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.
Files changed (42) hide show
  1. package/.claude/commands/learn-investigate.md +195 -195
  2. package/.claude/commands/learn-retro.md +303 -303
  3. package/.claude/commands/learn-second-opinion.md +167 -167
  4. package/.claude/commands/maestro-amend.md +300 -300
  5. package/.claude/commands/maestro-analyze.md +126 -126
  6. package/.claude/commands/maestro-composer.md +354 -354
  7. package/.claude/commands/maestro-execute.md +114 -114
  8. package/.claude/commands/maestro-learn.md +140 -140
  9. package/.claude/commands/maestro-milestone-audit.md +68 -68
  10. package/.claude/commands/maestro-milestone-complete.md +75 -75
  11. package/.claude/commands/maestro-milestone-release.md +96 -96
  12. package/.claude/commands/maestro-plan.md +138 -138
  13. package/.claude/commands/maestro-player.md +404 -404
  14. package/.claude/commands/maestro-update.md +176 -176
  15. package/.claude/commands/maestro-verify.md +90 -90
  16. package/.claude/commands/manage-codebase-rebuild.md +75 -75
  17. package/.claude/commands/manage-knowhow-capture.md +193 -193
  18. package/.claude/commands/manage-knowhow.md +77 -77
  19. package/.claude/commands/manage-learn.md +67 -67
  20. package/.claude/commands/manage-wiki.md +62 -62
  21. package/.claude/commands/quality-business-test.md +110 -110
  22. package/.claude/commands/quality-retrospective.md +78 -78
  23. package/.claude/commands/spec-add.md +49 -49
  24. package/.claude/commands/spec-load.md +51 -51
  25. package/.claude/commands/spec-remove.md +51 -51
  26. package/.claude/commands/wiki-connect.md +62 -62
  27. package/.claude/commands/wiki-digest.md +69 -69
  28. package/.codex/skills/maestro-link-coordinate/SKILL.md +5 -5
  29. package/.codex/skills/maestro-player/SKILL.md +5 -5
  30. package/dashboard/dist-server/dashboard/src/server/coordinator/workflow-coordinator.js +3 -3
  31. package/dashboard/dist-server/dashboard/src/server/coordinator/workflow-coordinator.js.map +1 -1
  32. package/dashboard/dist-server/dashboard/src/server/execution/execution-scheduler.js +1 -1
  33. package/dashboard/dist-server/dashboard/src/server/execution/execution-scheduler.js.map +1 -1
  34. package/dist/src/commands/coordinate.js +2 -2
  35. package/dist/src/commands/coordinate.js.map +1 -1
  36. package/dist/src/hooks/coordinator-tracker.d.ts +1 -1
  37. package/dist/src/hooks/coordinator-tracker.js +3 -3
  38. package/dist/src/hooks/coordinator-tracker.js.map +1 -1
  39. package/package.json +1 -1
  40. package/workflows/maestro-link-coordinate.md +3 -3
  41. package/workflows/maestro.codex.md +2 -2
  42. package/workflows/maestro-coordinate.codex.md +0 -281
