maestro-flow 0.3.2 → 0.3.4

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 (187) hide show
  1. package/.claude/CLAUDE.md +2 -2
  2. package/.claude/agents/cli-explore-agent.md +1 -1
  3. package/.claude/agents/team-worker.md +237 -237
  4. package/.claude/commands/maestro-coordinate.md +65 -65
  5. package/.claude/commands/maestro-link-coordinate.md +71 -71
  6. package/.claude/commands/manage-issue-execute.md +73 -73
  7. package/.claude/commands/quality-business-test.md +110 -0
  8. package/.claude/skills/team-coordinate/SKILL.md +266 -266
  9. package/.claude/skills/team-lifecycle-v4/SKILL.md +209 -209
  10. package/.claude/skills/team-lifecycle-v4/roles/analyst/role.md +94 -94
  11. package/.claude/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -62
  12. package/.claude/skills/team-lifecycle-v4/roles/planner/role.md +85 -85
  13. package/.claude/skills/team-lifecycle-v4/roles/writer/role.md +95 -95
  14. package/.claude/skills/team-quality-assurance/SKILL.md +147 -147
  15. package/.claude/skills/team-quality-assurance/roles/scout/role.md +75 -75
  16. package/.claude/skills/team-review/SKILL.md +147 -147
  17. package/.claude/skills/team-review/roles/reviewer/role.md +68 -68
  18. package/.claude/skills/team-review/roles/scanner/role.md +79 -79
  19. package/.claude/skills/team-tech-debt/SKILL.md +128 -128
  20. package/.claude/skills/team-tech-debt/roles/executor/role.md +76 -76
  21. package/.claude/skills/team-tech-debt/roles/scanner/role.md +90 -90
  22. package/.claude/skills/team-tech-debt/roles/validator/role.md +78 -78
  23. package/.claude/skills/team-testing/SKILL.md +143 -143
  24. package/.claude/skills/team-testing/roles/executor/role.md +99 -99
  25. package/.claude/skills/team-testing/roles/generator/role.md +98 -98
  26. package/.codex/skills/maestro-coordinate/SKILL.md +1 -1
  27. package/.codex/skills/manage-issue-analyze/SKILL.md +3 -3
  28. package/.codex/skills/manage-issue-execute/SKILL.md +4 -4
  29. package/.codex/skills/manage-issue-plan/SKILL.md +2 -2
  30. package/.codex/skills/quality-business-test/SKILL.md +223 -0
  31. package/.codex/skills/team-coordinate/SKILL.md +7 -7
  32. package/.codex/skills/team-coordinate/roles/coordinator/role.md +1 -1
  33. package/.codex/skills/team-lifecycle-v4/SKILL.md +2 -2
  34. package/.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md +2 -2
  35. package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +2 -2
  36. package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +2 -2
  37. package/.codex/skills/team-lifecycle-v4/roles/executor/commands/implement.md +1 -1
  38. package/.codex/skills/team-lifecycle-v4/roles/planner/role.md +2 -2
  39. package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  40. package/.codex/skills/team-quality-assurance/SKILL.md +2 -2
  41. package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +2 -2
  42. package/.codex/skills/team-quality-assurance/roles/scout/role.md +2 -2
  43. package/.codex/skills/team-review/SKILL.md +2 -2
  44. package/.codex/skills/team-review/roles/coordinator/role.md +2 -2
  45. package/.codex/skills/team-review/roles/reviewer/role.md +1 -1
  46. package/.codex/skills/team-review/roles/scanner/role.md +1 -1
  47. package/.codex/skills/team-tech-debt/SKILL.md +2 -2
  48. package/.codex/skills/team-tech-debt/roles/coordinator/role.md +1 -1
  49. package/.codex/skills/team-tech-debt/roles/executor/role.md +1 -1
  50. package/.codex/skills/team-tech-debt/roles/scanner/role.md +1 -1
  51. package/.codex/skills/team-tech-debt/roles/validator/role.md +1 -1
  52. package/.codex/skills/team-testing/SKILL.md +2 -2
  53. package/.codex/skills/team-testing/roles/coordinator/role.md +2 -2
  54. package/.codex/skills/team-testing/roles/executor/role.md +1 -1
  55. package/.codex/skills/team-testing/roles/generator/role.md +1 -1
  56. package/README.md +31 -2
  57. package/README.zh-CN.md +23 -1
  58. package/chains/_intent-map.json +6 -0
  59. package/chains/_router.json +14 -0
  60. package/chains/full-lifecycle.json +15 -0
  61. package/chains/quality-loop.json +16 -1
  62. package/chains/singles/business-test.json +26 -0
  63. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +16 -2
  64. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
  65. package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.d.ts +1 -1
  66. package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js +25 -9
  67. package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js.map +1 -1
  68. package/dashboard/dist-server/src/agents/cli-agent-runner.d.ts +3 -0
  69. package/dashboard/dist-server/src/agents/cli-agent-runner.js +78 -61
  70. package/dashboard/dist-server/src/agents/cli-agent-runner.js.map +1 -1
  71. package/dashboard/dist-server/src/agents/cli-history-store.d.ts +14 -1
  72. package/dashboard/dist-server/src/agents/cli-history-store.js +24 -2
  73. package/dashboard/dist-server/src/agents/cli-history-store.js.map +1 -1
  74. package/dashboard/dist-server/src/commands/delegate.js +142 -6
  75. package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
  76. package/dist/src/agents/cli-agent-runner.d.ts +3 -0
  77. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  78. package/dist/src/agents/cli-agent-runner.js +78 -61
  79. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  80. package/dist/src/agents/cli-history-store.d.ts +14 -1
  81. package/dist/src/agents/cli-history-store.d.ts.map +1 -1
  82. package/dist/src/agents/cli-history-store.js +24 -2
  83. package/dist/src/agents/cli-history-store.js.map +1 -1
  84. package/dist/src/commands/delegate.d.ts.map +1 -1
  85. package/dist/src/commands/delegate.js +142 -6
  86. package/dist/src/commands/delegate.js.map +1 -1
  87. package/dist/src/commands/hooks.d.ts +15 -0
  88. package/dist/src/commands/hooks.d.ts.map +1 -1
  89. package/dist/src/commands/hooks.js +29 -2
  90. package/dist/src/commands/hooks.js.map +1 -1
  91. package/dist/src/commands/install-backend.d.ts +15 -0
  92. package/dist/src/commands/install-backend.d.ts.map +1 -1
  93. package/dist/src/commands/install-backend.js +67 -0
  94. package/dist/src/commands/install-backend.js.map +1 -1
  95. package/dist/src/commands/install-ui/BackupConfig.d.ts +6 -4
  96. package/dist/src/commands/install-ui/BackupConfig.d.ts.map +1 -1
  97. package/dist/src/commands/install-ui/BackupConfig.js +39 -12
  98. package/dist/src/commands/install-ui/BackupConfig.js.map +1 -1
  99. package/dist/src/commands/install-ui/ConfigPanel.d.ts.map +1 -1
  100. package/dist/src/commands/install-ui/ConfigPanel.js +1 -1
  101. package/dist/src/commands/install-ui/ConfigPanel.js.map +1 -1
  102. package/dist/src/commands/install-ui/InstallConfirm.d.ts +3 -0
  103. package/dist/src/commands/install-ui/InstallConfirm.d.ts.map +1 -1
  104. package/dist/src/commands/install-ui/InstallConfirm.js +5 -1
  105. package/dist/src/commands/install-ui/InstallConfirm.js.map +1 -1
  106. package/dist/src/commands/install-ui/InstallExecution.d.ts +2 -0
  107. package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
  108. package/dist/src/commands/install-ui/InstallExecution.js +30 -5
  109. package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
  110. package/dist/src/commands/install-ui/InstallFlow.d.ts +1 -1
  111. package/dist/src/commands/install-ui/InstallFlow.d.ts.map +1 -1
  112. package/dist/src/commands/install-ui/InstallFlow.js +31 -6
  113. package/dist/src/commands/install-ui/InstallFlow.js.map +1 -1
  114. package/dist/src/commands/install-ui/InstallHub.d.ts +5 -0
  115. package/dist/src/commands/install-ui/InstallHub.d.ts.map +1 -1
  116. package/dist/src/commands/install-ui/InstallHub.js +24 -0
  117. package/dist/src/commands/install-ui/InstallHub.js.map +1 -1
  118. package/dist/src/commands/install-ui/InstallResult.d.ts.map +1 -1
  119. package/dist/src/commands/install-ui/InstallResult.js +1 -1
  120. package/dist/src/commands/install-ui/InstallResult.js.map +1 -1
  121. package/dist/src/commands/install-ui/StatuslineConfig.d.ts +9 -0
  122. package/dist/src/commands/install-ui/StatuslineConfig.d.ts.map +1 -0
  123. package/dist/src/commands/install-ui/StatuslineConfig.js +13 -0
  124. package/dist/src/commands/install-ui/StatuslineConfig.js.map +1 -0
  125. package/dist/src/commands/install-ui/index.d.ts +1 -1
  126. package/dist/src/commands/install-ui/index.d.ts.map +1 -1
  127. package/dist/src/commands/install-ui/types.d.ts +6 -0
  128. package/dist/src/commands/install-ui/types.d.ts.map +1 -1
  129. package/dist/src/commands/install-ui/types.js +3 -0
  130. package/dist/src/commands/install-ui/types.js.map +1 -1
  131. package/dist/src/commands/install.d.ts.map +1 -1
  132. package/dist/src/commands/install.js +6 -1
  133. package/dist/src/commands/install.js.map +1 -1
  134. package/dist/src/commands/overlay.d.ts.map +1 -1
  135. package/dist/src/commands/overlay.js +45 -1
  136. package/dist/src/commands/overlay.js.map +1 -1
  137. package/dist/src/commands/team.d.ts +10 -0
  138. package/dist/src/commands/team.d.ts.map +1 -1
  139. package/dist/src/commands/team.js +436 -42
  140. package/dist/src/commands/team.js.map +1 -1
  141. package/dist/src/core/manifest.d.ts.map +1 -1
  142. package/dist/src/core/manifest.js +58 -0
  143. package/dist/src/core/manifest.js.map +1 -1
  144. package/dist/src/core/overlay/applier.d.ts +4 -0
  145. package/dist/src/core/overlay/applier.d.ts.map +1 -1
  146. package/dist/src/core/overlay/applier.js.map +1 -1
  147. package/dist/src/hooks/delegate-monitor.js +1 -1
  148. package/dist/src/hooks/delegate-monitor.js.map +1 -1
  149. package/dist/src/hooks/plugins/spec-injection-plugin.d.ts.map +1 -1
  150. package/dist/src/hooks/plugins/spec-injection-plugin.js +17 -1
  151. package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
  152. package/dist/src/hooks/spec-injector.d.ts +2 -1
  153. package/dist/src/hooks/spec-injector.d.ts.map +1 -1
  154. package/dist/src/hooks/spec-injector.js +19 -2
  155. package/dist/src/hooks/spec-injector.js.map +1 -1
  156. package/dist/src/hooks/team-monitor.d.ts.map +1 -1
  157. package/dist/src/hooks/team-monitor.js +17 -0
  158. package/dist/src/hooks/team-monitor.js.map +1 -1
  159. package/dist/src/i18n/locales/en.d.ts.map +1 -1
  160. package/dist/src/i18n/locales/en.js +25 -1
  161. package/dist/src/i18n/locales/en.js.map +1 -1
  162. package/dist/src/i18n/locales/zh.d.ts.map +1 -1
  163. package/dist/src/i18n/locales/zh.js +25 -1
  164. package/dist/src/i18n/locales/zh.js.map +1 -1
  165. package/dist/src/i18n/types.d.ts +22 -0
  166. package/dist/src/i18n/types.d.ts.map +1 -1
  167. package/dist/src/mcp/delegate-channel-relay.d.ts.map +1 -1
  168. package/dist/src/mcp/delegate-channel-relay.js +9 -9
  169. package/dist/src/mcp/delegate-channel-relay.js.map +1 -1
  170. package/dist/src/tools/index.d.ts.map +1 -1
  171. package/dist/src/tools/index.js +11 -2
  172. package/dist/src/tools/index.js.map +1 -1
  173. package/dist/src/tools/namespace-guard.d.ts +37 -0
  174. package/dist/src/tools/namespace-guard.d.ts.map +1 -0
  175. package/dist/src/tools/namespace-guard.js +126 -0
  176. package/dist/src/tools/namespace-guard.js.map +1 -0
  177. package/dist/src/tools/spec-loader.d.ts +17 -1
  178. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  179. package/dist/src/tools/spec-loader.js +71 -13
  180. package/dist/src/tools/spec-loader.js.map +1 -1
  181. package/dist/src/tools/team-members.d.ts +16 -0
  182. package/dist/src/tools/team-members.d.ts.map +1 -1
  183. package/dist/src/tools/team-members.js +31 -0
  184. package/dist/src/tools/team-members.js.map +1 -1
  185. package/package.json +2 -2
  186. package/templates/business-test-report.json +68 -0
  187. package/workflows/delegate-usage.md +330 -0
