maestro-flow 0.3.24 → 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.
Files changed (76) hide show
  1. package/.claude/agents/cli-explore-agent.md +2 -2
  2. package/.claude/commands/learn-investigate.md +26 -0
  3. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.d.ts +2 -0
  4. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +32 -7
  5. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
  6. package/dashboard/dist-server/src/agents/cli-agent-runner.d.ts +2 -0
  7. package/dashboard/dist-server/src/agents/cli-agent-runner.js +62 -4
  8. package/dashboard/dist-server/src/agents/cli-agent-runner.js.map +1 -1
  9. package/dashboard/dist-server/src/commands/delegate.d.ts +2 -0
  10. package/dashboard/dist-server/src/commands/delegate.js +1 -0
  11. package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
  12. package/dashboard/dist-server/src/config/paths.d.ts +1 -0
  13. package/dashboard/dist-server/src/config/paths.js +1 -0
  14. package/dashboard/dist-server/src/config/paths.js.map +1 -1
  15. package/dashboard/dist-server/src/tools/spec-entry-parser.d.ts +55 -0
  16. package/dashboard/dist-server/src/tools/spec-entry-parser.js +222 -0
  17. package/dashboard/dist-server/src/tools/spec-entry-parser.js.map +1 -0
  18. package/dashboard/dist-server/src/tools/spec-loader.d.ts +51 -0
  19. package/dashboard/dist-server/src/tools/spec-loader.js +267 -0
  20. package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -0
  21. package/dist/src/agents/cli-agent-runner.d.ts +2 -0
  22. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  23. package/dist/src/agents/cli-agent-runner.js +62 -4
  24. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  25. package/dist/src/cli.js +2 -0
  26. package/dist/src/cli.js.map +1 -1
  27. package/dist/src/commands/config-ui/ConfigSourcesView.d.ts +6 -0
  28. package/dist/src/commands/config-ui/ConfigSourcesView.d.ts.map +1 -0
  29. package/dist/src/commands/config-ui/ConfigSourcesView.js +25 -0
  30. package/dist/src/commands/config-ui/ConfigSourcesView.js.map +1 -0
  31. package/dist/src/commands/config-ui/SkillConfigDashboard.d.ts +9 -0
  32. package/dist/src/commands/config-ui/SkillConfigDashboard.d.ts.map +1 -0
  33. package/dist/src/commands/config-ui/SkillConfigDashboard.js +64 -0
  34. package/dist/src/commands/config-ui/SkillConfigDashboard.js.map +1 -0
  35. package/dist/src/commands/config-ui/SkillParamEditor.d.ts +12 -0
  36. package/dist/src/commands/config-ui/SkillParamEditor.d.ts.map +1 -0
  37. package/dist/src/commands/config-ui/SkillParamEditor.js +162 -0
  38. package/dist/src/commands/config-ui/SkillParamEditor.js.map +1 -0
  39. package/dist/src/commands/config-ui/SkillsList.d.ts +12 -0
  40. package/dist/src/commands/config-ui/SkillsList.d.ts.map +1 -0
  41. package/dist/src/commands/config-ui/SkillsList.js +91 -0
  42. package/dist/src/commands/config-ui/SkillsList.js.map +1 -0
  43. package/dist/src/commands/config.d.ts +8 -0
  44. package/dist/src/commands/config.d.ts.map +1 -0
  45. package/dist/src/commands/config.js +172 -0
  46. package/dist/src/commands/config.js.map +1 -0
  47. package/dist/src/commands/delegate.d.ts +2 -0
  48. package/dist/src/commands/delegate.d.ts.map +1 -1
  49. package/dist/src/commands/delegate.js +1 -0
  50. package/dist/src/commands/delegate.js.map +1 -1
  51. package/dist/src/config/argument-hint-parser.d.ts +49 -0
  52. package/dist/src/config/argument-hint-parser.d.ts.map +1 -0
  53. package/dist/src/config/argument-hint-parser.js +283 -0
  54. package/dist/src/config/argument-hint-parser.js.map +1 -0
  55. package/dist/src/config/paths.d.ts +1 -0
  56. package/dist/src/config/paths.d.ts.map +1 -1
  57. package/dist/src/config/paths.js +1 -0
  58. package/dist/src/config/paths.js.map +1 -1
  59. package/dist/src/config/skill-config.d.ts +56 -0
  60. package/dist/src/config/skill-config.d.ts.map +1 -0
  61. package/dist/src/config/skill-config.js +188 -0
  62. package/dist/src/config/skill-config.js.map +1 -0
  63. package/dist/src/hooks/skill-context.d.ts +12 -2
  64. package/dist/src/hooks/skill-context.d.ts.map +1 -1
  65. package/dist/src/hooks/skill-context.js +126 -39
  66. package/dist/src/hooks/skill-context.js.map +1 -1
  67. package/package.json +1 -1
  68. package/templates/cli/protocols/analysis-protocol.md +121 -121
  69. package/templates/cli/protocols/write-protocol.md +138 -138
  70. package/workflows/debug.md +35 -0
  71. package/workflows/execute.md +23 -0
  72. package/workflows/milestone-audit.md +28 -0
  73. package/workflows/plan.md +17 -0
  74. package/workflows/review.md +46 -0
  75. package/workflows/test-gen.md +28 -0
  76. package/workflows/verify.md +38 -0
