@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,105 @@
1
+ workflowId: refactoring
2
+ version: "1.0.0"
3
+ name: Code Refactoring Workflow
4
+ description: Systematic code refactoring with safety checks
5
+
6
+ steps:
7
+ - stepId: scan-opportunities
8
+ type: tool
9
+ name: Scan for Refactoring Opportunities
10
+ timeout: 120000
11
+ config:
12
+ tool: refactor_scan
13
+ args:
14
+ types:
15
+ - extract-function
16
+ - extract-variable
17
+ - simplify-conditional
18
+ - remove-duplication
19
+ - improve-types
20
+ - modernize-syntax
21
+ minConfidence: 0.7
22
+
23
+ - stepId: prioritize-refactoring
24
+ type: prompt
25
+ name: Prioritize Refactoring Tasks
26
+ timeout: 60000
27
+ config:
28
+ agentId: architecture
29
+ prompt: |
30
+ Prioritize refactoring opportunities:
31
+ 1. Impact on maintainability
32
+ 2. Risk level (breaking changes)
33
+ 3. Effort required
34
+ 4. Dependencies affected
35
+
36
+ - stepId: create-safety-net
37
+ type: tool
38
+ name: Ensure Test Coverage
39
+ timeout: 120000
40
+ config:
41
+ tool: guard_check
42
+ args:
43
+ policyId: test-coverage
44
+ threshold: 80
45
+ scope: affected-files
46
+
47
+ - stepId: apply-refactoring
48
+ type: tool
49
+ name: Apply Refactoring
50
+ timeout: 180000
51
+ retryPolicy:
52
+ maxAttempts: 1
53
+ backoffMs: 1000
54
+ config:
55
+ tool: refactor_apply
56
+ args:
57
+ dryRun: false
58
+ createBackup: true
59
+ runTests: true
60
+
61
+ - stepId: verify-behavior
62
+ type: tool
63
+ name: Verify Behavior Unchanged
64
+ timeout: 120000
65
+ config:
66
+ tool: guard_check
67
+ args:
68
+ policyId: test-pass
69
+ compareBaseline: true
70
+
71
+ - stepId: review-changes
72
+ type: prompt
73
+ name: Review Refactored Code
74
+ timeout: 60000
75
+ config:
76
+ agentId: quality
77
+ prompt: |
78
+ Review refactored code:
79
+ 1. Verify readability improved
80
+ 2. Check for new issues
81
+ 3. Validate patterns applied correctly
82
+ 4. Ensure documentation updated
83
+
84
+ - stepId: update-documentation
85
+ type: prompt
86
+ name: Update Documentation
87
+ timeout: 30000
88
+ config:
89
+ agentId: writer
90
+ prompt: |
91
+ Update affected documentation:
92
+ 1. API changes
93
+ 2. Architecture changes
94
+ 3. Migration notes if needed
95
+
96
+ metadata:
97
+ category: maintenance
98
+ tags:
99
+ - refactoring
100
+ - code-quality
101
+ - maintenance
102
+ requiredAbilities:
103
+ - clean-code
104
+ - design-patterns
105
+ - testing-strategy
@@ -0,0 +1,135 @@
1
+ workflowId: security-audit
2
+ version: "1.0.0"
3
+ name: Security Audit Workflow
4
+ description: Comprehensive security audit and vulnerability assessment
5
+
6
+ steps:
7
+ - stepId: define-scope
8
+ type: prompt
9
+ name: Define Audit Scope
10
+ timeout: 30000
11
+ config:
12
+ agentId: security
13
+ prompt: |
14
+ Define security audit scope:
15
+ 1. Systems and components to audit
16
+ 2. Compliance requirements
17
+ 3. Previous audit findings
18
+ 4. Known vulnerabilities to check
19
+
20
+ - stepId: dependency-scan
21
+ type: tool
22
+ name: Scan Dependencies
23
+ timeout: 120000
24
+ config:
25
+ tool: bugfix_scan
26
+ args:
27
+ categories:
28
+ - security
29
+ paths:
30
+ - package.json
31
+ - pnpm-lock.yaml
32
+
33
+ - stepId: code-security-scan
34
+ type: tool
35
+ name: Static Security Analysis
36
+ timeout: 180000
37
+ config:
38
+ tool: bugfix_scan
39
+ args:
40
+ categories:
41
+ - security
42
+ - injection
43
+ - authentication
44
+ minSeverity: low
45
+ useAst: true
46
+
47
+ - stepId: authentication-review
48
+ type: prompt
49
+ name: Review Authentication
50
+ timeout: 90000
51
+ config:
52
+ agentId: security
53
+ prompt: |
54
+ Review authentication mechanisms:
55
+ 1. Password policies and storage
56
+ 2. Session management
57
+ 3. Token handling
58
+ 4. MFA implementation
59
+ 5. OAuth/OIDC configuration
60
+
61
+ - stepId: authorization-review
62
+ type: prompt
63
+ name: Review Authorization
64
+ timeout: 90000
65
+ config:
66
+ agentId: security
67
+ prompt: |
68
+ Review authorization mechanisms:
69
+ 1. Role-based access control
70
+ 2. Permission enforcement
71
+ 3. Resource ownership checks
72
+ 4. API endpoint protection
73
+
74
+ - stepId: data-protection-review
75
+ type: prompt
76
+ name: Review Data Protection
77
+ timeout: 90000
78
+ config:
79
+ agentId: security
80
+ prompt: |
81
+ Review data protection:
82
+ 1. Encryption at rest
83
+ 2. Encryption in transit
84
+ 3. PII handling
85
+ 4. Data retention policies
86
+ 5. Backup security
87
+
88
+ - stepId: infrastructure-review
89
+ type: prompt
90
+ name: Review Infrastructure Security
91
+ timeout: 90000
92
+ config:
93
+ agentId: devops
94
+ prompt: |
95
+ Review infrastructure security:
96
+ 1. Network segmentation
97
+ 2. Firewall rules
98
+ 3. Container security
99
+ 4. Secret management
100
+ 5. Logging and monitoring
101
+
102
+ - stepId: generate-report
103
+ type: prompt
104
+ name: Generate Security Report
105
+ timeout: 120000
106
+ config:
107
+ agentId: security
108
+ prompt: |
109
+ Generate security audit report:
110
+ 1. Executive summary
111
+ 2. Findings by severity
112
+ 3. Risk assessment
113
+ 4. Remediation recommendations
114
+ 5. Compliance status
115
+
116
+ - stepId: create-remediation-tasks
117
+ type: tool
118
+ name: Create Remediation Tasks
119
+ timeout: 30000
120
+ config:
121
+ tool: task_create
122
+ args:
123
+ type: security-remediation
124
+ priority: severity-based
125
+
126
+ metadata:
127
+ category: security
128
+ tags:
129
+ - security
130
+ - audit
131
+ - compliance
132
+ requiredAbilities:
133
+ - security
134
+ - infrastructure
135
+ - compliance
@@ -0,0 +1,190 @@
1
+ workflowId: std/analysis
2
+ version: "1.0.0"
3
+ name: Standard Analysis
4
+ description: |
5
+ General analysis workflow for investigating code, systems, or problems.
6
+ Provides structured approach to understanding and documenting findings.
7
+
8
+ metadata:
9
+ category: analysis
10
+ tags:
11
+ - analysis
12
+ - investigation
13
+ - research
14
+ estimatedDuration: 90000
15
+
16
+ steps:
17
+ - stepId: gather
18
+ name: Gather Information
19
+ type: prompt
20
+ config:
21
+ prompt: |
22
+ You are conducting an analysis. First, gather and organize relevant information.
23
+
24
+ ## Analysis Subject
25
+ ${input.subject}
26
+
27
+ ## Analysis Goals
28
+ ${input.goals}
29
+
30
+ ## Context
31
+ ${input.context}
32
+
33
+ Gather information on:
34
+
35
+ 1. **Subject Overview**
36
+ - What are we analyzing?
37
+ - Scope and boundaries
38
+ - Key components/aspects
39
+
40
+ 2. **Current State**
41
+ - How does it work now?
42
+ - Key characteristics
43
+ - Known issues or concerns
44
+
45
+ 3. **Historical Context**
46
+ - How did we get here?
47
+ - Previous decisions
48
+ - Evolution over time
49
+
50
+ 4. **Stakeholders**
51
+ - Who is affected?
52
+ - Who cares about this?
53
+ - Different perspectives
54
+
55
+ 5. **Constraints**
56
+ - Technical limitations
57
+ - Business constraints
58
+ - Resource limitations
59
+
60
+ 6. **Success Criteria**
61
+ - What makes this analysis successful?
62
+ - Decisions to be made
63
+ - Actions to be taken
64
+ timeoutMs: 45000
65
+
66
+ - stepId: analyze
67
+ name: Deep Analysis
68
+ type: prompt
69
+ dependencies:
70
+ - gather
71
+ config:
72
+ prompt: |
73
+ Based on gathered information:
74
+ ${previousOutputs.gather}
75
+
76
+ Conduct deep analysis:
77
+
78
+ ## Findings
79
+
80
+ ### Strengths
81
+ What's working well?
82
+ - Strength 1: [Description and evidence]
83
+ - Strength 2: [Description and evidence]
84
+
85
+ ### Weaknesses
86
+ What's not working or could be better?
87
+ - Weakness 1: [Description, impact, evidence]
88
+ - Weakness 2: [Description, impact, evidence]
89
+
90
+ ### Opportunities
91
+ What could be improved or leveraged?
92
+ - Opportunity 1: [Description and potential value]
93
+ - Opportunity 2: [Description and potential value]
94
+
95
+ ### Risks/Threats
96
+ What could go wrong?
97
+ - Risk 1: [Description, likelihood, impact]
98
+ - Risk 2: [Description, likelihood, impact]
99
+
100
+ ## Patterns Observed
101
+ - Pattern 1: [Description]
102
+ - Pattern 2: [Description]
103
+
104
+ ## Comparisons
105
+ How does this compare to alternatives or best practices?
106
+
107
+ ## Root Causes
108
+ For identified issues, what are the underlying causes?
109
+ timeoutMs: 60000
110
+
111
+ - stepId: recommend
112
+ name: Recommendations
113
+ type: prompt
114
+ dependencies:
115
+ - analyze
116
+ config:
117
+ prompt: |
118
+ Based on your analysis:
119
+ ${previousOutputs.analyze}
120
+
121
+ Provide recommendations:
122
+
123
+ ## Key Insights
124
+ Most important takeaways from the analysis:
125
+ 1. [Insight 1]
126
+ 2. [Insight 2]
127
+ 3. [Insight 3]
128
+
129
+ ## Recommendations
130
+
131
+ ### High Priority
132
+ Actions that should be taken soon:
133
+ - **Recommendation 1**
134
+ - What: [Action]
135
+ - Why: [Justification]
136
+ - How: [Approach]
137
+ - Effort: [Estimate]
138
+
139
+ ### Medium Priority
140
+ Actions to plan for:
141
+ - **Recommendation 2**
142
+ - What, Why, How, Effort
143
+
144
+ ### Low Priority / Future Consideration
145
+ Ideas for later:
146
+ - **Recommendation 3**
147
+ - What, Why, How, Effort
148
+
149
+ ## Trade-offs
150
+ Key trade-offs to consider in decision-making.
151
+
152
+ ## Next Steps
153
+ Immediate actions to take based on this analysis.
154
+ timeoutMs: 45000
155
+
156
+ - stepId: summary
157
+ name: Create Summary
158
+ type: prompt
159
+ dependencies:
160
+ - recommend
161
+ config:
162
+ prompt: |
163
+ Summarize the analysis:
164
+ ${previousOutputs.recommend}
165
+
166
+ ## Executive Summary
167
+ 2-3 paragraph summary of the analysis and key findings.
168
+
169
+ ## Key Findings
170
+ 1. [Finding 1]
171
+ 2. [Finding 2]
172
+ 3. [Finding 3]
173
+
174
+ ## Recommendations Summary
175
+ | Priority | Recommendation | Effort | Impact |
176
+ |----------|---------------|--------|--------|
177
+ | High | [Rec 1] | Low/Med/High | Low/Med/High |
178
+ | Medium | [Rec 2] | ... | ... |
179
+ | Low | [Rec 3] | ... | ... |
180
+
181
+ ## Decision Points
182
+ Decisions that need to be made based on this analysis.
183
+
184
+ ## Action Items
185
+ - [ ] [Action 1] - [Owner] - [Due]
186
+ - [ ] [Action 2] - [Owner] - [Due]
187
+
188
+ ## Follow-up
189
+ When/how to revisit this analysis.
190
+ timeoutMs: 30000
@@ -0,0 +1,117 @@
1
+ workflowId: std/code-review
2
+ version: "1.0.0"
3
+ name: Standard Code Review
4
+ description: |
5
+ Multi-step code review workflow with analysis and recommendations.
6
+ Analyzes code changes for quality, bugs, security, and performance.
7
+
8
+ metadata:
9
+ category: review
10
+ tags:
11
+ - code-review
12
+ - quality
13
+ - security
14
+ estimatedDuration: 120000
15
+
16
+ steps:
17
+ - stepId: analyze
18
+ name: Analyze Changes
19
+ type: prompt
20
+ config:
21
+ prompt: |
22
+ You are conducting a thorough code review. Analyze the code for:
23
+
24
+ 1. **Code Quality**
25
+ - Adherence to best practices and coding standards
26
+ - Code organization and structure
27
+ - Naming conventions and readability
28
+ - DRY principles and code reuse
29
+
30
+ 2. **Potential Bugs**
31
+ - Logic errors and edge cases
32
+ - Null/undefined handling
33
+ - Error handling completeness
34
+ - Race conditions or concurrency issues
35
+
36
+ 3. **Security Considerations**
37
+ - Input validation
38
+ - Authentication/authorization
39
+ - Data sanitization
40
+ - Sensitive data exposure
41
+
42
+ 4. **Performance**
43
+ - Algorithm efficiency
44
+ - Memory usage
45
+ - Database query optimization
46
+ - Caching opportunities
47
+
48
+ Context and code to review:
49
+ ${input.context}
50
+
51
+ Focus areas (if specified): ${input.scope}
52
+
53
+ Provide a detailed analysis organized by category.
54
+ timeoutMs: 120000
55
+
56
+ - stepId: findings
57
+ name: Generate Findings
58
+ type: prompt
59
+ dependencies:
60
+ - analyze
61
+ config:
62
+ prompt: |
63
+ Based on your code analysis:
64
+ ${previousOutputs.analyze}
65
+
66
+ Generate structured, actionable findings organized by priority:
67
+
68
+ ## Critical Issues (Must Fix)
69
+ Issues that would cause bugs, security vulnerabilities, or data loss.
70
+ Each issue should include:
71
+ - Description of the problem
72
+ - Location in code (if known)
73
+ - Recommended fix
74
+ - Why it's critical
75
+
76
+ ## Recommendations (Should Consider)
77
+ Issues that affect maintainability, performance, or code quality.
78
+ Each recommendation should include:
79
+ - Description
80
+ - Impact if not addressed
81
+ - Suggested improvement
82
+
83
+ ## Suggestions (Nice to Have)
84
+ Minor improvements or style suggestions.
85
+ Each suggestion should include:
86
+ - Description
87
+ - Benefit
88
+
89
+ Format each item as an actionable task the author can address.
90
+ timeoutMs: 60000
91
+
92
+ - stepId: summary
93
+ name: Create Summary
94
+ type: prompt
95
+ dependencies:
96
+ - findings
97
+ config:
98
+ prompt: |
99
+ Create a concise review summary based on your findings:
100
+ ${previousOutputs.findings}
101
+
102
+ Include:
103
+
104
+ ## Overall Assessment
105
+ Choose one: APPROVE / REQUEST_CHANGES / NEEDS_DISCUSSION
106
+ Brief justification for the assessment.
107
+
108
+ ## Key Points for the Author
109
+ - Most important items to address (max 3-5 bullet points)
110
+ - What was done well (if applicable)
111
+
112
+ ## Suggested Next Steps
113
+ - Prioritized list of actions
114
+ - Any follow-up discussions needed
115
+
116
+ Keep the summary concise but informative.
117
+ timeoutMs: 30000
@@ -0,0 +1,155 @@
1
+ workflowId: std/debugging
2
+ version: "1.0.0"
3
+ name: Standard Debugging
4
+ description: |
5
+ Systematic debugging workflow for investigating and resolving issues.
6
+ Follows a structured approach: reproduce, analyze, hypothesize, fix, verify.
7
+
8
+ metadata:
9
+ category: debugging
10
+ tags:
11
+ - debugging
12
+ - bug-fix
13
+ - troubleshooting
14
+ estimatedDuration: 180000
15
+
16
+ steps:
17
+ - stepId: understand
18
+ name: Understand the Issue
19
+ type: prompt
20
+ config:
21
+ prompt: |
22
+ You are investigating a bug or issue. First, understand the problem thoroughly.
23
+
24
+ ## Issue Details
25
+ ${input.errorMessage}
26
+
27
+ ## Additional Context
28
+ ${input.context}
29
+
30
+ ## Stack Trace (if available)
31
+ ${input.stackTrace}
32
+
33
+ Analyze and answer:
34
+
35
+ 1. **What is the expected behavior?**
36
+ - What should happen under normal circumstances?
37
+
38
+ 2. **What is the actual behavior?**
39
+ - What is actually happening?
40
+ - Is the error consistent or intermittent?
41
+
42
+ 3. **When does it occur?**
43
+ - Specific conditions or triggers
44
+ - User actions that lead to the issue
45
+
46
+ 4. **What is the scope of impact?**
47
+ - Which features/users are affected?
48
+ - Is this blocking critical functionality?
49
+
50
+ 5. **Initial observations**
51
+ - Any patterns in the error message/stack trace
52
+ - Similar issues you've seen before
53
+ timeoutMs: 60000
54
+
55
+ - stepId: investigate
56
+ name: Root Cause Analysis
57
+ type: prompt
58
+ dependencies:
59
+ - understand
60
+ config:
61
+ prompt: |
62
+ Based on your understanding of the issue:
63
+ ${previousOutputs.understand}
64
+
65
+ Conduct a root cause analysis:
66
+
67
+ ## Hypotheses
68
+ List 2-4 potential root causes, ranked by likelihood:
69
+ 1. Most likely cause and reasoning
70
+ 2. Second most likely cause
71
+ 3. Other possibilities
72
+
73
+ ## Evidence Needed
74
+ For each hypothesis, what evidence would confirm or refute it?
75
+ - Code to examine
76
+ - Logs to check
77
+ - Tests to run
78
+ - Data to inspect
79
+
80
+ ## Investigation Plan
81
+ Step-by-step plan to identify the root cause:
82
+ 1. First thing to check
83
+ 2. What to do based on findings
84
+ 3. How to narrow down if initial checks inconclusive
85
+
86
+ ## Related Code Areas
87
+ List files/functions that are likely involved based on the error.
88
+ timeoutMs: 90000
89
+
90
+ - stepId: solution
91
+ name: Propose Solution
92
+ type: prompt
93
+ dependencies:
94
+ - investigate
95
+ config:
96
+ prompt: |
97
+ Based on your investigation:
98
+ ${previousOutputs.investigate}
99
+
100
+ Propose a solution:
101
+
102
+ ## Recommended Fix
103
+ - Description of the fix
104
+ - Why this addresses the root cause
105
+ - Code changes needed (be specific)
106
+
107
+ ## Alternative Approaches
108
+ If applicable, list other ways to fix this with pros/cons.
109
+
110
+ ## Testing Strategy
111
+ How to verify the fix works:
112
+ - Manual testing steps
113
+ - Unit/integration tests to add
114
+ - Edge cases to cover
115
+
116
+ ## Potential Side Effects
117
+ - What else might this change affect?
118
+ - Any regressions to watch for?
119
+
120
+ ## Prevention
121
+ How can we prevent similar issues in the future?
122
+ - Code patterns to adopt
123
+ - Tests to add
124
+ - Monitoring/alerting
125
+ timeoutMs: 60000
126
+
127
+ - stepId: summary
128
+ name: Create Summary
129
+ type: prompt
130
+ dependencies:
131
+ - solution
132
+ config:
133
+ prompt: |
134
+ Create a debugging summary based on your analysis:
135
+ ${previousOutputs.solution}
136
+
137
+ ## Bug Summary
138
+ One-sentence description of the bug.
139
+
140
+ ## Root Cause
141
+ Brief explanation of what caused the issue.
142
+
143
+ ## Fix
144
+ Concise description of the solution.
145
+
146
+ ## Files to Modify
147
+ List of files that need changes.
148
+
149
+ ## Next Steps
150
+ 1. Immediate action items
151
+ 2. Follow-up tasks
152
+
153
+ ## Estimated Effort
154
+ Simple/Medium/Complex and brief justification.
155
+ timeoutMs: 30000