maestro-flow 0.4.10 → 0.4.11

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 (226) hide show
  1. package/.agents/agents/cli-explore-agent.md +189 -0
  2. package/.agents/agents/conceptual-planning-agent.md +247 -0
  3. package/.agents/agents/impeccable-agent.md +101 -0
  4. package/.agents/agents/team-supervisor.md +145 -0
  5. package/.agents/agents/team-worker.md +239 -0
  6. package/.agents/agents/ui-design-agent.md +289 -0
  7. package/.agents/agents/workflow-analyzer.md +117 -0
  8. package/.agents/agents/workflow-codebase-mapper.md +79 -0
  9. package/.agents/agents/workflow-collab-planner.md +145 -0
  10. package/.agents/agents/workflow-debugger.md +105 -0
  11. package/.agents/agents/workflow-executor.md +134 -0
  12. package/.agents/agents/workflow-external-researcher.md +88 -0
  13. package/.agents/agents/workflow-integration-checker.md +85 -0
  14. package/.agents/agents/workflow-nyquist-auditor.md +87 -0
  15. package/.agents/agents/workflow-phase-researcher.md +87 -0
  16. package/.agents/agents/workflow-plan-checker.md +92 -0
  17. package/.agents/agents/workflow-planner.md +197 -0
  18. package/.agents/agents/workflow-project-researcher.md +76 -0
  19. package/.agents/agents/workflow-research-synthesizer.md +72 -0
  20. package/.agents/agents/workflow-reviewer.md +84 -0
  21. package/.agents/agents/workflow-roadmapper.md +83 -0
  22. package/.agents/agents/workflow-verifier.md +122 -0
  23. package/.agents/skills/codify-to-knowhow/SKILL.md +169 -0
  24. package/.agents/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
  25. package/.agents/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
  26. package/.agents/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
  27. package/.agents/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
  28. package/.agents/skills/learn-decompose/SKILL.md +118 -0
  29. package/.agents/skills/learn-follow/SKILL.md +129 -0
  30. package/.agents/skills/learn-investigate/SKILL.md +154 -0
  31. package/.agents/skills/learn-retro/SKILL.md +159 -0
  32. package/.agents/skills/learn-second-opinion/SKILL.md +124 -0
  33. package/.agents/skills/maestro/SKILL.md +224 -0
  34. package/.agents/skills/maestro-amend/SKILL.md +165 -0
  35. package/.agents/skills/maestro-analyze/SKILL.md +135 -0
  36. package/.agents/skills/maestro-brainstorm/SKILL.md +118 -0
  37. package/.agents/skills/maestro-collab/SKILL.md +174 -0
  38. package/.agents/skills/maestro-composer/SKILL.md +181 -0
  39. package/.agents/skills/maestro-execute/SKILL.md +133 -0
  40. package/.agents/skills/maestro-fork/SKILL.md +88 -0
  41. package/.agents/skills/maestro-guard/SKILL.md +103 -0
  42. package/.agents/skills/maestro-help/SKILL.md +266 -0
  43. package/.agents/skills/maestro-help/index/catalog.json +184 -0
  44. package/.agents/skills/maestro-help/phases/01-parse-intent.md +122 -0
  45. package/.agents/skills/maestro-help/phases/02-search-present.md +181 -0
  46. package/.agents/skills/maestro-help/phases/03-workflow-guide.md +186 -0
  47. package/.agents/skills/maestro-impeccable/SKILL.md +251 -0
  48. package/.agents/skills/maestro-init/SKILL.md +80 -0
  49. package/.agents/skills/maestro-learn/SKILL.md +142 -0
  50. package/.agents/skills/maestro-merge/SKILL.md +66 -0
  51. package/.agents/skills/maestro-milestone-audit/SKILL.md +70 -0
  52. package/.agents/skills/maestro-milestone-complete/SKILL.md +77 -0
  53. package/.agents/skills/maestro-milestone-release/SKILL.md +98 -0
  54. package/.agents/skills/maestro-overlay/SKILL.md +180 -0
  55. package/.agents/skills/maestro-plan/SKILL.md +172 -0
  56. package/.agents/skills/maestro-player/SKILL.md +177 -0
  57. package/.agents/skills/maestro-quick/SKILL.md +67 -0
  58. package/.agents/skills/maestro-ralph/SKILL.md +685 -0
  59. package/.agents/skills/maestro-ralph-execute/SKILL.md +259 -0
  60. package/.agents/skills/maestro-roadmap/SKILL.md +170 -0
  61. package/.agents/skills/maestro-tools-execute/SKILL.md +119 -0
  62. package/.agents/skills/maestro-tools-register/SKILL.md +159 -0
  63. package/.agents/skills/maestro-ui-codify/SKILL.md +82 -0
  64. package/.agents/skills/maestro-update/SKILL.md +178 -0
  65. package/.agents/skills/maestro-verify/SKILL.md +111 -0
  66. package/.agents/skills/manage-codebase-rebuild/SKILL.md +77 -0
  67. package/.agents/skills/manage-codebase-refresh/SKILL.md +59 -0
  68. package/.agents/skills/manage-harvest/SKILL.md +96 -0
  69. package/.agents/skills/manage-issue/SKILL.md +75 -0
  70. package/.agents/skills/manage-issue-discover/SKILL.md +83 -0
  71. package/.agents/skills/manage-knowhow/SKILL.md +79 -0
  72. package/.agents/skills/manage-knowhow-capture/SKILL.md +81 -0
  73. package/.agents/skills/manage-learn/SKILL.md +67 -0
  74. package/.agents/skills/manage-status/SKILL.md +54 -0
  75. package/.agents/skills/manage-wiki/SKILL.md +64 -0
  76. package/.agents/skills/quality-auto-test/SKILL.md +138 -0
  77. package/.agents/skills/quality-debug/SKILL.md +122 -0
  78. package/.agents/skills/quality-refactor/SKILL.md +69 -0
  79. package/.agents/skills/quality-retrospective/SKILL.md +79 -0
  80. package/.agents/skills/quality-review/SKILL.md +130 -0
  81. package/.agents/skills/quality-sync/SKILL.md +53 -0
  82. package/.agents/skills/quality-test/SKILL.md +119 -0
  83. package/.agents/skills/security-audit/SKILL.md +157 -0
  84. package/.agents/skills/skill-iter-tune/SKILL.md +384 -0
  85. package/.agents/skills/skill-iter-tune/phases/01-setup.md +144 -0
  86. package/.agents/skills/skill-iter-tune/phases/02-execute.md +292 -0
  87. package/.agents/skills/skill-iter-tune/phases/03-evaluate.md +312 -0
  88. package/.agents/skills/skill-iter-tune/phases/04-improve.md +186 -0
  89. package/.agents/skills/skill-iter-tune/phases/05-report.md +166 -0
  90. package/.agents/skills/skill-iter-tune/specs/evaluation-criteria.md +63 -0
  91. package/.agents/skills/skill-iter-tune/templates/eval-prompt.md +134 -0
  92. package/.agents/skills/skill-iter-tune/templates/execute-prompt.md +97 -0
  93. package/.agents/skills/spec-add/SKILL.md +70 -0
  94. package/.agents/skills/spec-load/SKILL.md +73 -0
  95. package/.agents/skills/spec-remove/SKILL.md +53 -0
  96. package/.agents/skills/spec-setup/SKILL.md +50 -0
  97. package/.agents/skills/team-coordinate/SKILL.md +268 -0
  98. package/.agents/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +247 -0
  99. package/.agents/skills/team-coordinate/roles/coordinator/commands/dispatch.md +131 -0
  100. package/.agents/skills/team-coordinate/roles/coordinator/commands/monitor.md +358 -0
  101. package/.agents/skills/team-coordinate/roles/coordinator/role.md +365 -0
  102. package/.agents/skills/team-coordinate/specs/knowledge-transfer.md +111 -0
  103. package/.agents/skills/team-coordinate/specs/pipelines.md +97 -0
  104. package/.agents/skills/team-coordinate/specs/quality-gates.md +112 -0
  105. package/.agents/skills/team-coordinate/specs/role-spec-template.md +198 -0
  106. package/.agents/skills/team-executor/SKILL.md +191 -0
  107. package/.agents/skills/team-executor/roles/executor/commands/monitor.md +239 -0
  108. package/.agents/skills/team-executor/roles/executor/role.md +171 -0
  109. package/.agents/skills/team-executor/specs/session-schema.md +264 -0
  110. package/.agents/skills/team-lifecycle-v4/SKILL.md +211 -0
  111. package/.agents/skills/team-lifecycle-v4/roles/analyst/role.md +96 -0
  112. package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +56 -0
  113. package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +56 -0
  114. package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +206 -0
  115. package/.agents/skills/team-lifecycle-v4/roles/coordinator/role.md +130 -0
  116. package/.agents/skills/team-lifecycle-v4/roles/executor/commands/fix.md +35 -0
  117. package/.agents/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -0
  118. package/.agents/skills/team-lifecycle-v4/roles/executor/role.md +69 -0
  119. package/.agents/skills/team-lifecycle-v4/roles/planner/role.md +87 -0
  120. package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-code.md +34 -0
  121. package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +44 -0
  122. package/.agents/skills/team-lifecycle-v4/roles/reviewer/role.md +71 -0
  123. package/.agents/skills/team-lifecycle-v4/roles/supervisor/role.md +194 -0
  124. package/.agents/skills/team-lifecycle-v4/roles/tester/role.md +89 -0
  125. package/.agents/skills/team-lifecycle-v4/roles/writer/role.md +97 -0
  126. package/.agents/skills/team-lifecycle-v4/specs/knowledge-transfer.md +114 -0
  127. package/.agents/skills/team-lifecycle-v4/specs/pipelines.md +140 -0
  128. package/.agents/skills/team-lifecycle-v4/specs/quality-gates.md +130 -0
  129. package/.agents/skills/team-lifecycle-v4/templates/architecture.md +254 -0
  130. package/.agents/skills/team-lifecycle-v4/templates/epics.md +196 -0
  131. package/.agents/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
  132. package/.agents/skills/team-lifecycle-v4/templates/requirements.md +224 -0
  133. package/.agents/skills/team-quality-assurance/SKILL.md +149 -0
  134. package/.agents/skills/team-quality-assurance/roles/analyst/role.md +90 -0
  135. package/.agents/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -0
  136. package/.agents/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +111 -0
  137. package/.agents/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +250 -0
  138. package/.agents/skills/team-quality-assurance/roles/coordinator/role.md +143 -0
  139. package/.agents/skills/team-quality-assurance/roles/executor/role.md +68 -0
  140. package/.agents/skills/team-quality-assurance/roles/generator/role.md +70 -0
  141. package/.agents/skills/team-quality-assurance/roles/scout/role.md +77 -0
  142. package/.agents/skills/team-quality-assurance/roles/strategist/role.md +73 -0
  143. package/.agents/skills/team-quality-assurance/specs/pipelines.md +115 -0
  144. package/.agents/skills/team-quality-assurance/specs/team-config.json +131 -0
  145. package/.agents/skills/team-review/SKILL.md +149 -0
  146. package/.agents/skills/team-review/roles/coordinator/commands/analyze.md +71 -0
  147. package/.agents/skills/team-review/roles/coordinator/commands/dispatch.md +91 -0
  148. package/.agents/skills/team-review/roles/coordinator/commands/monitor.md +224 -0
  149. package/.agents/skills/team-review/roles/coordinator/role.md +132 -0
  150. package/.agents/skills/team-review/roles/fixer/role.md +78 -0
  151. package/.agents/skills/team-review/roles/reviewer/role.md +70 -0
  152. package/.agents/skills/team-review/roles/scanner/role.md +81 -0
  153. package/.agents/skills/team-review/specs/dimensions.md +82 -0
  154. package/.agents/skills/team-review/specs/finding-schema.json +82 -0
  155. package/.agents/skills/team-review/specs/pipelines.md +102 -0
  156. package/.agents/skills/team-review/specs/team-config.json +27 -0
  157. package/.agents/skills/team-tech-debt/SKILL.md +130 -0
  158. package/.agents/skills/team-tech-debt/roles/assessor/role.md +79 -0
  159. package/.agents/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -0
  160. package/.agents/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +156 -0
  161. package/.agents/skills/team-tech-debt/roles/coordinator/commands/monitor.md +209 -0
  162. package/.agents/skills/team-tech-debt/roles/coordinator/role.md +123 -0
  163. package/.agents/skills/team-tech-debt/roles/executor/role.md +78 -0
  164. package/.agents/skills/team-tech-debt/roles/planner/role.md +71 -0
  165. package/.agents/skills/team-tech-debt/roles/scanner/role.md +92 -0
  166. package/.agents/skills/team-tech-debt/roles/validator/role.md +80 -0
  167. package/.agents/skills/team-tech-debt/specs/pipelines.md +47 -0
  168. package/.agents/skills/team-tech-debt/specs/team-config.json +129 -0
  169. package/.agents/skills/team-testing/SKILL.md +145 -0
  170. package/.agents/skills/team-testing/roles/analyst/role.md +105 -0
  171. package/.agents/skills/team-testing/roles/coordinator/commands/analyze.md +70 -0
  172. package/.agents/skills/team-testing/roles/coordinator/commands/dispatch.md +108 -0
  173. package/.agents/skills/team-testing/roles/coordinator/commands/monitor.md +257 -0
  174. package/.agents/skills/team-testing/roles/coordinator/role.md +134 -0
  175. package/.agents/skills/team-testing/roles/executor/role.md +101 -0
  176. package/.agents/skills/team-testing/roles/generator/role.md +100 -0
  177. package/.agents/skills/team-testing/roles/strategist/role.md +85 -0
  178. package/.agents/skills/team-testing/specs/pipelines.md +101 -0
  179. package/.agents/skills/team-testing/specs/team-config.json +93 -0
  180. package/.agents/skills/wiki-connect/SKILL.md +64 -0
  181. package/.agents/skills/wiki-digest/SKILL.md +70 -0
  182. package/.agents/skills/workflow-skill-designer/SKILL.md +498 -0
  183. package/.agents/skills/workflow-skill-designer/phases/01-requirements-analysis.md +356 -0
  184. package/.agents/skills/workflow-skill-designer/phases/02-orchestrator-design.md +444 -0
  185. package/.agents/skills/workflow-skill-designer/phases/03-phase-design.md +458 -0
  186. package/.agents/skills/workflow-skill-designer/phases/04-validation.md +471 -0
  187. package/.agy/skills/maestro/SKILL.md +13 -11
  188. package/.agy/skills/maestro-ralph/SKILL.md +222 -87
  189. package/.claude/commands/maestro-ralph.md +222 -87
  190. package/.claude/commands/maestro.md +13 -11
  191. package/.codex/skills/maestro/SKILL.md +23 -17
  192. package/.codex/skills/maestro-ralph/SKILL.md +177 -67
  193. package/dist/src/commands/install-backend.d.ts +12 -0
  194. package/dist/src/commands/install-backend.d.ts.map +1 -1
  195. package/dist/src/commands/install-backend.js +144 -0
  196. package/dist/src/commands/install-backend.js.map +1 -1
  197. package/dist/src/core/component-defs.d.ts +6 -0
  198. package/dist/src/core/component-defs.d.ts.map +1 -1
  199. package/dist/src/core/component-defs.js +97 -0
  200. package/dist/src/core/component-defs.js.map +1 -1
  201. package/dist/src/tui/install-ui/ExtraMcpConfig.d.ts +11 -0
  202. package/dist/src/tui/install-ui/ExtraMcpConfig.d.ts.map +1 -0
  203. package/dist/src/tui/install-ui/ExtraMcpConfig.js +61 -0
  204. package/dist/src/tui/install-ui/ExtraMcpConfig.js.map +1 -0
  205. package/dist/src/tui/install-ui/InstallConfirm.d.ts +3 -0
  206. package/dist/src/tui/install-ui/InstallConfirm.d.ts.map +1 -1
  207. package/dist/src/tui/install-ui/InstallConfirm.js +1 -1
  208. package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
  209. package/dist/src/tui/install-ui/InstallExecution.d.ts +2 -0
  210. package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
  211. package/dist/src/tui/install-ui/InstallExecution.js +14 -2
  212. package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
  213. package/dist/src/tui/install-ui/InstallFlow.d.ts +1 -1
  214. package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
  215. package/dist/src/tui/install-ui/InstallFlow.js +16 -3
  216. package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
  217. package/dist/src/tui/install-ui/InstallHub.d.ts +2 -0
  218. package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -1
  219. package/dist/src/tui/install-ui/InstallHub.js +8 -0
  220. package/dist/src/tui/install-ui/InstallHub.js.map +1 -1
  221. package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -1
  222. package/dist/src/tui/install-ui/InstallResult.js +3 -1
  223. package/dist/src/tui/install-ui/InstallResult.js.map +1 -1
  224. package/dist/src/utils/update-notices.js +19 -0
  225. package/dist/src/utils/update-notices.js.map +1 -1
  226. package/package.json +5 -2