@@ -1,77 +1,77 @@
1
- ---
2
- name: manage-knowhow
3
- description: Manage memory entries — workflow memory (.workflow/knowhow/) and system memory (~/.claude/projects/*/memory/)
4
- argument-hint: "[list|search|view|edit|delete|prune] [query|id|file] [--store workflow|system|all] [--tag tag] [--type compact|tip]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Edit
9
- - Bash
10
- - Glob
11
- - Grep
12
- - AskUserQuestion
13
- ---
14
- <purpose>
15
- Unified memory management across two stores:
16
- 1. **Workflow knowhow** (`.workflow/knowhow/`) — Session compacts and tips with JSON index, created by `manage-knowhow-capture`
17
- 2. **System memory** (`~/.claude/projects/{project}/memory/`) — Claude Code auto-memory (MEMORY.md + topic files), persists across conversations
18
-
19
- Provides list/search/view/edit/delete/prune operations. Default store is `all` (show both).
20
- </purpose>
21
-
22
- <required_reading>
23
- @~/.maestro/workflows/knowhow.md
24
- </required_reading>
25
-
26
- <context>
27
- Arguments: $ARGUMENTS
28
-
29
- Dual store architecture (paths, formats, index) defined in workflow knowhow.md.
30
-
31
- **Subcommands:**
32
- - `list` — List entries from both stores (default if no arguments)
33
- - `search <query>` — Full-text search across both stores
34
- - `view <id|file>` — Display a workflow entry by ID or system file by name
35
- - `edit <file>` — Edit a system memory file (MEMORY.md or topic file)
36
- - `delete <id|file>` — Remove an entry/file (with confirmation)
37
- - `prune` — Bulk cleanup by criteria
38
-
39
- **Flags:**
40
- - `--store <workflow|system|all>` — Target store (default: `all` for list/search, inferred for other ops)
41
- - `--tag <tag>` — Filter by tag (workflow store)
42
- - `--type <compact|tip>` — Filter by entry type (workflow store)
43
- - `--before <YYYY-MM-DD>` — Entries before date
44
- - `--after <YYYY-MM-DD>` — Entries after date
45
- - `--dry-run` — Preview destructive ops without executing
46
- - `--confirm` — Skip confirmation prompt
47
- </context>
48
-
49
- <execution>
50
- Follow '~/.maestro/workflows/knowhow.md' Part A (KnowHow Management) completely.
51
- </execution>
52
-
53
- <error_codes>
54
- | Code | Severity | Description | Stage |
55
- |------|----------|-------------|-------|
56
- | E001 | error | No memory stores found — run `/manage-knowhow-capture` or create MEMORY.md | resolve_paths |
57
- | E002 | error | Entry ID or filename not found | execute_view, execute_delete |
58
- | E003 | error | Prune requires at least one filter (--tag, --type, --before, --after) | execute_prune |
59
- | E004 | error | Cannot delete MEMORY.md — use `edit` subcommand instead | execute_delete |
60
- | W001 | warning | Workflow index has orphaned files or dangling references | integrity_check |
61
- | W002 | warning | MEMORY.md references non-existent topic file | integrity_check |
62
- | W003 | warning | MEMORY.md exceeds 200 lines — content will be truncated at load | execute_edit |
63
- </error_codes>
64
-
65
- <success_criteria>
66
- - [ ] Both store paths correctly resolved
67
- - [ ] Subcommand correctly detected from arguments
68
- - [ ] Store auto-detected from argument format (KNW-*/TIP-* vs filename)
69
- - [ ] List: both stores displayed with appropriate formatting
70
- - [ ] Search: results from both stores, ranked by relevance
71
- - [ ] View: correct store selected, full content displayed
72
- - [ ] Edit: system memory files editable, MEMORY.md kept under 200 lines
73
- - [ ] Delete: MEMORY.md protected, confirmation required, references checked
74
- - [ ] Prune: workflow-only, filters validated, index updated
75
- - [ ] Integrity check catches orphans and broken links
76
- - [ ] Next step: `/manage-knowhow-capture compact` to save new knowhow, or `/manage-status` to continue workflow
77
- </success_criteria>
1
+ ---
2
+ name: manage-knowhow
3
+ description: Manage memory entries — workflow memory (.workflow/knowhow/) and system memory (~/.claude/projects/*/memory/)
4
+ argument-hint: "[list|search|view|edit|delete|prune] [query|id|file] [--store workflow|system|all] [--tag tag] [--type compact|tip]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - AskUserQuestion
13
+ ---
14
+ <purpose>
15
+ Unified memory management across two stores:
16
+ 1. **Workflow knowhow** (`.workflow/knowhow/`) — Session compacts and tips with JSON index, created by `manage-knowhow-capture`
17
+ 2. **System memory** (`~/.claude/projects/{project}/memory/`) — Claude Code auto-memory (MEMORY.md + topic files), persists across conversations
18
+
19
+ Provides list/search/view/edit/delete/prune operations. Default store is `all` (show both).
20
+ </purpose>
21
+
22
+ <required_reading>
23
+ @~/.maestro/workflows/knowhow.md
24
+ </required_reading>
25
+
26
+ <context>
27
+ Arguments: $ARGUMENTS
28
+
29
+ Dual store architecture (paths, formats, index) defined in workflow knowhow.md.
30
+
31
+ **Subcommands:**
32
+ - `list` — List entries from both stores (default if no arguments)
33
+ - `search <query>` — Full-text search across both stores
34
+ - `view <id|file>` — Display a workflow entry by ID or system file by name
35
+ - `edit <file>` — Edit a system memory file (MEMORY.md or topic file)
36
+ - `delete <id|file>` — Remove an entry/file (with confirmation)
37
+ - `prune` — Bulk cleanup by criteria
38
+
39
+ **Flags:**
40
+ - `--store <workflow|system|all>` — Target store (default: `all` for list/search, inferred for other ops)
41
+ - `--tag <tag>` — Filter by tag (workflow store)
42
+ - `--type <compact|tip>` — Filter by entry type (workflow store)
43
+ - `--before <YYYY-MM-DD>` — Entries before date
44
+ - `--after <YYYY-MM-DD>` — Entries after date
45
+ - `--dry-run` — Preview destructive ops without executing
46
+ - `--confirm` — Skip confirmation prompt
47
+ </context>
48
+
49
+ <execution>
50
+ Follow '~/.maestro/workflows/knowhow.md' Part A (KnowHow Management) completely.
51
+ </execution>
52
+
53
+ <error_codes>
54
+ | Code | Severity | Description | Stage |
55
+ |------|----------|-------------|-------|
56
+ | E001 | error | No memory stores found — run `/manage-knowhow-capture` or create MEMORY.md | resolve_paths |
57
+ | E002 | error | Entry ID or filename not found | execute_view, execute_delete |
58
+ | E003 | error | Prune requires at least one filter (--tag, --type, --before, --after) | execute_prune |
59
+ | E004 | error | Cannot delete MEMORY.md — use `edit` subcommand instead | execute_delete |
60
+ | W001 | warning | Workflow index has orphaned files or dangling references | integrity_check |
61
+ | W002 | warning | MEMORY.md references non-existent topic file | integrity_check |
62
+ | W003 | warning | MEMORY.md exceeds 200 lines — content will be truncated at load | execute_edit |
63
+ </error_codes>
64
+
65
+ <success_criteria>
66
+ - [ ] Both store paths correctly resolved
67
+ - [ ] Subcommand correctly detected from arguments
68
+ - [ ] Store auto-detected from argument format (KNW-*/TIP-* vs filename)
69
+ - [ ] List: both stores displayed with appropriate formatting
70
+ - [ ] Search: results from both stores, ranked by relevance
71
+ - [ ] View: correct store selected, full content displayed
72
+ - [ ] Edit: system memory files editable, MEMORY.md kept under 200 lines
73
+ - [ ] Delete: MEMORY.md protected, confirmation required, references checked
74
+ - [ ] Prune: workflow-only, filters validated, index updated
75
+ - [ ] Integrity check catches orphans and broken links
76
+ - [ ] Next step: `/manage-knowhow-capture compact` to save new knowhow, or `/manage-status` to continue workflow
77
+ </success_criteria>
@@ -1,67 +1,67 @@
1
- ---
2
- name: manage-learn
3
- description: Capture, search, and review atomic learning insights and tips into .workflow/learning/lessons.jsonl
4
- argument-hint: "[<text>|tip <text>|list|search|show <id>] [--category ...] [--tag t1,t2] [--phase N] [--confidence ...]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Edit
9
- - Bash
10
- - Glob
11
- - Grep
12
- - AskUserQuestion
13
- ---
14
- <purpose>
15
- Unified atomic knowledge capture for the workflow learning library. Captures two types of knowledge:
16
- - **Insights**: Timeless "eureka moment" entries (patterns, gotchas, techniques) — the default mode
17
- - **Tips**: Quick contextual notes for cross-session recovery (formerly in `manage-knowhow-capture tip`)
18
-
19
- Both types are stored in `.workflow/learning/lessons.jsonl` with auto-detected phase linkage and keyword-based category inference. Tips are distinguished by `source: "tip"` and implicitly tagged `tip`. Same store as retrospective output, so search and list see the entire knowledge corpus.
20
- </purpose>
21
-
22
- <required_reading>
23
- @~/.maestro/workflows/learn.md
24
- </required_reading>
25
-
26
- <context>
27
- Arguments: $ARGUMENTS
28
-
29
- **Modes (auto-detected from first token):**
30
- - `"<insight text>"` (or any non-keyword text) → insight capture mode
31
- - `tip <text>` → tip capture mode (quick contextual note, auto-tagged `tip`)
32
- - `list` → list recent entries (default 20)
33
- - `search <query>` → text search across lessons.jsonl
34
- - `show <INS-id>` → full detail with phase context
35
- - empty → AskUserQuestion to prompt for text
36
-
37
- Flags, storage paths, and shared store rationale defined in workflow learn.md.
38
- </context>
39
-
40
- <execution>
41
- Follow `~/.maestro/workflows/learn.md` Stages 1–5 in order.
42
- </execution>
43
-
44
- <error_codes>
45
- | Code | Severity | Description | Stage |
46
- |------|----------|-------------|-------|
47
- | E001 | error | `.workflow/` not initialized — run `/maestro-init` first | parse_input |
48
- | E002 | error | Unknown `--category` value (allowed: pattern, antipattern, decision, tool, gotcha, technique, tip) | parse_input |
49
- | E003 | error | `show` mode requires an INS-id argument | show |
50
- | E004 | error | Insight id not found in lessons.jsonl | show |
51
- | W001 | warning | Auto-phase detection found a current_phase but no matching artifact in registry; phase set to null | capture |
52
- | W002 | warning | learning-index.json out of sync with lessons.jsonl (different row count); offer to rebuild | list/search |
53
- </error_codes>
54
-
55
- <success_criteria>
56
- - [ ] Mode correctly routed (capture / list / search / show)
57
- - [ ] Capture: `lessons.jsonl` row appended with valid JSON and all required fields
58
- - [ ] Capture: `learning-index.json` updated with matching entry
59
- - [ ] Capture: phase auto-link resolves correctly via artifact registry when `state.json` has `current_phase`
60
- - [ ] Capture: category inference produces a sensible default when `--category` absent
61
- - [ ] List: filters apply, output sorted newest-first, default limit 20
62
- - [ ] Search: results ranked by title (3) > tags (2) > summary (1) match
63
- - [ ] Show: full insight displayed with phase context and routed-artifact link if any
64
- - [ ] No file modifications outside `.workflow/learning/`
65
- - [ ] Confirmation banner displayed with INS-id and next-step hints
66
- - [ ] Next step: `/manage-learn list` to browse, or `/manage-learn search <query>` to find related insights
67
- </success_criteria>
1
+ ---
2
+ name: manage-learn
3
+ description: Capture, search, and review atomic learning insights and tips into .workflow/learning/lessons.jsonl
4
+ argument-hint: "[<text>|tip <text>|list|search|show <id>] [--category ...] [--tag t1,t2] [--phase N] [--confidence ...]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - AskUserQuestion
13
+ ---
14
+ <purpose>
15
+ Unified atomic knowledge capture for the workflow learning library. Captures two types of knowledge:
16
+ - **Insights**: Timeless "eureka moment" entries (patterns, gotchas, techniques) — the default mode
17
+ - **Tips**: Quick contextual notes for cross-session recovery (formerly in `manage-knowhow-capture tip`)
18
+
19
+ Both types are stored in `.workflow/learning/lessons.jsonl` with auto-detected phase linkage and keyword-based category inference. Tips are distinguished by `source: "tip"` and implicitly tagged `tip`. Same store as retrospective output, so search and list see the entire knowledge corpus.
20
+ </purpose>
21
+
22
+ <required_reading>
23
+ @~/.maestro/workflows/learn.md
24
+ </required_reading>
25
+
26
+ <context>
27
+ Arguments: $ARGUMENTS
28
+
29
+ **Modes (auto-detected from first token):**
30
+ - `"<insight text>"` (or any non-keyword text) → insight capture mode
31
+ - `tip <text>` → tip capture mode (quick contextual note, auto-tagged `tip`)
32
+ - `list` → list recent entries (default 20)
33
+ - `search <query>` → text search across lessons.jsonl
34
+ - `show <INS-id>` → full detail with phase context
35
+ - empty → AskUserQuestion to prompt for text
36
+
37
+ Flags, storage paths, and shared store rationale defined in workflow learn.md.
38
+ </context>
39
+
40
+ <execution>
41
+ Follow `~/.maestro/workflows/learn.md` Stages 1–5 in order.
42
+ </execution>
43
+
44
+ <error_codes>
45
+ | Code | Severity | Description | Stage |
46
+ |------|----------|-------------|-------|
47
+ | E001 | error | `.workflow/` not initialized — run `/maestro-init` first | parse_input |
48
+ | E002 | error | Unknown `--category` value (allowed: pattern, antipattern, decision, tool, gotcha, technique, tip) | parse_input |
49
+ | E003 | error | `show` mode requires an INS-id argument | show |
50
+ | E004 | error | Insight id not found in lessons.jsonl | show |
51
+ | W001 | warning | Auto-phase detection found a current_phase but no matching artifact in registry; phase set to null | capture |
52
+ | W002 | warning | learning-index.json out of sync with lessons.jsonl (different row count); offer to rebuild | list/search |
53
+ </error_codes>
54
+
55
+ <success_criteria>
56
+ - [ ] Mode correctly routed (capture / list / search / show)
57
+ - [ ] Capture: `lessons.jsonl` row appended with valid JSON and all required fields
58
+ - [ ] Capture: `learning-index.json` updated with matching entry
59
+ - [ ] Capture: phase auto-link resolves correctly via artifact registry when `state.json` has `current_phase`
60
+ - [ ] Capture: category inference produces a sensible default when `--category` absent
61
+ - [ ] List: filters apply, output sorted newest-first, default limit 20
62
+ - [ ] Search: results ranked by title (3) > tags (2) > summary (1) match
63
+ - [ ] Show: full insight displayed with phase context and routed-artifact link if any
64
+ - [ ] No file modifications outside `.workflow/learning/`
65
+ - [ ] Confirmation banner displayed with INS-id and next-step hints
66
+ - [ ] Next step: `/manage-learn list` to browse, or `/manage-learn search <query>` to find related insights
67
+ </success_criteria>
@@ -1,62 +1,62 @@
1
- ---
2
- name: manage-wiki
3
- description: Wiki knowledge graph management — health dashboard, orphan cleanup, entry search, and graph statistics
4
- argument-hint: "[health|search|cleanup|stats] [options]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Edit
9
- - Bash
10
- - Glob
11
- - Grep
12
- - AskUserQuestion
13
- ---
14
- <purpose>
15
- Unified wiki graph management command. Provides interactive access to wiki health monitoring, entry search, orphan cleanup, and graph statistics — the day-to-day operations that keep the knowledge graph healthy.
16
-
17
- Complements `/wiki-connect` (link discovery) and `/wiki-digest` (synthesis) with operational tooling.
18
- </purpose>
19
-
20
- <required_reading>
21
- @~/.maestro/workflows/wiki-manage.md
22
- </required_reading>
23
-
24
- <context>
25
- $ARGUMENTS — subcommand and optional flags.
26
-
27
- **Subcommands:**
28
- | Subcommand | Description |
29
- |-----------|-------------|
30
- | `health` | Health dashboard — score, broken links, orphans, hubs (default) |
31
- | `search <query>` | Interactive BM25 search with follow-up actions |
32
- | `cleanup` | Find and resolve orphans, broken links, stale entries |
33
- | `stats` | Graph statistics — type distribution, tag frequency, growth trends |
34
- | No args | Same as `health` |
35
-
36
- **Flags:**
37
- - `--type <type>` — Filter by wiki type: spec, knowhow, note, lesson, issue
38
- - `--fix` — Auto-fix issues found during cleanup (remove broken links, suggest connections)
39
- - `--json` — Output in JSON format
40
- </context>
41
-
42
- <execution>
43
- Follow '~/.maestro/workflows/wiki-manage.md' completely.
44
- </execution>
45
-
46
- <error_codes>
47
- | Code | Severity | Description | Stage |
48
- |------|----------|-------------|-------|
49
- | E001 | fatal | `.workflow/` not initialized — run `/maestro-init` first | validate |
50
- | E002 | fatal | No wiki entries found — create content first | load |
51
- | E003 | error | Invalid subcommand | parse_input |
52
- | W001 | warning | Health score below 50 — graph needs attention | health |
53
- | W002 | warning | Orphan cleanup had partial failures | cleanup |
54
- </error_codes>
55
-
56
- <success_criteria>
57
- - [ ] Subcommand parsed (health/search/cleanup/stats)
58
- - [ ] Wiki data loaded via `maestro wiki` CLI
59
- - [ ] Results displayed in formatted output
60
- - [ ] If cleanup --fix: issues resolved and delta reported
61
- - [ ] Next-step suggestions provided
62
- </success_criteria>
1
+ ---
2
+ name: manage-wiki
3
+ description: Wiki knowledge graph management — health dashboard, orphan cleanup, entry search, and graph statistics
4
+ argument-hint: "[health|search|cleanup|stats] [options]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - AskUserQuestion
13
+ ---
14
+ <purpose>
15
+ Unified wiki graph management command. Provides interactive access to wiki health monitoring, entry search, orphan cleanup, and graph statistics — the day-to-day operations that keep the knowledge graph healthy.
16
+
17
+ Complements `/wiki-connect` (link discovery) and `/wiki-digest` (synthesis) with operational tooling.
18
+ </purpose>
19
+
20
+ <required_reading>
21
+ @~/.maestro/workflows/wiki-manage.md
22
+ </required_reading>
23
+
24
+ <context>
25
+ $ARGUMENTS — subcommand and optional flags.
26
+
27
+ **Subcommands:**
28
+ | Subcommand | Description |
29
+ |-----------|-------------|
30
+ | `health` | Health dashboard — score, broken links, orphans, hubs (default) |
31
+ | `search <query>` | Interactive BM25 search with follow-up actions |
32
+ | `cleanup` | Find and resolve orphans, broken links, stale entries |
33
+ | `stats` | Graph statistics — type distribution, tag frequency, growth trends |
34
+ | No args | Same as `health` |
35
+
36
+ **Flags:**
37
+ - `--type <type>` — Filter by wiki type: spec, knowhow, note, lesson, issue
38
+ - `--fix` — Auto-fix issues found during cleanup (remove broken links, suggest connections)
39
+ - `--json` — Output in JSON format
40
+ </context>
41
+
42
+ <execution>
43
+ Follow '~/.maestro/workflows/wiki-manage.md' completely.
44
+ </execution>
45
+
46
+ <error_codes>
47
+ | Code | Severity | Description | Stage |
48
+ |------|----------|-------------|-------|
49
+ | E001 | fatal | `.workflow/` not initialized — run `/maestro-init` first | validate |
50
+ | E002 | fatal | No wiki entries found — create content first | load |
51
+ | E003 | error | Invalid subcommand | parse_input |
52
+ | W001 | warning | Health score below 50 — graph needs attention | health |
53
+ | W002 | warning | Orphan cleanup had partial failures | cleanup |
54
+ </error_codes>
55
+
56
+ <success_criteria>
57
+ - [ ] Subcommand parsed (health/search/cleanup/stats)
58
+ - [ ] Wiki data loaded via `maestro wiki` CLI
59
+ - [ ] Results displayed in formatted output
60
+ - [ ] If cleanup --fix: issues resolved and delta reported
61
+ - [ ] Next-step suggestions provided
62
+ </success_criteria>
@@ -1,110 +1,110 @@
1
- ---
2
- name: quality-business-test
3
- description: PRD-forward business testing with requirement traceability, fixture generation, and multi-layer execution
4
- argument-hint: "<phase> [--spec SPEC-xxx] [--layer L1|L2|L3] [--gen-code] [--dry-run] [--re-run] [--auto]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Edit
9
- - Bash
10
- - Glob
11
- - Grep
12
- - Agent
13
- - AskUserQuestion
14
- ---
15
- <purpose>
16
- Validate built features against PRD acceptance criteria through automated multi-layer business testing. Unlike quality-test (interactive UAT from code gaps) and quality-test-gen (generate tests from coverage gaps), this command starts from REQ-*.md acceptance criteria and works forward to verify business rules are satisfied.
17
-
18
- Key mechanisms:
19
- - **PRD-forward extraction**: Parse REQ-*.md acceptance criteria with RFC 2119 priority mapping
20
- - **Three-tier fixture generation**: Schema-derived (valid/invalid/boundary), criteria-derived (expected outcomes), scenario-derived (multi-entity packs)
21
- - **Progressive L1-L3 layers**: Interface Contract -> Business Rule -> Business Scenario (fail-fast on critical)
22
- - **Generator-Critic loop**: Max 3 iterations per layer to distinguish test defects from code defects
23
- - **Requirement traceability**: Every failure traces back to REQ-NNN:AC-N
24
- - **Degraded mode**: Falls back to success_criteria + plan.json when no spec package exists
25
- </purpose>
26
-
27
- <required_reading>
28
- @~/.maestro/workflows/business-test.md
29
- </required_reading>
30
-
31
- <context>
32
- Phase: $ARGUMENTS (required -- phase number)
33
-
34
- **Flags:**
35
- - `--spec SPEC-xxx` -- Explicit spec reference (default: auto-detect from index.json.spec_ref)
36
- - `--layer L1|L2|L3` -- Run only specific layer (default: progressive L1->L2->L3)
37
- - `--gen-code` -- Generate framework-specific test classes (JUnit/RestAssured, supertest/vitest, pytest/httpx)
38
- - `--dry-run` -- Extract scenarios and fixtures only, don't execute
39
- - `--re-run` -- Re-run only previously failed/blocked scenarios
40
- - `--auto` -- Skip interactive confirmations
41
-
42
- **Layer definitions:**
43
-
44
- | Layer | Name | Tests | Source |
45
- |-------|------|-------|--------|
46
- | L1 | Interface Contract | Single endpoint request/response, input validation, schema compliance | Architecture API endpoints + REQ AC |
47
- | L2 | Business Rule | Multi-step logic, state transitions, business constraints, edge cases | REQ acceptance criteria + NFR |
48
- | L3 | Business Scenario | Full user flows, multi-service chains, error propagation | Epic user stories |
49
-
50
- **Priority mapping (RFC 2119):**
51
-
52
- | Keyword | Priority | Failure = |
53
- |---------|----------|-----------|
54
- | MUST / SHALL | critical | blocker |
55
- | SHOULD / RECOMMENDED | high | major |
56
- | MAY / OPTIONAL | medium | minor |
57
-
58
- Context files:
59
- - `.workflow/.spec/SPEC-xxx/requirements/REQ-*.md` -- Functional requirements + acceptance criteria
60
- - `.workflow/.spec/SPEC-xxx/requirements/NFR-*.md` -- Non-functional requirements
61
- - `.workflow/.spec/SPEC-xxx/architecture/_index.md` -- API endpoints, data model, state machines
62
- - `.workflow/.spec/SPEC-xxx/epics/EPIC-*.md` -- User stories for E2E scenarios
63
- - Phase artifacts (resolve via `state.json.artifacts[]` → `.workflow/scratch/` paths):
64
- - plan.json -- Task overview (degraded mode)
65
- - verification.json -- Cross-reference for must_haves
66
- - .tests/business/ -- Previous business test artifacts
67
- </context>
68
-
69
- <execution>
70
- Follow '~/.maestro/workflows/business-test.md' completely.
71
-
72
- **Next-step routing on completion:**
73
- - All requirements verified → `/maestro-milestone-audit`
74
- - Failures found → `/quality-debug --from-business-test {phase}`
75
- - Re-run all pass → `/maestro-verify {phase}`
76
- - Low coverage → `/quality-test-gen {phase}`
77
- - Need integration tests → `/quality-integration-test {phase}`
78
- </execution>
79
-
80
- <error_codes>
81
- | Code | Severity | Condition | Recovery |
82
- |------|----------|-----------|----------|
83
- | E001 | error | Phase number required | Prompt user for phase number |
84
- | E002 | error | Phase artifacts not found | Verify phase has artifacts in state.json |
85
- | E003 | error | No spec package AND no success_criteria (can't extract scenarios) | Run maestro-spec-generate or maestro-plan first |
86
- | E004 | error | L1 critical failures block L2/L3 progression | Fix blockers first via quality-debug |
87
- | W001 | warning | Degraded mode (no spec package, using success_criteria) | Consider running maestro-spec-generate for full coverage |
88
- | W002 | warning | Some requirements have no testable acceptance criteria | Note in report, suggest spec refinement |
89
- | W003 | warning | Generator-Critic loop exhausted (3 iterations) without full convergence | Accept current state, proceed with known defects |
90
- | W004 | warning | Mock services not available for L3 scenarios | Skip L3 or run with --gen-code for TestContainers |
91
- </error_codes>
92
-
93
- <success_criteria>
94
- - [ ] Phase resolved and spec package loaded (or degraded mode activated)
95
- - [ ] Business test scenarios extracted from REQ acceptance criteria
96
- - [ ] RFC 2119 keywords mapped to test priorities
97
- - [ ] Test fixtures generated (valid/invalid/boundary per REQ data model)
98
- - [ ] business-test-plan.json written with layer distribution
99
- - [ ] User confirmed plan (or --auto skipped confirmation)
100
- - [ ] Test code generated if --gen-code (framework-appropriate)
101
- - [ ] L1 executed with Generator-Critic loop (max 3 iterations)
102
- - [ ] L2 executed if no L1 critical failures
103
- - [ ] L3 executed if no L2 critical failures
104
- - [ ] Traceability matrix built (every result -> REQ-NNN:AC-N)
105
- - [ ] business-test-report.json written with requirement_coverage
106
- - [ ] business-test-summary.md written (human-readable)
107
- - [ ] index.json updated with business_test section
108
- - [ ] Issues auto-created for failures (ISS-* in issues.jsonl with req_ref)
109
- - [ ] Next step routed based on results
110
- </success_criteria>
1
+ ---
2
+ name: quality-business-test
3
+ description: PRD-forward business testing with requirement traceability, fixture generation, and multi-layer execution
4
+ argument-hint: "<phase> [--spec SPEC-xxx] [--layer L1|L2|L3] [--gen-code] [--dry-run] [--re-run] [--auto]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Agent
13
+ - AskUserQuestion
14
+ ---
15
+ <purpose>
16
+ Validate built features against PRD acceptance criteria through automated multi-layer business testing. Unlike quality-test (interactive UAT from code gaps) and quality-test-gen (generate tests from coverage gaps), this command starts from REQ-*.md acceptance criteria and works forward to verify business rules are satisfied.
17
+
18
+ Key mechanisms:
19
+ - **PRD-forward extraction**: Parse REQ-*.md acceptance criteria with RFC 2119 priority mapping
20
+ - **Three-tier fixture generation**: Schema-derived (valid/invalid/boundary), criteria-derived (expected outcomes), scenario-derived (multi-entity packs)
21
+ - **Progressive L1-L3 layers**: Interface Contract -> Business Rule -> Business Scenario (fail-fast on critical)
22
+ - **Generator-Critic loop**: Max 3 iterations per layer to distinguish test defects from code defects
23
+ - **Requirement traceability**: Every failure traces back to REQ-NNN:AC-N
24
+ - **Degraded mode**: Falls back to success_criteria + plan.json when no spec package exists
25
+ </purpose>
26
+
27
+ <required_reading>
28
+ @~/.maestro/workflows/business-test.md
29
+ </required_reading>
30
+
31
+ <context>
32
+ Phase: $ARGUMENTS (required -- phase number)
33
+
34
+ **Flags:**
35
+ - `--spec SPEC-xxx` -- Explicit spec reference (default: auto-detect from index.json.spec_ref)
36
+ - `--layer L1|L2|L3` -- Run only specific layer (default: progressive L1->L2->L3)
37
+ - `--gen-code` -- Generate framework-specific test classes (JUnit/RestAssured, supertest/vitest, pytest/httpx)
38
+ - `--dry-run` -- Extract scenarios and fixtures only, don't execute
39
+ - `--re-run` -- Re-run only previously failed/blocked scenarios
40
+ - `--auto` -- Skip interactive confirmations
41
+
42
+ **Layer definitions:**
43
+
44
+ | Layer | Name | Tests | Source |
45
+ |-------|------|-------|--------|
46
+ | L1 | Interface Contract | Single endpoint request/response, input validation, schema compliance | Architecture API endpoints + REQ AC |
47
+ | L2 | Business Rule | Multi-step logic, state transitions, business constraints, edge cases | REQ acceptance criteria + NFR |
48
+ | L3 | Business Scenario | Full user flows, multi-service chains, error propagation | Epic user stories |
49
+
50
+ **Priority mapping (RFC 2119):**
51
+
52
+ | Keyword | Priority | Failure = |
53
+ |---------|----------|-----------|
54
+ | MUST / SHALL | critical | blocker |
55
+ | SHOULD / RECOMMENDED | high | major |
56
+ | MAY / OPTIONAL | medium | minor |
57
+
58
+ Context files:
59
+ - `.workflow/.spec/SPEC-xxx/requirements/REQ-*.md` -- Functional requirements + acceptance criteria
60
+ - `.workflow/.spec/SPEC-xxx/requirements/NFR-*.md` -- Non-functional requirements
61
+ - `.workflow/.spec/SPEC-xxx/architecture/_index.md` -- API endpoints, data model, state machines
62
+ - `.workflow/.spec/SPEC-xxx/epics/EPIC-*.md` -- User stories for E2E scenarios
63
+ - Phase artifacts (resolve via `state.json.artifacts[]` → `.workflow/scratch/` paths):
64
+ - plan.json -- Task overview (degraded mode)
65
+ - verification.json -- Cross-reference for must_haves
66
+ - .tests/business/ -- Previous business test artifacts
67
+ </context>
68
+
69
+ <execution>
70
+ Follow '~/.maestro/workflows/business-test.md' completely.
71
+
72
+ **Next-step routing on completion:**
73
+ - All requirements verified → `/maestro-milestone-audit`
74
+ - Failures found → `/quality-debug --from-business-test {phase}`
75
+ - Re-run all pass → `/maestro-verify {phase}`
76
+ - Low coverage → `/quality-test-gen {phase}`
77
+ - Need integration tests → `/quality-integration-test {phase}`
78
+ </execution>
79
+
80
+ <error_codes>
81
+ | Code | Severity | Condition | Recovery |
82
+ |------|----------|-----------|----------|
83
+ | E001 | error | Phase number required | Prompt user for phase number |
84
+ | E002 | error | Phase artifacts not found | Verify phase has artifacts in state.json |
85
+ | E003 | error | No spec package AND no success_criteria (can't extract scenarios) | Run maestro-spec-generate or maestro-plan first |
86
+ | E004 | error | L1 critical failures block L2/L3 progression | Fix blockers first via quality-debug |
87
+ | W001 | warning | Degraded mode (no spec package, using success_criteria) | Consider running maestro-spec-generate for full coverage |
88
+ | W002 | warning | Some requirements have no testable acceptance criteria | Note in report, suggest spec refinement |
89
+ | W003 | warning | Generator-Critic loop exhausted (3 iterations) without full convergence | Accept current state, proceed with known defects |
90
+ | W004 | warning | Mock services not available for L3 scenarios | Skip L3 or run with --gen-code for TestContainers |
91
+ </error_codes>
92
+
93
+ <success_criteria>
94
+ - [ ] Phase resolved and spec package loaded (or degraded mode activated)
95
+ - [ ] Business test scenarios extracted from REQ acceptance criteria
96
+ - [ ] RFC 2119 keywords mapped to test priorities
97
+ - [ ] Test fixtures generated (valid/invalid/boundary per REQ data model)
98
+ - [ ] business-test-plan.json written with layer distribution
99
+ - [ ] User confirmed plan (or --auto skipped confirmation)
100
+ - [ ] Test code generated if --gen-code (framework-appropriate)
101
+ - [ ] L1 executed with Generator-Critic loop (max 3 iterations)
102
+ - [ ] L2 executed if no L1 critical failures
103
+ - [ ] L3 executed if no L2 critical failures
104
+ - [ ] Traceability matrix built (every result -> REQ-NNN:AC-N)
105
+ - [ ] business-test-report.json written with requirement_coverage
106
+ - [ ] business-test-summary.md written (human-readable)
107
+ - [ ] index.json updated with business_test section
108
+ - [ ] Issues auto-created for failures (ISS-* in issues.jsonl with req_ref)
109
+ - [ ] Next step routed based on results
110
+ </success_criteria>