@defai.digital/cli 13.4.3 → 13.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/bundled/agents/aerospace-scientist.json +114 -0
  2. package/bundled/agents/architecture.json +96 -0
  3. package/bundled/agents/backend.json +125 -0
  4. package/bundled/agents/blockchain-developer.json +114 -0
  5. package/bundled/agents/ceo.json +113 -0
  6. package/bundled/agents/creative-marketer.json +114 -0
  7. package/bundled/agents/cto.json +96 -0
  8. package/bundled/agents/data-scientist.json +96 -0
  9. package/bundled/agents/devops.json +98 -0
  10. package/bundled/agents/frontend.json +118 -0
  11. package/bundled/agents/fullstack.json +99 -0
  12. package/bundled/agents/ml-engineer.json +114 -0
  13. package/bundled/agents/mlops-engineer.json +102 -0
  14. package/bundled/agents/mobile.json +96 -0
  15. package/bundled/agents/product.json +96 -0
  16. package/bundled/agents/quality.json +95 -0
  17. package/bundled/agents/quantum-engineer.json +114 -0
  18. package/bundled/agents/researcher.json +123 -0
  19. package/bundled/agents/reviewer.json +107 -0
  20. package/bundled/agents/security.json +79 -0
  21. package/bundled/agents/standard.json +82 -0
  22. package/bundled/agents/writer.json +78 -0
  23. package/bundled/templates/monorepo/contract-index.ts.hbs +7 -0
  24. package/bundled/templates/monorepo/contract-test.ts.hbs +130 -0
  25. package/bundled/templates/monorepo/contracts-package.json.hbs +29 -0
  26. package/bundled/templates/monorepo/domain-index.ts.hbs +115 -0
  27. package/bundled/templates/monorepo/domain-package.json.hbs +27 -0
  28. package/bundled/templates/monorepo/gitignore.hbs +32 -0
  29. package/bundled/templates/monorepo/invariants.md.hbs +43 -0
  30. package/bundled/templates/monorepo/package.json.hbs +28 -0
  31. package/bundled/templates/monorepo/pnpm-workspace.yaml.hbs +5 -0
  32. package/bundled/templates/monorepo/schema.ts.hbs +82 -0
  33. package/bundled/templates/monorepo/template.json +106 -0
  34. package/bundled/templates/monorepo/tsconfig.json.hbs +22 -0
  35. package/bundled/templates/standalone/contract-index.ts.hbs +5 -0
  36. package/bundled/templates/standalone/contract-test.ts.hbs +95 -0
  37. package/bundled/templates/standalone/contracts-root-index.ts.hbs +7 -0
  38. package/bundled/templates/standalone/domain-index.ts.hbs +6 -0
  39. package/bundled/templates/standalone/domain-repository.ts.hbs +44 -0
  40. package/bundled/templates/standalone/domain-service.ts.hbs +102 -0
  41. package/bundled/templates/standalone/gitignore.hbs +27 -0
  42. package/bundled/templates/standalone/invariants.md.hbs +35 -0
  43. package/bundled/templates/standalone/package.json.hbs +41 -0
  44. package/bundled/templates/standalone/schema.ts.hbs +61 -0
  45. package/bundled/templates/standalone/src-index.ts.hbs +11 -0
  46. package/bundled/templates/standalone/template.json +91 -0
  47. package/bundled/templates/standalone/tsconfig.json.hbs +20 -0
  48. package/bundled/templates/standalone/vitest.config.ts.hbs +8 -0
  49. package/bundled/workflows/adversarial-debate.yaml +222 -0
  50. package/bundled/workflows/analyst.yaml +115 -0
  51. package/bundled/workflows/assistant.yaml +74 -0
  52. package/bundled/workflows/code-review-discussion.yaml +166 -0
  53. package/bundled/workflows/code-reviewer.yaml +94 -0
  54. package/bundled/workflows/contract-first-project.yaml +356 -0
  55. package/bundled/workflows/debugger.yaml +107 -0
  56. package/bundled/workflows/designer.yaml +113 -0
  57. package/bundled/workflows/developer.yaml +105 -0
  58. package/bundled/workflows/discuss-step-examples.yaml +153 -0
  59. package/bundled/workflows/infrastructure-automation.yaml +283 -0
  60. package/bundled/workflows/ml-ab-testing.yaml +311 -0
  61. package/bundled/workflows/ml-experiment-tracker.yaml +150 -0
  62. package/bundled/workflows/ml-feature-engineering.yaml +242 -0
  63. package/bundled/workflows/ml-model-evaluation.yaml +234 -0
  64. package/bundled/workflows/ml-model-monitoring.yaml +227 -0
  65. package/bundled/workflows/ml-model-registry.yaml +232 -0
  66. package/bundled/workflows/mlops-deployment.yaml +267 -0
  67. package/bundled/workflows/mobile-development.yaml +312 -0
  68. package/bundled/workflows/multi-model-discussion.yaml +243 -0
  69. package/bundled/workflows/product-discovery.yaml +295 -0
  70. package/bundled/workflows/qa-specialist.yaml +116 -0
  71. package/bundled/workflows/refactoring.yaml +105 -0
  72. package/bundled/workflows/security-audit.yaml +135 -0
  73. package/bundled/workflows/std/analysis.yaml +190 -0
  74. package/bundled/workflows/std/code-review.yaml +117 -0
  75. package/bundled/workflows/std/debugging.yaml +155 -0
  76. package/bundled/workflows/std/documentation.yaml +180 -0
  77. package/bundled/workflows/std/implementation.yaml +197 -0
  78. package/bundled/workflows/std/refactoring.yaml +180 -0
  79. package/bundled/workflows/std/testing.yaml +200 -0
  80. package/bundled/workflows/strategic-planning.yaml +235 -0
  81. package/bundled/workflows/technology-research.yaml +239 -0
  82. package/dist/commands/agent.d.ts.map +1 -1
  83. package/dist/commands/agent.js +8 -2
  84. package/dist/commands/agent.js.map +1 -1
  85. package/dist/commands/scaffold.d.ts.map +1 -1
  86. package/dist/commands/scaffold.js +6 -3
  87. package/dist/commands/scaffold.js.map +1 -1
  88. package/dist/web/api.d.ts.map +1 -1
  89. package/dist/web/api.js +13 -6
  90. package/dist/web/api.js.map +1 -1
  91. package/package.json +23 -22
