maestro-flow 0.3.43 → 0.3.44
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/commands/learn-decompose.md +10 -15
- package/.claude/commands/learn-follow.md +11 -16
- package/.claude/commands/learn-investigate.md +18 -22
- package/.claude/commands/learn-retro.md +23 -26
- package/.claude/commands/learn-second-opinion.md +11 -16
- package/.claude/commands/maestro-analyze.md +8 -0
- package/.claude/commands/maestro-brainstorm.md +8 -0
- package/.claude/commands/maestro-execute.md +11 -3
- package/.claude/commands/maestro-learn.md +4 -4
- package/.claude/commands/maestro-milestone-complete.md +6 -6
- package/.claude/commands/maestro-plan.md +8 -0
- package/.claude/commands/maestro-ralph-execute.md +1 -2
- package/.claude/commands/maestro-tools-execute.md +117 -0
- package/.claude/commands/maestro-tools-register.md +137 -0
- package/.claude/commands/maestro-ui-codify.md +67 -0
- package/.claude/commands/manage-harvest.md +1 -1
- package/.claude/commands/manage-learn.md +5 -7
- package/.claude/commands/manage-wiki.md +1 -1
- package/.claude/commands/quality-auto-test.md +1 -1
- package/.claude/commands/quality-debug.md +8 -0
- package/.claude/commands/quality-retrospective.md +4 -5
- package/.claude/commands/quality-review.md +8 -0
- package/.claude/commands/spec-add.md +25 -4
- package/.claude/commands/spec-load.md +26 -6
- package/.claude/commands/spec-setup.md +2 -2
- package/.claude/commands/wiki-connect.md +1 -1
- package/.claude/commands/wiki-digest.md +5 -6
- package/.claude/skills/codify-to-knowhow/SKILL.md +167 -0
- package/.claude/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
- package/.claude/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
- package/.claude/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
- package/.claude/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
- package/.codex/skills/codify-to-knowhow/SKILL.md +427 -0
- package/.codex/skills/learn-decompose/SKILL.md +8 -8
- package/.codex/skills/learn-follow/SKILL.md +6 -6
- package/.codex/skills/learn-investigate/SKILL.md +4 -4
- package/.codex/skills/learn-retro/SKILL.md +7 -7
- package/.codex/skills/learn-second-opinion/SKILL.md +6 -6
- package/.codex/skills/maestro-analyze/SKILL.md +491 -491
- package/.codex/skills/maestro-collab/SKILL.md +1 -1
- package/.codex/skills/maestro-learn/SKILL.md +1 -1
- package/.codex/skills/maestro-milestone-complete/SKILL.md +122 -122
- package/.codex/skills/maestro-plan/SKILL.md +485 -485
- package/.codex/skills/maestro-tools-execute/SKILL.md +105 -0
- package/.codex/skills/maestro-tools-register/SKILL.md +144 -0
- package/.codex/skills/maestro-ui-codify/SKILL.md +398 -0
- package/.codex/skills/maestro-verify/SKILL.md +486 -486
- package/.codex/skills/manage-harvest/SKILL.md +3 -3
- package/.codex/skills/manage-issue-discover/SKILL.md +431 -431
- package/.codex/skills/manage-learn/SKILL.md +13 -13
- package/.codex/skills/manage-wiki/SKILL.md +1 -1
- package/.codex/skills/quality-auto-test/SKILL.md +553 -553
- package/.codex/skills/quality-refactor/SKILL.md +151 -151
- package/.codex/skills/quality-retrospective/SKILL.md +6 -6
- package/.codex/skills/spec-add/SKILL.md +17 -4
- package/.codex/skills/spec-load/SKILL.md +24 -28
- package/.codex/skills/team-quality-assurance/roles/executor/role.md +1 -1
- package/.codex/skills/team-review/roles/reviewer/role.md +1 -1
- package/.codex/skills/team-tech-debt/roles/scanner/role.md +1 -1
- package/.codex/skills/team-testing/roles/executor/role.md +1 -1
- package/.codex/skills/team-testing/roles/generator/role.md +1 -1
- package/.codex/skills/wiki-connect/SKILL.md +5 -5
- package/.codex/skills/wiki-digest/SKILL.md +8 -8
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +2 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js +2 -2
- package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/supervisor/self-learning-service.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/supervisor/self-learning-service.js +1 -1
- package/dashboard/dist-server/dashboard/src/server/supervisor/self-learning-service.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/search.js +2 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/search.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.d.ts +7 -3
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +47 -15
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.d.ts +1 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js +3 -52
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +67 -21
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +6 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js +1 -11
- package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.d.ts +7 -4
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.js +27 -12
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.js.map +1 -1
- package/dashboard/dist-server/src/tools/spec-entry-parser.d.ts +10 -2
- package/dashboard/dist-server/src/tools/spec-entry-parser.js +46 -12
- package/dashboard/dist-server/src/tools/spec-entry-parser.js.map +1 -1
- package/dashboard/dist-server/src/tools/spec-loader.d.ts +6 -2
- package/dashboard/dist-server/src/tools/spec-loader.js +119 -23
- package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
- package/dist/src/commands/knowhow.d.ts.map +1 -1
- package/dist/src/commands/knowhow.js +21 -2
- package/dist/src/commands/knowhow.js.map +1 -1
- package/dist/src/commands/spec.d.ts +1 -1
- package/dist/src/commands/spec.d.ts.map +1 -1
- package/dist/src/commands/spec.js +78 -4
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/commands/wiki.d.ts.map +1 -1
- package/dist/src/commands/wiki.js +51 -3
- package/dist/src/commands/wiki.js.map +1 -1
- package/dist/src/hooks/keyword-spec-injector.js +1 -1
- package/dist/src/hooks/keyword-spec-injector.js.map +1 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.js +11 -11
- package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
- package/dist/src/hooks/spec-injector.d.ts +1 -0
- package/dist/src/hooks/spec-injector.d.ts.map +1 -1
- package/dist/src/hooks/spec-injector.js +55 -22
- package/dist/src/hooks/spec-injector.js.map +1 -1
- package/dist/src/hooks/wiki-role-loader.d.ts +18 -0
- package/dist/src/hooks/wiki-role-loader.d.ts.map +1 -0
- package/dist/src/hooks/wiki-role-loader.js +43 -0
- package/dist/src/hooks/wiki-role-loader.js.map +1 -0
- package/dist/src/tools/spec-entry-parser.d.ts +10 -2
- package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
- package/dist/src/tools/spec-entry-parser.js +46 -12
- package/dist/src/tools/spec-entry-parser.js.map +1 -1
- package/dist/src/tools/spec-init.d.ts.map +1 -1
- package/dist/src/tools/spec-init.js +19 -0
- package/dist/src/tools/spec-init.js.map +1 -1
- package/dist/src/tools/spec-loader.d.ts +6 -2
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +119 -23
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tools/spec-writer.d.ts +6 -1
- package/dist/src/tools/spec-writer.d.ts.map +1 -1
- package/dist/src/tools/spec-writer.js +29 -2
- package/dist/src/tools/spec-writer.js.map +1 -1
- package/dist/src/tools/store-knowhow.d.ts.map +1 -1
- package/dist/src/tools/store-knowhow.js +56 -27
- package/dist/src/tools/store-knowhow.js.map +1 -1
- package/package.json +1 -1
- package/workflows/analyze.md +2 -2
- package/workflows/auto-test.md +2 -2
- package/workflows/brainstorm.md +1 -1
- package/workflows/codebase-rebuild.md +1 -1
- package/workflows/codebase-refresh.md +1 -1
- package/workflows/debug.md +1 -1
- package/workflows/execute.md +3 -3
- package/workflows/harvest.md +13 -13
- package/workflows/integration-test.md +2 -2
- package/workflows/issue-discover.md +1 -1
- package/workflows/knowhow.md +72 -11
- package/workflows/learn.md +70 -58
- package/workflows/map.md +1 -1
- package/workflows/milestone-complete.md +2 -2
- package/workflows/plan.md +1 -1
- package/workflows/quick.md +1 -1
- package/workflows/refactor.md +1 -1
- package/workflows/retrospective.md +51 -57
- package/workflows/review.md +1 -1
- package/workflows/roadmap-common.md +1 -1
- package/workflows/specs-add.md +11 -2
- package/workflows/specs-load.md +17 -15
- package/workflows/test-gen.md +1 -1
- package/workflows/tools-spec.md +98 -0
- package/workflows/ui-codify-extract.md +373 -0
- package/workflows/ui-codify-knowhow.md +258 -0
- package/workflows/ui-codify-package.md +161 -0
- package/workflows/ui-codify.md +225 -0
- package/workflows/verify.md +1 -1
- package/workflows/wiki-connect.md +7 -7
- package/workflows/wiki-digest.md +13 -13
- package/workflows/wiki-manage.md +1 -1
|
@@ -1,486 +1,486 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: maestro-verify
|
|
3
|
-
description: Verify goals with must-have checks and test coverage validation
|
|
4
|
-
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<phase> [--skip-tests] [--skip-antipattern]\""
|
|
5
|
-
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<purpose>
|
|
9
|
-
Wave-based 3-layer Goal-Backward verification using `spawn_agents_on_csv`. Decomposes verification into staged parallel checks across three waves: truth + artifact existence (Wave 1), artifact substance + wiring (Wave 2), anti-pattern scan + Nyquist audit (Wave 3).
|
|
10
|
-
|
|
11
|
-
**Core workflow**: Load Phase Artifacts -> Establish Must-Haves -> Decompose Checks -> Staged Parallel Verification -> Aggregate + Fix Plans
|
|
12
|
-
|
|
13
|
-
**Core principle**: Task completion != Goal achievement. A task marked complete may contain stubs/placeholders. This verifier checks that goals are actually achieved.
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
+-------------------------------------------------------------------------+
|
|
17
|
-
| VERIFICATION CSV WAVE WORKFLOW |
|
|
18
|
-
+-------------------------------------------------------------------------+
|
|
19
|
-
| |
|
|
20
|
-
| Phase 1: Phase Resolution -> CSV |
|
|
21
|
-
| +-- Resolve phase directory from arguments |
|
|
22
|
-
| +-- Load index.json, plan.json, TASK-*.json, summaries |
|
|
23
|
-
| +-- Establish must-haves (truths, artifacts, key links) |
|
|
24
|
-
| +-- Decompose into check tasks per layer |
|
|
25
|
-
| +-- Assign waves based on layer dependencies |
|
|
26
|
-
| +-- Generate tasks.csv with one row per check |
|
|
27
|
-
| +-- User validates check breakdown (skip if -y) |
|
|
28
|
-
| |
|
|
29
|
-
| Phase 2: Wave Execution Engine |
|
|
30
|
-
| +-- Wave 1: Truth Checks + Artifact Existence (parallel) |
|
|
31
|
-
| | +-- Truth agents verify observable behaviors |
|
|
32
|
-
| | +-- Artifact-exist agents check L1 (file exists on disk) |
|
|
33
|
-
| | +-- Discoveries shared via board (gap patterns, stubs) |
|
|
34
|
-
| | +-- Results: status + evidence + gaps_found per check |
|
|
35
|
-
| +-- Wave 2: Artifact Substance + Wiring (parallel) |
|
|
36
|
-
| | +-- Substance agents check L2 (real impl, not stub) |
|
|
37
|
-
| | +-- Wiring agents check L3 (imported + used) |
|
|
38
|
-
| | +-- Needs truth context from wave 1 |
|
|
39
|
-
| | +-- Results: status + evidence + gaps_found per check |
|
|
40
|
-
| +-- Wave 3: Anti-Pattern Scan + Nyquist Audit (parallel) |
|
|
41
|
-
| | +-- Anti-pattern agent scans modified files (skip if flagged) |
|
|
42
|
-
| | +-- Nyquist agent maps requirements to tests (skip if flagged) |
|
|
43
|
-
| | +-- Needs artifact context from wave 2 |
|
|
44
|
-
| | +-- Results: antipatterns[] + coverage gaps |
|
|
45
|
-
| +-- discoveries.ndjson shared across all waves (append-only) |
|
|
46
|
-
| |
|
|
47
|
-
| Phase 3: Results Aggregation |
|
|
48
|
-
| +-- Export results.csv |
|
|
49
|
-
| +-- Build verification.json (must_haves, gaps, antipatterns, fixes) |
|
|
50
|
-
| +-- Build validation.json (if Nyquist ran) |
|
|
51
|
-
| +-- Generate context.md with all findings |
|
|
52
|
-
| +-- Auto-create issues for gaps + blocker anti-patterns |
|
|
53
|
-
| +-- Generate fix plans (cluster related gaps) |
|
|
54
|
-
| +-- Update phase index.json with verification status |
|
|
55
|
-
| +-- Display summary with next steps |
|
|
56
|
-
| |
|
|
57
|
-
+-------------------------------------------------------------------------+
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
</purpose>
|
|
61
|
-
|
|
62
|
-
<context>
|
|
63
|
-
```bash
|
|
64
|
-
$maestro-verify "3"
|
|
65
|
-
$maestro-verify -c 4 "3 --skip-tests"
|
|
66
|
-
$maestro-verify -y "3 --skip-antipattern"
|
|
67
|
-
$maestro-verify --continue "20260318-verify-P3-auth"
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**Flags**:
|
|
71
|
-
- `-y, --yes`: Skip all confirmations (auto mode)
|
|
72
|
-
- `-c, --concurrency N`: Max concurrent agents within each wave (default: 4)
|
|
73
|
-
- `--continue`: Resume existing session
|
|
74
|
-
|
|
75
|
-
When `--yes` or `-y`: Auto-confirm check decomposition, skip interactive validation, use defaults for layer detection.
|
|
76
|
-
|
|
77
|
-
**Output Directory**: `.workflow/.csv-wave/{session-id}/`
|
|
78
|
-
**Core Output**: `tasks.csv` (master state) + `results.csv` (final) + `discoveries.ndjson` (shared exploration) + `context.md` (human-readable report) + `verification.json` (structured verification output) + `validation.json` (test coverage output, if Nyquist ran)
|
|
79
|
-
</context>
|
|
80
|
-
|
|
81
|
-
<csv_schema>
|
|
82
|
-
|
|
83
|
-
### tasks.csv (Master State)
|
|
84
|
-
|
|
85
|
-
```csv
|
|
86
|
-
id,title,description,layer,phase_dir,check_type,deps,context_from,wave,status,findings,gaps_found,fix_plan,error
|
|
87
|
-
"1","Truth: User can see existing messages","Verify observable behavior: user can see existing messages by checking supporting artifacts, API calls, and render logic.","truth",".workflow/scratch/plan-chat-2026/","observable_behavior","","","1","","","","",""
|
|
88
|
-
"2","Truth: User can send new messages","Verify observable behavior: user can send new messages by checking form submission, API POST, and state update.","truth",".workflow/scratch/plan-chat-2026/","observable_behavior","","","1","","","","",""
|
|
89
|
-
"3","Artifact Exists: src/components/Chat.tsx","Check L1 existence: verify file src/components/Chat.tsx exists on disk.","artifact",".workflow/scratch/plan-chat-2026/","exists","","","1","","","","",""
|
|
90
|
-
"4","Artifact Exists: src/api/chat.ts","Check L1 existence: verify file src/api/chat.ts exists on disk.","artifact",".workflow/scratch/plan-chat-2026/","exists","","","1","","","","",""
|
|
91
|
-
"5","Artifact Substance: src/components/Chat.tsx","Check L2 substance: verify src/components/Chat.tsx has real implementation (not stub/placeholder). Minimum logic threshold, no placeholder markers.","artifact",".workflow/scratch/plan-chat-2026/","substance","3","3","2","","","","",""
|
|
92
|
-
"6","Artifact Substance: src/api/chat.ts","Check L2 substance: verify src/api/chat.ts has real implementation (not stub/placeholder).","artifact",".workflow/scratch/plan-chat-2026/","substance","4","4","2","","","","",""
|
|
93
|
-
"7","Wiring: Chat.tsx -> /api/chat","Check L3 wiring: verify Chat.tsx imports and calls /api/chat endpoints. Check import statements and actual usage beyond imports.","wiring",".workflow/scratch/plan-chat-2026/","import_usage","3;4","3;4","2","","","","",""
|
|
94
|
-
"8","Anti-Pattern Scan","Scan all modified files for TODO/FIXME/XXX/HACK, placeholder content, empty returns, log-only functions, hardcoded test data, disabled tests. Categorize as Blocker/Warning/Info.","antipattern",".workflow/scratch/plan-chat-2026/","pattern_scan","1;2;5;6;7","1;2;5;6;7","3","","","","",""
|
|
95
|
-
"9","Nyquist Test Coverage Audit","Map requirements to test files. Classify each as COVERED/PARTIAL/MISSING. Detect test framework, run coverage if available.","nyquist",".workflow/scratch/plan-chat-2026/","test_coverage","1;2;5;6;7","1;2;5;6;7","3","","","","",""
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
**Columns**:
|
|
99
|
-
|
|
100
|
-
| Column | Phase | Description |
|
|
101
|
-
|--------|-------|-------------|
|
|
102
|
-
| `id` | Input | Unique task identifier (string) |
|
|
103
|
-
| `title` | Input | Short check title |
|
|
104
|
-
| `description` | Input | Detailed verification instructions for this check |
|
|
105
|
-
| `layer` | Input | Verification layer: truth/artifact/wiring/antipattern/nyquist |
|
|
106
|
-
| `phase_dir` | Input | Target directory path (e.g., `.workflow/scratch/plan-chat-2026/`) |
|
|
107
|
-
| `check_type` | Input | Specific check type: observable_behavior/exists/substance/import_usage/pattern_scan/test_coverage |
|
|
108
|
-
| `deps` | Input | Semicolon-separated dependency task IDs |
|
|
109
|
-
| `context_from` | Input | Semicolon-separated task IDs whose findings this task needs |
|
|
110
|
-
| `wave` | Computed | Wave number (1 = truths + existence, 2 = substance + wiring, 3 = antipattern + nyquist) |
|
|
111
|
-
| `status` | Output | `pending` -> `completed` / `failed` / `skipped` |
|
|
112
|
-
| `findings` | Output | Key verification findings summary (max 500 chars) |
|
|
113
|
-
| `gaps_found` | Output | JSON array of gap descriptions: `[{"id":"GAP-001","type":"missing_feature","severity":"critical","description":"...","fix_direction":"..."}]` |
|
|
114
|
-
| `fix_plan` | Output | Suggested fix actions for identified gaps |
|
|
115
|
-
| `error` | Output | Error message if failed |
|
|
116
|
-
|
|
117
|
-
### Per-Wave CSV (Temporary)
|
|
118
|
-
|
|
119
|
-
Each wave generates `wave-{N}.csv` with extra `prev_context` column.
|
|
120
|
-
|
|
121
|
-
### Output Artifacts
|
|
122
|
-
|
|
123
|
-
| File | Purpose | Lifecycle |
|
|
124
|
-
|------|---------|-----------|
|
|
125
|
-
| `tasks.csv` | Master state -- all tasks with status/findings | Updated after each wave |
|
|
126
|
-
| `wave-{N}.csv` | Per-wave input (temporary) | Created before wave, deleted after |
|
|
127
|
-
| `results.csv` | Final export of all task results | Created in Phase 3 |
|
|
128
|
-
| `discoveries.ndjson` | Shared exploration board | Append-only, carries across waves |
|
|
129
|
-
| `context.md` | Human-readable verification report | Created in Phase 3 |
|
|
130
|
-
| `verification.json` | Structured verification output for downstream | Created in Phase 3 |
|
|
131
|
-
| `validation.json` | Nyquist test coverage output (if ran) | Created in Phase 3 |
|
|
132
|
-
|
|
133
|
-
### Session Structure
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
.workflow/.csv-wave/{YYYYMMDD}-verify-P{N}-{slug}/
|
|
137
|
-
+-- tasks.csv
|
|
138
|
-
+-- results.csv
|
|
139
|
-
+-- discoveries.ndjson
|
|
140
|
-
+-- context.md
|
|
141
|
-
+-- verification.json
|
|
142
|
-
+-- validation.json (if Nyquist ran)
|
|
143
|
-
+-- wave-{N}.csv (temporary)
|
|
144
|
-
```
|
|
145
|
-
</csv_schema>
|
|
146
|
-
|
|
147
|
-
<invariants>
|
|
148
|
-
1. **Start Immediately**: First action is session initialization, then Phase 1
|
|
149
|
-
2. **Wave Order is Sacred**: Never execute wave 2 before wave 1 completes and results are merged
|
|
150
|
-
3. **CSV is Source of Truth**: Master tasks.csv holds all state
|
|
151
|
-
4. **Context Propagation**: prev_context built from master CSV, not from memory
|
|
152
|
-
5. **Discovery Board is Append-Only**: Never clear, modify, or recreate discoveries.ndjson
|
|
153
|
-
6. **Skip on Failure**: If artifact existence check failed, skip its substance/wiring checks
|
|
154
|
-
7. **Respect Skip Flags**: `--skip-tests` and `--skip-antipattern` mark wave 3 tasks as skipped, not removed
|
|
155
|
-
8. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
|
156
|
-
9. **DO NOT STOP**: Continuous execution until all waves complete
|
|
157
|
-
10. **Goal-Backward**: Verify goals are achieved, not just tasks completed
|
|
158
|
-
</invariants>
|
|
159
|
-
|
|
160
|
-
<execution>
|
|
161
|
-
|
|
162
|
-
### Session Initialization
|
|
163
|
-
|
|
164
|
-
**Parse from `$ARGUMENTS`**:
|
|
165
|
-
|
|
166
|
-
| Variable | Source | Default |
|
|
167
|
-
|----------|--------|---------|
|
|
168
|
-
| `AUTO_YES` | `--yes` or `-y` | false |
|
|
169
|
-
| `continueMode` | `--continue` | false |
|
|
170
|
-
| `maxConcurrency` | `--concurrency N` or `-c N` | 4 |
|
|
171
|
-
| `skipTests` | `--skip-tests` | false |
|
|
172
|
-
| `skipAntipattern` | `--skip-antipattern` | false |
|
|
173
|
-
| `phaseArg` | remaining text after flag removal | — |
|
|
174
|
-
|
|
175
|
-
**Session path** (UTC+8 date prefix): `.workflow/.csv-wave/{YYYYMMDD}-verify-P{phaseArg}-{phaseSlug}/`
|
|
176
|
-
|
|
177
|
-
Create session directory.
|
|
178
|
-
|
|
179
|
-
### Pre-flight: Team Conflict Check
|
|
180
|
-
|
|
181
|
-
Before starting verification, run:
|
|
182
|
-
```
|
|
183
|
-
Bash("maestro collab preflight --phase <phase-number>")
|
|
184
|
-
```
|
|
185
|
-
If exit code is 1, present warnings and ask whether to proceed.
|
|
186
|
-
|
|
187
|
-
### Phase 1: Phase Resolution -> CSV
|
|
188
|
-
|
|
189
|
-
**Objective**: Resolve phase, load artifacts, establish must-haves, decompose into check tasks, generate tasks.csv.
|
|
190
|
-
|
|
191
|
-
**Decomposition Rules**:
|
|
192
|
-
|
|
193
|
-
1. **Phase resolution**: Resolve `{phaseArg}` via artifact registry in `state.json` to `.workflow/scratch/{YYYYMMDD}-{type}-{slug}/`
|
|
194
|
-
2. **Artifact loading**: Read from phase directory:
|
|
195
|
-
- `index.json` -- success_criteria (ground truth for verification)
|
|
196
|
-
- `plan.json` -- original plan with task_ids
|
|
197
|
-
- All `.task/TASK-{NNN}.json` -- task definitions with convergence.criteria
|
|
198
|
-
- All `.summaries/TASK-{NNN}-summary.md` -- execution results
|
|
199
|
-
- `uat.md` (if exists) -- human UAT gaps to incorporate
|
|
200
|
-
- `.workflow/codebase/ARCHITECTURE.md` (if exists) -- module wiring expectations for Layer 3 checks
|
|
201
|
-
- `maestro wiki search "architecture constraint" --json 2>/dev/null` -- documented invariants as additional truth checks (if available)
|
|
202
|
-
|
|
203
|
-
3. **Must-have establishment** (priority order):
|
|
204
|
-
- **success_criteria from index.json** -- primary contract
|
|
205
|
-
- **convergence.criteria from task JSON** -- per-task completion criteria
|
|
206
|
-
- **Derived from phase goal** -- fallback: derive 3-7 observable behaviors
|
|
207
|
-
|
|
208
|
-
4. **Must-have decomposition** into 3 layers:
|
|
209
|
-
- **Truths**: Observable behaviors (e.g., "User can see existing messages")
|
|
210
|
-
- **Artifacts**: Concrete file paths that must exist and be substantive
|
|
211
|
-
- **Key Links**: Critical wiring between artifacts (e.g., "Chat.tsx imports /api/chat")
|
|
212
|
-
|
|
213
|
-
5. **Check task generation**: For each must-have, generate check rows:
|
|
214
|
-
|
|
215
|
-
| Layer | Check Types | Wave |
|
|
216
|
-
|-------|-------------|------|
|
|
217
|
-
| truth | observable_behavior | 1 |
|
|
218
|
-
| artifact (exists) | exists | 1 |
|
|
219
|
-
| artifact (substance) | substance | 2 |
|
|
220
|
-
| wiring | import_usage | 2 |
|
|
221
|
-
| antipattern | pattern_scan | 3 (skip if `--skip-antipattern`) |
|
|
222
|
-
| nyquist | test_coverage | 3 (skip if `--skip-tests`) |
|
|
223
|
-
|
|
224
|
-
6. **Wave computation**: Assign waves based on layer dependency chain:
|
|
225
|
-
- Wave 1: truth + artifact/exists (no predecessors, parallel)
|
|
226
|
-
- Wave 2: artifact/substance + wiring (need existence confirmation from wave 1)
|
|
227
|
-
- Wave 3: antipattern + nyquist (need substance/wiring context from wave 2)
|
|
228
|
-
|
|
229
|
-
7. **Specs loading**: `specs_content = maestro spec load --
|
|
230
|
-
|
|
231
|
-
8. **CSV generation**: One row per check task.
|
|
232
|
-
|
|
233
|
-
**User validation**: Display check breakdown (skip if AUTO_YES).
|
|
234
|
-
|
|
235
|
-
### Phase 2: Wave Execution Engine
|
|
236
|
-
|
|
237
|
-
**Objective**: Execute verification checks wave-by-wave via spawn_agents_on_csv.
|
|
238
|
-
|
|
239
|
-
#### Wave 1: Truth Checks + Artifact Existence (Parallel)
|
|
240
|
-
|
|
241
|
-
Filter `wave == 1 && status == pending` from master CSV. No prev_context (no predecessors). Write `wave-1.csv`.
|
|
242
|
-
|
|
243
|
-
```javascript
|
|
244
|
-
spawn_agents_on_csv({
|
|
245
|
-
csv_path: `${sessionFolder}/wave-1.csv`,
|
|
246
|
-
id_column: "id",
|
|
247
|
-
instruction: buildVerifyInstruction(sessionFolder, "wave1"), // agent: ~/.codex/agents/workflow-verifier.toml
|
|
248
|
-
max_concurrency: maxConcurrency,
|
|
249
|
-
max_runtime_seconds: 3600,
|
|
250
|
-
output_csv_path: `${sessionFolder}/wave-1-results.csv`,
|
|
251
|
-
output_schema: { id, status: ["completed"|"failed"], findings, gaps_found, fix_plan, error }
|
|
252
|
-
// required: id, status, findings
|
|
253
|
-
})
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
Merge results into master `tasks.csv`, delete `wave-1.csv`.
|
|
257
|
-
|
|
258
|
-
**Truth check agent**: Identify supporting artifacts, check existence + substance + wiring indicators. Status: VERIFIED / FAILED / UNCERTAIN. Report gaps for FAILED with severity + fix direction.
|
|
259
|
-
|
|
260
|
-
**Artifact existence agent**: Check file on disk. Missing = gap (severity=critical). Exists = note size + structure for wave 2.
|
|
261
|
-
|
|
262
|
-
#### Wave 2: Artifact Substance + Wiring (Parallel)
|
|
263
|
-
|
|
264
|
-
Filter `wave == 2 && status == pending`. Skip substance check if all wave 1 existence checks failed for that artifact. Build `prev_context` from wave 1 findings (format: `[Task N: Title] status - summary`). Write `wave-2.csv`, execute `spawn_agents_on_csv`, merge results, delete temp CSV.
|
|
265
|
-
|
|
266
|
-
**Substance check agent**: <10 lines real logic or contains placeholder markers ("placeholder", "coming soon", "TODO: implement") = STUB. Otherwise SUBSTANTIVE.
|
|
267
|
-
|
|
268
|
-
**Wiring check agent**: Grep for import statements + actual usage beyond imports. Status: WIRED / ORPHANED / NOT_WIRED.
|
|
269
|
-
|
|
270
|
-
#### Wave 3: Anti-Pattern Scan + Nyquist Audit (Parallel)
|
|
271
|
-
|
|
272
|
-
Filter `wave == 3 && status == pending`. Mark as `skipped` per skip flags (`--skip-antipattern`, `--skip-tests`). Build `prev_context` from wave 1 + wave 2 findings. Write `wave-3.csv`, execute `spawn_agents_on_csv`, merge results, delete temp CSV.
|
|
273
|
-
|
|
274
|
-
**Anti-pattern scan agent**: Extract modified files from task summaries. Scan for TODO/FIXME/XXX/HACK, placeholder content, empty returns, log-only functions, hardcoded test data, disabled tests. Categorize: Blocker / Warning / Info. Report as JSON array in `gaps_found`.
|
|
275
|
-
|
|
276
|
-
**Nyquist audit agent**: Detect test framework, map requirements to test files, classify COVERED / PARTIAL / MISSING. Run coverage if available. Report gaps + coverage percentage.
|
|
277
|
-
|
|
278
|
-
### Phase 3: Results Aggregation
|
|
279
|
-
|
|
280
|
-
**Objective**: Generate final results, fix plans, and human-readable report.
|
|
281
|
-
|
|
282
|
-
1. Read final master `tasks.csv`
|
|
283
|
-
2. Export as `results.csv`
|
|
284
|
-
3. **Aggregate must_haves** from all check results:
|
|
285
|
-
|
|
286
|
-
```json
|
|
287
|
-
{
|
|
288
|
-
"truths": [
|
|
289
|
-
{ "claim": "User can see existing messages", "status": "verified", "evidence": "Chat.tsx renders from /api/chat GET" }
|
|
290
|
-
],
|
|
291
|
-
"artifacts": [
|
|
292
|
-
{ "path": "src/components/Chat.tsx", "status": "exists", "substantive": true }
|
|
293
|
-
],
|
|
294
|
-
"key_links": [
|
|
295
|
-
{ "from": "Chat.tsx -> /api/chat", "status": "wired" }
|
|
296
|
-
]
|
|
297
|
-
}
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
4. **Collect all gaps** from all tasks' `gaps_found` columns + UAT gaps (if uat.md exists)
|
|
301
|
-
5. **Generate fix plans**: Cluster related gaps -> generate plan per cluster -> order by dependency
|
|
302
|
-
6. **Build verification.json**:
|
|
303
|
-
|
|
304
|
-
```json
|
|
305
|
-
{
|
|
306
|
-
"phase": "<phase>",
|
|
307
|
-
"status": "passed|gaps_found|human_needed",
|
|
308
|
-
"verified_at": "<ISO>",
|
|
309
|
-
"verifier": "csv-wave-verifier",
|
|
310
|
-
"must_haves": { "truths": [...], "artifacts": [...], "key_links": [...] },
|
|
311
|
-
"gaps": [...],
|
|
312
|
-
"antipatterns": [...],
|
|
313
|
-
"fix_plans": [...],
|
|
314
|
-
"human_verification": [...],
|
|
315
|
-
"coverage_score": 0.85
|
|
316
|
-
}
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
7. **Build validation.json** (if Nyquist ran):
|
|
320
|
-
|
|
321
|
-
```json
|
|
322
|
-
{
|
|
323
|
-
"phase": "<phase>",
|
|
324
|
-
"status": "passed|gaps_found",
|
|
325
|
-
"validated_at": "<ISO>",
|
|
326
|
-
"test_framework": "vitest",
|
|
327
|
-
"coverage": { "statements": 80, "branches": 72, "functions": 85, "lines": 78 },
|
|
328
|
-
"requirement_coverage": [
|
|
329
|
-
{ "requirement": "REQ-001", "tests": ["auth.spec.ts"], "status": "covered" }
|
|
330
|
-
],
|
|
331
|
-
"gaps": [...]
|
|
332
|
-
}
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
8. **Generate context.md**:
|
|
336
|
-
|
|
337
|
-
```markdown
|
|
338
|
-
# Verification Report -- Phase {phase}
|
|
339
|
-
|
|
340
|
-
## Summary
|
|
341
|
-
- Truths: {verified}/{total} verified
|
|
342
|
-
- Artifacts: {artifact_verified}/{artifact_total} (L1-L3)
|
|
343
|
-
- Wiring: {links_wired}/{links_total} key links
|
|
344
|
-
- Anti-patterns: {blocker_count} blockers, {warning_count} warnings
|
|
345
|
-
- Nyquist: {coverage_pct}% coverage ({skipped|status})
|
|
346
|
-
|
|
347
|
-
## Overall Status: **{status}**
|
|
348
|
-
|
|
349
|
-
## Must-Have Truths
|
|
350
|
-
### {truth_claim}
|
|
351
|
-
Status: {VERIFIED|FAILED|UNCERTAIN}
|
|
352
|
-
Evidence: {evidence}
|
|
353
|
-
|
|
354
|
-
## Artifact Checks
|
|
355
|
-
| Path | Exists | Substantive | Wired | Status |
|
|
356
|
-
|------|--------|-------------|-------|--------|
|
|
357
|
-
|
|
358
|
-
## Key Links
|
|
359
|
-
| Link | Status | Evidence |
|
|
360
|
-
|
|
361
|
-
## Gaps
|
|
362
|
-
| ID | Type | Severity | Description | Fix Direction |
|
|
363
|
-
|
|
364
|
-
## Anti-Patterns
|
|
365
|
-
| File:Line | Pattern | Severity | Description |
|
|
366
|
-
|
|
367
|
-
## Fix Plans
|
|
368
|
-
### {cluster_name}
|
|
369
|
-
Objective: {objective}
|
|
370
|
-
Tasks: {task_list}
|
|
371
|
-
Issue Refs: {issue_ids}
|
|
372
|
-
|
|
373
|
-
## Nyquist Coverage
|
|
374
|
-
{requirement_coverage_table}
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
9. **Overall status determination**:
|
|
378
|
-
|
|
379
|
-
| Condition | Status |
|
|
380
|
-
|-----------|--------|
|
|
381
|
-
| All truths VERIFIED, all artifacts pass L1-L3, all key links WIRED, no blockers | passed |
|
|
382
|
-
| Any truth FAILED, artifact MISSING/STUB, key link NOT_WIRED, or blocker found | gaps_found |
|
|
383
|
-
| All automated checks pass but human verification items remain | human_needed |
|
|
384
|
-
|
|
385
|
-
10. **Auto-create issues** from gaps + blocker anti-patterns (ID format: `ISS-YYYYMMDD-NNN`).
|
|
386
|
-
|
|
387
|
-
11. **Archive previous artifacts**: Move existing `verification.json`/`validation.json` in phase dir to `.history/`.
|
|
388
|
-
|
|
389
|
-
12. **Copy outputs** to phase directory: `verification.json`, `validation.json` (if generated).
|
|
390
|
-
|
|
391
|
-
13. **Update phase index.json** with verification status and timestamps.
|
|
392
|
-
|
|
393
|
-
14. **Display summary**: Phase name, truths verified/total, artifacts L1-L3, wiring status, anti-pattern counts, Nyquist coverage, gaps by severity, fix plan count, issues created, human verification items, output file paths.
|
|
394
|
-
|
|
395
|
-
15. **Post-verify Knowledge Inquiry** (before next step routing):
|
|
396
|
-
|
|
397
|
-
| Signal | Prompt User | Spec Category | Target File |
|
|
398
|
-
|--------|-------------|---------------|-------------|
|
|
399
|
-
| Anti-pattern blockers found | "Verification found {N} anti-patterns. Update quality rules?" | `quality` | `quality-rules.md` |
|
|
400
|
-
| Constraint/wiring violations | "Architecture constraint violations found. Update constraints?" | `arch` | `architecture-constraints.md` |
|
|
401
|
-
| Recurring Nyquist coverage gaps | "Persistent test gap in {module}. Add to test conventions?" | `test` | `test-conventions.md` |
|
|
402
|
-
| Stub/placeholder detected | "Stub artifacts found. Record as quality anti-pattern?" | `quality` | `quality-rules.md` |
|
|
403
|
-
| Missing wiring (orphaned modules) | "Orphaned modules detected. Document wiring requirement?" | `arch` | `architecture-constraints.md` |
|
|
404
|
-
|
|
405
|
-
On user confirm, invoke `maestro spec add <category> "<title>" "<content>" --keywords ... --source verify:{sessionId}`.
|
|
406
|
-
|
|
407
|
-
Use `request_user_input` for prompts:
|
|
408
|
-
```json
|
|
409
|
-
{ "questions": [{ "id": "knowledge-capture", "header": "Post-Verify Knowledge Capture", "question": "...", "options": [{ "label": "Yes", "description": "Record to specs" }, { "label": "Skip", "description": "Continue without recording" }] }] }
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
16. **Next step routing**:
|
|
413
|
-
|
|
414
|
-
| Result | Suggestion |
|
|
415
|
-
|--------|------------|
|
|
416
|
-
| All passed, no gaps | `$quality-review "{phase}"` for code review |
|
|
417
|
-
| Critical gaps found | `$quality-debug` for investigation |
|
|
418
|
-
| Minor gaps only | `$maestro-plan "{phase} --gaps"` -> `$maestro-execute` -> re-run `$maestro-verify` |
|
|
419
|
-
| Low test coverage | `$quality-auto-test "{phase}"` to generate missing tests |
|
|
420
|
-
| Human verification needed | `$quality-test "{phase}"` for interactive UAT |
|
|
421
|
-
|
|
422
|
-
### Shared Discovery Board Protocol
|
|
423
|
-
|
|
424
|
-
#### Standard Discovery Types
|
|
425
|
-
|
|
426
|
-
| Type | Dedup Key | Data Schema | Description |
|
|
427
|
-
|------|-----------|-------------|-------------|
|
|
428
|
-
| `code_pattern` | `data.name` | `{name, file, description}` | Reusable code pattern found |
|
|
429
|
-
| `integration_point` | `data.file` | `{file, description, exports[]}` | Module connection point |
|
|
430
|
-
| `convention` | singleton | `{naming, imports, formatting}` | Project code conventions |
|
|
431
|
-
| `blocker` | `data.issue` | `{issue, severity, impact}` | Blocking issue found |
|
|
432
|
-
| `tech_stack` | singleton | `{framework, language, tools[]}` | Technology stack info |
|
|
433
|
-
|
|
434
|
-
#### Domain Discovery Types
|
|
435
|
-
|
|
436
|
-
| Type | Dedup Key | Data Schema | Description |
|
|
437
|
-
|------|-----------|-------------|-------------|
|
|
438
|
-
| `verification_gap` | `data.gap_id` | `{gap_id, layer, severity, description}` | Verification gap found |
|
|
439
|
-
| `stub_detected` | `data.file` | `{file, line, marker, content}` | Stub/placeholder file detected |
|
|
440
|
-
| `broken_wiring` | `data.from+data.to` | `{from, to, expected, actual}` | Broken integration link |
|
|
441
|
-
| `antipattern` | `data.location` | `{location, pattern, severity}` | Anti-pattern instance |
|
|
442
|
-
| `test_gap` | `data.requirement` | `{requirement, status, suggested_test}` | Missing test coverage |
|
|
443
|
-
|
|
444
|
-
#### Protocol
|
|
445
|
-
|
|
446
|
-
1. **Read** `{session_folder}/discoveries.ndjson` before own check
|
|
447
|
-
2. **Skip covered**: If discovery of same type + dedup key exists, skip
|
|
448
|
-
3. **Write immediately**: Append findings as found
|
|
449
|
-
4. **Append-only**: Never modify or delete
|
|
450
|
-
5. **Deduplicate**: Check before writing
|
|
451
|
-
|
|
452
|
-
```bash
|
|
453
|
-
echo '{"ts":"<ISO>","worker":"{id}","type":"verification_gap","data":{"gap_id":"GAP-001","layer":"truth","severity":"critical","description":"User cannot send messages - form handler is a stub"}}' >> {session_folder}/discoveries.ndjson
|
|
454
|
-
```
|
|
455
|
-
</execution>
|
|
456
|
-
|
|
457
|
-
<error_codes>
|
|
458
|
-
|
|
459
|
-
| Error | Resolution |
|
|
460
|
-
|-------|------------|
|
|
461
|
-
| Phase directory not found | Resolve via state.json artifact registry; abort if not found |
|
|
462
|
-
| No execution results found | Abort with error: "No completed tasks found -- run execute first" |
|
|
463
|
-
| No summaries found | Warn, proceed with task file analysis only |
|
|
464
|
-
| No success_criteria in index.json | Derive must-haves from phase goal (fallback) |
|
|
465
|
-
| Truth check agent timeout | Mark as failed, continue remaining checks |
|
|
466
|
-
| Substance check on missing artifact | Auto-skip (dep failed), mark as skipped |
|
|
467
|
-
| Anti-pattern scan disabled | Mark as skipped, note in context.md |
|
|
468
|
-
| Nyquist audit disabled | Mark as skipped, note in context.md |
|
|
469
|
-
| Test framework not detected | Skip coverage calculation, warn user |
|
|
470
|
-
| CSV parse error | Validate format, show line number |
|
|
471
|
-
| discoveries.ndjson corrupt | Ignore malformed lines |
|
|
472
|
-
| Continue mode: no session found | List available sessions |
|
|
473
|
-
</error_codes>
|
|
474
|
-
|
|
475
|
-
<success_criteria>
|
|
476
|
-
- [ ] Session folder created with valid tasks.csv
|
|
477
|
-
- [ ] All 3 waves executed in order (with skip flags respected)
|
|
478
|
-
- [ ] verification.json produced with must_haves, gaps, antipatterns
|
|
479
|
-
- [ ] validation.json produced (if Nyquist ran)
|
|
480
|
-
- [ ] context.md produced with full report
|
|
481
|
-
- [ ] Fix plans generated for gap clusters
|
|
482
|
-
- [ ] Issues auto-created for gaps + blocker anti-patterns
|
|
483
|
-
- [ ] Output files copied to phase directory
|
|
484
|
-
- [ ] Phase index.json updated with verification status
|
|
485
|
-
- [ ] discoveries.ndjson append-only throughout
|
|
486
|
-
</success_criteria>
|
|
1
|
+
---
|
|
2
|
+
name: maestro-verify
|
|
3
|
+
description: Verify goals with must-have checks and test coverage validation
|
|
4
|
+
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<phase> [--skip-tests] [--skip-antipattern]\""
|
|
5
|
+
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<purpose>
|
|
9
|
+
Wave-based 3-layer Goal-Backward verification using `spawn_agents_on_csv`. Decomposes verification into staged parallel checks across three waves: truth + artifact existence (Wave 1), artifact substance + wiring (Wave 2), anti-pattern scan + Nyquist audit (Wave 3).
|
|
10
|
+
|
|
11
|
+
**Core workflow**: Load Phase Artifacts -> Establish Must-Haves -> Decompose Checks -> Staged Parallel Verification -> Aggregate + Fix Plans
|
|
12
|
+
|
|
13
|
+
**Core principle**: Task completion != Goal achievement. A task marked complete may contain stubs/placeholders. This verifier checks that goals are actually achieved.
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
+-------------------------------------------------------------------------+
|
|
17
|
+
| VERIFICATION CSV WAVE WORKFLOW |
|
|
18
|
+
+-------------------------------------------------------------------------+
|
|
19
|
+
| |
|
|
20
|
+
| Phase 1: Phase Resolution -> CSV |
|
|
21
|
+
| +-- Resolve phase directory from arguments |
|
|
22
|
+
| +-- Load index.json, plan.json, TASK-*.json, summaries |
|
|
23
|
+
| +-- Establish must-haves (truths, artifacts, key links) |
|
|
24
|
+
| +-- Decompose into check tasks per layer |
|
|
25
|
+
| +-- Assign waves based on layer dependencies |
|
|
26
|
+
| +-- Generate tasks.csv with one row per check |
|
|
27
|
+
| +-- User validates check breakdown (skip if -y) |
|
|
28
|
+
| |
|
|
29
|
+
| Phase 2: Wave Execution Engine |
|
|
30
|
+
| +-- Wave 1: Truth Checks + Artifact Existence (parallel) |
|
|
31
|
+
| | +-- Truth agents verify observable behaviors |
|
|
32
|
+
| | +-- Artifact-exist agents check L1 (file exists on disk) |
|
|
33
|
+
| | +-- Discoveries shared via board (gap patterns, stubs) |
|
|
34
|
+
| | +-- Results: status + evidence + gaps_found per check |
|
|
35
|
+
| +-- Wave 2: Artifact Substance + Wiring (parallel) |
|
|
36
|
+
| | +-- Substance agents check L2 (real impl, not stub) |
|
|
37
|
+
| | +-- Wiring agents check L3 (imported + used) |
|
|
38
|
+
| | +-- Needs truth context from wave 1 |
|
|
39
|
+
| | +-- Results: status + evidence + gaps_found per check |
|
|
40
|
+
| +-- Wave 3: Anti-Pattern Scan + Nyquist Audit (parallel) |
|
|
41
|
+
| | +-- Anti-pattern agent scans modified files (skip if flagged) |
|
|
42
|
+
| | +-- Nyquist agent maps requirements to tests (skip if flagged) |
|
|
43
|
+
| | +-- Needs artifact context from wave 2 |
|
|
44
|
+
| | +-- Results: antipatterns[] + coverage gaps |
|
|
45
|
+
| +-- discoveries.ndjson shared across all waves (append-only) |
|
|
46
|
+
| |
|
|
47
|
+
| Phase 3: Results Aggregation |
|
|
48
|
+
| +-- Export results.csv |
|
|
49
|
+
| +-- Build verification.json (must_haves, gaps, antipatterns, fixes) |
|
|
50
|
+
| +-- Build validation.json (if Nyquist ran) |
|
|
51
|
+
| +-- Generate context.md with all findings |
|
|
52
|
+
| +-- Auto-create issues for gaps + blocker anti-patterns |
|
|
53
|
+
| +-- Generate fix plans (cluster related gaps) |
|
|
54
|
+
| +-- Update phase index.json with verification status |
|
|
55
|
+
| +-- Display summary with next steps |
|
|
56
|
+
| |
|
|
57
|
+
+-------------------------------------------------------------------------+
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
</purpose>
|
|
61
|
+
|
|
62
|
+
<context>
|
|
63
|
+
```bash
|
|
64
|
+
$maestro-verify "3"
|
|
65
|
+
$maestro-verify -c 4 "3 --skip-tests"
|
|
66
|
+
$maestro-verify -y "3 --skip-antipattern"
|
|
67
|
+
$maestro-verify --continue "20260318-verify-P3-auth"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Flags**:
|
|
71
|
+
- `-y, --yes`: Skip all confirmations (auto mode)
|
|
72
|
+
- `-c, --concurrency N`: Max concurrent agents within each wave (default: 4)
|
|
73
|
+
- `--continue`: Resume existing session
|
|
74
|
+
|
|
75
|
+
When `--yes` or `-y`: Auto-confirm check decomposition, skip interactive validation, use defaults for layer detection.
|
|
76
|
+
|
|
77
|
+
**Output Directory**: `.workflow/.csv-wave/{session-id}/`
|
|
78
|
+
**Core Output**: `tasks.csv` (master state) + `results.csv` (final) + `discoveries.ndjson` (shared exploration) + `context.md` (human-readable report) + `verification.json` (structured verification output) + `validation.json` (test coverage output, if Nyquist ran)
|
|
79
|
+
</context>
|
|
80
|
+
|
|
81
|
+
<csv_schema>
|
|
82
|
+
|
|
83
|
+
### tasks.csv (Master State)
|
|
84
|
+
|
|
85
|
+
```csv
|
|
86
|
+
id,title,description,layer,phase_dir,check_type,deps,context_from,wave,status,findings,gaps_found,fix_plan,error
|
|
87
|
+
"1","Truth: User can see existing messages","Verify observable behavior: user can see existing messages by checking supporting artifacts, API calls, and render logic.","truth",".workflow/scratch/plan-chat-2026/","observable_behavior","","","1","","","","",""
|
|
88
|
+
"2","Truth: User can send new messages","Verify observable behavior: user can send new messages by checking form submission, API POST, and state update.","truth",".workflow/scratch/plan-chat-2026/","observable_behavior","","","1","","","","",""
|
|
89
|
+
"3","Artifact Exists: src/components/Chat.tsx","Check L1 existence: verify file src/components/Chat.tsx exists on disk.","artifact",".workflow/scratch/plan-chat-2026/","exists","","","1","","","","",""
|
|
90
|
+
"4","Artifact Exists: src/api/chat.ts","Check L1 existence: verify file src/api/chat.ts exists on disk.","artifact",".workflow/scratch/plan-chat-2026/","exists","","","1","","","","",""
|
|
91
|
+
"5","Artifact Substance: src/components/Chat.tsx","Check L2 substance: verify src/components/Chat.tsx has real implementation (not stub/placeholder). Minimum logic threshold, no placeholder markers.","artifact",".workflow/scratch/plan-chat-2026/","substance","3","3","2","","","","",""
|
|
92
|
+
"6","Artifact Substance: src/api/chat.ts","Check L2 substance: verify src/api/chat.ts has real implementation (not stub/placeholder).","artifact",".workflow/scratch/plan-chat-2026/","substance","4","4","2","","","","",""
|
|
93
|
+
"7","Wiring: Chat.tsx -> /api/chat","Check L3 wiring: verify Chat.tsx imports and calls /api/chat endpoints. Check import statements and actual usage beyond imports.","wiring",".workflow/scratch/plan-chat-2026/","import_usage","3;4","3;4","2","","","","",""
|
|
94
|
+
"8","Anti-Pattern Scan","Scan all modified files for TODO/FIXME/XXX/HACK, placeholder content, empty returns, log-only functions, hardcoded test data, disabled tests. Categorize as Blocker/Warning/Info.","antipattern",".workflow/scratch/plan-chat-2026/","pattern_scan","1;2;5;6;7","1;2;5;6;7","3","","","","",""
|
|
95
|
+
"9","Nyquist Test Coverage Audit","Map requirements to test files. Classify each as COVERED/PARTIAL/MISSING. Detect test framework, run coverage if available.","nyquist",".workflow/scratch/plan-chat-2026/","test_coverage","1;2;5;6;7","1;2;5;6;7","3","","","","",""
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Columns**:
|
|
99
|
+
|
|
100
|
+
| Column | Phase | Description |
|
|
101
|
+
|--------|-------|-------------|
|
|
102
|
+
| `id` | Input | Unique task identifier (string) |
|
|
103
|
+
| `title` | Input | Short check title |
|
|
104
|
+
| `description` | Input | Detailed verification instructions for this check |
|
|
105
|
+
| `layer` | Input | Verification layer: truth/artifact/wiring/antipattern/nyquist |
|
|
106
|
+
| `phase_dir` | Input | Target directory path (e.g., `.workflow/scratch/plan-chat-2026/`) |
|
|
107
|
+
| `check_type` | Input | Specific check type: observable_behavior/exists/substance/import_usage/pattern_scan/test_coverage |
|
|
108
|
+
| `deps` | Input | Semicolon-separated dependency task IDs |
|
|
109
|
+
| `context_from` | Input | Semicolon-separated task IDs whose findings this task needs |
|
|
110
|
+
| `wave` | Computed | Wave number (1 = truths + existence, 2 = substance + wiring, 3 = antipattern + nyquist) |
|
|
111
|
+
| `status` | Output | `pending` -> `completed` / `failed` / `skipped` |
|
|
112
|
+
| `findings` | Output | Key verification findings summary (max 500 chars) |
|
|
113
|
+
| `gaps_found` | Output | JSON array of gap descriptions: `[{"id":"GAP-001","type":"missing_feature","severity":"critical","description":"...","fix_direction":"..."}]` |
|
|
114
|
+
| `fix_plan` | Output | Suggested fix actions for identified gaps |
|
|
115
|
+
| `error` | Output | Error message if failed |
|
|
116
|
+
|
|
117
|
+
### Per-Wave CSV (Temporary)
|
|
118
|
+
|
|
119
|
+
Each wave generates `wave-{N}.csv` with extra `prev_context` column.
|
|
120
|
+
|
|
121
|
+
### Output Artifacts
|
|
122
|
+
|
|
123
|
+
| File | Purpose | Lifecycle |
|
|
124
|
+
|------|---------|-----------|
|
|
125
|
+
| `tasks.csv` | Master state -- all tasks with status/findings | Updated after each wave |
|
|
126
|
+
| `wave-{N}.csv` | Per-wave input (temporary) | Created before wave, deleted after |
|
|
127
|
+
| `results.csv` | Final export of all task results | Created in Phase 3 |
|
|
128
|
+
| `discoveries.ndjson` | Shared exploration board | Append-only, carries across waves |
|
|
129
|
+
| `context.md` | Human-readable verification report | Created in Phase 3 |
|
|
130
|
+
| `verification.json` | Structured verification output for downstream | Created in Phase 3 |
|
|
131
|
+
| `validation.json` | Nyquist test coverage output (if ran) | Created in Phase 3 |
|
|
132
|
+
|
|
133
|
+
### Session Structure
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
.workflow/.csv-wave/{YYYYMMDD}-verify-P{N}-{slug}/
|
|
137
|
+
+-- tasks.csv
|
|
138
|
+
+-- results.csv
|
|
139
|
+
+-- discoveries.ndjson
|
|
140
|
+
+-- context.md
|
|
141
|
+
+-- verification.json
|
|
142
|
+
+-- validation.json (if Nyquist ran)
|
|
143
|
+
+-- wave-{N}.csv (temporary)
|
|
144
|
+
```
|
|
145
|
+
</csv_schema>
|
|
146
|
+
|
|
147
|
+
<invariants>
|
|
148
|
+
1. **Start Immediately**: First action is session initialization, then Phase 1
|
|
149
|
+
2. **Wave Order is Sacred**: Never execute wave 2 before wave 1 completes and results are merged
|
|
150
|
+
3. **CSV is Source of Truth**: Master tasks.csv holds all state
|
|
151
|
+
4. **Context Propagation**: prev_context built from master CSV, not from memory
|
|
152
|
+
5. **Discovery Board is Append-Only**: Never clear, modify, or recreate discoveries.ndjson
|
|
153
|
+
6. **Skip on Failure**: If artifact existence check failed, skip its substance/wiring checks
|
|
154
|
+
7. **Respect Skip Flags**: `--skip-tests` and `--skip-antipattern` mark wave 3 tasks as skipped, not removed
|
|
155
|
+
8. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
|
156
|
+
9. **DO NOT STOP**: Continuous execution until all waves complete
|
|
157
|
+
10. **Goal-Backward**: Verify goals are achieved, not just tasks completed
|
|
158
|
+
</invariants>
|
|
159
|
+
|
|
160
|
+
<execution>
|
|
161
|
+
|
|
162
|
+
### Session Initialization
|
|
163
|
+
|
|
164
|
+
**Parse from `$ARGUMENTS`**:
|
|
165
|
+
|
|
166
|
+
| Variable | Source | Default |
|
|
167
|
+
|----------|--------|---------|
|
|
168
|
+
| `AUTO_YES` | `--yes` or `-y` | false |
|
|
169
|
+
| `continueMode` | `--continue` | false |
|
|
170
|
+
| `maxConcurrency` | `--concurrency N` or `-c N` | 4 |
|
|
171
|
+
| `skipTests` | `--skip-tests` | false |
|
|
172
|
+
| `skipAntipattern` | `--skip-antipattern` | false |
|
|
173
|
+
| `phaseArg` | remaining text after flag removal | — |
|
|
174
|
+
|
|
175
|
+
**Session path** (UTC+8 date prefix): `.workflow/.csv-wave/{YYYYMMDD}-verify-P{phaseArg}-{phaseSlug}/`
|
|
176
|
+
|
|
177
|
+
Create session directory.
|
|
178
|
+
|
|
179
|
+
### Pre-flight: Team Conflict Check
|
|
180
|
+
|
|
181
|
+
Before starting verification, run:
|
|
182
|
+
```
|
|
183
|
+
Bash("maestro collab preflight --phase <phase-number>")
|
|
184
|
+
```
|
|
185
|
+
If exit code is 1, present warnings and ask whether to proceed.
|
|
186
|
+
|
|
187
|
+
### Phase 1: Phase Resolution -> CSV
|
|
188
|
+
|
|
189
|
+
**Objective**: Resolve phase, load artifacts, establish must-haves, decompose into check tasks, generate tasks.csv.
|
|
190
|
+
|
|
191
|
+
**Decomposition Rules**:
|
|
192
|
+
|
|
193
|
+
1. **Phase resolution**: Resolve `{phaseArg}` via artifact registry in `state.json` to `.workflow/scratch/{YYYYMMDD}-{type}-{slug}/`
|
|
194
|
+
2. **Artifact loading**: Read from phase directory:
|
|
195
|
+
- `index.json` -- success_criteria (ground truth for verification)
|
|
196
|
+
- `plan.json` -- original plan with task_ids
|
|
197
|
+
- All `.task/TASK-{NNN}.json` -- task definitions with convergence.criteria
|
|
198
|
+
- All `.summaries/TASK-{NNN}-summary.md` -- execution results
|
|
199
|
+
- `uat.md` (if exists) -- human UAT gaps to incorporate
|
|
200
|
+
- `.workflow/codebase/ARCHITECTURE.md` (if exists) -- module wiring expectations for Layer 3 checks
|
|
201
|
+
- `maestro wiki search "architecture constraint" --json 2>/dev/null` -- documented invariants as additional truth checks (if available)
|
|
202
|
+
|
|
203
|
+
3. **Must-have establishment** (priority order):
|
|
204
|
+
- **success_criteria from index.json** -- primary contract
|
|
205
|
+
- **convergence.criteria from task JSON** -- per-task completion criteria
|
|
206
|
+
- **Derived from phase goal** -- fallback: derive 3-7 observable behaviors
|
|
207
|
+
|
|
208
|
+
4. **Must-have decomposition** into 3 layers:
|
|
209
|
+
- **Truths**: Observable behaviors (e.g., "User can see existing messages")
|
|
210
|
+
- **Artifacts**: Concrete file paths that must exist and be substantive
|
|
211
|
+
- **Key Links**: Critical wiring between artifacts (e.g., "Chat.tsx imports /api/chat")
|
|
212
|
+
|
|
213
|
+
5. **Check task generation**: For each must-have, generate check rows:
|
|
214
|
+
|
|
215
|
+
| Layer | Check Types | Wave |
|
|
216
|
+
|-------|-------------|------|
|
|
217
|
+
| truth | observable_behavior | 1 |
|
|
218
|
+
| artifact (exists) | exists | 1 |
|
|
219
|
+
| artifact (substance) | substance | 2 |
|
|
220
|
+
| wiring | import_usage | 2 |
|
|
221
|
+
| antipattern | pattern_scan | 3 (skip if `--skip-antipattern`) |
|
|
222
|
+
| nyquist | test_coverage | 3 (skip if `--skip-tests`) |
|
|
223
|
+
|
|
224
|
+
6. **Wave computation**: Assign waves based on layer dependency chain:
|
|
225
|
+
- Wave 1: truth + artifact/exists (no predecessors, parallel)
|
|
226
|
+
- Wave 2: artifact/substance + wiring (need existence confirmation from wave 1)
|
|
227
|
+
- Wave 3: antipattern + nyquist (need substance/wiring context from wave 2)
|
|
228
|
+
|
|
229
|
+
7. **Specs loading**: `specs_content = maestro spec load --role review`
|
|
230
|
+
|
|
231
|
+
8. **CSV generation**: One row per check task.
|
|
232
|
+
|
|
233
|
+
**User validation**: Display check breakdown (skip if AUTO_YES).
|
|
234
|
+
|
|
235
|
+
### Phase 2: Wave Execution Engine
|
|
236
|
+
|
|
237
|
+
**Objective**: Execute verification checks wave-by-wave via spawn_agents_on_csv.
|
|
238
|
+
|
|
239
|
+
#### Wave 1: Truth Checks + Artifact Existence (Parallel)
|
|
240
|
+
|
|
241
|
+
Filter `wave == 1 && status == pending` from master CSV. No prev_context (no predecessors). Write `wave-1.csv`.
|
|
242
|
+
|
|
243
|
+
```javascript
|
|
244
|
+
spawn_agents_on_csv({
|
|
245
|
+
csv_path: `${sessionFolder}/wave-1.csv`,
|
|
246
|
+
id_column: "id",
|
|
247
|
+
instruction: buildVerifyInstruction(sessionFolder, "wave1"), // agent: ~/.codex/agents/workflow-verifier.toml
|
|
248
|
+
max_concurrency: maxConcurrency,
|
|
249
|
+
max_runtime_seconds: 3600,
|
|
250
|
+
output_csv_path: `${sessionFolder}/wave-1-results.csv`,
|
|
251
|
+
output_schema: { id, status: ["completed"|"failed"], findings, gaps_found, fix_plan, error }
|
|
252
|
+
// required: id, status, findings
|
|
253
|
+
})
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Merge results into master `tasks.csv`, delete `wave-1.csv`.
|
|
257
|
+
|
|
258
|
+
**Truth check agent**: Identify supporting artifacts, check existence + substance + wiring indicators. Status: VERIFIED / FAILED / UNCERTAIN. Report gaps for FAILED with severity + fix direction.
|
|
259
|
+
|
|
260
|
+
**Artifact existence agent**: Check file on disk. Missing = gap (severity=critical). Exists = note size + structure for wave 2.
|
|
261
|
+
|
|
262
|
+
#### Wave 2: Artifact Substance + Wiring (Parallel)
|
|
263
|
+
|
|
264
|
+
Filter `wave == 2 && status == pending`. Skip substance check if all wave 1 existence checks failed for that artifact. Build `prev_context` from wave 1 findings (format: `[Task N: Title] status - summary`). Write `wave-2.csv`, execute `spawn_agents_on_csv`, merge results, delete temp CSV.
|
|
265
|
+
|
|
266
|
+
**Substance check agent**: <10 lines real logic or contains placeholder markers ("placeholder", "coming soon", "TODO: implement") = STUB. Otherwise SUBSTANTIVE.
|
|
267
|
+
|
|
268
|
+
**Wiring check agent**: Grep for import statements + actual usage beyond imports. Status: WIRED / ORPHANED / NOT_WIRED.
|
|
269
|
+
|
|
270
|
+
#### Wave 3: Anti-Pattern Scan + Nyquist Audit (Parallel)
|
|
271
|
+
|
|
272
|
+
Filter `wave == 3 && status == pending`. Mark as `skipped` per skip flags (`--skip-antipattern`, `--skip-tests`). Build `prev_context` from wave 1 + wave 2 findings. Write `wave-3.csv`, execute `spawn_agents_on_csv`, merge results, delete temp CSV.
|
|
273
|
+
|
|
274
|
+
**Anti-pattern scan agent**: Extract modified files from task summaries. Scan for TODO/FIXME/XXX/HACK, placeholder content, empty returns, log-only functions, hardcoded test data, disabled tests. Categorize: Blocker / Warning / Info. Report as JSON array in `gaps_found`.
|
|
275
|
+
|
|
276
|
+
**Nyquist audit agent**: Detect test framework, map requirements to test files, classify COVERED / PARTIAL / MISSING. Run coverage if available. Report gaps + coverage percentage.
|
|
277
|
+
|
|
278
|
+
### Phase 3: Results Aggregation
|
|
279
|
+
|
|
280
|
+
**Objective**: Generate final results, fix plans, and human-readable report.
|
|
281
|
+
|
|
282
|
+
1. Read final master `tasks.csv`
|
|
283
|
+
2. Export as `results.csv`
|
|
284
|
+
3. **Aggregate must_haves** from all check results:
|
|
285
|
+
|
|
286
|
+
```json
|
|
287
|
+
{
|
|
288
|
+
"truths": [
|
|
289
|
+
{ "claim": "User can see existing messages", "status": "verified", "evidence": "Chat.tsx renders from /api/chat GET" }
|
|
290
|
+
],
|
|
291
|
+
"artifacts": [
|
|
292
|
+
{ "path": "src/components/Chat.tsx", "status": "exists", "substantive": true }
|
|
293
|
+
],
|
|
294
|
+
"key_links": [
|
|
295
|
+
{ "from": "Chat.tsx -> /api/chat", "status": "wired" }
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
4. **Collect all gaps** from all tasks' `gaps_found` columns + UAT gaps (if uat.md exists)
|
|
301
|
+
5. **Generate fix plans**: Cluster related gaps -> generate plan per cluster -> order by dependency
|
|
302
|
+
6. **Build verification.json**:
|
|
303
|
+
|
|
304
|
+
```json
|
|
305
|
+
{
|
|
306
|
+
"phase": "<phase>",
|
|
307
|
+
"status": "passed|gaps_found|human_needed",
|
|
308
|
+
"verified_at": "<ISO>",
|
|
309
|
+
"verifier": "csv-wave-verifier",
|
|
310
|
+
"must_haves": { "truths": [...], "artifacts": [...], "key_links": [...] },
|
|
311
|
+
"gaps": [...],
|
|
312
|
+
"antipatterns": [...],
|
|
313
|
+
"fix_plans": [...],
|
|
314
|
+
"human_verification": [...],
|
|
315
|
+
"coverage_score": 0.85
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
7. **Build validation.json** (if Nyquist ran):
|
|
320
|
+
|
|
321
|
+
```json
|
|
322
|
+
{
|
|
323
|
+
"phase": "<phase>",
|
|
324
|
+
"status": "passed|gaps_found",
|
|
325
|
+
"validated_at": "<ISO>",
|
|
326
|
+
"test_framework": "vitest",
|
|
327
|
+
"coverage": { "statements": 80, "branches": 72, "functions": 85, "lines": 78 },
|
|
328
|
+
"requirement_coverage": [
|
|
329
|
+
{ "requirement": "REQ-001", "tests": ["auth.spec.ts"], "status": "covered" }
|
|
330
|
+
],
|
|
331
|
+
"gaps": [...]
|
|
332
|
+
}
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
8. **Generate context.md**:
|
|
336
|
+
|
|
337
|
+
```markdown
|
|
338
|
+
# Verification Report -- Phase {phase}
|
|
339
|
+
|
|
340
|
+
## Summary
|
|
341
|
+
- Truths: {verified}/{total} verified
|
|
342
|
+
- Artifacts: {artifact_verified}/{artifact_total} (L1-L3)
|
|
343
|
+
- Wiring: {links_wired}/{links_total} key links
|
|
344
|
+
- Anti-patterns: {blocker_count} blockers, {warning_count} warnings
|
|
345
|
+
- Nyquist: {coverage_pct}% coverage ({skipped|status})
|
|
346
|
+
|
|
347
|
+
## Overall Status: **{status}**
|
|
348
|
+
|
|
349
|
+
## Must-Have Truths
|
|
350
|
+
### {truth_claim}
|
|
351
|
+
Status: {VERIFIED|FAILED|UNCERTAIN}
|
|
352
|
+
Evidence: {evidence}
|
|
353
|
+
|
|
354
|
+
## Artifact Checks
|
|
355
|
+
| Path | Exists | Substantive | Wired | Status |
|
|
356
|
+
|------|--------|-------------|-------|--------|
|
|
357
|
+
|
|
358
|
+
## Key Links
|
|
359
|
+
| Link | Status | Evidence |
|
|
360
|
+
|
|
361
|
+
## Gaps
|
|
362
|
+
| ID | Type | Severity | Description | Fix Direction |
|
|
363
|
+
|
|
364
|
+
## Anti-Patterns
|
|
365
|
+
| File:Line | Pattern | Severity | Description |
|
|
366
|
+
|
|
367
|
+
## Fix Plans
|
|
368
|
+
### {cluster_name}
|
|
369
|
+
Objective: {objective}
|
|
370
|
+
Tasks: {task_list}
|
|
371
|
+
Issue Refs: {issue_ids}
|
|
372
|
+
|
|
373
|
+
## Nyquist Coverage
|
|
374
|
+
{requirement_coverage_table}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
9. **Overall status determination**:
|
|
378
|
+
|
|
379
|
+
| Condition | Status |
|
|
380
|
+
|-----------|--------|
|
|
381
|
+
| All truths VERIFIED, all artifacts pass L1-L3, all key links WIRED, no blockers | passed |
|
|
382
|
+
| Any truth FAILED, artifact MISSING/STUB, key link NOT_WIRED, or blocker found | gaps_found |
|
|
383
|
+
| All automated checks pass but human verification items remain | human_needed |
|
|
384
|
+
|
|
385
|
+
10. **Auto-create issues** from gaps + blocker anti-patterns (ID format: `ISS-YYYYMMDD-NNN`).
|
|
386
|
+
|
|
387
|
+
11. **Archive previous artifacts**: Move existing `verification.json`/`validation.json` in phase dir to `.history/`.
|
|
388
|
+
|
|
389
|
+
12. **Copy outputs** to phase directory: `verification.json`, `validation.json` (if generated).
|
|
390
|
+
|
|
391
|
+
13. **Update phase index.json** with verification status and timestamps.
|
|
392
|
+
|
|
393
|
+
14. **Display summary**: Phase name, truths verified/total, artifacts L1-L3, wiring status, anti-pattern counts, Nyquist coverage, gaps by severity, fix plan count, issues created, human verification items, output file paths.
|
|
394
|
+
|
|
395
|
+
15. **Post-verify Knowledge Inquiry** (before next step routing):
|
|
396
|
+
|
|
397
|
+
| Signal | Prompt User | Spec Category | Target File |
|
|
398
|
+
|--------|-------------|---------------|-------------|
|
|
399
|
+
| Anti-pattern blockers found | "Verification found {N} anti-patterns. Update quality rules?" | `quality` | `quality-rules.md` |
|
|
400
|
+
| Constraint/wiring violations | "Architecture constraint violations found. Update constraints?" | `arch` | `architecture-constraints.md` |
|
|
401
|
+
| Recurring Nyquist coverage gaps | "Persistent test gap in {module}. Add to test conventions?" | `test` | `test-conventions.md` |
|
|
402
|
+
| Stub/placeholder detected | "Stub artifacts found. Record as quality anti-pattern?" | `quality` | `quality-rules.md` |
|
|
403
|
+
| Missing wiring (orphaned modules) | "Orphaned modules detected. Document wiring requirement?" | `arch` | `architecture-constraints.md` |
|
|
404
|
+
|
|
405
|
+
On user confirm, invoke `maestro spec add <category> "<title>" "<content>" --keywords ... --source verify:{sessionId}`.
|
|
406
|
+
|
|
407
|
+
Use `request_user_input` for prompts:
|
|
408
|
+
```json
|
|
409
|
+
{ "questions": [{ "id": "knowledge-capture", "header": "Post-Verify Knowledge Capture", "question": "...", "options": [{ "label": "Yes", "description": "Record to specs" }, { "label": "Skip", "description": "Continue without recording" }] }] }
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
16. **Next step routing**:
|
|
413
|
+
|
|
414
|
+
| Result | Suggestion |
|
|
415
|
+
|--------|------------|
|
|
416
|
+
| All passed, no gaps | `$quality-review "{phase}"` for code review |
|
|
417
|
+
| Critical gaps found | `$quality-debug` for investigation |
|
|
418
|
+
| Minor gaps only | `$maestro-plan "{phase} --gaps"` -> `$maestro-execute` -> re-run `$maestro-verify` |
|
|
419
|
+
| Low test coverage | `$quality-auto-test "{phase}"` to generate missing tests |
|
|
420
|
+
| Human verification needed | `$quality-test "{phase}"` for interactive UAT |
|
|
421
|
+
|
|
422
|
+
### Shared Discovery Board Protocol
|
|
423
|
+
|
|
424
|
+
#### Standard Discovery Types
|
|
425
|
+
|
|
426
|
+
| Type | Dedup Key | Data Schema | Description |
|
|
427
|
+
|------|-----------|-------------|-------------|
|
|
428
|
+
| `code_pattern` | `data.name` | `{name, file, description}` | Reusable code pattern found |
|
|
429
|
+
| `integration_point` | `data.file` | `{file, description, exports[]}` | Module connection point |
|
|
430
|
+
| `convention` | singleton | `{naming, imports, formatting}` | Project code conventions |
|
|
431
|
+
| `blocker` | `data.issue` | `{issue, severity, impact}` | Blocking issue found |
|
|
432
|
+
| `tech_stack` | singleton | `{framework, language, tools[]}` | Technology stack info |
|
|
433
|
+
|
|
434
|
+
#### Domain Discovery Types
|
|
435
|
+
|
|
436
|
+
| Type | Dedup Key | Data Schema | Description |
|
|
437
|
+
|------|-----------|-------------|-------------|
|
|
438
|
+
| `verification_gap` | `data.gap_id` | `{gap_id, layer, severity, description}` | Verification gap found |
|
|
439
|
+
| `stub_detected` | `data.file` | `{file, line, marker, content}` | Stub/placeholder file detected |
|
|
440
|
+
| `broken_wiring` | `data.from+data.to` | `{from, to, expected, actual}` | Broken integration link |
|
|
441
|
+
| `antipattern` | `data.location` | `{location, pattern, severity}` | Anti-pattern instance |
|
|
442
|
+
| `test_gap` | `data.requirement` | `{requirement, status, suggested_test}` | Missing test coverage |
|
|
443
|
+
|
|
444
|
+
#### Protocol
|
|
445
|
+
|
|
446
|
+
1. **Read** `{session_folder}/discoveries.ndjson` before own check
|
|
447
|
+
2. **Skip covered**: If discovery of same type + dedup key exists, skip
|
|
448
|
+
3. **Write immediately**: Append findings as found
|
|
449
|
+
4. **Append-only**: Never modify or delete
|
|
450
|
+
5. **Deduplicate**: Check before writing
|
|
451
|
+
|
|
452
|
+
```bash
|
|
453
|
+
echo '{"ts":"<ISO>","worker":"{id}","type":"verification_gap","data":{"gap_id":"GAP-001","layer":"truth","severity":"critical","description":"User cannot send messages - form handler is a stub"}}' >> {session_folder}/discoveries.ndjson
|
|
454
|
+
```
|
|
455
|
+
</execution>
|
|
456
|
+
|
|
457
|
+
<error_codes>
|
|
458
|
+
|
|
459
|
+
| Error | Resolution |
|
|
460
|
+
|-------|------------|
|
|
461
|
+
| Phase directory not found | Resolve via state.json artifact registry; abort if not found |
|
|
462
|
+
| No execution results found | Abort with error: "No completed tasks found -- run execute first" |
|
|
463
|
+
| No summaries found | Warn, proceed with task file analysis only |
|
|
464
|
+
| No success_criteria in index.json | Derive must-haves from phase goal (fallback) |
|
|
465
|
+
| Truth check agent timeout | Mark as failed, continue remaining checks |
|
|
466
|
+
| Substance check on missing artifact | Auto-skip (dep failed), mark as skipped |
|
|
467
|
+
| Anti-pattern scan disabled | Mark as skipped, note in context.md |
|
|
468
|
+
| Nyquist audit disabled | Mark as skipped, note in context.md |
|
|
469
|
+
| Test framework not detected | Skip coverage calculation, warn user |
|
|
470
|
+
| CSV parse error | Validate format, show line number |
|
|
471
|
+
| discoveries.ndjson corrupt | Ignore malformed lines |
|
|
472
|
+
| Continue mode: no session found | List available sessions |
|
|
473
|
+
</error_codes>
|
|
474
|
+
|
|
475
|
+
<success_criteria>
|
|
476
|
+
- [ ] Session folder created with valid tasks.csv
|
|
477
|
+
- [ ] All 3 waves executed in order (with skip flags respected)
|
|
478
|
+
- [ ] verification.json produced with must_haves, gaps, antipatterns
|
|
479
|
+
- [ ] validation.json produced (if Nyquist ran)
|
|
480
|
+
- [ ] context.md produced with full report
|
|
481
|
+
- [ ] Fix plans generated for gap clusters
|
|
482
|
+
- [ ] Issues auto-created for gaps + blocker anti-patterns
|
|
483
|
+
- [ ] Output files copied to phase directory
|
|
484
|
+
- [ ] Phase index.json updated with verification status
|
|
485
|
+
- [ ] discoveries.ndjson append-only throughout
|
|
486
|
+
</success_criteria>
|