maestro-flow 0.3.24 → 0.3.26
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/.claude/commands/maestro.md +8 -9
- 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/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/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/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/maestro-chain-execute.md +204 -0
- package/workflows/maestro.md +21 -99
- 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
package/workflows/maestro.md
CHANGED
|
@@ -20,16 +20,7 @@ Parse $ARGUMENTS → extract flags, remainder is intent text.
|
|
|
20
20
|
intent = arguments with all flags/valued options stripped, trimmed
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
### 1b:
|
|
24
|
-
|
|
25
|
-
If `resumeMode`:
|
|
26
|
-
1. Scan `.workflow/.maestro/` for latest session (or session ID if specified)
|
|
27
|
-
2. Read `status.json` → find last completed step, remaining steps
|
|
28
|
-
3. Set `$CHAIN` from status.json, `$STEP_INDEX` = last_completed + 1
|
|
29
|
-
4. If no session found: **Error E004** — list available sessions
|
|
30
|
-
5. Jump to **Step 4** at resume point
|
|
31
|
-
|
|
32
|
-
### 1c: Read project state
|
|
23
|
+
### 1b: Read project state
|
|
33
24
|
|
|
34
25
|
Check `.workflow/state.json` existence.
|
|
35
26
|
|
|
@@ -54,7 +45,7 @@ Check `.workflow/state.json` existence.
|
|
|
54
45
|
|
|
55
46
|
**If missing:** `$PROJECT_STATE = { initialized: false }`. If intent also empty → **Error E001** (suggest `maestro-init`).
|
|
56
47
|
|
|
57
|
-
###
|
|
48
|
+
### 1c: Display banner
|
|
58
49
|
|
|
59
50
|
```
|
|
60
51
|
============================================================
|
|
@@ -267,105 +258,36 @@ Create session directory `.workflow/.maestro/maestro-{YYYYMMDD-HHMMSS}/` and wri
|
|
|
267
258
|
"cli_tool": "{cliTool}",
|
|
268
259
|
"gemini_session_id": null,
|
|
269
260
|
"step_analyses": [],
|
|
261
|
+
"context": {
|
|
262
|
+
"current_phase": "{resolved_phase}",
|
|
263
|
+
"user_intent": "{original_intent}",
|
|
264
|
+
"issue_id": "{resolved_issue_id or null}",
|
|
265
|
+
"spec_session_id": null,
|
|
266
|
+
"scratch_dir": null
|
|
267
|
+
},
|
|
270
268
|
"steps": [{ "index": 0, "skill": "{cmd}", "args": "{args}", "engine": null, "status": "pending", "started_at": null, "completed_at": null }],
|
|
271
269
|
"current_step": 0,
|
|
272
270
|
"status": "running"
|
|
273
271
|
}
|
|
274
272
|
```
|
|
275
273
|
|
|
276
|
-
## Step 4:
|
|
277
|
-
|
|
278
|
-
### Shared: context & argument assembly
|
|
279
|
-
|
|
280
|
-
```
|
|
281
|
-
Context object tracks: current_phase, user_intent, issue_id, spec_session_id, scratch_dir, auto_mode.
|
|
282
|
-
|
|
283
|
-
assembleArgs: substitute placeholders {phase}, {description}, {issue_id}, {spec_session_id}, {scratch_dir} in step.args.
|
|
284
|
-
In auto_mode, append per-command flag if not already present:
|
|
285
|
-
maestro-analyze/brainstorm/roadmap/ui-design → -y
|
|
286
|
-
maestro-plan → --auto
|
|
287
|
-
quality-test → --auto-fix
|
|
288
|
-
quality-retrospective → --auto-yes
|
|
289
|
-
|
|
290
|
-
Shell-escape strings with single quotes for CLI delegate calls.
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
### Step loop — for each step starting at `$STEP_INDEX` (default 0):
|
|
294
|
-
|
|
295
|
-
**4a. Select engine & display banner:**
|
|
296
|
-
|
|
297
|
-
Select engine per step (see 3e). Display step banner with index, command name, engine, args.
|
|
298
|
-
- Step >= 4 and not autoYes: hint user about `/maestro -c` for fresh context resume.
|
|
299
|
-
- autoYes and step >= 5: log warning to status.json.
|
|
300
|
-
- Update status.json: step status = `"running"`, engine, started_at.
|
|
301
|
-
|
|
302
|
-
**4b. Execute (engine-dependent):**
|
|
303
|
-
|
|
304
|
-
**Skill** — invoke `Skill({ skill: step.cmd, args: assembledArgs })` directly (synchronous, visible).
|
|
305
|
-
|
|
306
|
-
**CLI** — template-driven, async, context-isolated:
|
|
307
|
-
1. Load template `~/.maestro/templates/cli/prompts/coordinate-step.txt`
|
|
308
|
-
2. Build `analysisHints` from previous step's `next_step_hints` (prompt_additions, cautions, context_to_carry)
|
|
309
|
-
3. Substitute template placeholders: `{{COMMAND}}`, `{{ARGS}}`, `{{STEP_N}}`, `{{AUTO_DIRECTIVE}}`, `{{CHAIN_NAME}}`, `{{ANALYSIS_HINTS}}`
|
|
310
|
-
4. Run `maestro delegate <prompt> --to {cliTool} --mode write` via `Bash(run_in_background: true, timeout: 600000)`
|
|
311
|
-
5. **STOP** — wait for background callback
|
|
312
|
-
|
|
313
|
-
**4c. Parse output & update context:**
|
|
314
|
-
|
|
315
|
-
Scan step output for context propagation: `PHASE: N` → current_phase, `SPEC-xxx` → spec_session_id, `scratch_dir: path` → scratch_dir. CLI: capture exec_id from stderr.
|
|
316
|
-
|
|
317
|
-
**4d. Handle result:**
|
|
318
|
-
|
|
319
|
-
Success: mark `"completed"` in status.json. CLI: save output to `step-{N}-output.txt`.
|
|
320
|
-
Failure: autoYes → retry once then skip. Interactive → Retry (max 2) / Skip / Abort. Abort → **Error E003** with resume hint.
|
|
321
|
-
|
|
322
|
-
**4e. Post-step analysis (CLI steps only, multi-step chains):**
|
|
323
|
-
|
|
324
|
-
Skip if: step failed/skipped, single-step chain, or `stepEngine === 'skill'`.
|
|
325
|
-
|
|
326
|
-
Delegate to gemini (analysis mode, `--resume` if prior gemini_session_id exists) with prompt containing:
|
|
327
|
-
- Step command, args, chain name, intent
|
|
328
|
-
- Last 200 lines of step output
|
|
329
|
-
- Next step info (if any)
|
|
330
|
-
|
|
331
|
-
Expected JSON response:
|
|
332
|
-
```json
|
|
333
|
-
{
|
|
334
|
-
"quality_score": "<0-100>",
|
|
335
|
-
"execution_assessment": { "success": "<bool>", "completeness": "<full|partial|minimal>", "key_outputs": [], "missing_outputs": [] },
|
|
336
|
-
"issues": [{ "severity": "critical|high|medium|low", "description": "" }],
|
|
337
|
-
"next_step_hints": {
|
|
338
|
-
"prompt_additions": "<extra context for next step>",
|
|
339
|
-
"cautions": ["<things to watch out for>"],
|
|
340
|
-
"context_to_carry": "<key facts from this step>"
|
|
341
|
-
},
|
|
342
|
-
"step_summary": ""
|
|
343
|
-
}
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
On callback: capture gemini exec_id for session continuity, store analysis in `state.step_analyses[]` and `step-{N}-analysis.json`, advance to next step (**4a**).
|
|
274
|
+
## Step 4: Dispatch
|
|
347
275
|
|
|
348
|
-
|
|
276
|
+
### 4a: Low-complexity fast path
|
|
349
277
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
Session: {session_id}
|
|
355
|
-
Chain: {chain_name}
|
|
356
|
-
Steps: {completed}/{total} completed
|
|
357
|
-
Phase: {current_phase}
|
|
278
|
+
If ALL conditions met:
|
|
279
|
+
- clarity >= 2
|
|
280
|
+
- task_type == `'quick'` or (action == `'create'` && object == `'feature'`)
|
|
281
|
+
- NOT `forcedChain`, NOT `state_continue`
|
|
358
282
|
|
|
359
|
-
|
|
360
|
-
[✓] 1. maestro-plan — completed [cli] (quality: 85/100)
|
|
361
|
-
[✓] 2. maestro-verify — completed [skill]
|
|
362
|
-
[—] 3. quality-review — skipped [skill]
|
|
283
|
+
Then: `Skill({ skill: "maestro-quick", args: '"{description}"' })`. **End.**
|
|
363
284
|
|
|
364
|
-
|
|
285
|
+
### 4b: Standard execution — read and follow execution workflow
|
|
365
286
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
287
|
+
For ALL chains (regardless of step count):
|
|
288
|
+
1. status.json already created in Step 3f with `steps[]` and `context`
|
|
289
|
+
2. Read `~/.maestro/workflows/maestro-chain-execute.md`
|
|
290
|
+
3. Follow it with `$SESSION_PATH` = session directory from Step 3f
|
|
369
291
|
|
|
370
292
|
---
|
|
371
293
|
|
|
@@ -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):
|
package/workflows/review.md
CHANGED
|
@@ -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.**
|
package/workflows/test-gen.md
CHANGED
|
@@ -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:
|
package/workflows/verify.md
CHANGED
|
@@ -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.
|