maestro-flow 0.3.23 → 0.3.25
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.
- package/.claude/agents/cli-explore-agent.md +2 -2
- package/.claude/commands/learn-investigate.md +26 -0
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +32 -7
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
- package/dashboard/dist-server/src/agents/cli-agent-runner.d.ts +2 -0
- package/dashboard/dist-server/src/agents/cli-agent-runner.js +62 -4
- package/dashboard/dist-server/src/agents/cli-agent-runner.js.map +1 -1
- package/dashboard/dist-server/src/commands/delegate.d.ts +2 -0
- package/dashboard/dist-server/src/commands/delegate.js +1 -0
- package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
- package/dashboard/dist-server/src/config/cli-tools-config.d.ts +4 -0
- package/dashboard/dist-server/src/config/cli-tools-config.js +22 -0
- package/dashboard/dist-server/src/config/cli-tools-config.js.map +1 -1
- package/dashboard/dist-server/src/config/paths.d.ts +1 -0
- package/dashboard/dist-server/src/config/paths.js +1 -0
- package/dashboard/dist-server/src/config/paths.js.map +1 -1
- package/dashboard/dist-server/src/tools/spec-entry-parser.d.ts +55 -0
- package/dashboard/dist-server/src/tools/spec-entry-parser.js +222 -0
- package/dashboard/dist-server/src/tools/spec-entry-parser.js.map +1 -0
- package/dashboard/dist-server/src/tools/spec-loader.d.ts +51 -0
- package/dashboard/dist-server/src/tools/spec-loader.js +267 -0
- package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -0
- package/dist/src/agents/cli-agent-runner.d.ts +2 -0
- package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +62 -4
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/cli.js +2 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/config-ui/ConfigSourcesView.d.ts +6 -0
- package/dist/src/commands/config-ui/ConfigSourcesView.d.ts.map +1 -0
- package/dist/src/commands/config-ui/ConfigSourcesView.js +25 -0
- package/dist/src/commands/config-ui/ConfigSourcesView.js.map +1 -0
- package/dist/src/commands/config-ui/SkillConfigDashboard.d.ts +9 -0
- package/dist/src/commands/config-ui/SkillConfigDashboard.d.ts.map +1 -0
- package/dist/src/commands/config-ui/SkillConfigDashboard.js +64 -0
- package/dist/src/commands/config-ui/SkillConfigDashboard.js.map +1 -0
- package/dist/src/commands/config-ui/SkillParamEditor.d.ts +12 -0
- package/dist/src/commands/config-ui/SkillParamEditor.d.ts.map +1 -0
- package/dist/src/commands/config-ui/SkillParamEditor.js +162 -0
- package/dist/src/commands/config-ui/SkillParamEditor.js.map +1 -0
- package/dist/src/commands/config-ui/SkillsList.d.ts +12 -0
- package/dist/src/commands/config-ui/SkillsList.d.ts.map +1 -0
- package/dist/src/commands/config-ui/SkillsList.js +91 -0
- package/dist/src/commands/config-ui/SkillsList.js.map +1 -0
- package/dist/src/commands/config.d.ts +8 -0
- package/dist/src/commands/config.d.ts.map +1 -0
- package/dist/src/commands/config.js +172 -0
- package/dist/src/commands/config.js.map +1 -0
- package/dist/src/commands/delegate.d.ts +2 -0
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +1 -0
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/install.d.ts.map +1 -1
- package/dist/src/commands/install.js +5 -0
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/config/argument-hint-parser.d.ts +49 -0
- package/dist/src/config/argument-hint-parser.d.ts.map +1 -0
- package/dist/src/config/argument-hint-parser.js +283 -0
- package/dist/src/config/argument-hint-parser.js.map +1 -0
- package/dist/src/config/cli-tools-config.d.ts +4 -0
- package/dist/src/config/cli-tools-config.d.ts.map +1 -1
- package/dist/src/config/cli-tools-config.js +22 -0
- package/dist/src/config/cli-tools-config.js.map +1 -1
- package/dist/src/config/paths.d.ts +1 -0
- package/dist/src/config/paths.d.ts.map +1 -1
- package/dist/src/config/paths.js +1 -0
- package/dist/src/config/paths.js.map +1 -1
- package/dist/src/config/skill-config.d.ts +56 -0
- package/dist/src/config/skill-config.d.ts.map +1 -0
- package/dist/src/config/skill-config.js +188 -0
- package/dist/src/config/skill-config.js.map +1 -0
- package/dist/src/hooks/skill-context.d.ts +12 -2
- package/dist/src/hooks/skill-context.d.ts.map +1 -1
- package/dist/src/hooks/skill-context.js +126 -39
- package/dist/src/hooks/skill-context.js.map +1 -1
- package/package.json +1 -1
- package/templates/cli/protocols/analysis-protocol.md +121 -121
- package/templates/cli/protocols/write-protocol.md +138 -138
- package/workflows/debug.md +35 -0
- package/workflows/execute.md +23 -0
- package/workflows/milestone-audit.md +28 -0
- package/workflows/plan.md +17 -0
- package/workflows/review.md +46 -0
- package/workflows/test-gen.md +28 -0
- package/workflows/verify.md +38 -0
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
# Analysis Mode Protocol
|
|
2
|
-
|
|
3
|
-
## Mode Definition
|
|
4
|
-
**Mode**: `analysis` (READ-ONLY)
|
|
5
|
-
## Prompt Structure
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
PURPOSE: [development goal]
|
|
9
|
-
TASK: [specific implementation task]
|
|
10
|
-
MODE: [auto|write]
|
|
11
|
-
CONTEXT: [file patterns]
|
|
12
|
-
EXPECTED: [deliverables]
|
|
13
|
-
RULES: [templates | additional constraints]
|
|
14
|
-
```
|
|
15
|
-
## Operation Boundaries
|
|
16
|
-
|
|
17
|
-
### ALLOWED Operations
|
|
18
|
-
- **READ**: All CONTEXT files and analyze content
|
|
19
|
-
- **ANALYZE**: Code patterns, architecture, dependencies
|
|
20
|
-
- **GENERATE**: Text output, insights, recommendations
|
|
21
|
-
- **DOCUMENT**: Analysis results in output response only
|
|
22
|
-
|
|
23
|
-
### FORBIDDEN Operations
|
|
24
|
-
- **NO FILE CREATION**: Cannot create any files on disk
|
|
25
|
-
- **NO FILE MODIFICATION**: Cannot modify existing files
|
|
26
|
-
- **NO FILE DELETION**: Cannot delete any files
|
|
27
|
-
- **NO DIRECTORY OPERATIONS**: Cannot create/modify directories
|
|
28
|
-
|
|
29
|
-
**CRITICAL**: Absolutely NO file system operations - OUTPUT ONLY
|
|
30
|
-
|
|
31
|
-
## Execution Flow
|
|
32
|
-
|
|
33
|
-
0. **
|
|
34
|
-
1. **Parse** all 6 fields (PURPOSE, TASK, MODE, CONTEXT, EXPECTED, RULES)
|
|
35
|
-
2. **Read** and analyze CONTEXT files thoroughly
|
|
36
|
-
3. **Identify** patterns, issues, and dependencies
|
|
37
|
-
4. **Generate** insights and recommendations
|
|
38
|
-
5. **Validate** EXPECTED deliverables met
|
|
39
|
-
6. **Output** structured analysis (text response only)
|
|
40
|
-
|
|
41
|
-
## Core Requirements
|
|
42
|
-
|
|
43
|
-
**ALWAYS**:
|
|
44
|
-
-
|
|
45
|
-
- Analyze ALL CONTEXT files completely
|
|
46
|
-
- Apply RULES (templates + constraints) exactly
|
|
47
|
-
- Provide code evidence with `file:line` references
|
|
48
|
-
- List all related/analyzed files at output beginning
|
|
49
|
-
- Match EXPECTED deliverables precisely
|
|
50
|
-
|
|
51
|
-
**NEVER**:
|
|
52
|
-
- Assume behavior without code verification
|
|
53
|
-
- Ignore CONTEXT file patterns
|
|
54
|
-
- Skip RULES or templates
|
|
55
|
-
- Make unsubstantiated claims
|
|
56
|
-
- Create/modify/delete any files
|
|
57
|
-
|
|
58
|
-
## RULES Processing
|
|
59
|
-
|
|
60
|
-
- Parse RULES field to extract template content and constraints
|
|
61
|
-
- Recognize `|` as separator: `template content | additional constraints`
|
|
62
|
-
- Apply ALL template guidelines as mandatory
|
|
63
|
-
- Treat rule violations as task failures
|
|
64
|
-
|
|
65
|
-
## Error Handling
|
|
66
|
-
|
|
67
|
-
**File Not Found**: Report missing files, continue with available, note in output
|
|
68
|
-
**Invalid CONTEXT Pattern**: Report invalid pattern, request correction, do not guess
|
|
69
|
-
|
|
70
|
-
## Quality Standards
|
|
71
|
-
|
|
72
|
-
- **Thoroughness**: Analyze ALL files, check cross-file patterns, quantify metrics
|
|
73
|
-
- **Evidence-Based**: Quote code with `file:line`, link patterns, support claims with examples
|
|
74
|
-
- **Actionable**: Clear recommendations, prioritized by impact, incremental changes
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
## Output Format
|
|
79
|
-
|
|
80
|
-
### Format Priority
|
|
81
|
-
|
|
82
|
-
**If template defines output format** → Follow template format EXACTLY
|
|
83
|
-
|
|
84
|
-
**If template has no format** → Use default format below
|
|
85
|
-
|
|
86
|
-
### Default Analysis Output
|
|
87
|
-
|
|
88
|
-
```markdown
|
|
89
|
-
# Analysis: [TASK Title]
|
|
90
|
-
|
|
91
|
-
## Related Files
|
|
92
|
-
- `path/to/file1.ext` - [Brief description of relevance]
|
|
93
|
-
- `path/to/file2.ext` - [Brief description of relevance]
|
|
94
|
-
|
|
95
|
-
## Summary
|
|
96
|
-
[2-3 sentence overview]
|
|
97
|
-
|
|
98
|
-
## Key Findings
|
|
99
|
-
1. [Finding] - path/to/file:123
|
|
100
|
-
2. [Finding] - path/to/file:456
|
|
101
|
-
|
|
102
|
-
## Detailed Analysis
|
|
103
|
-
[Evidence-based analysis with code quotes]
|
|
104
|
-
|
|
105
|
-
## Recommendations
|
|
106
|
-
1. [Actionable recommendation]
|
|
107
|
-
2. [Actionable recommendation]
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Code References
|
|
111
|
-
|
|
112
|
-
**Format**: `path/to/file:line_number`
|
|
113
|
-
**Example**: `src/auth/jwt.ts:45` - Authentication uses deprecated algorithm
|
|
114
|
-
|
|
115
|
-
### Quality Checklist
|
|
116
|
-
|
|
117
|
-
- [ ] All CONTEXT files analyzed
|
|
118
|
-
- [ ] Code evidence with `file:line` references
|
|
119
|
-
- [ ] Specific, actionable recommendations
|
|
120
|
-
- [ ] No unsubstantiated claims
|
|
121
|
-
- [ ] EXPECTED deliverables met
|
|
1
|
+
# Analysis Mode Protocol
|
|
2
|
+
|
|
3
|
+
## Mode Definition
|
|
4
|
+
**Mode**: `analysis` (READ-ONLY)
|
|
5
|
+
## Prompt Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
PURPOSE: [development goal]
|
|
9
|
+
TASK: [specific implementation task]
|
|
10
|
+
MODE: [auto|write]
|
|
11
|
+
CONTEXT: [file patterns]
|
|
12
|
+
EXPECTED: [deliverables]
|
|
13
|
+
RULES: [templates | additional constraints]
|
|
14
|
+
```
|
|
15
|
+
## Operation Boundaries
|
|
16
|
+
|
|
17
|
+
### ALLOWED Operations
|
|
18
|
+
- **READ**: All CONTEXT files and analyze content
|
|
19
|
+
- **ANALYZE**: Code patterns, architecture, dependencies
|
|
20
|
+
- **GENERATE**: Text output, insights, recommendations
|
|
21
|
+
- **DOCUMENT**: Analysis results in output response only
|
|
22
|
+
|
|
23
|
+
### FORBIDDEN Operations
|
|
24
|
+
- **NO FILE CREATION**: Cannot create any files on disk
|
|
25
|
+
- **NO FILE MODIFICATION**: Cannot modify existing files
|
|
26
|
+
- **NO FILE DELETION**: Cannot delete any files
|
|
27
|
+
- **NO DIRECTORY OPERATIONS**: Cannot create/modify directories
|
|
28
|
+
|
|
29
|
+
**CRITICAL**: Absolutely NO file system operations - OUTPUT ONLY
|
|
30
|
+
|
|
31
|
+
## Execution Flow
|
|
32
|
+
|
|
33
|
+
0. **Apply Project Specs** - Review the `[PROJECT SPECS]` section (pre-loaded in this prompt) and adapt analysis scope and standards accordingly
|
|
34
|
+
1. **Parse** all 6 fields (PURPOSE, TASK, MODE, CONTEXT, EXPECTED, RULES)
|
|
35
|
+
2. **Read** and analyze CONTEXT files thoroughly
|
|
36
|
+
3. **Identify** patterns, issues, and dependencies
|
|
37
|
+
4. **Generate** insights and recommendations
|
|
38
|
+
5. **Validate** EXPECTED deliverables met
|
|
39
|
+
6. **Output** structured analysis (text response only)
|
|
40
|
+
|
|
41
|
+
## Core Requirements
|
|
42
|
+
|
|
43
|
+
**ALWAYS**:
|
|
44
|
+
- Apply `[PROJECT SPECS]` constraints (pre-loaded in prompt) to guide analysis
|
|
45
|
+
- Analyze ALL CONTEXT files completely
|
|
46
|
+
- Apply RULES (templates + constraints) exactly
|
|
47
|
+
- Provide code evidence with `file:line` references
|
|
48
|
+
- List all related/analyzed files at output beginning
|
|
49
|
+
- Match EXPECTED deliverables precisely
|
|
50
|
+
|
|
51
|
+
**NEVER**:
|
|
52
|
+
- Assume behavior without code verification
|
|
53
|
+
- Ignore CONTEXT file patterns
|
|
54
|
+
- Skip RULES or templates
|
|
55
|
+
- Make unsubstantiated claims
|
|
56
|
+
- Create/modify/delete any files
|
|
57
|
+
|
|
58
|
+
## RULES Processing
|
|
59
|
+
|
|
60
|
+
- Parse RULES field to extract template content and constraints
|
|
61
|
+
- Recognize `|` as separator: `template content | additional constraints`
|
|
62
|
+
- Apply ALL template guidelines as mandatory
|
|
63
|
+
- Treat rule violations as task failures
|
|
64
|
+
|
|
65
|
+
## Error Handling
|
|
66
|
+
|
|
67
|
+
**File Not Found**: Report missing files, continue with available, note in output
|
|
68
|
+
**Invalid CONTEXT Pattern**: Report invalid pattern, request correction, do not guess
|
|
69
|
+
|
|
70
|
+
## Quality Standards
|
|
71
|
+
|
|
72
|
+
- **Thoroughness**: Analyze ALL files, check cross-file patterns, quantify metrics
|
|
73
|
+
- **Evidence-Based**: Quote code with `file:line`, link patterns, support claims with examples
|
|
74
|
+
- **Actionable**: Clear recommendations, prioritized by impact, incremental changes
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Output Format
|
|
79
|
+
|
|
80
|
+
### Format Priority
|
|
81
|
+
|
|
82
|
+
**If template defines output format** → Follow template format EXACTLY
|
|
83
|
+
|
|
84
|
+
**If template has no format** → Use default format below
|
|
85
|
+
|
|
86
|
+
### Default Analysis Output
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
# Analysis: [TASK Title]
|
|
90
|
+
|
|
91
|
+
## Related Files
|
|
92
|
+
- `path/to/file1.ext` - [Brief description of relevance]
|
|
93
|
+
- `path/to/file2.ext` - [Brief description of relevance]
|
|
94
|
+
|
|
95
|
+
## Summary
|
|
96
|
+
[2-3 sentence overview]
|
|
97
|
+
|
|
98
|
+
## Key Findings
|
|
99
|
+
1. [Finding] - path/to/file:123
|
|
100
|
+
2. [Finding] - path/to/file:456
|
|
101
|
+
|
|
102
|
+
## Detailed Analysis
|
|
103
|
+
[Evidence-based analysis with code quotes]
|
|
104
|
+
|
|
105
|
+
## Recommendations
|
|
106
|
+
1. [Actionable recommendation]
|
|
107
|
+
2. [Actionable recommendation]
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Code References
|
|
111
|
+
|
|
112
|
+
**Format**: `path/to/file:line_number`
|
|
113
|
+
**Example**: `src/auth/jwt.ts:45` - Authentication uses deprecated algorithm
|
|
114
|
+
|
|
115
|
+
### Quality Checklist
|
|
116
|
+
|
|
117
|
+
- [ ] All CONTEXT files analyzed
|
|
118
|
+
- [ ] Code evidence with `file:line` references
|
|
119
|
+
- [ ] Specific, actionable recommendations
|
|
120
|
+
- [ ] No unsubstantiated claims
|
|
121
|
+
- [ ] EXPECTED deliverables met
|
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
# Write Mode Protocol
|
|
2
|
-
## Prompt Structure
|
|
3
|
-
|
|
4
|
-
```
|
|
5
|
-
PURPOSE: [development goal]
|
|
6
|
-
TASK: [specific implementation task]
|
|
7
|
-
MODE: [auto|write]
|
|
8
|
-
CONTEXT: [file patterns]
|
|
9
|
-
EXPECTED: [deliverables]
|
|
10
|
-
RULES: [templates | additional constraints]
|
|
11
|
-
```
|
|
12
|
-
## Operation Boundaries
|
|
13
|
-
|
|
14
|
-
### MODE: write
|
|
15
|
-
- **READ**: All CONTEXT files and analyze content
|
|
16
|
-
- **CREATE**: New files (documentation, code, configuration)
|
|
17
|
-
- **MODIFY**: Existing files (update content, refactor code)
|
|
18
|
-
- **DELETE**: Files when explicitly required
|
|
19
|
-
|
|
20
|
-
**Restrictions**: Follow project conventions, cannot break existing functionality
|
|
21
|
-
|
|
22
|
-
**Constraint**: Must test every change
|
|
23
|
-
|
|
24
|
-
## Execution Flow
|
|
25
|
-
|
|
26
|
-
### MODE: write
|
|
27
|
-
0. **
|
|
28
|
-
1. **Parse** all 6 fields (PURPOSE, TASK, MODE, CONTEXT, EXPECTED, RULES)
|
|
29
|
-
2. **Read** CONTEXT files, find 3+ similar patterns
|
|
30
|
-
3. **Plan** implementation following RULES
|
|
31
|
-
4. **Execute** requested file operations
|
|
32
|
-
5. **Validate** changes
|
|
33
|
-
6. **Report** file changes
|
|
34
|
-
|
|
35
|
-
## Core Requirements
|
|
36
|
-
|
|
37
|
-
**ALWAYS**:
|
|
38
|
-
-
|
|
39
|
-
- Study CONTEXT files - find 3+ similar patterns before implementing
|
|
40
|
-
- Apply RULES exactly
|
|
41
|
-
- Test continuously (auto mode)
|
|
42
|
-
- Commit incrementally (auto mode)
|
|
43
|
-
- Match project style exactly
|
|
44
|
-
- List all created/modified files at output beginning
|
|
45
|
-
|
|
46
|
-
**NEVER**:
|
|
47
|
-
- Make assumptions without code verification
|
|
48
|
-
- Ignore existing patterns
|
|
49
|
-
- Skip tests (auto mode)
|
|
50
|
-
- Use clever tricks over boring solutions
|
|
51
|
-
- Break backward compatibility
|
|
52
|
-
- Exceed 3 failed attempts without stopping
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
**Three-Attempt Rule**: On 3rd failure, stop and report what attempted, what failed, root cause
|
|
56
|
-
|
|
57
|
-
| Error Type | Response |
|
|
58
|
-
|------------|----------|
|
|
59
|
-
| Syntax/Type | Review → Fix → Re-run tests |
|
|
60
|
-
| Runtime | Analyze stack → Add handling → Test |
|
|
61
|
-
| Test Failure | Debug → Review setup → Fix |
|
|
62
|
-
| Build Failure | Check messages → Fix incrementally |
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## Output Format
|
|
67
|
-
|
|
68
|
-
### Format Priority
|
|
69
|
-
|
|
70
|
-
**If template defines output format** → Follow template format EXACTLY
|
|
71
|
-
|
|
72
|
-
**If template has no format** → Use default format below
|
|
73
|
-
|
|
74
|
-
### Task Implementation
|
|
75
|
-
|
|
76
|
-
```markdown
|
|
77
|
-
# Implementation: [TASK Title]
|
|
78
|
-
|
|
79
|
-
## Changes
|
|
80
|
-
- Created: `path/to/file1.ext` (X lines)
|
|
81
|
-
- Modified: `path/to/file2.ext` (+Y/-Z lines)
|
|
82
|
-
- Deleted: `path/to/file3.ext`
|
|
83
|
-
|
|
84
|
-
## Summary
|
|
85
|
-
[2-3 sentence overview]
|
|
86
|
-
|
|
87
|
-
## Key Decisions
|
|
88
|
-
1. [Decision] - Rationale and reference to similar pattern
|
|
89
|
-
2. [Decision] - path/to/reference:line
|
|
90
|
-
|
|
91
|
-
## Implementation Details
|
|
92
|
-
[Evidence-based description with code references]
|
|
93
|
-
|
|
94
|
-
## Testing
|
|
95
|
-
- Tests written: X new tests
|
|
96
|
-
- Tests passing: Y/Z tests
|
|
97
|
-
|
|
98
|
-
## Validation
|
|
99
|
-
✅ Tests: X passing
|
|
100
|
-
✅ Build: Success
|
|
101
|
-
|
|
102
|
-
## Next Steps
|
|
103
|
-
[Recommendations if any]
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### Partial Completion
|
|
107
|
-
|
|
108
|
-
```markdown
|
|
109
|
-
# Task Status: Partially Completed
|
|
110
|
-
|
|
111
|
-
## Completed
|
|
112
|
-
- [What worked]
|
|
113
|
-
- Files: `path/to/completed.ext`
|
|
114
|
-
|
|
115
|
-
## Blocked
|
|
116
|
-
- **Issue**: [What failed]
|
|
117
|
-
- **Root Cause**: [Analysis]
|
|
118
|
-
- **Attempted**: [Solutions tried - attempt X of 3]
|
|
119
|
-
|
|
120
|
-
## Required
|
|
121
|
-
[What's needed to proceed]
|
|
122
|
-
|
|
123
|
-
## Recommendation
|
|
124
|
-
[Suggested next steps]
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### Code References
|
|
128
|
-
|
|
129
|
-
**Format**: `path/to/file:line_number`
|
|
130
|
-
**Example**: `src/auth/jwt.ts:45` - Implemented following pattern from `src/auth/session.ts:78`
|
|
131
|
-
|
|
132
|
-
### Quality Checklist
|
|
133
|
-
|
|
134
|
-
- [ ] All tests pass
|
|
135
|
-
- [ ] Build succeeds
|
|
136
|
-
- [ ] All EXPECTED deliverables met
|
|
137
|
-
- [ ] Code follows existing patterns
|
|
138
|
-
- [ ] File changes listed at beginning
|
|
1
|
+
# Write Mode Protocol
|
|
2
|
+
## Prompt Structure
|
|
3
|
+
|
|
4
|
+
```
|
|
5
|
+
PURPOSE: [development goal]
|
|
6
|
+
TASK: [specific implementation task]
|
|
7
|
+
MODE: [auto|write]
|
|
8
|
+
CONTEXT: [file patterns]
|
|
9
|
+
EXPECTED: [deliverables]
|
|
10
|
+
RULES: [templates | additional constraints]
|
|
11
|
+
```
|
|
12
|
+
## Operation Boundaries
|
|
13
|
+
|
|
14
|
+
### MODE: write
|
|
15
|
+
- **READ**: All CONTEXT files and analyze content
|
|
16
|
+
- **CREATE**: New files (documentation, code, configuration)
|
|
17
|
+
- **MODIFY**: Existing files (update content, refactor code)
|
|
18
|
+
- **DELETE**: Files when explicitly required
|
|
19
|
+
|
|
20
|
+
**Restrictions**: Follow project conventions, cannot break existing functionality
|
|
21
|
+
|
|
22
|
+
**Constraint**: Must test every change
|
|
23
|
+
|
|
24
|
+
## Execution Flow
|
|
25
|
+
|
|
26
|
+
### MODE: write
|
|
27
|
+
0. **Apply Project Specs** - Review the `[PROJECT SPECS]` section (pre-loaded in this prompt) and apply specs to guide coding standards, architecture decisions, and quality gates
|
|
28
|
+
1. **Parse** all 6 fields (PURPOSE, TASK, MODE, CONTEXT, EXPECTED, RULES)
|
|
29
|
+
2. **Read** CONTEXT files, find 3+ similar patterns
|
|
30
|
+
3. **Plan** implementation following RULES
|
|
31
|
+
4. **Execute** requested file operations
|
|
32
|
+
5. **Validate** changes
|
|
33
|
+
6. **Report** file changes
|
|
34
|
+
|
|
35
|
+
## Core Requirements
|
|
36
|
+
|
|
37
|
+
**ALWAYS**:
|
|
38
|
+
- Apply `[PROJECT SPECS]` constraints (pre-loaded in prompt) to guide implementation
|
|
39
|
+
- Study CONTEXT files - find 3+ similar patterns before implementing
|
|
40
|
+
- Apply RULES exactly
|
|
41
|
+
- Test continuously (auto mode)
|
|
42
|
+
- Commit incrementally (auto mode)
|
|
43
|
+
- Match project style exactly
|
|
44
|
+
- List all created/modified files at output beginning
|
|
45
|
+
|
|
46
|
+
**NEVER**:
|
|
47
|
+
- Make assumptions without code verification
|
|
48
|
+
- Ignore existing patterns
|
|
49
|
+
- Skip tests (auto mode)
|
|
50
|
+
- Use clever tricks over boring solutions
|
|
51
|
+
- Break backward compatibility
|
|
52
|
+
- Exceed 3 failed attempts without stopping
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
**Three-Attempt Rule**: On 3rd failure, stop and report what attempted, what failed, root cause
|
|
56
|
+
|
|
57
|
+
| Error Type | Response |
|
|
58
|
+
|------------|----------|
|
|
59
|
+
| Syntax/Type | Review → Fix → Re-run tests |
|
|
60
|
+
| Runtime | Analyze stack → Add handling → Test |
|
|
61
|
+
| Test Failure | Debug → Review setup → Fix |
|
|
62
|
+
| Build Failure | Check messages → Fix incrementally |
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Output Format
|
|
67
|
+
|
|
68
|
+
### Format Priority
|
|
69
|
+
|
|
70
|
+
**If template defines output format** → Follow template format EXACTLY
|
|
71
|
+
|
|
72
|
+
**If template has no format** → Use default format below
|
|
73
|
+
|
|
74
|
+
### Task Implementation
|
|
75
|
+
|
|
76
|
+
```markdown
|
|
77
|
+
# Implementation: [TASK Title]
|
|
78
|
+
|
|
79
|
+
## Changes
|
|
80
|
+
- Created: `path/to/file1.ext` (X lines)
|
|
81
|
+
- Modified: `path/to/file2.ext` (+Y/-Z lines)
|
|
82
|
+
- Deleted: `path/to/file3.ext`
|
|
83
|
+
|
|
84
|
+
## Summary
|
|
85
|
+
[2-3 sentence overview]
|
|
86
|
+
|
|
87
|
+
## Key Decisions
|
|
88
|
+
1. [Decision] - Rationale and reference to similar pattern
|
|
89
|
+
2. [Decision] - path/to/reference:line
|
|
90
|
+
|
|
91
|
+
## Implementation Details
|
|
92
|
+
[Evidence-based description with code references]
|
|
93
|
+
|
|
94
|
+
## Testing
|
|
95
|
+
- Tests written: X new tests
|
|
96
|
+
- Tests passing: Y/Z tests
|
|
97
|
+
|
|
98
|
+
## Validation
|
|
99
|
+
✅ Tests: X passing
|
|
100
|
+
✅ Build: Success
|
|
101
|
+
|
|
102
|
+
## Next Steps
|
|
103
|
+
[Recommendations if any]
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Partial Completion
|
|
107
|
+
|
|
108
|
+
```markdown
|
|
109
|
+
# Task Status: Partially Completed
|
|
110
|
+
|
|
111
|
+
## Completed
|
|
112
|
+
- [What worked]
|
|
113
|
+
- Files: `path/to/completed.ext`
|
|
114
|
+
|
|
115
|
+
## Blocked
|
|
116
|
+
- **Issue**: [What failed]
|
|
117
|
+
- **Root Cause**: [Analysis]
|
|
118
|
+
- **Attempted**: [Solutions tried - attempt X of 3]
|
|
119
|
+
|
|
120
|
+
## Required
|
|
121
|
+
[What's needed to proceed]
|
|
122
|
+
|
|
123
|
+
## Recommendation
|
|
124
|
+
[Suggested next steps]
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Code References
|
|
128
|
+
|
|
129
|
+
**Format**: `path/to/file:line_number`
|
|
130
|
+
**Example**: `src/auth/jwt.ts:45` - Implemented following pattern from `src/auth/session.ts:78`
|
|
131
|
+
|
|
132
|
+
### Quality Checklist
|
|
133
|
+
|
|
134
|
+
- [ ] All tests pass
|
|
135
|
+
- [ ] Build succeeds
|
|
136
|
+
- [ ] All EXPECTED deliverables met
|
|
137
|
+
- [ ] Code follows existing patterns
|
|
138
|
+
- [ ] File changes listed at beginning
|
package/workflows/debug.md
CHANGED
|
@@ -144,6 +144,41 @@ All agents run concurrently. Collect all results.
|
|
|
144
144
|
|
|
145
145
|
---
|
|
146
146
|
|
|
147
|
+
### Step 5.5: CLI Supplementary Evidence Gathering (optional)
|
|
148
|
+
|
|
149
|
+
**Purpose:** Use external CLI tool for broad codebase evidence collection before spawning debug agents. Provides agents with richer context without consuming their token budget on exploration.
|
|
150
|
+
|
|
151
|
+
**Skip if** no enabled CLI tools or standalone mode with minimal context.
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
IF no CLI tools enabled: skip to Step 6
|
|
155
|
+
|
|
156
|
+
# Build evidence request from symptoms
|
|
157
|
+
symptom_summary = symptoms or gap descriptions, concatenated
|
|
158
|
+
|
|
159
|
+
Bash({
|
|
160
|
+
command: 'maestro delegate "PURPOSE: Gather codebase evidence related to a bug investigation
|
|
161
|
+
TASK: Trace call chains for affected functions | Find recent changes to related files | Identify error handling gaps | Check for similar patterns elsewhere
|
|
162
|
+
MODE: analysis
|
|
163
|
+
CONTEXT: @${affected_files or scoped_path}/**/*
|
|
164
|
+
EXPECTED: JSON { call_chains: [{ entry, chain: [file:line...] }], recent_changes: [{ file, commits: [...] }], error_gaps: [{ file, line, description }], similar_patterns: [{ file, line, description }] }
|
|
165
|
+
CONSTRAINTS: Focus on code paths related to the symptoms | Max 20 entries per category
|
|
166
|
+
|
|
167
|
+
Symptoms: ${symptom_summary}
|
|
168
|
+
" --role explore --mode analysis',
|
|
169
|
+
run_in_background: true
|
|
170
|
+
})
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**On callback:**
|
|
174
|
+
```
|
|
175
|
+
cli_evidence = maestro delegate output <id>
|
|
176
|
+
Parse and append to evidence.ndjson with type: "cli-exploration"
|
|
177
|
+
Pass cli_evidence as supplementary_context to debug agent prompts in Step 5/6
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
147
182
|
### Step 6: Spawn Single Debug Agent (sequential mode)
|
|
148
183
|
|
|
149
184
|
Spawn general-purpose agent (`run_in_background: false`) with:
|
package/workflows/execute.md
CHANGED
|
@@ -336,6 +336,29 @@ If constraints exist:
|
|
|
336
336
|
Scan each for disallowed import patterns → critical "tech_stack_violation" per match
|
|
337
337
|
```
|
|
338
338
|
|
|
339
|
+
### Check 4: CLI Supplementary Validation (optional)
|
|
340
|
+
|
|
341
|
+
**Purpose:** Use external CLI tool for semantic validation that structural checks miss — dead code, unused exports, circular dependencies introduced by execution.
|
|
342
|
+
|
|
343
|
+
```
|
|
344
|
+
IF no CLI tools enabled OR completed_tasks.length == 0: skip
|
|
345
|
+
|
|
346
|
+
modified_files = collect all files modified by completed tasks
|
|
347
|
+
|
|
348
|
+
Bash({
|
|
349
|
+
command: 'maestro delegate "PURPOSE: Validate execution output for semantic issues
|
|
350
|
+
TASK: Check for circular dependency introduction | Detect dead code / unused exports | Verify public API consistency (no breaking changes to existing exports)
|
|
351
|
+
MODE: analysis
|
|
352
|
+
CONTEXT: @${modified_files as glob}
|
|
353
|
+
EXPECTED: JSON { circular_deps: [{ cycle: [file...] }], dead_code: [{ file, line, symbol }], breaking_changes: [{ file, export_name, change_type }] }
|
|
354
|
+
CONSTRAINTS: Only check modified files and their direct importers | severity = critical for breaking_changes, warning for others
|
|
355
|
+
" --role analyze --mode analysis',
|
|
356
|
+
run_in_background: true
|
|
357
|
+
})
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
**On callback:** Parse result. Append critical-severity items to violations list. Log warnings separately.
|
|
361
|
+
|
|
339
362
|
### Gate Logic
|
|
340
363
|
|
|
341
364
|
```
|
|
@@ -71,6 +71,34 @@ Agent({
|
|
|
71
71
|
|
|
72
72
|
---
|
|
73
73
|
|
|
74
|
+
## Step 5.5: CLI Supplementary Integration Scan (optional)
|
|
75
|
+
|
|
76
|
+
**Purpose:** Use external CLI tool for broad cross-phase dependency and API consistency checks that complement the agent-based integration checker.
|
|
77
|
+
|
|
78
|
+
**Skip if** no enabled CLI tools or milestone has only 1 phase.
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
IF no CLI tools enabled OR phases.length <= 1: skip to Step 6
|
|
82
|
+
|
|
83
|
+
# Collect all modified files across execute artifacts
|
|
84
|
+
all_execute_paths = execute_artifacts.map(a => a.path)
|
|
85
|
+
|
|
86
|
+
Bash({
|
|
87
|
+
command: 'maestro delegate "PURPOSE: Cross-phase integration scan for milestone completion
|
|
88
|
+
TASK: Check for import/export consistency across phase boundaries | Detect shared type/interface mismatches | Identify configuration key conflicts between phases
|
|
89
|
+
MODE: analysis
|
|
90
|
+
CONTEXT: @${all_execute_paths as glob patterns}
|
|
91
|
+
EXPECTED: JSON { import_issues: [{ file, import_path, issue }], type_mismatches: [{ type_name, definitions: [{ file, shape }] }], config_conflicts: [{ key, values: [{ file, value }] }] }
|
|
92
|
+
CONSTRAINTS: Only check cross-phase boundaries | Ignore intra-phase issues
|
|
93
|
+
" --role analyze --mode analysis',
|
|
94
|
+
run_in_background: true
|
|
95
|
+
})
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**On callback:** Parse result, append to integration checker findings. Critical items surface in Step 6 verdict.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
74
102
|
## Step 6: Audit Report & Verdict
|
|
75
103
|
|
|
76
104
|
1. Read the audit report generated by the integration checker
|
package/workflows/plan.md
CHANGED
|
@@ -100,6 +100,23 @@ default → Create Mode: P1 → P2 → P3 → P4 → P4.5 → P5
|
|
|
100
100
|
- Spawn 1-4 `cli-explore-agent` in parallel, each with phase goal + success_criteria + one angle
|
|
101
101
|
- Output: `.process/exploration-{angle}.json`, `.process/explorations-manifest.json`, `.process/context-package.json`
|
|
102
102
|
|
|
103
|
+
5b. **CLI supplementary context** (runs in parallel with step 5, skip if `--gaps` or no CLI tools enabled)
|
|
104
|
+
```
|
|
105
|
+
IF no CLI tools enabled: skip
|
|
106
|
+
|
|
107
|
+
Bash({
|
|
108
|
+
command: 'maestro delegate "PURPOSE: Gather implementation context for planning phase
|
|
109
|
+
TASK: Identify existing patterns for similar features | Map dependency graph of target modules | Find potential conflict points with other recent changes
|
|
110
|
+
MODE: analysis
|
|
111
|
+
CONTEXT: @**/*
|
|
112
|
+
EXPECTED: JSON { patterns: [{ name, files, description }], dependencies: [{ module, depends_on[] }], conflict_risks: [{ file, reason }] }
|
|
113
|
+
CONSTRAINTS: Focus on ${phase_goal} scope | Max 10 entries per category
|
|
114
|
+
" --role explore --mode analysis',
|
|
115
|
+
run_in_background: true
|
|
116
|
+
})
|
|
117
|
+
```
|
|
118
|
+
**On callback:** Parse result, merge into explorationContext as `cli_context` field. Planner uses patterns for task `read_first[]`, dependencies for wave ordering, conflict_risks for collision detection.
|
|
119
|
+
|
|
103
120
|
6. **Gap-mode context** (if `--gaps`)
|
|
104
121
|
|
|
105
122
|
Gap sources (in priority order, first non-empty wins, then additionals merged):
|