@@ -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. **Load Project Specs** - MANDATORY first step: run `maestro spec load` to retrieve project specifications and constraints before any implementation. Apply loaded 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
- - Run `maestro spec load` FIRST to obtain project specifications before starting any work
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
@@ -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:
@@ -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):
@@ -219,6 +219,52 @@ verdict:
219
219
 
220
220
  ---
221
221
 
222
+ ## Step 6.5: CLI Supplementary Analysis (standard + deep only)
223
+
224
+ **Skip for quick level or if no enabled CLI tools.**
225
+
226
+ **Purpose:** Use external CLI tool as a second opinion on critical findings before deep-dive. The CLI analysis supplements (not replaces) the agent review — its results are merged into findings.
227
+
228
+ ```
229
+ IF level == "quick" OR no CLI tools enabled: skip to Step 7
230
+
231
+ # Gather critical/high findings for CLI cross-check
232
+ cli_targets = all_findings.filter(f => f.severity in ["critical", "high"])
233
+ IF cli_targets.length == 0: skip to Step 7
234
+
235
+ # Build concise review prompt from findings
236
+ finding_summary = cli_targets.map(f => "${f.id}: [${f.severity}] ${f.file}:${f.line} — ${f.title}").join("\n")
237
+
238
+ Bash({
239
+ command: 'maestro delegate "PURPOSE: Cross-verify code review findings and identify missed issues
240
+ TASK: For each finding, verify severity is accurate | Check for false positives | Identify any critical issues missed by initial review in the same files
241
+ MODE: analysis
242
+ CONTEXT: @${review_files as glob pattern}
243
+ EXPECTED: JSON array of { finding_id, verified: bool, adjusted_severity?, missed_issues?: [{ severity, file, line, title, description }] }
244
+ CONSTRAINTS: Only report missed issues of severity high or above | Do not duplicate existing findings
245
+
246
+ Existing findings to verify:
247
+ ${finding_summary}
248
+ " --role review --mode analysis',
249
+ run_in_background: true
250
+ })
251
+ ```
252
+
253
+ **On callback:**
254
+ ```
255
+ cli_result = maestro delegate output <id>
256
+ Parse JSON from cli_result
257
+
258
+ For each verified finding:
259
+ If adjusted_severity differs: update finding.severity, add finding.cli_note = "severity adjusted by CLI review"
260
+ For each missed_issue:
261
+ Append to all_findings with id: "CLI-{NNN}", source: "cli-supplementary"
262
+
263
+ Recalculate severity_dist after merge
264
+ ```
265
+
266
+ ---
267
+
222
268
  ## Step 7: Deep-Dive (Conditional)