@@ -0,0 +1,259 @@
1
+ ---
2
+ name: maestro-ralph-execute
3
+ description: Execute next pending step in ralph session
4
+ argument-hint: "[-y] [session-id]"
5
+ allowed-tools:
6
+ - read_file
7
+ - write_file
8
+ - edit_file
9
+ - shell
10
+ - find_files
11
+ - search
12
+ - invoke_skill
13
+ ---
14
+ <!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
15
+
16
+ <purpose>
17
+ Single-step executor for ralph (adaptive) and maestro (static) sessions.
18
+ Each invocation: locate session → find next step → resolve args → execute → update → self-invoke next.
19
+
20
+ Mutual invocation with `/maestro-ralph` forms a self-perpetuating work loop.
21
+ Session: `.workflow/.maestro/*/status.json`
22
+ </purpose>
23
+
24
+ <context>
25
+ $ARGUMENTS — optional `-y` flag + optional session ID.
26
+
27
+ **Parse:**
28
+ ```
29
+ -y / --yes → auto = true
30
+ Remaining → session_id (if matches maestro-* or ralph-*)
31
+ ```
32
+ Also read `session.auto_mode` from status.json — if true, treat as `-y`.
33
+
34
+ **Node types:**
35
+
36
+ | Type | Execution | Flow after |
37
+ |------|-----------|------------|
38
+ | decision (ralph-only) | `invoke_skill("maestro-ralph")` — ralph re-evaluates | Execution ends here |
39
+ | internal | `invoke_skill({ skill, args })` — synchronous | Self-invoke next |
40
+ | external | `maestro delegate --to claude --mode write` | STOP → callback → self-invoke |
41
+
42
+ HARD RULE: External nodes ALWAYS append `-y` to skill args inside the prompt — delegate sessions are non-interactive.
43
+ HARD RULE: External nodes ALWAYS delegate to `claude` — only Claude Code can execute slash-command skills.
44
+ </context>
45
+
46
+ <invariants>
47
+ 1. **Every step via invoke_skill() or delegate** — never simulate or inline a skill's work
48
+ 2. **External → claude only** — `session.cli_tool` is for analysis delegates, NOT execution
49
+ 3. **Self-invocation chain** — continues until all steps complete or session paused
50
+ 4. **Status.json updated after every change** — resume-safe
51
+ </invariants>
52
+
53
+ <state_machine>
54
+
55
+ <states>
56
+ S_LOCATE — 定位 session + 找下一个 pending step PERSIST: —
57
+ S_RESOLVE_ARGS — 解析占位符 + 丰富参数 PERSIST: step.args (enriched)
58
+ S_EXECUTE — 执行当前 step PERSIST: step.status = "running", session.current_step
59
+ S_POST_EXEC — 标记完成 + 传播上下文 PERSIST: step.status, session.context
60
+ S_HANDLE_FAIL — 处理失败(重试/跳过/中止) PERSIST: step.status, session.status
61
+ S_COMPLETE — 所有 step 完成 PERSIST: session.status = "completed"
62
+ S_FALLBACK — 无 session 可执行 PERSIST: —
63
+ </states>
64
+
65
+ <transitions>
66
+
67
+ S_LOCATE:
68
+ → S_RESOLVE_ARGS WHEN: pending step found DO: A_LOCATE_SESSION
69
+ → S_COMPLETE WHEN: no pending steps
70
+ → S_FALLBACK WHEN: no running session
71
+
72
+ S_RESOLVE_ARGS:
73
+ → S_EXECUTE DO: A_RESOLVE_ARGS
74
+
75
+ S_EXECUTE:
76
+ → END WHEN: step.type == "decision" DO: A_EXEC_DECISION
77
+ → S_POST_EXEC WHEN: step.type == "internal" + success DO: A_EXEC_INTERNAL
78
+ → S_HANDLE_FAIL WHEN: step.type == "internal" + failure DO: A_EXEC_INTERNAL
79
+ → END WHEN: step.type == "external" DO: A_EXEC_EXTERNAL
80
+ (STOP after background delegate; on callback → S_POST_EXEC or S_HANDLE_FAIL)
81
+
82
+ S_POST_EXEC:
83
+ → S_LOCATE DO: A_MARK_COMPLETE + invoke_skill("maestro-ralph-execute")
84
+
85
+ S_HANDLE_FAIL:
86
+ → S_LOCATE WHEN: auto + not retried DO: A_RETRY
87
+ → END WHEN: auto + retried DO: A_PAUSE_SESSION
88
+ → S_LOCATE WHEN: interactive + user selects retry DO: A_RETRY
89
+ → S_LOCATE WHEN: interactive + user selects skip DO: A_SKIP_STEP
90
+ → END WHEN: interactive + user selects abort DO: A_PAUSE_SESSION
91
+
92
+ S_COMPLETE:
93
+ → END DO: A_COMPLETE_SESSION
94
+
95
+ S_FALLBACK:
96
+ → END DO: display "无运行中的会话。使用 /maestro 或 /maestro-ralph 创建。"
97
+
98
+ </transitions>
99
+
100
+ <actions>
101
+
102
+ ### A_LOCATE_SESSION
103
+
104
+ 1. If session_id provided → load `.workflow/.maestro/{session_id}/status.json`
105
+ 2. Else: scan `.workflow/.maestro/*/status.json`, filter `status == "running"`, sort DESC, take first
106
+ 3. Extract: session_id, source, steps[], current_step, phase, milestone, intent, auto_mode, context, cli_tool
107
+ 4. Find first step with `status == "pending"` → next step
108
+
109
+ ### A_RESOLVE_ARGS
110
+
111
+ **Placeholder substitution:**
112
+
113
+ | Placeholder | Source |
114
+ |-------------|--------|
115
+ | `{phase}` | session.phase |
116
+ | `{milestone}` | session.milestone |
117
+ | `{intent}` | session.intent |
118
+ | `{description}` | session.intent (alias) |
119
+ | `{scratch_dir}` | session.context.scratch_dir or latest artifact path |
120
+ | `{plan_dir}` | session.context.plan_dir |
121
+ | `{analysis_dir}` | session.context.analysis_dir |
122
+ | `{issue_id}` | session.context.issue_id |
123
+ | `{milestone_num}` | session.context.milestone_num |
124
+
125
+ **Per-skill enrichment** (when args empty or minimal):
126
+
127
+ | Skill | Required context | Source |
128
+ |-------|-----------------|--------|
129
+ | maestro-brainstorm | topic | `"{intent}"` |
130
+ | maestro-roadmap | description | `"{intent}"` |
131
+ | maestro-analyze | phase or topic | `{phase}` or `"{intent}"` |
132
+ | maestro-plan | phase or --dir | `{phase}`, or `--dir {scratch_dir}` if standalone |
133
+ | maestro-execute | phase or --dir | `{phase}`, or `--dir {scratch_dir}` if standalone |
134
+ | quality-debug | gap context | Read previous step's error/gap from artifact dir |
135
+ | quality-* | phase | `{phase}` |
136
+
137
+ **Artifact dir resolution for --dir:**
138
+ ```
139
+ Read state.json → filter artifacts by milestone + phase
140
+ plan commands: latest type=="analyze" → --dir .workflow/scratch/{path}
141
+ execute commands: latest type=="plan" → --dir .workflow/scratch/{path}
142
+ ```
143
+
144
+ Write enriched args back to status.json (resume-safe).
145
+
146
+ ### A_EXEC_DECISION
147
+
148
+ 1. Mark step running, write status.json
149
+ 2. Display: `[{index}/{total}] ◆ {skill} [decision] Retry: {retry}/{max}`
150
+ 3. `invoke_skill({ skill: "maestro-ralph" })` — ralph detects running decision → evaluates → handoff
151
+ 4. **This execution ends here** — ralph handles the handoff back
152
+
153
+ ### A_EXEC_INTERNAL
154
+
155
+ 1. Mark step running, write status.json
156
+ 2. Display: `[{index}/{total}] {skill} [internal]`
157
+ 3. Resolve auto flag: `auto ? (flag_map[skill] || "") : ""`
158
+ 4. `invoke_skill({ skill: next.skill, args: effective_args })`
159
+ 5. Return success/failure
160
+
161
+ **Auto flag map:** all lifecycle skills → `-y`; `quality-test` → `-y --auto-fix`; unlisted internal → no flag
162
+
163
+ ### A_EXEC_EXTERNAL
164
+
165
+ 1. Mark step running, write status.json
166
+ 2. Display: `[{index}/{total}] ⚡ {skill} [external]`
167
+ 3. Always append `-y` to skill args (delegates are non-interactive): `flag = flag_map[skill] || "-y"`
168
+ 4. Execute:
169
+ ```
170
+ shell({
171
+ command: `maestro delegate "/${skill} ${effective_args}" --to claude --mode write`,
172
+ run_in_background: true, timeout: 600000
173
+ })
174
+ STOP — wait for callback.
175
+ ```
176
+ 5. On callback: retrieve output → S_POST_EXEC or S_HANDLE_FAIL
177
+
178
+ ### A_MARK_COMPLETE
179
+
180
+ 1. `step.status = "completed"`, `step.completed_at = now`
181
+ 2. Scan output for context signals:
182
+ - `PHASE: N` → session.phase
183
+ - `scratch_dir: path` → context.scratch_dir
184
+ - `SPEC-xxx` → context.spec_session_id
185
+ 3. Scan output for `--- COMPLETION STATUS ---` block. If found, parse and map:
186
+ - `STATUS: DONE` → `step.status = "completed"`
187
+ - `STATUS: DONE_WITH_CONCERNS` → `step.status = "completed"`, `step.concerns = CONCERNS value`
188
+ - `STATUS: NEEDS_RETRY` → trigger retry: set `step.status = "pending"`, `step.retried = true` → S_HANDLE_FAIL
189
+ - `STATUS: BLOCKED` → `session.status = "paused"`, display blocker reason from CONCERNS
190
+ - `STATUS: NEEDS_CONTEXT` → `session.status = "paused"`, display context gap from CONCERNS
191
+ - If no `--- COMPLETION STATUS ---` block found → fall back to existing heuristic (backward compatible)
192
+ 4. Write status.json
193
+ 5. Display: `[{index}/{total}] ✓ {skill} completed`
194
+
195
+ ### A_RETRY
196
+
197
+ 1. `step.retried = true`, `step.status = "pending"`, `step.error = null`
198
+ 2. Write status.json
199
+
200
+ ### A_SKIP_STEP
201
+
202
+ 1. `step.status = "skipped"`
203
+ 2. Write status.json
204
+
205
+ ### A_PAUSE_SESSION
206
+
207
+ 1. `session.status = "paused"`, write status.json
208
+ 2. Display: `[{index}/{total}] ✗ {skill} 失败,会话已暂停。/maestro-ralph continue 恢复。`
209
+
210
+ ### A_COMPLETE_SESSION
211
+
212
+ 1. `session.status = "completed"`, write status.json
213
+ 2. Display completion report:
214
+ ```
215
+ ============================================================
216
+ SESSION COMPLETE
217
+ ============================================================
218
+ Session: {session_id} [{source}]
219
+ Steps: {completed}/{total}
220
+
221
+ [✓] 0. maestro-plan 1 [internal]
222
+ [✓] 1. ⚡ maestro-execute 1 [external]
223
+ [✓] 2. maestro-verify 1 [internal]
224
+ [✓] 3. ◆ post-verify [decision]
225
+ ...
226
+ ============================================================
227
+ ```
228
+ Icons: `✓` completed, `—` skipped, `✗` failed, `◆` decision, `⚡` external
229
+
230
+ </actions>
231
+
232
+ </state_machine>
233
+
234
+ <appendix>
235
+
236
+ ### Error Codes
237
+
238
+ | Code | Severity | Description | Recovery |
239
+ |------|----------|-------------|----------|
240
+ | E001 | error | No running session found | Suggest /maestro or /maestro-ralph |
241
+ | E002 | error | status.json corrupt | Show path, suggest manual check |
242
+ | E003 | error | Delegate failed + user abort | Mark paused, suggest resume |
243
+ | W001 | warning | Step completed with warnings | Log and continue |
244
+
245
+ ### Success Criteria
246
+
247
+ - [ ] Session discovery covers both maestro-* and ralph-*
248
+ - [ ] `-y` parsed from args OR inherited from session.auto_mode
249
+ - [ ] Placeholders resolved from session context
250
+ - [ ] Per-skill enrichment provides correct args
251
+ - [ ] Decision nodes hand off to maestro-ralph via invoke_skill()
252
+ - [ ] Internal nodes execute via invoke_skill() with auto flag
253
+ - [ ] External nodes delegate to claude with `-y` in prompt args, run_in_background + STOP
254
+ - [ ] Context signals propagate to status.json
255
+ - [ ] Auto mode: retry once then pause
256
+ - [ ] Interactive: ask_user retry/skip/abort
257
+ - [ ] Self-invocation continues until complete or paused
258
+
259
+ </appendix>
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: maestro-roadmap
3
+ description: Generate roadmap from requirements (light or full mode)
4
+ argument-hint: "<requirement> [--mode light|full] [-y] [-c] [-m progressive|direct|auto] [--from-brainstorm SESSION-ID] [--revise [instructions]] [--review]"
5
+ allowed-tools:
6
+ - read_file
7
+ - write_file
8
+ - edit_file
9
+ - shell
10
+ - find_files
11
+ - search
12
+ - delegate_subagent
13
+ - ask_user
14
+ ---
15
+ <!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
16
+
17
+ <purpose>
18
+ Unified roadmap generation with two execution paths:
19
+
20
+ - **Light mode** (default): Directly from requirements to roadmap. No specification documents.
21
+ - **Full mode** (`--mode full`): 7-phase document chain (Product Brief → PRD → Architecture → Epics → Roadmap) producing a complete specification package in `.workflow/.spec/` plus `.workflow/roadmap.md`.
22
+
23
+ Additional operation modes (light mode only):
24
+ - **Revise** (`--revise`): Modify existing roadmap while preserving completed phase progress
25
+ - **Review** (`--review`): Health assessment of current roadmap (read-only)
26
+
27
+ Both modes produce `.workflow/roadmap.md` with milestone/phase structure ready for maestro-plan.
28
+ </purpose>
29
+
30
+ <required_reading>
31
+ @~/.maestro/workflows/roadmap-common.md
32
+ @~/.maestro/templates/roadmap.md
33
+ </required_reading>
34
+
35
+ <deferred_reading>
36
+ - [roadmap.md](~/.maestro/workflows/roadmap.md) — read when mode is light (default)
37
+ - [spec-generate.md](~/.maestro/workflows/spec-generate.md) — read when mode is full
38
+ - [spec-config.json](~/.maestro/templates/spec-config.json) — read when initializing spec configuration (full mode)
39
+ </deferred_reading>
40
+
41
+ <context>
42
+ $ARGUMENTS -- requirement text, @file reference, or brainstorm session reference.
43
+
44
+ **Flags (shared):**
45
+ - `--mode light|full`: Execution path (default: light)
46
+ - `-y` / `--yes`: Auto mode — skip interactive questions, use recommended defaults
47
+ - `-c` / `--continue`: Resume from last checkpoint
48
+ - `--from-brainstorm SESSION-ID`: Import guidance-specification.md from a brainstorm session as seed
49
+
50
+ **Flags (light mode only):**
51
+ - `-m progressive|direct|auto`: Decomposition strategy (default: auto)
52
+ - `--revise [instructions]`: Revise existing roadmap. If instructions provided, apply directly. If omitted, ask user. Preserves completed phase progress.
53
+ - `--review`: Roadmap health assessment (read-only)
54
+
55
+ **Input types:**
56
+ - Direct text: `"Implement user authentication system with OAuth and 2FA"`
57
+ - File reference: `@requirements.md`
58
+ - Brainstorm import: `--from-brainstorm WFS-xxx`
59
+ - No args + `--revise` / `--review`: Operate on existing `.workflow/roadmap.md`
60
+
61
+ **Pipeline position:**
62
+ ```
63
+ maestro-brainstorm (optional upstream)
64
+ ↓ guidance-specification.md
65
+ maestro-init (project setup)
66
+ ↓ project.md, state.json, config.json
67
+ maestro-roadmap [--mode light] → roadmap.md directly
68
+ maestro-roadmap --mode full → spec package + roadmap.md
69
+
70
+ maestro-plan → maestro-execute → maestro-verify
71
+ ```
72
+
73
+ **Note (full mode):** `maestro-init` MUST run before `--mode full`. It creates the `.workflow/` directory and project context.
74
+
75
+ ### Pre-load specs
76
+ 1. **Architecture specs**: Run `maestro spec load --category arch` to load architecture constraints. Use as context for phase decomposition — ensures roadmap respects documented decisions and boundaries.
77
+ 2. Optional — proceed without if unavailable.
78
+ </context>
79
+
80
+ <execution>
81
+
82
+ ### Mode routing
83
+
84
+ 1. Read `@~/.maestro/workflows/roadmap-common.md` (always — shared logic)
85
+ 2. Parse `--mode` flag:
86
+ - `light` or omitted → read `@~/.maestro/workflows/roadmap.md`, follow its process
87
+ - `full` → read `@~/.maestro/workflows/spec-generate.md`, follow its process
88
+ 3. If `--revise` or `--review` present → force light mode (these are light-mode-only operations)
89
+
90
+ ### Light mode (default)
91
+
92
+ Follow `~/.maestro/workflows/roadmap.md` completely.
93
+
94
+ Sub-modes:
95
+ - **Create** (default): Build roadmap from requirements
96
+ - **Revise** (`--revise`): Follow workflow roadmap.md "Mode: Revise" section
97
+ - **Review** (`--review`): Follow workflow roadmap.md "Mode: Review" section
98
+
99
+ ### Full mode (`--mode full`)
100
+
101
+ Follow `~/.maestro/workflows/spec-generate.md` completely.
102
+
103
+ ### Next-step routing on completion
104
+
105
+ | Condition | Suggestion |
106
+ |-----------|-----------|
107
+ | Roadmap approved, need analysis | /maestro-analyze 1 |
108
+ | Simple project, ready to plan | /maestro-plan 1 |
109
+ | Need UI design first | /maestro-impeccable build |
110
+ | View project dashboard | /manage-status |
111
+ | Need project setup (full mode) | /maestro-init |
112
+ </execution>
113
+
114
+ <error_codes>
115
+
116
+ **Shared:**
117
+ | Code | Severity | Condition | Recovery |
118
+ |------|----------|-----------|----------|
119
+ | E001 | error | Requirement/idea text or @file required | Prompt user for input |
120
+ | E002 | error | Brainstorm session not found (--from-brainstorm) | Show available sessions |
121
+ | W001 | warning | CLI analysis failed, using fallback | Continue with available data |
122
+ | W005 | warning | External research agent failed | Continue without apiResearchContext |
123
+
124
+ **Light mode:**
125
+ | Code | Severity | Condition | Recovery |
126
+ |------|----------|-----------|----------|
127
+ | E003 | error | Circular dependency detected in phases | Prompt user to re-decompose |
128
+ | E004 | error | roadmap.md not found (--revise/--review) | Run maestro-roadmap first |
129
+ | E005 | error | Revision invalidates completed phase work | Warn user, ask to confirm or adjust |
130
+ | W002 | warning | Max refinement rounds (5) reached | Force proceed with current roadmap |
131
+
132
+ **Full mode:**
133
+ | Code | Severity | Condition | Recovery |
134
+ |------|----------|-----------|----------|
135
+ | E006 | error | `.workflow/` not initialized | Run maestro-init first |
136
+ | E007 | error | Phase 6 readiness Fail after 2 auto-fix iterations | Present manual fix options |
137
+ | W002 | warning | Codebase exploration failed | Continue without codebase context |
138
+ | W003 | warning | Glossary has < 5 terms | Note in readiness check |
139
+ | W004 | warning | Review-level readiness score (60-79%) | Proceed with caveats |
140
+ </error_codes>
141
+
142
+ <success_criteria>
143
+
144
+ **Light mode:**
145
+ - [ ] Requirement parsed with goal, constraints, stakeholders
146
+ - [ ] Decomposition strategy selected (progressive or direct)
147
+ - [ ] Phases defined with success criteria, dependencies, and requirement mappings
148
+ - [ ] Every Active requirement from project.md mapped to exactly one phase
149
+ - [ ] No circular dependencies in phase ordering
150
+ - [ ] User approved roadmap (or auto-approved with -y)
151
+ - [ ] `.workflow/roadmap.md` written with phase details, scope decisions, and progress table
152
+ - [ ] No phase directories created (phases are labels in roadmap, not directories)
153
+
154
+ **Full mode (in addition to light mode criteria for roadmap):**
155
+ - [ ] `spec-config.json` created with session metadata and phase tracking
156
+ - [ ] `product-brief.md` with vision, goals, scope, multi-perspective synthesis
157
+ - [ ] `glossary.json` with 5+ core terms for cross-document consistency
158
+ - [ ] `requirements/` directory with `_index.md` + individual `REQ-*.md` + `NFR-*.md` files
159
+ - [ ] All requirements have RFC 2119 keywords and acceptance criteria
160
+ - [ ] `architecture/` directory with `_index.md` + individual `ADR-*.md` files
161
+ - [ ] Architecture includes state machine, config model, error handling, observability (service type)
162
+ - [ ] `epics/` directory with `_index.md` + individual `EPIC-*.md` files
163
+ - [ ] Cross-Epic dependency map (Mermaid) and MVP subset tagged
164
+ - [ ] `readiness-report.md` with 4-dimension quality scores and traceability matrix
165
+ - [ ] `spec-summary.md` with one-page executive summary
166
+ - [ ] All documents have valid YAML frontmatter with session_id
167
+ - [ ] Glossary terms used consistently across all documents
168
+ - [ ] Readiness gate: Pass (>=80%) or Review (>=60%) with documented caveats
169
+ - [ ] `.workflow/roadmap.md` written
170
+ </success_criteria>
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: maestro-tools-execute
3
+ description: Load and execute tool specs by category or name
4
+ argument-hint: "[<tool-name> | --category <category>] [--list]"
5
+ allowed-tools:
6
+ - read_file
7
+ - write_file
8
+ - edit_file
9
+ - shell
10
+ - find_files
11
+ - search
12
+ - ask_user
13
+ - delegate_subagent
14
+ ---
15
+ <!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
16
+
17
+ <purpose>
18
+ Load registered tool documents and execute them step-by-step. Two invocation modes:
19
+
20
+ 1. **Direct** — Specify tool name, load full steps, execute sequentially
21
+ 2. **Category-based** — List available tools for a category, user selects, then execute
22
+
23
+ Execution follows the tool definition steps in order, reporting progress per step and asking user on blockers.
24
+ </purpose>
25
+
26
+ <required_reading>
27
+ @~/.maestro/workflows/tools-spec.md
28
+ </required_reading>
29
+
30
+ <context>
31
+ $ARGUMENTS — Tool name, keyword, or --category filter
32
+
33
+ **Examples**:
34
+ ```
35
+ /maestro-tools-execute integration-test
36
+ /maestro-tools-execute --category coding
37
+ /maestro-tools-execute --category review --keyword api
38
+ /maestro-tools-execute
39
+ ```
40
+
41
+ Empty arguments enters interactive mode: list all tools for user selection.
42
+ </context>
43
+
44
+ <execution>
45
+
46
+ ### Step 1: Load Tool
47
+
48
+ **By name**:
49
+ ```bash
50
+ maestro spec load --category coding --keyword <name>
51
+ ```
52
+ Match knowhow documents with `tool: true` whose title or keywords contain the name.
53
+
54
+ **By category**:
55
+ ```bash
56
+ maestro spec load --category <category>
57
+ ```
58
+ Extract tool entries from the "Available Tools" section in output.
59
+
60
+ **Empty args**:
61
+ Load all categories, collect tool entries, present to user with ask_user for selection.
62
+
63
+ ### Step 2: Display Tool
64
+
65
+ Show tool information:
66
+ - Name, category, keywords
67
+ - Steps overview (for ref entries, expand knowhow detail first)
68
+
69
+ Expand ref entries:
70
+ ```bash
71
+ maestro wiki load <knowhow-id>
72
+ ```
73
+
74
+ ### Step 3: Confirm Execution
75
+
76
+ Ask user:
77
+ - Execute steps as-is?
78
+ - Adjust parameters/scope?
79
+ - View only, do not execute?
80
+
81
+ ### Step 4: Step-by-Step Execution
82
+
83
+ Follow the tool definition steps in order:
84
+ 1. Read current step description
85
+ 2. Execute step action (file ops, commands, code changes, etc.)
86
+ 3. Verify step completion
87
+ 4. Report progress: `[Step N/M] done — <step_name>`
88
+ 5. Proceed to next step
89
+
90
+ **Blocker handling**:
91
+ - Step fails → report error, ask user: retry / skip / abort
92
+ - Needs user input → ask_user for parameters
93
+ - Prerequisites unmet → show missing items, ask how to proceed
94
+
95
+ ### Step 5: Report Results
96
+
97
+ After completion, output:
98
+ - Completed steps list
99
+ - Skipped/failed steps (if any)
100
+ - Artifacts produced (generated files, test results, etc.)
101
+ - Suggested next actions
102
+
103
+ </execution>
104
+
105
+ <error_codes>
106
+ | Code | Severity | Description |
107
+ |------|----------|-------------|
108
+ | E001 | fatal | No matching tool found — check name/keyword |
109
+ | E002 | warning | Multiple tools match — list options for user selection |
110
+ | E003 | warning | Step execution failed — ask user how to proceed |
111
+ </error_codes>
112
+
113
+ <success_criteria>
114
+ - [ ] Tool correctly loaded (ref expanded if applicable)
115
+ - [ ] User confirmed before execution starts
116
+ - [ ] Each step has progress feedback
117
+ - [ ] Blockers handled interactively
118
+ - [ ] Results reported clearly
119
+ </success_criteria>