maestro-flow 0.3.19 → 0.3.20
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-investigate.md +195 -195
- package/.claude/commands/learn-retro.md +303 -303
- package/.claude/commands/learn-second-opinion.md +167 -167
- package/.claude/commands/maestro-amend.md +300 -300
- package/.claude/commands/maestro-analyze.md +126 -126
- package/.claude/commands/maestro-composer.md +354 -354
- package/.claude/commands/maestro-execute.md +114 -114
- package/.claude/commands/maestro-learn.md +140 -140
- package/.claude/commands/maestro-milestone-audit.md +68 -68
- package/.claude/commands/maestro-milestone-complete.md +75 -75
- package/.claude/commands/maestro-milestone-release.md +96 -96
- package/.claude/commands/maestro-plan.md +138 -138
- package/.claude/commands/maestro-player.md +404 -404
- package/.claude/commands/maestro-update.md +176 -176
- package/.claude/commands/maestro-verify.md +90 -90
- package/.claude/commands/manage-codebase-rebuild.md +75 -75
- package/.claude/commands/manage-knowhow-capture.md +193 -193
- package/.claude/commands/manage-knowhow.md +77 -77
- package/.claude/commands/manage-learn.md +67 -67
- package/.claude/commands/manage-wiki.md +62 -62
- package/.claude/commands/quality-business-test.md +110 -110
- package/.claude/commands/quality-retrospective.md +78 -78
- package/.claude/commands/spec-add.md +49 -49
- package/.claude/commands/spec-load.md +51 -51
- package/.claude/commands/spec-remove.md +51 -51
- package/.claude/commands/wiki-connect.md +62 -62
- package/.claude/commands/wiki-digest.md +69 -69
- package/.codex/skills/maestro-link-coordinate/SKILL.md +5 -5
- package/.codex/skills/maestro-player/SKILL.md +5 -5
- package/dashboard/dist-server/dashboard/src/server/coordinator/workflow-coordinator.js +3 -3
- package/dashboard/dist-server/dashboard/src/server/coordinator/workflow-coordinator.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/execution/execution-scheduler.js +1 -1
- package/dashboard/dist-server/dashboard/src/server/execution/execution-scheduler.js.map +1 -1
- package/dist/src/commands/coordinate.js +2 -2
- package/dist/src/commands/coordinate.js.map +1 -1
- package/dist/src/hooks/coordinator-tracker.d.ts +1 -1
- package/dist/src/hooks/coordinator-tracker.js +3 -3
- package/dist/src/hooks/coordinator-tracker.js.map +1 -1
- package/package.json +1 -1
- package/workflows/maestro-link-coordinate.md +3 -3
- package/workflows/maestro.codex.md +2 -2
- package/workflows/maestro-coordinate.codex.md +0 -281
|
@@ -1,176 +1,176 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: maestro-update
|
|
3
|
-
description: Interactive workflow migration — detect version, preview changes, apply upgrades
|
|
4
|
-
argument-hint: "[--dry-run] [--force]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Edit
|
|
9
|
-
- Bash
|
|
10
|
-
- Glob
|
|
11
|
-
- Grep
|
|
12
|
-
- AskUserQuestion
|
|
13
|
-
---
|
|
14
|
-
<purpose>
|
|
15
|
-
Detect the current `.workflow/` schema version, show available migrations, and interactively apply them step-by-step. Uses a migration registry that supports incremental version upgrades (e.g., 1.0 → 2.0 → 3.0).
|
|
16
|
-
|
|
17
|
-
Each migration step is previewed before execution. The user confirms each step in a loop.
|
|
18
|
-
</purpose>
|
|
19
|
-
|
|
20
|
-
<context>
|
|
21
|
-
$ARGUMENTS — optional flags.
|
|
22
|
-
|
|
23
|
-
**Flags:**
|
|
24
|
-
- `--dry-run` -- Preview migration plan without executing
|
|
25
|
-
- `--force` -- Skip confirmation prompts (apply all pending migrations)
|
|
26
|
-
|
|
27
|
-
**Migration registry:** `src/migrations/`
|
|
28
|
-
- Each migration is a standalone file (e.g., `v1-to-v2.ts`) exporting a `MigrationDef`
|
|
29
|
-
- All migrations are registered via `src/migrations/index.ts`
|
|
30
|
-
- Registry auto-chains: detects current version → walks chain → applies in order
|
|
31
|
-
- To add a new migration: create `src/migrations/v{N}-to-v{N+1}.ts`, register in `index.ts`
|
|
32
|
-
|
|
33
|
-
**CLI runner:** `src/migrations/run.ts`
|
|
34
|
-
- Executable entrypoint: `npx tsx src/migrations/run.ts [root] [--dry-run] [--force] [--json]`
|
|
35
|
-
- Outputs JSON (with `--json`) or human-readable text
|
|
36
|
-
|
|
37
|
-
**State version source:** `.workflow/state.json` → `version` field
|
|
38
|
-
</context>
|
|
39
|
-
|
|
40
|
-
<execution>
|
|
41
|
-
|
|
42
|
-
### Step 1: Detect Current State
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
1. Read .workflow/state.json
|
|
46
|
-
2. Extract version field (default "1.0" if missing)
|
|
47
|
-
3. Display:
|
|
48
|
-
|
|
49
|
-
=== Maestro Workflow Update ===
|
|
50
|
-
Project: {project_name}
|
|
51
|
-
Version: {version}
|
|
52
|
-
Location: {.workflow/ path}
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Step 2: Dry-Run Preview
|
|
56
|
-
|
|
57
|
-
Run the migration CLI in dry-run + JSON mode to get the full plan:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
npx tsx src/migrations/run.ts "$(pwd)" --dry-run --json
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Parse the JSON output. If status is `up-to-date`:
|
|
64
|
-
```
|
|
65
|
-
Already up to date (v{version})
|
|
66
|
-
```
|
|
67
|
-
→ EXIT
|
|
68
|
-
|
|
69
|
-
Otherwise display the migration plan:
|
|
70
|
-
```
|
|
71
|
-
Pending Migrations ({N} step(s)):
|
|
72
|
-
|
|
73
|
-
1. [v{from} → v{to}] {name}
|
|
74
|
-
{description}
|
|
75
|
-
|
|
76
|
-
2. [v{from} → v{to}] {name}
|
|
77
|
-
{description}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
If `--dry-run` flag was passed by user → display plan and EXIT.
|
|
81
|
-
|
|
82
|
-
### Step 3: Interactive Confirmation Loop
|
|
83
|
-
|
|
84
|
-
For each migration step (unless `--force`):
|
|
85
|
-
|
|
86
|
-
```
|
|
87
|
-
LOOP for step_index = 1 to N:
|
|
88
|
-
|
|
89
|
-
Display:
|
|
90
|
-
--- Step {step_index}/{N}: {name} ---
|
|
91
|
-
Version: v{from} → v{to}
|
|
92
|
-
|
|
93
|
-
Changes:
|
|
94
|
-
{description, indented}
|
|
95
|
-
|
|
96
|
-
IF NOT --force:
|
|
97
|
-
AskUserQuestion: "Apply this migration?"
|
|
98
|
-
Options: [yes / skip / abort]
|
|
99
|
-
|
|
100
|
-
- "yes" → proceed to Step 4 (execute)
|
|
101
|
-
- "skip" → WARN "Skipping may break the migration chain"
|
|
102
|
-
continue to next step
|
|
103
|
-
- "abort" → display summary of what was applied so far → EXIT
|
|
104
|
-
|
|
105
|
-
IF --force:
|
|
106
|
-
→ proceed to Step 4 (execute)
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Step 4: Execute Single Migration
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
1. Create backup:
|
|
113
|
-
Bash: cp .workflow/state.json .workflow/state.json.backup-v{from}-{timestamp}
|
|
114
|
-
|
|
115
|
-
2. Run migration:
|
|
116
|
-
Bash: npx tsx src/migrations/run.ts "$(pwd)" --json
|
|
117
|
-
|
|
118
|
-
NOTE: The runner executes ALL pending migrations. For step-by-step control,
|
|
119
|
-
read state.json, call the migration function directly, or use the runner
|
|
120
|
-
which stops on first failure.
|
|
121
|
-
|
|
122
|
-
3. Parse result JSON and display:
|
|
123
|
-
|
|
124
|
-
{status_icon} Step {N} completed: {name}
|
|
125
|
-
Summary: {summary}
|
|
126
|
-
Changes:
|
|
127
|
-
- {change_1}
|
|
128
|
-
- {change_2}
|
|
129
|
-
- ...
|
|
130
|
-
|
|
131
|
-
4. If failed:
|
|
132
|
-
Display: "Migration failed: {summary}"
|
|
133
|
-
Display: "Backup available at: {backup_path}"
|
|
134
|
-
Display: "Restore with: cp {backup_path} .workflow/state.json"
|
|
135
|
-
→ EXIT
|
|
136
|
-
|
|
137
|
-
5. Continue loop to next step
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Step 5: Summary
|
|
141
|
-
|
|
142
|
-
After all steps completed (or user aborted):
|
|
143
|
-
|
|
144
|
-
```
|
|
145
|
-
=== Migration Complete ===
|
|
146
|
-
Applied: {applied_count} / {total_count} migration(s)
|
|
147
|
-
Skipped: {skipped_count}
|
|
148
|
-
Version: v{original} → v{final}
|
|
149
|
-
Backup: .workflow/state.json.backup-v{original}-{timestamp}
|
|
150
|
-
|
|
151
|
-
Next steps:
|
|
152
|
-
/manage-status -- Verify project state
|
|
153
|
-
/maestro -- Continue workflow
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
</execution>
|
|
157
|
-
|
|
158
|
-
<error_codes>
|
|
159
|
-
| Code | Severity | Condition | Recovery |
|
|
160
|
-
|------|----------|-----------|----------|
|
|
161
|
-
| E001 | error | .workflow/state.json not found | Run /maestro-init first |
|
|
162
|
-
| E002 | error | state.json parse error | Check file for corruption |
|
|
163
|
-
| E003 | error | Migration function failed | Restore from backup |
|
|
164
|
-
| W001 | warning | Skipped migration may break version chain | Re-run /maestro-update later |
|
|
165
|
-
| W002 | warning | tsx not available | Install tsx: npm i -D tsx |
|
|
166
|
-
</error_codes>
|
|
167
|
-
|
|
168
|
-
<success_criteria>
|
|
169
|
-
- [ ] Current version detected from state.json
|
|
170
|
-
- [ ] Dry-run preview shows full migration plan without execution
|
|
171
|
-
- [ ] Each step confirmed interactively (unless --force)
|
|
172
|
-
- [ ] Backup created before each migration
|
|
173
|
-
- [ ] Migration executed and result displayed with change list
|
|
174
|
-
- [ ] Abort stops cleanly with partial summary
|
|
175
|
-
- [ ] Summary shows applied/skipped counts and version change
|
|
176
|
-
</success_criteria>
|
|
1
|
+
---
|
|
2
|
+
name: maestro-update
|
|
3
|
+
description: Interactive workflow migration — detect version, preview changes, apply upgrades
|
|
4
|
+
argument-hint: "[--dry-run] [--force]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- AskUserQuestion
|
|
13
|
+
---
|
|
14
|
+
<purpose>
|
|
15
|
+
Detect the current `.workflow/` schema version, show available migrations, and interactively apply them step-by-step. Uses a migration registry that supports incremental version upgrades (e.g., 1.0 → 2.0 → 3.0).
|
|
16
|
+
|
|
17
|
+
Each migration step is previewed before execution. The user confirms each step in a loop.
|
|
18
|
+
</purpose>
|
|
19
|
+
|
|
20
|
+
<context>
|
|
21
|
+
$ARGUMENTS — optional flags.
|
|
22
|
+
|
|
23
|
+
**Flags:**
|
|
24
|
+
- `--dry-run` -- Preview migration plan without executing
|
|
25
|
+
- `--force` -- Skip confirmation prompts (apply all pending migrations)
|
|
26
|
+
|
|
27
|
+
**Migration registry:** `src/migrations/`
|
|
28
|
+
- Each migration is a standalone file (e.g., `v1-to-v2.ts`) exporting a `MigrationDef`
|
|
29
|
+
- All migrations are registered via `src/migrations/index.ts`
|
|
30
|
+
- Registry auto-chains: detects current version → walks chain → applies in order
|
|
31
|
+
- To add a new migration: create `src/migrations/v{N}-to-v{N+1}.ts`, register in `index.ts`
|
|
32
|
+
|
|
33
|
+
**CLI runner:** `src/migrations/run.ts`
|
|
34
|
+
- Executable entrypoint: `npx tsx src/migrations/run.ts [root] [--dry-run] [--force] [--json]`
|
|
35
|
+
- Outputs JSON (with `--json`) or human-readable text
|
|
36
|
+
|
|
37
|
+
**State version source:** `.workflow/state.json` → `version` field
|
|
38
|
+
</context>
|
|
39
|
+
|
|
40
|
+
<execution>
|
|
41
|
+
|
|
42
|
+
### Step 1: Detect Current State
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
1. Read .workflow/state.json
|
|
46
|
+
2. Extract version field (default "1.0" if missing)
|
|
47
|
+
3. Display:
|
|
48
|
+
|
|
49
|
+
=== Maestro Workflow Update ===
|
|
50
|
+
Project: {project_name}
|
|
51
|
+
Version: {version}
|
|
52
|
+
Location: {.workflow/ path}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Step 2: Dry-Run Preview
|
|
56
|
+
|
|
57
|
+
Run the migration CLI in dry-run + JSON mode to get the full plan:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npx tsx src/migrations/run.ts "$(pwd)" --dry-run --json
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Parse the JSON output. If status is `up-to-date`:
|
|
64
|
+
```
|
|
65
|
+
Already up to date (v{version})
|
|
66
|
+
```
|
|
67
|
+
→ EXIT
|
|
68
|
+
|
|
69
|
+
Otherwise display the migration plan:
|
|
70
|
+
```
|
|
71
|
+
Pending Migrations ({N} step(s)):
|
|
72
|
+
|
|
73
|
+
1. [v{from} → v{to}] {name}
|
|
74
|
+
{description}
|
|
75
|
+
|
|
76
|
+
2. [v{from} → v{to}] {name}
|
|
77
|
+
{description}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
If `--dry-run` flag was passed by user → display plan and EXIT.
|
|
81
|
+
|
|
82
|
+
### Step 3: Interactive Confirmation Loop
|
|
83
|
+
|
|
84
|
+
For each migration step (unless `--force`):
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
LOOP for step_index = 1 to N:
|
|
88
|
+
|
|
89
|
+
Display:
|
|
90
|
+
--- Step {step_index}/{N}: {name} ---
|
|
91
|
+
Version: v{from} → v{to}
|
|
92
|
+
|
|
93
|
+
Changes:
|
|
94
|
+
{description, indented}
|
|
95
|
+
|
|
96
|
+
IF NOT --force:
|
|
97
|
+
AskUserQuestion: "Apply this migration?"
|
|
98
|
+
Options: [yes / skip / abort]
|
|
99
|
+
|
|
100
|
+
- "yes" → proceed to Step 4 (execute)
|
|
101
|
+
- "skip" → WARN "Skipping may break the migration chain"
|
|
102
|
+
continue to next step
|
|
103
|
+
- "abort" → display summary of what was applied so far → EXIT
|
|
104
|
+
|
|
105
|
+
IF --force:
|
|
106
|
+
→ proceed to Step 4 (execute)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Step 4: Execute Single Migration
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
1. Create backup:
|
|
113
|
+
Bash: cp .workflow/state.json .workflow/state.json.backup-v{from}-{timestamp}
|
|
114
|
+
|
|
115
|
+
2. Run migration:
|
|
116
|
+
Bash: npx tsx src/migrations/run.ts "$(pwd)" --json
|
|
117
|
+
|
|
118
|
+
NOTE: The runner executes ALL pending migrations. For step-by-step control,
|
|
119
|
+
read state.json, call the migration function directly, or use the runner
|
|
120
|
+
which stops on first failure.
|
|
121
|
+
|
|
122
|
+
3. Parse result JSON and display:
|
|
123
|
+
|
|
124
|
+
{status_icon} Step {N} completed: {name}
|
|
125
|
+
Summary: {summary}
|
|
126
|
+
Changes:
|
|
127
|
+
- {change_1}
|
|
128
|
+
- {change_2}
|
|
129
|
+
- ...
|
|
130
|
+
|
|
131
|
+
4. If failed:
|
|
132
|
+
Display: "Migration failed: {summary}"
|
|
133
|
+
Display: "Backup available at: {backup_path}"
|
|
134
|
+
Display: "Restore with: cp {backup_path} .workflow/state.json"
|
|
135
|
+
→ EXIT
|
|
136
|
+
|
|
137
|
+
5. Continue loop to next step
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Step 5: Summary
|
|
141
|
+
|
|
142
|
+
After all steps completed (or user aborted):
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
=== Migration Complete ===
|
|
146
|
+
Applied: {applied_count} / {total_count} migration(s)
|
|
147
|
+
Skipped: {skipped_count}
|
|
148
|
+
Version: v{original} → v{final}
|
|
149
|
+
Backup: .workflow/state.json.backup-v{original}-{timestamp}
|
|
150
|
+
|
|
151
|
+
Next steps:
|
|
152
|
+
/manage-status -- Verify project state
|
|
153
|
+
/maestro -- Continue workflow
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
</execution>
|
|
157
|
+
|
|
158
|
+
<error_codes>
|
|
159
|
+
| Code | Severity | Condition | Recovery |
|
|
160
|
+
|------|----------|-----------|----------|
|
|
161
|
+
| E001 | error | .workflow/state.json not found | Run /maestro-init first |
|
|
162
|
+
| E002 | error | state.json parse error | Check file for corruption |
|
|
163
|
+
| E003 | error | Migration function failed | Restore from backup |
|
|
164
|
+
| W001 | warning | Skipped migration may break version chain | Re-run /maestro-update later |
|
|
165
|
+
| W002 | warning | tsx not available | Install tsx: npm i -D tsx |
|
|
166
|
+
</error_codes>
|
|
167
|
+
|
|
168
|
+
<success_criteria>
|
|
169
|
+
- [ ] Current version detected from state.json
|
|
170
|
+
- [ ] Dry-run preview shows full migration plan without execution
|
|
171
|
+
- [ ] Each step confirmed interactively (unless --force)
|
|
172
|
+
- [ ] Backup created before each migration
|
|
173
|
+
- [ ] Migration executed and result displayed with change list
|
|
174
|
+
- [ ] Abort stops cleanly with partial summary
|
|
175
|
+
- [ ] Summary shows applied/skipped counts and version change
|
|
176
|
+
</success_criteria>
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: maestro-verify
|
|
3
|
-
description: Goal-Backward verification with 3-layer must-have checks, anti-pattern scan, Nyquist test coverage validation, and gap-fix plan generation
|
|
4
|
-
argument-hint: "[phase] [--skip-tests] [--skip-antipattern] [--dir <path>]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Edit
|
|
9
|
-
- Bash
|
|
10
|
-
- Glob
|
|
11
|
-
- Grep
|
|
12
|
-
- Agent
|
|
13
|
-
- AskUserQuestion
|
|
14
|
-
---
|
|
15
|
-
<purpose>
|
|
16
|
-
Verify execution results through three complementary methods:
|
|
17
|
-
1. **Goal-Backward verification** — 3-layer check (Truths → Artifacts → Wiring) that validates goals are actually achieved
|
|
18
|
-
2. **Anti-pattern scan** — detect stubs, placeholders, TODO/FIXME, empty returns in modified files
|
|
19
|
-
3. **Nyquist test coverage validation** — requirement-to-test mapping with gap classification
|
|
20
|
-
|
|
21
|
-
Supports dual-level verification:
|
|
22
|
-
- **Single plan**: `verify --dir scratch/plan-xxx` — verifies one plan, writes `verification.json` into plan dir
|
|
23
|
-
- **Milestone**: `verify` (no args) — aggregates all execute artifacts for current milestone into `scratch/{YYYYMMDD}-verify-M{N}-{slug}/milestone-verification.json`
|
|
24
|
-
|
|
25
|
-
Registers VRF artifact in state.json on completion.
|
|
26
|
-
</purpose>
|
|
27
|
-
|
|
28
|
-
<required_reading>
|
|
29
|
-
@~/.maestro/workflows/verify.md
|
|
30
|
-
</required_reading>
|
|
31
|
-
|
|
32
|
-
<deferred_reading>
|
|
33
|
-
- [verification.json](~/.maestro/templates/verification.json) — read when generating output
|
|
34
|
-
- [validation.json](~/.maestro/templates/validation.json) — read when generating test output
|
|
35
|
-
</deferred_reading>
|
|
36
|
-
|
|
37
|
-
<context>
|
|
38
|
-
$ARGUMENTS — phase number or no args for milestone-wide, with optional flags.
|
|
39
|
-
|
|
40
|
-
Flags (`--skip-tests`, `--skip-antipattern`, `--dir`), scope routing, output paths, and VRF artifact registration schema are defined in workflow `verify.md`.
|
|
41
|
-
</context>
|
|
42
|
-
|
|
43
|
-
<execution>
|
|
44
|
-
Follow '~/.maestro/workflows/verify.md' completely.
|
|
45
|
-
|
|
46
|
-
### Post-verify Knowledge Inquiry
|
|
47
|
-
|
|
48
|
-
After verification completes, evaluate inquiry triggers:
|
|
49
|
-
|
|
50
|
-
1. **Anti-pattern detection**: If anti-pattern scan found blockers (TODO/FIXME, stubs, empty returns):
|
|
51
|
-
→ Ask: "Verification found {N} anti-patterns. Should `quality-rules.md` be updated to enforce these checks? (`/spec-add quality`)"
|
|
52
|
-
|
|
53
|
-
2. **Constraint violation**: If Goal-Backward check found constraint_violations or missing wiring:
|
|
54
|
-
→ Ask: "Verification found architecture constraint violations. Should `architecture-constraints.md` be updated? (`/spec-add arch`)"
|
|
55
|
-
|
|
56
|
-
3. **Test coverage gaps**: If Nyquist gaps found with recurring pattern (same module/type across tasks):
|
|
57
|
-
→ Ask: "Persistent test coverage gap detected in {module}. Should it be added to `test-conventions.md` as a required test area? (`/spec-add test`)"
|
|
58
|
-
|
|
59
|
-
If user confirms, invoke `Skill({ skill: "spec-add", args: "<category> <content>" })`.
|
|
60
|
-
|
|
61
|
-
**Next-step routing on completion:**
|
|
62
|
-
- All checks pass, no gaps → /quality-review
|
|
63
|
-
- Gaps found (must-have failures or anti-pattern blockers) → /maestro-plan --gaps
|
|
64
|
-
- Low test coverage (Nyquist gaps) → /quality-test-gen
|
|
65
|
-
|
|
66
|
-
**Gap-fix closure loop:**
|
|
67
|
-
Gaps found → maestro-plan --gaps → maestro-execute → maestro-verify (re-run)
|
|
68
|
-
</execution>
|
|
69
|
-
|
|
70
|
-
<error_codes>
|
|
71
|
-
| Code | Severity | Condition | Recovery |
|
|
72
|
-
|------|----------|-----------|----------|
|
|
73
|
-
| E001 | error | No executed plans found for verification | Run maestro-execute first |
|
|
74
|
-
| E002 | error | Plan directory not found | Check --dir path |
|
|
75
|
-
| E003 | error | No execution results found (missing summaries) | Run maestro-execute first |
|
|
76
|
-
| W001 | warning | Test coverage below configured threshold | Review coverage gaps |
|
|
77
|
-
| W002 | warning | Anti-pattern blockers found in modified files | Fix blockers before proceeding |
|
|
78
|
-
</error_codes>
|
|
79
|
-
|
|
80
|
-
<success_criteria>
|
|
81
|
-
- [ ] Must-haves established (from convergence.criteria in tasks)
|
|
82
|
-
- [ ] All truths verified with status and evidence (Layer 1)
|
|
83
|
-
- [ ] All artifacts checked at L1 (exists), L2 (substantive), L3 (wired) (Layer 2)
|
|
84
|
-
- [ ] All key links verified with evidence (Layer 3)
|
|
85
|
-
- [ ] Anti-patterns scanned and categorized (unless skipped)
|
|
86
|
-
- [ ] Nyquist test coverage assessed (unless skipped)
|
|
87
|
-
- [ ] Fix plans generated for identified gaps
|
|
88
|
-
- [ ] verification.json written to plan dir (single plan) or milestone verify dir
|
|
89
|
-
- [ ] VRF artifact registered in state.json
|
|
90
|
-
</success_criteria>
|
|
1
|
+
---
|
|
2
|
+
name: maestro-verify
|
|
3
|
+
description: Goal-Backward verification with 3-layer must-have checks, anti-pattern scan, Nyquist test coverage validation, and gap-fix plan generation
|
|
4
|
+
argument-hint: "[phase] [--skip-tests] [--skip-antipattern] [--dir <path>]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Agent
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
<purpose>
|
|
16
|
+
Verify execution results through three complementary methods:
|
|
17
|
+
1. **Goal-Backward verification** — 3-layer check (Truths → Artifacts → Wiring) that validates goals are actually achieved
|
|
18
|
+
2. **Anti-pattern scan** — detect stubs, placeholders, TODO/FIXME, empty returns in modified files
|
|
19
|
+
3. **Nyquist test coverage validation** — requirement-to-test mapping with gap classification
|
|
20
|
+
|
|
21
|
+
Supports dual-level verification:
|
|
22
|
+
- **Single plan**: `verify --dir scratch/plan-xxx` — verifies one plan, writes `verification.json` into plan dir
|
|
23
|
+
- **Milestone**: `verify` (no args) — aggregates all execute artifacts for current milestone into `scratch/{YYYYMMDD}-verify-M{N}-{slug}/milestone-verification.json`
|
|
24
|
+
|
|
25
|
+
Registers VRF artifact in state.json on completion.
|
|
26
|
+
</purpose>
|
|
27
|
+
|
|
28
|
+
<required_reading>
|
|
29
|
+
@~/.maestro/workflows/verify.md
|
|
30
|
+
</required_reading>
|
|
31
|
+
|
|
32
|
+
<deferred_reading>
|
|
33
|
+
- [verification.json](~/.maestro/templates/verification.json) — read when generating output
|
|
34
|
+
- [validation.json](~/.maestro/templates/validation.json) — read when generating test output
|
|
35
|
+
</deferred_reading>
|
|
36
|
+
|
|
37
|
+
<context>
|
|
38
|
+
$ARGUMENTS — phase number or no args for milestone-wide, with optional flags.
|
|
39
|
+
|
|
40
|
+
Flags (`--skip-tests`, `--skip-antipattern`, `--dir`), scope routing, output paths, and VRF artifact registration schema are defined in workflow `verify.md`.
|
|
41
|
+
</context>
|
|
42
|
+
|
|
43
|
+
<execution>
|
|
44
|
+
Follow '~/.maestro/workflows/verify.md' completely.
|
|
45
|
+
|
|
46
|
+
### Post-verify Knowledge Inquiry
|
|
47
|
+
|
|
48
|
+
After verification completes, evaluate inquiry triggers:
|
|
49
|
+
|
|
50
|
+
1. **Anti-pattern detection**: If anti-pattern scan found blockers (TODO/FIXME, stubs, empty returns):
|
|
51
|
+
→ Ask: "Verification found {N} anti-patterns. Should `quality-rules.md` be updated to enforce these checks? (`/spec-add quality`)"
|
|
52
|
+
|
|
53
|
+
2. **Constraint violation**: If Goal-Backward check found constraint_violations or missing wiring:
|
|
54
|
+
→ Ask: "Verification found architecture constraint violations. Should `architecture-constraints.md` be updated? (`/spec-add arch`)"
|
|
55
|
+
|
|
56
|
+
3. **Test coverage gaps**: If Nyquist gaps found with recurring pattern (same module/type across tasks):
|
|
57
|
+
→ Ask: "Persistent test coverage gap detected in {module}. Should it be added to `test-conventions.md` as a required test area? (`/spec-add test`)"
|
|
58
|
+
|
|
59
|
+
If user confirms, invoke `Skill({ skill: "spec-add", args: "<category> <content>" })`.
|
|
60
|
+
|
|
61
|
+
**Next-step routing on completion:**
|
|
62
|
+
- All checks pass, no gaps → /quality-review
|
|
63
|
+
- Gaps found (must-have failures or anti-pattern blockers) → /maestro-plan --gaps
|
|
64
|
+
- Low test coverage (Nyquist gaps) → /quality-test-gen
|
|
65
|
+
|
|
66
|
+
**Gap-fix closure loop:**
|
|
67
|
+
Gaps found → maestro-plan --gaps → maestro-execute → maestro-verify (re-run)
|
|
68
|
+
</execution>
|
|
69
|
+
|
|
70
|
+
<error_codes>
|
|
71
|
+
| Code | Severity | Condition | Recovery |
|
|
72
|
+
|------|----------|-----------|----------|
|
|
73
|
+
| E001 | error | No executed plans found for verification | Run maestro-execute first |
|
|
74
|
+
| E002 | error | Plan directory not found | Check --dir path |
|
|
75
|
+
| E003 | error | No execution results found (missing summaries) | Run maestro-execute first |
|
|
76
|
+
| W001 | warning | Test coverage below configured threshold | Review coverage gaps |
|
|
77
|
+
| W002 | warning | Anti-pattern blockers found in modified files | Fix blockers before proceeding |
|
|
78
|
+
</error_codes>
|
|
79
|
+
|
|
80
|
+
<success_criteria>
|
|
81
|
+
- [ ] Must-haves established (from convergence.criteria in tasks)
|
|
82
|
+
- [ ] All truths verified with status and evidence (Layer 1)
|
|
83
|
+
- [ ] All artifacts checked at L1 (exists), L2 (substantive), L3 (wired) (Layer 2)
|
|
84
|
+
- [ ] All key links verified with evidence (Layer 3)
|
|
85
|
+
- [ ] Anti-patterns scanned and categorized (unless skipped)
|
|
86
|
+
- [ ] Nyquist test coverage assessed (unless skipped)
|
|
87
|
+
- [ ] Fix plans generated for identified gaps
|
|
88
|
+
- [ ] verification.json written to plan dir (single plan) or milestone verify dir
|
|
89
|
+
- [ ] VRF artifact registered in state.json
|
|
90
|
+
</success_criteria>
|