223
269
 
224
270
  **Skip entirely for quick level.**
@@ -58,6 +58,34 @@ Apply --layer filter if set.
58
58
 
59
59
  ---
60
60
 
61
+ ### Step 3.5: CLI Supplementary Test Analysis (optional)
62
+
63
+ **Purpose:** Use external CLI tool to analyze source code and suggest edge cases and boundary conditions that manual classification may miss.
64
+
65
+ **Skip if** no enabled CLI tools or classified files are all "skip".
66
+
67
+ ```
68
+ IF no CLI tools enabled OR all files classified as "skip": skip to Step 4
69
+
70
+ # Build file list for analysis
71
+ target_files = unit + integration + e2e files, map to paths
72
+
73
+ Bash({
74
+ command: 'maestro delegate "PURPOSE: Analyze source files to identify test-worthy edge cases and boundary conditions
75
+ TASK: For each file, identify: error handling paths | boundary conditions | state transitions | external dependency interactions
76
+ MODE: analysis
77
+ CONTEXT: @${target_files as glob}
78
+ EXPECTED: JSON array of { file, edge_cases: [{ description, type: boundary|error|state|integration, priority: high|medium }] }
79
+ CONSTRAINTS: Only report non-obvious cases | Max 5 edge cases per file | Focus on untested paths
80
+ " --role analyze --mode analysis',
81
+ run_in_background: true
82
+ })
83
+ ```
84
+
85
+ **On callback:** Parse result, merge edge_cases into Step 4 test_cases for matching files. Mark CLI-suggested cases with `source: "cli-analysis"`.
86
+
87
+ ---
88
+
61
89
  ### Step 4: Generate Test Plan
62
90
 
63
91
  For each gap + classified file, create a test entry:
@@ -102,6 +102,44 @@ The `constraint_violations[]` array is included in the final `verification.json`
102
102
 
103
103
  ---
104
104
 
105
+ ## V0.8: CLI Supplementary Verification (optional)
106
+
107
+ **Purpose:** Use external CLI tool for broad anti-pattern and completeness scan as a supplementary signal before structural verification. Results feed into V1 as pre-collected evidence.
108
+
109
+ **Skip if** no enabled CLI tools.
110
+
111
+ ```
112
+ IF no CLI tools enabled: skip to V1
113
+
114
+ # Collect modified files list from task summaries
115
+ modified_files_list = modified_files.join(", ")
116
+
117
+ Bash({
118
+ command: 'maestro delegate "PURPOSE: Pre-verify code completeness and anti-patterns in modified files
119
+ TASK: Check for TODO/FIXME/HACK markers | Detect stub implementations (empty functions, placeholder returns) | Verify imports are used | Check for console.log/print debug statements left behind
120
+ MODE: analysis
121
+ CONTEXT: @${modified_files as glob pattern}
122
+ EXPECTED: JSON { anti_patterns: [{ type, file, line, description, severity }], completeness_flags: [{ file, issue, severity }] }
123
+ CONSTRAINTS: Only scan the listed modified files | severity = blocker|warning|info
124
+ " --role analyze --mode analysis',
125
+ run_in_background: true
126
+ })
127
+ ```
128
+
129
+ **On callback:**
130
+ ```
131
+ cli_verify = maestro delegate output <id>
132
+ Parse JSON result
133
+
134
+ # Merge into constraint_violations for V3 aggregation
135
+ For each anti_pattern with severity == "blocker":
136
+ Append to constraint_violations as { id: "CLI-AP-{NNN}", type: "cli_anti_pattern", ... }
137
+
138
+ Pass cli_verify.completeness_flags as supplementary context to V1 verification
139
+ ```
140
+
141
+ ---
142
+
105
143
  ## V1: Goal-Backward Verification
106
144
 
107
145
  **Purpose:** Verify execution results match phase goals through 3-layer structural checking.