@@ -0,0 +1,180 @@
1
+ workflowId: std/documentation
2
+ version: "1.0.0"
3
+ name: Standard Documentation
4
+ description: |
5
+ Documentation workflow for creating clear, useful documentation.
6
+ Covers technical docs, API docs, and user guides.
7
+
8
+ metadata:
9
+ category: documentation
10
+ tags:
11
+ - documentation
12
+ - writing
13
+ - technical-writing
14
+ estimatedDuration: 90000
15
+
16
+ steps:
17
+ - stepId: analyze
18
+ name: Analyze Documentation Needs
19
+ type: prompt
20
+ config:
21
+ prompt: |
22
+ You are creating documentation. First, understand what needs to be documented.
23
+
24
+ ## Subject
25
+ ${input.targetPath}
26
+
27
+ ## Audience
28
+ ${input.audience}
29
+
30
+ ## Documentation Type
31
+ ${input.docType}
32
+
33
+ ## Context
34
+ ${input.context}
35
+
36
+ Analyze:
37
+
38
+ 1. **Subject Matter**
39
+ - What is being documented?
40
+ - Key concepts to explain
41
+ - Complexity level
42
+
43
+ 2. **Audience Analysis**
44
+ - Who will read this?
45
+ - What do they already know?
46
+ - What do they need to accomplish?
47
+
48
+ 3. **Documentation Scope**
49
+ - What to include
50
+ - What to exclude
51
+ - Related documentation to reference
52
+
53
+ 4. **Existing Documentation**
54
+ - What already exists?
55
+ - What needs updating?
56
+ - Gaps to fill
57
+
58
+ 5. **Format Requirements**
59
+ - Markdown/HTML/other
60
+ - Code examples needed
61
+ - Diagrams/visuals needed
62
+ timeoutMs: 45000
63
+
64
+ - stepId: outline
65
+ name: Create Outline
66
+ type: prompt
67
+ dependencies:
68
+ - analyze
69
+ config:
70
+ prompt: |
71
+ Based on your analysis:
72
+ ${previousOutputs.analyze}
73
+
74
+ Create a documentation outline:
75
+
76
+ ## Document Structure
77
+
78
+ ### Title
79
+ Clear, descriptive title for the documentation.
80
+
81
+ ### Overview
82
+ - Purpose (1-2 sentences)
83
+ - Who this is for
84
+ - Prerequisites
85
+
86
+ ### Main Sections
87
+ 1. **[Section 1 Title]**
88
+ - Key points to cover
89
+ - Examples needed
90
+ - Estimated length
91
+
92
+ 2. **[Section 2 Title]**
93
+ - Key points to cover
94
+ - Examples needed
95
+ - Estimated length
96
+
97
+ (Continue for all sections...)
98
+
99
+ ### Code Examples
100
+ List code examples to include:
101
+ - Example 1: [Description]
102
+ - Example 2: [Description]
103
+
104
+ ### Diagrams/Visuals
105
+ - Diagram 1: [What it shows]
106
+ - Screenshot: [What to capture]
107
+
108
+ ### Cross-References
109
+ - Related docs to link
110
+ - External resources
111
+
112
+ ### FAQ/Troubleshooting
113
+ Common questions or issues to address.
114
+ timeoutMs: 45000
115
+
116
+ - stepId: write
117
+ name: Write Documentation
118
+ type: prompt
119
+ dependencies:
120
+ - outline
121
+ config:
122
+ prompt: |
123
+ Based on your outline:
124
+ ${previousOutputs.outline}
125
+
126
+ Write the complete documentation:
127
+
128
+ Follow these guidelines:
129
+ - Use clear, concise language
130
+ - Include practical examples
131
+ - Use proper formatting (headings, lists, code blocks)
132
+ - Anticipate reader questions
133
+ - Provide context before details
134
+
135
+ Write the full documentation content following the outline structure.
136
+ Include all code examples, explanations, and cross-references.
137
+
138
+ Make sure to:
139
+ - Start with the most important information
140
+ - Use consistent terminology
141
+ - Include copy-paste ready code
142
+ - Explain the "why" not just the "what"
143
+ timeoutMs: 90000
144
+
145
+ - stepId: summary
146
+ name: Create Summary
147
+ type: prompt
148
+ dependencies:
149
+ - write
150
+ config:
151
+ prompt: |
152
+ Provide a summary of the documentation created:
153
+ ${previousOutputs.write}
154
+
155
+ ## Documentation Summary
156
+ - Document title
157
+ - Target audience
158
+ - Main topics covered
159
+
160
+ ## Sections Created
161
+ 1. [Section name] - [brief description]
162
+ 2. [Section name] - [brief description]
163
+
164
+ ## Code Examples Included
165
+ - Example 1: [description]
166
+ - Example 2: [description]
167
+
168
+ ## Suggested File Location
169
+ Where this documentation should be saved.
170
+
171
+ ## Related Documentation
172
+ - Links to add from other docs
173
+ - Links to add to other docs
174
+
175
+ ## Review Checklist
176
+ - [ ] Technical accuracy
177
+ - [ ] Code examples tested
178
+ - [ ] Links verified
179
+ - [ ] Spelling/grammar checked
180
+ timeoutMs: 30000
@@ -0,0 +1,197 @@
1
+ workflowId: std/implementation
2
+ version: "1.0.0"
3
+ name: Standard Implementation
4
+ description: |
5
+ Structured workflow for implementing new features or functionality.
6
+ Covers requirements analysis, design, implementation, and testing.
7
+
8
+ metadata:
9
+ category: implementation
10
+ tags:
11
+ - implementation
12
+ - feature
13
+ - development
14
+ estimatedDuration: 180000
15
+
16
+ steps:
17
+ - stepId: analyze
18
+ name: Analyze Requirements
19
+ type: prompt
20
+ config:
21
+ prompt: |
22
+ You are implementing a new feature. First, analyze the requirements thoroughly.
23
+
24
+ ## Feature Specification
25
+ ${input.spec}
26
+
27
+ ## Acceptance Criteria
28
+ ${input.acceptanceCriteria}
29
+
30
+ ## Context
31
+ ${input.context}
32
+
33
+ Analyze and clarify:
34
+
35
+ 1. **Functional Requirements**
36
+ - What must the feature do?
37
+ - User stories or use cases
38
+ - Input/output expectations
39
+
40
+ 2. **Non-Functional Requirements**
41
+ - Performance expectations
42
+ - Security considerations
43
+ - Scalability needs
44
+ - Accessibility requirements
45
+
46
+ 3. **Constraints**
47
+ - Technical constraints
48
+ - Time/resource constraints
49
+ - Dependencies on other features
50
+
51
+ 4. **Open Questions**
52
+ - Ambiguities in requirements
53
+ - Decisions needed
54
+ - Assumptions being made
55
+
56
+ 5. **Out of Scope**
57
+ - What this feature explicitly does NOT include
58
+ - Future enhancements to consider later
59
+ timeoutMs: 60000
60
+
61
+ - stepId: design
62
+ name: Design Solution
63
+ type: prompt
64
+ dependencies:
65
+ - analyze
66
+ config:
67
+ prompt: |
68
+ Based on your requirements analysis:
69
+ ${previousOutputs.analyze}
70
+
71
+ Design the implementation:
72
+
73
+ ## Architecture Overview
74
+ High-level description of how the feature fits into the system.
75
+
76
+ ## Component Design
77
+
78
+ ### New Components
79
+ For each new component/module:
80
+ - Name and purpose
81
+ - Responsibilities
82
+ - Public interface
83
+ - Dependencies
84
+
85
+ ### Modified Components
86
+ For each existing component to modify:
87
+ - What changes needed
88
+ - Why these changes
89
+ - Impact on existing functionality
90
+
91
+ ## Data Model
92
+ - New data structures/schemas
93
+ - Database changes (if any)
94
+ - Data flow description
95
+
96
+ ## API Design (if applicable)
97
+ - Endpoints/methods
98
+ - Request/response formats
99
+ - Error handling
100
+
101
+ ## Integration Points
102
+ - How this connects to existing code
103
+ - External service integrations
104
+ - Event/message flows
105
+
106
+ ## Design Decisions
107
+ Key decisions made and alternatives considered.
108
+ timeoutMs: 90000
109
+
110
+ - stepId: implement
111
+ name: Implementation Plan
112
+ type: prompt
113
+ dependencies:
114
+ - design
115
+ config:
116
+ prompt: |
117
+ Based on your design:
118
+ ${previousOutputs.design}
119
+
120
+ Create an implementation plan:
121
+
122
+ ## Implementation Steps
123
+ Break down into small, mergeable increments:
124
+
125
+ ### Phase 1: Foundation
126
+ - Step 1.1: [Description]
127
+ - Step 1.2: [Description]
128
+
129
+ ### Phase 2: Core Logic
130
+ - Step 2.1: [Description]
131
+ - Step 2.2: [Description]
132
+
133
+ ### Phase 3: Integration
134
+ - Step 3.1: [Description]
135
+ - Step 3.2: [Description]
136
+
137
+ ## Code Structure
138
+ - Files to create
139
+ - Files to modify
140
+ - Suggested directory structure
141
+
142
+ ## Testing Plan
143
+ - Unit tests to write
144
+ - Integration tests needed
145
+ - Manual testing scenarios
146
+
147
+ ## Dependencies
148
+ - External packages needed
149
+ - Internal dependencies
150
+ - Order of implementation
151
+
152
+ ## Risk Mitigation
153
+ - Potential issues and how to address them
154
+ - Feature flags if needed
155
+ - Rollback strategy
156
+ timeoutMs: 60000
157
+
158
+ - stepId: summary
159
+ name: Create Summary
160
+ type: prompt
161
+ dependencies:
162
+ - implement
163
+ config:
164
+ prompt: |
165
+ Summarize the implementation plan:
166
+ ${previousOutputs.implement}
167
+
168
+ ## Feature Summary
169
+ One paragraph describing the feature and approach.
170
+
171
+ ## Deliverables
172
+ - [ ] Component 1
173
+ - [ ] Component 2
174
+ - [ ] Tests
175
+ - [ ] Documentation
176
+
177
+ ## Files to Create/Modify
178
+ List of files with brief description of changes.
179
+
180
+ ## Dependencies
181
+ - External packages: [list]
182
+ - Internal modules: [list]
183
+
184
+ ## Testing Checklist
185
+ - [ ] Unit tests for [component]
186
+ - [ ] Integration test for [flow]
187
+ - [ ] Manual testing of [scenario]
188
+
189
+ ## Definition of Done
190
+ - [ ] All acceptance criteria met
191
+ - [ ] Tests passing
192
+ - [ ] Code reviewed
193
+ - [ ] Documentation updated
194
+
195
+ ## Estimated Effort
196
+ Simple/Medium/Complex and brief justification.
197
+ timeoutMs: 30000
@@ -0,0 +1,180 @@
1
+ workflowId: std/refactoring
2
+ version: "1.0.0"
3
+ name: Standard Refactoring
4
+ description: |
5
+ Systematic refactoring workflow for improving code structure.
6
+ Focuses on maintainability, readability, and design improvements.
7
+
8
+ metadata:
9
+ category: refactoring
10
+ tags:
11
+ - refactoring
12
+ - clean-code
13
+ - maintenance
14
+ estimatedDuration: 150000
15
+
16
+ steps:
17
+ - stepId: assess
18
+ name: Assess Current State
19
+ type: prompt
20
+ config:
21
+ prompt: |
22
+ You are planning a refactoring effort. First, assess the current state of the code.
23
+
24
+ ## Target Code/Area
25
+ ${input.targetPath}
26
+
27
+ ## Refactoring Goals
28
+ ${input.goals}
29
+
30
+ ## Context
31
+ ${input.context}
32
+
33
+ Analyze and document:
34
+
35
+ 1. **Current Code Structure**
36
+ - How is the code organized?
37
+ - What patterns/abstractions are used?
38
+ - What are the main components/modules?
39
+
40
+ 2. **Code Smells Identified**
41
+ - Duplication
42
+ - Long methods/classes
43
+ - Poor naming
44
+ - Tight coupling
45
+ - Missing abstractions
46
+ - Other issues
47
+
48
+ 3. **Dependencies**
49
+ - What does this code depend on?
50
+ - What depends on this code?
51
+ - External integrations
52
+
53
+ 4. **Test Coverage**
54
+ - Are there existing tests?
55
+ - What's the coverage level?
56
+ - Are tests reliable?
57
+
58
+ 5. **Risk Assessment**
59
+ - How critical is this code?
60
+ - What could break?
61
+ - How easy to rollback?
62
+ timeoutMs: 60000
63
+
64
+ - stepId: plan
65
+ name: Create Refactoring Plan
66
+ type: prompt
67
+ dependencies:
68
+ - assess
69
+ config:
70
+ prompt: |
71
+ Based on your assessment:
72
+ ${previousOutputs.assess}
73
+
74
+ Create a detailed refactoring plan:
75
+
76
+ ## Refactoring Strategy
77
+ Overall approach and guiding principles for this refactoring.
78
+
79
+ ## Changes in Priority Order
80
+ List each change as a discrete, safe step:
81
+
82
+ ### Step 1: [Name]
83
+ - What: Specific change to make
84
+ - Why: Benefit of this change
85
+ - How: Brief implementation approach
86
+ - Risk: Low/Medium/High
87
+ - Tests: Tests to add/update
88
+
89
+ ### Step 2: [Name]
90
+ (Continue for each step...)
91
+
92
+ ## Suggested Order
93
+ Why this order? (dependencies, risk mitigation, etc.)
94
+
95
+ ## What NOT to Change
96
+ Areas to leave alone and why.
97
+
98
+ ## Success Criteria
99
+ How do we know the refactoring is successful?
100
+ - Metrics to track
101
+ - Quality gates
102
+ timeoutMs: 90000
103
+
104
+ - stepId: implement
105
+ name: Implementation Guidance
106
+ type: prompt
107
+ dependencies:
108
+ - plan
109
+ config:
110
+ prompt: |
111
+ Based on your refactoring plan:
112
+ ${previousOutputs.plan}
113
+
114
+ Provide specific implementation guidance:
115
+
116
+ ## Code Changes
117
+
118
+ For each step in the plan, provide:
119
+
120
+ ### [Step Name]
121
+
122
+ **Before (Current Code Pattern):**
123
+ Show the problematic pattern to change.
124
+
125
+ **After (Refactored Pattern):**
126
+ Show the improved pattern to implement.
127
+
128
+ **Key Points:**
129
+ - Specific things to watch for
130
+ - Common mistakes to avoid
131
+ - Edge cases to handle
132
+
133
+ ## Testing Strategy
134
+ - Tests to write BEFORE refactoring (safety net)
135
+ - Tests to add AFTER refactoring
136
+ - How to verify behavior unchanged
137
+
138
+ ## Rollback Plan
139
+ If something goes wrong:
140
+ - How to detect problems
141
+ - How to revert safely
142
+ - Data migration considerations (if any)
143
+ timeoutMs: 60000
144
+
145
+ - stepId: summary
146
+ name: Create Summary
147
+ type: prompt
148
+ dependencies:
149
+ - implement
150
+ config:
151
+ prompt: |
152
+ Summarize the refactoring plan:
153
+ ${previousOutputs.implement}
154
+
155
+ ## Refactoring Summary
156
+ One paragraph describing what this refactoring achieves.
157
+
158
+ ## Scope
159
+ - Files to modify: [list]
160
+ - Estimated changes: [lines/functions/classes]
161
+
162
+ ## Key Improvements
163
+ 1. [Improvement 1]
164
+ 2. [Improvement 2]
165
+ 3. [Improvement 3]
166
+
167
+ ## Prerequisites
168
+ - [ ] Existing tests pass
169
+ - [ ] Code reviewed
170
+ - [ ] Other prerequisites
171
+
172
+ ## Checklist
173
+ - [ ] Step 1: [name]
174
+ - [ ] Step 2: [name]
175
+ - [ ] All tests pass
176
+ - [ ] Code review complete
177
+
178
+ ## Estimated Effort
179
+ Simple/Medium/Complex and brief justification.
180
+ timeoutMs: 30000