@@ -1,71 +1,71 @@
1
- ---
2
- name: maestro-link-coordinate
3
- description: Step-mode graph coordinator via maestro coordinate endpoint — executes chain nodes one by one with session tracking
4
- argument-hint: "\"intent text\" [--list] [-c [sessionId]] [--chain <name>] [--tool <tool>] [-y]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Edit
9
- - Bash
10
- - Glob
11
- - Grep
12
- - Agent
13
- ---
14
- <purpose>
15
- Step-mode workflow coordinator using `maestro coordinate` CLI subcommands (start/next/status).
16
- Walks chain graphs node by node — each command node executed via `maestro cli` internally.
17
- Decision/gate/eval nodes auto-resolve between steps. Session persisted for resume.
18
- </purpose>
19
-
20
- <required_reading>
21
- @~/.maestro/workflows/maestro-link-coordinate.md
22
- </required_reading>
23
-
24
- <context>
25
- $ARGUMENTS — user intent text, or flags.
26
-
27
- **Flags:**
28
- - `--list` — List all available chain graphs
29
- - `-c` / `--continue [sessionId]` — Resume step_paused session via `coordinate next`
30
- - `--chain <name>` — Force a specific chain graph
31
- - `--tool <tool>` — CLI tool override (default: claude)
32
- - `-y` / `--yes` — Auto mode
33
-
34
- **CLI endpoints used:**
35
- - `maestro coordinate list` — enumerate chains
36
- - `maestro coordinate start "intent" --chain X` — begin step-mode session
37
- - `maestro coordinate next [sessionId]` — advance one step
38
- - `maestro coordinate status [sessionId]` — query state
39
- - `maestro coordinate run "intent"` — autonomous full run
40
- - `maestro coordinate watch <sessionId> [--follow]` — read-only event tail (separate from driver loop)
41
- - `maestro coordinate report` — agent-invoked command-node result writer (authoritative result channel)
42
-
43
- **Internal walker capabilities (invisible to driver loop):**
44
- - Prompt assembly owned by the walker (main flow) for both command and decision nodes
45
- - Decision nodes auto-resolve via `strategy: 'expr'` (fast path) with LLM decider fallback when expr has no match and no default edge, or explicit `strategy: 'llm'`
46
- - Walker events published to a file/SQLite broker for `watch` observers
47
- - LLM decision in step mode is synchronous — avoid tight per-step deadlines
48
- </context>
49
-
50
- <execution>
51
- Follow '~/.maestro/workflows/maestro-link-coordinate.md' completely.
52
- </execution>
53
-
54
- <error_codes>
55
- | Code | Severity | Description | Recovery |
56
- |------|----------|-------------|----------|
57
- | E001 | error | No intent and no --list/--chain | Suggest --list |
58
- | E002 | error | Chain graph not found | Show list output |
59
- | E003 | error | Step execution failed | Check status, retry next |
60
- | E004 | error | Resume session not found | List sessions |
61
- | E005 | error | CLI endpoint unavailable | Check maestro installation |
62
- </error_codes>
63
-
64
- <success_criteria>
65
- - [ ] Chain graph loaded via `maestro coordinate start`
66
- - [ ] Each step executed via `maestro coordinate next` loop
67
- - [ ] JSON output parsed for session tracking
68
- - [ ] Decision nodes auto-resolved between steps
69
- - [ ] Session persisted and resumable via `-c`
70
- - [ ] Completion summary displayed
71
- </success_criteria>
1
+ ---
2
+ name: maestro-link-coordinate
3
+ description: Step-mode graph coordinator via maestro coordinate endpoint — executes chain nodes one by one with session tracking
4
+ argument-hint: "\"intent text\" [--list] [-c [sessionId]] [--chain <name>] [--tool <tool>] [-y]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Agent
13
+ ---
14
+ <purpose>
15
+ Step-mode workflow coordinator using `maestro coordinate` CLI subcommands (start/next/status).
16
+ Walks chain graphs node by node — each command node executed via `maestro delegate` internally.
17
+ Decision/gate/eval nodes auto-resolve between steps. Session persisted for resume.
18
+ </purpose>
19
+
20
+ <required_reading>
21
+ @~/.maestro/workflows/maestro-link-coordinate.md
22
+ </required_reading>
23
+
24
+ <context>
25
+ $ARGUMENTS — user intent text, or flags.
26
+
27
+ **Flags:**
28
+ - `--list` — List all available chain graphs
29
+ - `-c` / `--continue [sessionId]` — Resume step_paused session via `coordinate next`
30
+ - `--chain <name>` — Force a specific chain graph
31
+ - `--tool <tool>` — CLI tool override (default: claude)
32
+ - `-y` / `--yes` — Auto mode
33
+
34
+ **CLI endpoints used:**
35
+ - `maestro coordinate list` — enumerate chains
36
+ - `maestro coordinate start "intent" --chain X` — begin step-mode session
37
+ - `maestro coordinate next [sessionId]` — advance one step
38
+ - `maestro coordinate status [sessionId]` — query state
39
+ - `maestro coordinate run "intent"` — autonomous full run
40
+ - `maestro coordinate watch <sessionId> [--follow]` — read-only event tail (separate from driver loop)
41
+ - `maestro coordinate report` — agent-invoked command-node result writer (authoritative result channel)
42
+
43
+ **Internal walker capabilities (invisible to driver loop):**
44
+ - Prompt assembly owned by the walker (main flow) for both command and decision nodes
45
+ - Decision nodes auto-resolve via `strategy: 'expr'` (fast path) with LLM decider fallback when expr has no match and no default edge, or explicit `strategy: 'llm'`
46
+ - Walker events published to a file/SQLite broker for `watch` observers
47
+ - LLM decision in step mode is synchronous — avoid tight per-step deadlines
48
+ </context>
49
+
50
+ <execution>
51
+ Follow '~/.maestro/workflows/maestro-link-coordinate.md' completely.
52
+ </execution>
53
+
54
+ <error_codes>
55
+ | Code | Severity | Description | Recovery |
56
+ |------|----------|-------------|----------|
57
+ | E001 | error | No intent and no --list/--chain | Suggest --list |
58
+ | E002 | error | Chain graph not found | Show list output |
59
+ | E003 | error | Step execution failed | Check status, retry next |
60
+ | E004 | error | Resume session not found | List sessions |
61
+ | E005 | error | CLI endpoint unavailable | Check maestro installation |
62
+ </error_codes>
63
+
64
+ <success_criteria>
65
+ - [ ] Chain graph loaded via `maestro coordinate start`
66
+ - [ ] Each step executed via `maestro coordinate next` loop
67
+ - [ ] JSON output parsed for session tracking
68
+ - [ ] Decision nodes auto-resolved between steps
69
+ - [ ] Session persisted and resumable via `-c`
70
+ - [ ] Completion summary displayed
71
+ </success_criteria>
@@ -1,73 +1,73 @@
1
- ---
2
- name: manage-issue-execute
3
- description: Execute planned solution for an issue via dual-mode agent dispatch
4
- argument-hint: "<ISS-ID> [--executor claude-code|codex|gemini] [--dry-run]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Bash
9
- - Glob
10
- - Grep
11
- - Agent
12
- - AskUserQuestion
13
- ---
14
- <purpose>
15
- Execute a planned solution for a specific issue. Supports dual-mode dispatch:
16
-
17
- - **Server UP**: POST to `/api/execution/dispatch` for orchestrated execution
18
- - **Server DOWN**: Direct execution via `maestro cli` with the solution prompt
19
-
20
- Options:
21
- - **--executor**: Agent to execute the solution (default: claude-code)
22
- - **--dry-run**: Display the constructed prompt and steps without executing
23
-
24
- For issue CRUD, use `/manage-issue`. For analysis, use `/manage-issue-analyze`. For planning, use `/manage-issue-plan`.
25
- </purpose>
26
-
27
- <required_reading>
28
- @~/.maestro/workflows/issue-execute.md
29
- </required_reading>
30
-
31
- <deferred_reading>
32
- - [issue.json template](~/.maestro/templates/issue.json) -- read when updating issue status after execution
33
- </deferred_reading>
34
-
35
- <context>
36
- $ARGUMENTS -- ISS-ID (required) + optional flags.
37
-
38
- **Options:**
39
- - `<ISS-ID>` -- issue ID in ISS-XXXXXXXX-NNN format (required)
40
- - `--executor claude-code|codex|gemini` -- execution agent (default: claude-code)
41
- - `--dry-run` -- preview prompt and steps without executing
42
-
43
- **State files:**
44
- - `.workflow/issues/issues.jsonl` -- issue records (read + write)
45
- </context>
46
-
47
- <execution>
48
- Follow '~/.maestro/workflows/issue-execute.md' completely.
49
-
50
- **Next-step routing on completion:**
51
- - Execution succeeded → Skill({ skill: "manage-issue", args: "close <ISS-ID> --resolution fixed" })
52
- - Execution failed → Skill({ skill: "quality-debug", args: "<failure description>" }) then retry
53
- - Want verification → Skill({ skill: "maestro-verify", args: "{phase}" })
54
- </execution>
55
-
56
- <error_codes>
57
- | Code | Severity | Condition | Recovery |
58
- |------|----------|-----------|----------|
59
- | E_NO_ISSUE_ID | error | No ISS-ID provided in $ARGUMENTS | Display usage hint with example |
60
- | E_NO_SOLUTION | error | Issue has no solution record (issue.solution is null) | Suggest `/manage-issue-plan` first |
61
- | E_DISPATCH_FAILED | error | Server dispatch or CLI execution failed | Log error, revert status to open, display failure details |
62
- </error_codes>
63
-
64
- <success_criteria>
65
- - [ ] Issue loaded with valid solution record
66
- - [ ] Execution mode detected (server UP or DOWN)
67
- - [ ] Solution executed (or dry-run displayed)
68
- - [ ] Issue status updated in issues.jsonl (in_progress -> resolved or open on failure)
69
- - [ ] Result summary displayed with next-step routing:
70
- - Execution succeeded → Skill({ skill: "manage-issue", args: "close <ISS-ID> --resolution fixed" })
71
- - Execution failed → Skill({ skill: "quality-debug", args: "<failure description>" }) then retry
72
- - Want verification → Skill({ skill: "maestro-verify", args: "{phase}" })
73
- </success_criteria>
1
+ ---
2
+ name: manage-issue-execute
3
+ description: Execute planned solution for an issue via dual-mode agent dispatch
4
+ argument-hint: "<ISS-ID> [--executor claude-code|codex|gemini] [--dry-run]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - Agent
12
+ - AskUserQuestion
13
+ ---
14
+ <purpose>
15
+ Execute a planned solution for a specific issue. Supports dual-mode dispatch:
16
+
17
+ - **Server UP**: POST to `/api/execution/dispatch` for orchestrated execution
18
+ - **Server DOWN**: Direct execution via `maestro delegate` with the solution prompt
19
+
20
+ Options:
21
+ - **--executor**: Agent to execute the solution (default: claude-code)
22
+ - **--dry-run**: Display the constructed prompt and steps without executing
23
+
24
+ For issue CRUD, use `/manage-issue`. For analysis, use `/manage-issue-analyze`. For planning, use `/manage-issue-plan`.
25
+ </purpose>
26
+
27
+ <required_reading>
28
+ @~/.maestro/workflows/issue-execute.md
29
+ </required_reading>
30
+
31
+ <deferred_reading>
32
+ - [issue.json template](~/.maestro/templates/issue.json) -- read when updating issue status after execution
33
+ </deferred_reading>
34
+
35
+ <context>
36
+ $ARGUMENTS -- ISS-ID (required) + optional flags.
37
+
38
+ **Options:**
39
+ - `<ISS-ID>` -- issue ID in ISS-XXXXXXXX-NNN format (required)
40
+ - `--executor claude-code|codex|gemini` -- execution agent (default: claude-code)
41
+ - `--dry-run` -- preview prompt and steps without executing
42
+
43
+ **State files:**
44
+ - `.workflow/issues/issues.jsonl` -- issue records (read + write)
45
+ </context>
46
+
47
+ <execution>
48
+ Follow '~/.maestro/workflows/issue-execute.md' completely.
49
+
50
+ **Next-step routing on completion:**
51
+ - Execution succeeded → Skill({ skill: "manage-issue", args: "close <ISS-ID> --resolution fixed" })
52
+ - Execution failed → Skill({ skill: "quality-debug", args: "<failure description>" }) then retry
53
+ - Want verification → Skill({ skill: "maestro-verify", args: "{phase}" })
54
+ </execution>
55
+
56
+ <error_codes>
57
+ | Code | Severity | Condition | Recovery |
58
+ |------|----------|-----------|----------|
59
+ | E_NO_ISSUE_ID | error | No ISS-ID provided in $ARGUMENTS | Display usage hint with example |
60
+ | E_NO_SOLUTION | error | Issue has no solution record (issue.solution is null) | Suggest `/manage-issue-plan` first |
61
+ | E_DISPATCH_FAILED | error | Server dispatch or CLI execution failed | Log error, revert status to open, display failure details |
62
+ </error_codes>
63
+
64
+ <success_criteria>
65
+ - [ ] Issue loaded with valid solution record
66
+ - [ ] Execution mode detected (server UP or DOWN)
67
+ - [ ] Solution executed (or dry-run displayed)
68
+ - [ ] Issue status updated in issues.jsonl (in_progress -> resolved or open on failure)
69
+ - [ ] Result summary displayed with next-step routing:
70
+ - Execution succeeded → Skill({ skill: "manage-issue", args: "close <ISS-ID> --resolution fixed" })
71
+ - Execution failed → Skill({ skill: "quality-debug", args: "<failure description>" }) then retry
72
+ - Want verification → Skill({ skill: "maestro-verify", args: "{phase}" })
73
+ </success_criteria>
@@ -0,0 +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
+ - `.workflow/phases/{NN}-{slug}/index.json` -- Phase metadata, success_criteria
64
+ - `.workflow/phases/{NN}-{slug}/plan.json` -- Task overview (degraded mode)
65
+ - `.workflow/phases/{NN}-{slug}/verification.json` -- Cross-reference for must_haves
66
+ - `.workflow/phases/{NN}-{slug}/.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 → Skill({ skill: "maestro-phase-transition", args: "{phase}" })
74
+ - Failures found → Skill({ skill: "quality-debug", args: "--from-business-test {phase}" })
75
+ - Re-run all pass → Skill({ skill: "maestro-verify", args: "{phase}" })
76
+ - Low coverage → Skill({ skill: "quality-test-gen", args: "{phase}" })
77
+ - Need integration tests → Skill({ skill: "quality-integration-test", args: "{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 directory not found | Verify phase exists in .workflow/phases/ |
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>