maestro-flow 0.3.45 → 0.3.47

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 (289) hide show
  1. package/.claude/agents/ui-design-agent.md +1 -0
  2. package/.claude/agents/workflow-executor.md +3 -0
  3. package/.claude/commands/learn-decompose.md +91 -146
  4. package/.claude/commands/learn-follow.md +102 -137
  5. package/.claude/commands/learn-investigate.md +102 -167
  6. package/.claude/commands/learn-retro.md +100 -243
  7. package/.claude/commands/learn-second-opinion.md +95 -135
  8. package/.claude/commands/maestro-amend.md +95 -232
  9. package/.claude/commands/maestro-analyze.md +1 -6
  10. package/.claude/commands/maestro-collab.md +104 -265
  11. package/.claude/commands/maestro-composer.md +113 -293
  12. package/.claude/commands/maestro-execute.md +11 -17
  13. package/.claude/commands/maestro-impeccable.md +89 -0
  14. package/.claude/commands/maestro-plan.md +1 -6
  15. package/.claude/commands/maestro-player.md +111 -340
  16. package/.claude/commands/maestro-quick.md +9 -0
  17. package/.claude/commands/maestro-ralph-execute.md +167 -210
  18. package/.claude/commands/maestro-ralph.md +245 -426
  19. package/.claude/commands/maestro-tools-register.md +28 -7
  20. package/.claude/commands/maestro-ui-codify.md +13 -0
  21. package/.claude/commands/maestro-ui-craft.md +364 -0
  22. package/.claude/commands/maestro-ui-design.md +12 -1
  23. package/.claude/commands/maestro-verify.md +12 -13
  24. package/.claude/commands/maestro.md +142 -72
  25. package/.claude/commands/manage-knowhow-capture.md +45 -161
  26. package/.claude/commands/quality-auto-test.md +9 -0
  27. package/.claude/commands/quality-debug.md +11 -24
  28. package/.claude/commands/quality-refactor.md +9 -0
  29. package/.claude/commands/quality-review.md +5 -13
  30. package/.claude/commands/quality-test.md +5 -0
  31. package/.claude/commands/spec-add.md +1 -1
  32. package/.claude/commands/spec-load.md +3 -2
  33. package/.claude/skills/maestro-help/SKILL.md +264 -0
  34. package/.claude/skills/maestro-help/index/catalog.json +182 -0
  35. package/.claude/skills/maestro-help/phases/01-parse-intent.md +122 -0
  36. package/.claude/skills/maestro-help/phases/02-search-present.md +181 -0
  37. package/.claude/skills/maestro-help/phases/03-workflow-guide.md +186 -0
  38. package/.claude/skills/maestro-impeccable/SKILL.md +169 -0
  39. package/.codex/agents/team-supervisor.toml +40 -0
  40. package/.codex/agents/team-worker.toml +63 -0
  41. package/.codex/skills/learn-decompose/SKILL.md +1 -1
  42. package/.codex/skills/learn-investigate/SKILL.md +2 -1
  43. package/.codex/skills/maestro/SKILL.md +278 -313
  44. package/.codex/skills/maestro-analyze/SKILL.md +126 -417
  45. package/.codex/skills/maestro-brainstorm/SKILL.md +129 -451
  46. package/.codex/skills/maestro-collab/SKILL.md +134 -547
  47. package/.codex/skills/maestro-execute/SKILL.md +4 -2
  48. package/.codex/skills/maestro-help/SKILL.md +213 -0
  49. package/.codex/skills/maestro-help/catalog.json +182 -0
  50. package/.codex/skills/maestro-impeccable/SKILL.md +112 -0
  51. package/.codex/skills/maestro-plan/SKILL.md +88 -437
  52. package/.codex/skills/maestro-player/SKILL.md +191 -333
  53. package/.codex/skills/maestro-quick/SKILL.md +2 -0
  54. package/.codex/skills/maestro-ralph/SKILL.md +307 -710
  55. package/.codex/skills/maestro-roadmap/SKILL.md +201 -518
  56. package/.codex/skills/maestro-tools-register/SKILL.md +29 -7
  57. package/.codex/skills/maestro-ui-codify/SKILL.md +1 -0
  58. package/.codex/skills/maestro-ui-craft/SKILL.md +341 -0
  59. package/.codex/skills/maestro-ui-design/SKILL.md +10 -0
  60. package/.codex/skills/maestro-verify/SKILL.md +116 -409
  61. package/.codex/skills/manage-knowhow-capture/SKILL.md +18 -3
  62. package/.codex/skills/quality-auto-test/SKILL.md +145 -443
  63. package/.codex/skills/quality-debug/SKILL.md +2 -1
  64. package/.codex/skills/quality-refactor/SKILL.md +1 -1
  65. package/.codex/skills/quality-review/SKILL.md +1 -1
  66. package/.codex/skills/quality-test/SKILL.md +229 -507
  67. package/.codex/skills/spec-add/SKILL.md +1 -1
  68. package/README.md +4 -1
  69. package/README.zh-CN.md +3 -1
  70. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +3 -0
  71. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
  72. package/dashboard/dist-server/dashboard/src/server/index.js +5 -3
  73. package/dashboard/dist-server/dashboard/src/server/index.js.map +1 -1
  74. package/dashboard/dist-server/dashboard/src/server/routes/board-state.integration.test.js +3 -3
  75. package/dashboard/dist-server/dashboard/src/server/routes/board-state.integration.test.js.map +1 -1
  76. package/dashboard/dist-server/dashboard/src/server/routes/index.js +14 -5
  77. package/dashboard/dist-server/dashboard/src/server/routes/index.js.map +1 -1
  78. package/dashboard/dist-server/dashboard/src/server/routes/install.js +110 -1
  79. package/dashboard/dist-server/dashboard/src/server/routes/install.js.map +1 -1
  80. package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.d.ts +2 -0
  81. package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.js +181 -0
  82. package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.js.map +1 -0
  83. package/dashboard/dist-server/dashboard/src/server/routes/settings.js +56 -0
  84. package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
  85. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +2 -0
  86. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
  87. package/dashboard/dist-server/dashboard/src/server/state/event-bus.d.ts +2 -0
  88. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js +2 -0
  89. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js.map +1 -1
  90. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.d.ts +2 -0
  91. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js +58 -0
  92. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js.map +1 -1
  93. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +2 -2
  94. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
  95. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +2 -0
  96. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  97. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +3 -1
  98. package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.d.ts +7 -2
  99. package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.js +7 -1
  100. package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.js.map +1 -1
  101. package/dashboard/dist-server/dashboard/src/shared/constants.d.ts +2 -0
  102. package/dashboard/dist-server/dashboard/src/shared/constants.js +9 -9
  103. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  104. package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.d.ts +113 -0
  105. package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.js +6 -0
  106. package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.js.map +1 -0
  107. package/dashboard/dist-server/dashboard/src/shared/types.d.ts +4 -3
  108. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +1 -1
  109. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
  110. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  111. package/dist/src/agents/cli-agent-runner.js +1 -3
  112. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  113. package/dist/src/agents/cli-history-store.d.ts +5 -0
  114. package/dist/src/agents/cli-history-store.d.ts.map +1 -1
  115. package/dist/src/agents/cli-history-store.js +65 -13
  116. package/dist/src/agents/cli-history-store.js.map +1 -1
  117. package/dist/src/cli.js +13 -0
  118. package/dist/src/cli.js.map +1 -1
  119. package/dist/src/commands/command-help.d.ts +3 -0
  120. package/dist/src/commands/command-help.d.ts.map +1 -0
  121. package/dist/src/commands/command-help.js +60 -0
  122. package/dist/src/commands/command-help.js.map +1 -0
  123. package/dist/src/commands/config.d.ts.map +1 -1
  124. package/dist/src/commands/config.js +17 -0
  125. package/dist/src/commands/config.js.map +1 -1
  126. package/dist/src/commands/delegate.d.ts.map +1 -1
  127. package/dist/src/commands/delegate.js +12 -2
  128. package/dist/src/commands/delegate.js.map +1 -1
  129. package/dist/src/commands/impeccable.d.ts +10 -0
  130. package/dist/src/commands/impeccable.d.ts.map +1 -0
  131. package/dist/src/commands/impeccable.js +181 -0
  132. package/dist/src/commands/impeccable.js.map +1 -0
  133. package/dist/src/commands/knowhow.d.ts.map +1 -1
  134. package/dist/src/commands/knowhow.js +7 -4
  135. package/dist/src/commands/knowhow.js.map +1 -1
  136. package/dist/src/commands/spec.js +1 -1
  137. package/dist/src/commands/spec.js.map +1 -1
  138. package/dist/src/commands/wiki.d.ts.map +1 -1
  139. package/dist/src/commands/wiki.js +5 -1
  140. package/dist/src/commands/wiki.js.map +1 -1
  141. package/dist/src/config/cli-tools-config.d.ts.map +1 -1
  142. package/dist/src/config/cli-tools-config.js +10 -7
  143. package/dist/src/config/cli-tools-config.js.map +1 -1
  144. package/dist/src/core/addon-registry.d.ts +31 -0
  145. package/dist/src/core/addon-registry.d.ts.map +1 -0
  146. package/dist/src/core/addon-registry.js +28 -0
  147. package/dist/src/core/addon-registry.js.map +1 -0
  148. package/dist/src/hooks/plugins/spec-injection-plugin.js +9 -4
  149. package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
  150. package/dist/src/hooks/spec-injector.js +2 -2
  151. package/dist/src/hooks/spec-injector.js.map +1 -1
  152. package/dist/src/index.d.ts +2 -0
  153. package/dist/src/index.d.ts.map +1 -1
  154. package/dist/src/index.js +1 -0
  155. package/dist/src/index.js.map +1 -1
  156. package/dist/src/tools/impeccable/critique-storage.d.ts +28 -0
  157. package/dist/src/tools/impeccable/critique-storage.d.ts.map +1 -0
  158. package/dist/src/tools/impeccable/critique-storage.js +120 -0
  159. package/dist/src/tools/impeccable/critique-storage.js.map +1 -0
  160. package/dist/src/tools/impeccable/design-parser.d.ts +90 -0
  161. package/dist/src/tools/impeccable/design-parser.d.ts.map +1 -0
  162. package/dist/src/tools/impeccable/design-parser.js +696 -0
  163. package/dist/src/tools/impeccable/design-parser.js.map +1 -0
  164. package/dist/src/tools/impeccable/detect-csp.d.ts +6 -0
  165. package/dist/src/tools/impeccable/detect-csp.d.ts.map +1 -0
  166. package/dist/src/tools/impeccable/detect-csp.js +130 -0
  167. package/dist/src/tools/impeccable/detect-csp.js.map +1 -0
  168. package/dist/src/tools/impeccable/is-generated.d.ts +4 -0
  169. package/dist/src/tools/impeccable/is-generated.d.ts.map +1 -0
  170. package/dist/src/tools/impeccable/is-generated.js +56 -0
  171. package/dist/src/tools/impeccable/is-generated.js.map +1 -0
  172. package/dist/src/tools/impeccable/live/accept.d.ts +50 -0
  173. package/dist/src/tools/impeccable/live/accept.d.ts.map +1 -0
  174. package/dist/src/tools/impeccable/live/accept.js +556 -0
  175. package/dist/src/tools/impeccable/live/accept.js.map +1 -0
  176. package/dist/src/tools/impeccable/live/bootstrap.d.ts +2 -0
  177. package/dist/src/tools/impeccable/live/bootstrap.d.ts.map +1 -0
  178. package/dist/src/tools/impeccable/live/bootstrap.js +244 -0
  179. package/dist/src/tools/impeccable/live/bootstrap.js.map +1 -0
  180. package/dist/src/tools/impeccable/live/complete.d.ts +7 -0
  181. package/dist/src/tools/impeccable/live/complete.d.ts.map +1 -0
  182. package/dist/src/tools/impeccable/live/complete.js +67 -0
  183. package/dist/src/tools/impeccable/live/complete.js.map +1 -0
  184. package/dist/src/tools/impeccable/live/completion.d.ts +24 -0
  185. package/dist/src/tools/impeccable/live/completion.d.ts.map +1 -0
  186. package/dist/src/tools/impeccable/live/completion.js +26 -0
  187. package/dist/src/tools/impeccable/live/completion.js.map +1 -0
  188. package/dist/src/tools/impeccable/live/inject.d.ts +41 -0
  189. package/dist/src/tools/impeccable/live/inject.d.ts.map +1 -0
  190. package/dist/src/tools/impeccable/live/inject.js +394 -0
  191. package/dist/src/tools/impeccable/live/inject.js.map +1 -0
  192. package/dist/src/tools/impeccable/live/poll.d.ts +24 -0
  193. package/dist/src/tools/impeccable/live/poll.d.ts.map +1 -0
  194. package/dist/src/tools/impeccable/live/poll.js +180 -0
  195. package/dist/src/tools/impeccable/live/poll.js.map +1 -0
  196. package/dist/src/tools/impeccable/live/resume.d.ts +5 -0
  197. package/dist/src/tools/impeccable/live/resume.d.ts.map +1 -0
  198. package/dist/src/tools/impeccable/live/resume.js +30 -0
  199. package/dist/src/tools/impeccable/live/resume.js.map +1 -0
  200. package/dist/src/tools/impeccable/live/server.d.ts +6 -0
  201. package/dist/src/tools/impeccable/live/server.d.ts.map +1 -0
  202. package/dist/src/tools/impeccable/live/server.js +867 -0
  203. package/dist/src/tools/impeccable/live/server.js.map +1 -0
  204. package/dist/src/tools/impeccable/live/session-store.d.ts +72 -0
  205. package/dist/src/tools/impeccable/live/session-store.d.ts.map +1 -0
  206. package/dist/src/tools/impeccable/live/session-store.js +281 -0
  207. package/dist/src/tools/impeccable/live/session-store.js.map +1 -0
  208. package/dist/src/tools/impeccable/live/static/live-browser-session.js +123 -0
  209. package/dist/src/tools/impeccable/live/static/live-browser.js +4860 -0
  210. package/dist/src/tools/impeccable/live/static/modern-screenshot.umd.js +14 -0
  211. package/dist/src/tools/impeccable/live/status.d.ts +2 -0
  212. package/dist/src/tools/impeccable/live/status.d.ts.map +1 -0
  213. package/dist/src/tools/impeccable/live/status.js +52 -0
  214. package/dist/src/tools/impeccable/live/status.js.map +1 -0
  215. package/dist/src/tools/impeccable/live/wrap.d.ts +33 -0
  216. package/dist/src/tools/impeccable/live/wrap.d.ts.map +1 -0
  217. package/dist/src/tools/impeccable/live/wrap.js +572 -0
  218. package/dist/src/tools/impeccable/live/wrap.js.map +1 -0
  219. package/dist/src/tools/impeccable/load-context.d.ts +13 -0
  220. package/dist/src/tools/impeccable/load-context.d.ts.map +1 -0
  221. package/dist/src/tools/impeccable/load-context.js +79 -0
  222. package/dist/src/tools/impeccable/load-context.js.map +1 -0
  223. package/dist/src/tools/impeccable/paths.d.ts +34 -0
  224. package/dist/src/tools/impeccable/paths.d.ts.map +1 -0
  225. package/dist/src/tools/impeccable/paths.js +102 -0
  226. package/dist/src/tools/impeccable/paths.js.map +1 -0
  227. package/dist/src/tools/spec-entry-parser.d.ts +1 -1
  228. package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
  229. package/dist/src/tools/spec-entry-parser.js +1 -1
  230. package/dist/src/tools/spec-entry-parser.js.map +1 -1
  231. package/dist/src/tools/spec-init.d.ts.map +1 -1
  232. package/dist/src/tools/spec-init.js +26 -1
  233. package/dist/src/tools/spec-init.js.map +1 -1
  234. package/dist/src/tools/spec-loader.d.ts +1 -1
  235. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  236. package/dist/src/tools/spec-loader.js +2 -0
  237. package/dist/src/tools/spec-loader.js.map +1 -1
  238. package/dist/src/tools/store-knowhow.d.ts.map +1 -1
  239. package/dist/src/tools/store-knowhow.js +15 -6
  240. package/dist/src/tools/store-knowhow.js.map +1 -1
  241. package/package.json +5 -3
  242. package/workflows/claude-instructions.md +17 -5
  243. package/workflows/cli-tools-usage.md +10 -3
  244. package/workflows/delegate-usage.md +3 -2
  245. package/workflows/impeccable/adapt.md +190 -0
  246. package/workflows/impeccable/animate.md +175 -0
  247. package/workflows/impeccable/audit.md +133 -0
  248. package/workflows/impeccable/bolder.md +113 -0
  249. package/workflows/impeccable/brand.md +118 -0
  250. package/workflows/impeccable/clarify.md +174 -0
  251. package/workflows/impeccable/codex.md +105 -0
  252. package/workflows/impeccable/cognitive-load.md +106 -0
  253. package/workflows/impeccable/color-and-contrast.md +105 -0
  254. package/workflows/impeccable/colorize.md +154 -0
  255. package/workflows/impeccable/craft.md +123 -0
  256. package/workflows/impeccable/critique.md +261 -0
  257. package/workflows/impeccable/delight.md +302 -0
  258. package/workflows/impeccable/distill.md +111 -0
  259. package/workflows/impeccable/document.md +439 -0
  260. package/workflows/impeccable/extract.md +69 -0
  261. package/workflows/impeccable/harden.md +347 -0
  262. package/workflows/impeccable/heuristics-scoring.md +234 -0
  263. package/workflows/impeccable/interaction-design.md +195 -0
  264. package/workflows/impeccable/layout.md +141 -0
  265. package/workflows/impeccable/live.md +622 -0
  266. package/workflows/impeccable/motion-design.md +109 -0
  267. package/workflows/impeccable/onboard.md +234 -0
  268. package/workflows/impeccable/optimize.md +258 -0
  269. package/workflows/impeccable/overdrive.md +130 -0
  270. package/workflows/impeccable/personas.md +179 -0
  271. package/workflows/impeccable/polish.md +242 -0
  272. package/workflows/impeccable/product.md +62 -0
  273. package/workflows/impeccable/quieter.md +99 -0
  274. package/workflows/impeccable/responsive-design.md +114 -0
  275. package/workflows/impeccable/shape.md +165 -0
  276. package/workflows/impeccable/spatial-design.md +100 -0
  277. package/workflows/impeccable/teach.md +168 -0
  278. package/workflows/impeccable/typeset.md +124 -0
  279. package/workflows/impeccable/typography.md +159 -0
  280. package/workflows/impeccable/ux-writing.md +107 -0
  281. package/workflows/impeccable.md +164 -0
  282. package/workflows/maestro.md +7 -3
  283. package/workflows/skill-authoring.md +265 -0
  284. package/workflows/specs-add.md +3 -2
  285. package/workflows/specs-load.md +2 -1
  286. package/workflows/specs-setup.md +21 -1
  287. package/workflows/tools-spec.md +20 -13
  288. package/.claude/commands/maestro-link-coordinate.md +0 -71
  289. package/.codex/skills/maestro-link-coordinate/SKILL.md +0 -257
@@ -1,518 +1,201 @@
1
- ---
2
- name: maestro-roadmap
3
- description: Generate roadmap from requirements (light or full mode)
4
- argument-hint: "\"<requirements>\" [--mode light|full] [-y|--yes] [-c] [--phases N] [--skip-research] [--from-brainstorm SESSION-ID] [--revise [instructions]] [--review]"
5
- allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
6
- ---
7
-
8
- <purpose>
9
- Unified 2-wave roadmap generation using `spawn_agents_on_csv` with dual execution modes:
10
-
11
- - **Light mode** (default): Wave 1 runs parallel requirement analysis agents (scope, risk, dependency). Wave 2 runs roadmap assembly agent producing `roadmap.md` with phases, milestones, and success criteria.
12
- - **Full mode** (`--mode full`): Wave 1 runs parallel research agents (domain, competitive, tech stack). Wave 2 runs a single synthesis agent producing the 7-phase specification document chain (product brief, PRD, architecture, epics, roadmap).
13
-
14
- **Common workflow**: Parse Input Parallel Analysis/Research Sequential Assembly/Synthesis → Output
15
-
16
- ```
17
- +---------------------------------------------------------------------------+
18
- | ROADMAP CSV WAVE WORKFLOW (DUAL MODE) |
19
- +---------------------------------------------------------------------------+
20
- | |
21
- | Phase 1: Input Parsing + CSV Generation |
22
- | +-- Parse requirement/idea from arguments |
23
- | +-- Detect input type (text, @file, brainstorm import) |
24
- | +-- Detect mode: light (default) or full (--mode full) |
25
- | +-- Codebase detection (conditional exploration) |
26
- | +-- Generate mode-specific tasks.csv |
27
- | +-- User validates breakdown (skip if -y) |
28
- | |
29
- | Phase 2: Wave Execution Engine |
30
- | +-- Wave 1: Analysis/Research (parallel) |
31
- | | [Light] scope, risk, dependency analysis |
32
- | | [Full] domain, competitive, tech stack research |
33
- | +-- Wave 2: Assembly/Synthesis (sequential) |
34
- | | [Light] roadmap assembly agent → roadmap.md |
35
- | | [Full] 7-phase document chain → spec package + roadmap.md |
36
- | +-- discoveries.ndjson shared across waves (append-only) |
37
- | |
38
- | Phase 3: Results Aggregation |
39
- | +-- Export results.csv |
40
- | +-- Interactive refinement (skip if -y) |
41
- | +-- [Full only] Readiness check (4 dimensions) |
42
- | +-- Generate context.md |
43
- | +-- Write .workflow/roadmap.md |
44
- | +-- Display summary with next steps |
45
- | |
46
- +---------------------------------------------------------------------------+
47
- ```
48
-
49
- </purpose>
50
-
51
- <context>
52
- $ARGUMENTS -- requirement/idea text or @file reference, plus optional flags.
53
-
54
- **Usage**:
55
-
56
- ```bash
57
- # Light mode (default)
58
- $maestro-roadmap "Implement user authentication with OAuth and 2FA"
59
- $maestro-roadmap -y "@requirements.md"
60
- $maestro-roadmap --phases 4 "Build real-time notification system"
61
-
62
- # Full mode
63
- $maestro-roadmap --mode full "Build a real-time collaboration platform"
64
- $maestro-roadmap --mode full -y "@requirements.md"
65
- $maestro-roadmap --mode full --skip-research "CLI workflow orchestration tool"
66
-
67
- # Shared flags
68
- $maestro-roadmap --from-brainstorm WFS-001 "Enhance auth system"
69
- ```
70
-
71
- **Flags**:
72
- - `--mode light|full`: Execution mode (default: light)
73
- - `-y, --yes`: Skip all confirmations (auto mode)
74
- - `-m progressive|direct|auto`: Decomposition strategy (default: auto, light mode only)
75
- - `--phases N`: Target number of roadmap phases (default: auto-determined, light mode only)
76
- - `--revise [instructions]`: Revise existing roadmap preserving completed phase progress (light mode only)
77
- - `--review`: Roadmap health assessment, read-only (light mode only)
78
- - `--skip-research`: Skip Wave 1 research, jump to document generation (full mode only)
79
- - `--from-brainstorm SESSION-ID`: Import guidance-specification.md from brainstorm session as seed
80
-
81
- **Operation modes** (light mode):
82
- - **Create** (default): Build roadmap from requirements via full CSV pipeline
83
- - **Revise** (`--revise`): Load existing roadmap.md, apply modifications while preserving completed phases
84
- - **Review** (`--review`): Health assessment of current roadmap (read-only, no writes)
85
-
86
- When `--yes` or `-y`: Auto-confirm strategy/decisions, skip interactive refinement, use defaults.
87
-
88
- **Output Directory**: `.workflow/.csv-wave/{session-id}/`
89
- **Core Output**: `tasks.csv` + `results.csv` + `discoveries.ndjson` + `context.md` + `.workflow/roadmap.md`
90
- **Full mode additional**: Spec package in `.workflow/.spec/SPEC-{slug}-{date}/`
91
- </context>
92
-
93
- <csv_schema>
94
-
95
- ### tasks.csv — Light Mode
96
-
97
- ```csv
98
- id,title,description,analysis_focus,deps,context_from,wave,status,findings,error
99
- "1","Scope Analysis","Analyze requirement scope: identify all features and sub-features, define MVP boundaries, classify must-have vs nice-to-have, estimate relative size of each feature area. Produce feature inventory with priority tags.","scope","","","1","","",""
100
- "2","Risk Analysis","Assess technical and project risks: identify unknowns, evaluate technical feasibility per feature, rate risk levels (high/medium/low), propose mitigations. Flag features requiring spikes or prototypes.","risk","","","1","","",""
101
- "3","Dependency Analysis","Map dependencies between features: identify ordering constraints, find parallel-safe groups, detect external dependencies (APIs, libraries, infrastructure). Produce dependency graph with critical path.","dependency","","","1","","",""
102
- "4","Roadmap Assembly","Synthesize analysis findings into a complete roadmap. Apply decomposition strategy. Produce roadmap.md with: phase structure (goal, depends-on, requirements, success criteria), milestone grouping, scope decisions, progress table. Each phase must have observable success criteria from user perspective.","","1;2;3","1;2;3","2","","",""
103
- ```
104
-
105
- ### tasks.csv Full Mode
106
-
107
- ```csv
108
- id,title,description,research_focus,doc_phase,deps,context_from,wave,status,findings,output_file,error
109
- "1","Domain Research","Research the problem domain: identify target users, market needs, existing solutions, industry trends, and domain terminology. Produce structured findings with confidence levels.","domain","","","","1","","","",""
110
- "2","Competitive Analysis","Analyze competing products and approaches: feature comparison matrix, UX patterns, pricing models, market positioning. Identify gaps and opportunities for differentiation.","competitive","","","","1","","","",""
111
- "3","Tech Stack Analysis","Evaluate technical feasibility: recommended languages, frameworks, databases, infrastructure. Assess constraints, integration complexity, scalability requirements. Reference existing codebase if available.","tech_stack","","","","1","","","",""
112
- "4","Document Chain","Generate complete 7-phase specification package using research context. Phases: (1) Product Brief, (2) PRD with REQ-*/NFR-*, (3) Architecture with ADR-*, (4) Data Model, (5) API Specification, (6) UI Wireframes, (7) Epic-to-Roadmap with EPIC-* and phase mapping. Produce glossary.json for terminology consistency.","","1-7","1;2;3","1;2;3","2","","","",""
113
- ```
114
-
115
- ### Shared Columns
116
-
117
- | Column | Phase | Description |
118
- |--------|-------|-------------|
119
- | `id` | Input | Unique task identifier (string) |
120
- | `title` | Input | Short task title |
121
- | `description` | Input | Detailed instructions for this task |
122
- | `deps` | Input | Semicolon-separated dependency task IDs |
123
- | `context_from` | Input | Semicolon-separated task IDs whose findings this task needs |
124
- | `wave` | Computed | Wave number (1 = analysis/research, 2 = assembly/synthesis) |
125
- | `status` | Output | `pending` -> `completed` / `failed` / `skipped` |
126
- | `findings` | Output | Key findings summary (max 500 chars) |
127
- | `error` | Output | Error message if failed |
128
-
129
- **Light-only**: `analysis_focus` (scope/risk/dependency)
130
- **Full-only**: `research_focus` (domain/competitive/tech_stack), `doc_phase`, `output_file`
131
-
132
- ### Per-Wave CSV (Temporary)
133
-
134
- Each wave generates `wave-{N}.csv` with extra `prev_context` column.
135
- </csv_schema>
136
-
137
- <invariants>
138
- 1. **Start Immediately**: First action is session initialization, then Phase 1
139
- 2. **Wave Order is Sacred**: Never execute wave 2 before wave 1 completes and results are merged
140
- 3. **CSV is Source of Truth**: Master tasks.csv holds all state
141
- 4. **Context Propagation**: prev_context built from master CSV, not from memory
142
- 5. **Discovery Board is Append-Only**: Never clear, modify, or recreate discoveries.ndjson
143
- 6. **Graceful Degradation**: If Wave 1 fails, Wave 2 proceeds with seed input only
144
- 7. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
145
- 8. **DO NOT STOP**: Continuous execution until all waves complete
146
- </invariants>
147
-
148
- <execution>
149
-
150
- ### Output Artifacts
151
-
152
- | File | Purpose | Lifecycle |
153
- |------|---------|-----------|
154
- | `tasks.csv` | Master state -- all tasks with status/findings | Updated after each wave |
155
- | `wave-{N}.csv` | Per-wave input (temporary) | Created before wave, deleted after |
156
- | `results.csv` | Final export of all task results | Created in Phase 3 |
157
- | `discoveries.ndjson` | Shared exploration board | Append-only, carries across waves |
158
- | `context.md` | Human-readable report | Created in Phase 3 |
159
- | `spec-config.json` | Session metadata (full mode only) | Created in Phase 1 |
160
-
161
- ### Session Structure
162
-
163
- **Light mode**:
164
- ```
165
- .workflow/.csv-wave/{YYYYMMDD}-roadmap-{slug}/
166
- +-- tasks.csv, results.csv, discoveries.ndjson, context.md
167
- ```
168
-
169
- **Full mode**:
170
- ```
171
- .workflow/.csv-wave/{YYYYMMDD}-roadmap-full-{slug}/
172
- +-- tasks.csv, results.csv, discoveries.ndjson, context.md, spec-config.json
173
-
174
- .workflow/.spec/SPEC-{slug}-{date}/
175
- +-- spec-config.json
176
- +-- product-brief.md
177
- +-- glossary.json
178
- +-- requirements/
179
- | +-- _index.md
180
- | +-- REQ-NNN-{slug}.md
181
- | +-- NFR-{type}-NNN-{slug}.md
182
- +-- architecture/
183
- | +-- _index.md
184
- | +-- ADR-NNN-{slug}.md
185
- +-- epics/
186
- | +-- _index.md
187
- | +-- EPIC-NNN-{slug}.md
188
- +-- readiness-report.md
189
- +-- spec-summary.md
190
- ```
191
-
192
- ### Session Initialization
193
-
194
- Parse `$ARGUMENTS` to extract:
195
- - `mode` from `--mode light|full` (default: `light`)
196
- - `AUTO_YES` from `--yes` / `-y`
197
- - `strategy` from `-m progressive|direct|auto` (default: `auto`, light only)
198
- - `targetPhases` from `--phases N` (light mode only)
199
- - `reviseMode` from `--revise [instructions]` (light only, forces mode=light)
200
- - `reviewMode` from `--review` (light only, forces mode=light)
201
- - `skipResearch` from `--skip-research` (full mode only)
202
- - `brainstormSession` from `--from-brainstorm <SESSION-ID>`
203
- - `requirementArg` = remaining text after stripping all flags
204
- - `slug` = requirementArg lowercased, non-alphanumeric → `-`, max 40 chars
205
-
206
- **Mode routing:**
207
- - If `--revise` or `--review`: force `mode = light`, bypass CSV pipeline
208
- - **Revise**: Load `.workflow/roadmap.md`, apply instructions (preserve completed phases), write updated roadmap. If instructions provided inline, apply directly; if omitted, ask user via `request_user_input`.
209
- - **Review**: Read `.workflow/roadmap.md` + `state.json`, assess health (phase completion, dependency validity, scope creep), report read-only. No writes.
210
- - Both skip Phase 1-3 CSV pipeline, go directly to operation-specific logic
211
- - If `-c` / `--continue`: Resume from last checkpoint in existing session
212
- - Otherwise: proceed with CSV pipeline
213
-
214
- Session ID: `{YYYYMMDD}-roadmap-{slug}` (light) or `{YYYYMMDD}-roadmap-full-{slug}` (full)
215
- Session folder: `.workflow/.csv-wave/{sessionId}/` — create via `mkdir -p`
216
-
217
- ### Phase 1: Input Parsing + CSV Generation
218
-
219
- **Shared steps**:
220
- 1. **Input parsing**: Parse `{requirementArg}` -- direct text or `@file` reference
221
- 2. **Brainstorm import**: If `--from-brainstorm`, read `guidance-specification.md` for enriched context
222
- 3. **Codebase detection**: Check for source files; if found, add context to analysis/research prompts
223
- 4. **Load project specs**: Read `.workflow/specs/` for constraint awareness
224
-
225
- **Light mode specific**:
226
- 5. **Uncertainty assessment**:
227
-
228
- | Factor | Low | Medium | High |
229
- |--------|-----|--------|------|
230
- | Scope clarity | Requirements explicit | Some ambiguity | Vague/open-ended |
231
- | Technical risk | Proven stack | Some unknowns | New technology |
232
- | Dependency unknown | All mapped | Some unclear | Many external |
233
- | Domain familiarity | Expert | Moderate | New domain |
234
- | Requirement stability | Locked | Some flux | Evolving |
235
-
236
- Strategy: >=3 high → progressive, >=3 low → direct, else → ask (or auto if -y).
237
-
238
- 6. **CSV generation**: 3 analysis tasks (wave 1) + 1 assembly task (wave 2)
239
-
240
- **Full mode specific**:
241
- 5. **Session init**: Create `spec-config.json` with session metadata
242
- 6. **CSV generation**: 3 research tasks (wave 1) + 1 document chain task (wave 2). If `--skip-research`: 0 research + 1 doc chain (wave 1).
243
-
244
- **User validation**: Display task breakdown + strategy (skip if AUTO_YES).
245
-
246
- ### Phase 2: Wave Execution Engine
247
-
248
- #### Wave 1 (Parallel)
249
-
250
- Filter master `tasks.csv` for `wave == 1 AND status == pending` → write `wave-1.csv`.
251
-
252
- ```javascript
253
- spawn_agents_on_csv({
254
- csv_path: `${sessionFolder}/wave-1.csv`,
255
- id_column: "id",
256
- instruction: mode === 'light'
257
- ? buildAnalysisInstruction(sessionFolder, requirementArg, strategy)
258
- : buildResearchInstruction(sessionFolder, requirementArg), // agent: ~/.codex/agents/workflow-project-researcher.toml
259
- max_concurrency: 3,
260
- max_runtime_seconds: 3600,
261
- output_csv_path: `${sessionFolder}/wave-1-results.csv`,
262
- output_schema: {
263
- type: "object",
264
- properties: {
265
- id: { type: "string" },
266
- status: { type: "string", enum: ["completed", "failed"] },
267
- findings: { type: "string" },
268
- output_file: { type: "string" }, // full mode only
269
- error: { type: "string" }
270
- },
271
- required: ["id", "status", "findings"]
272
- }
273
- })
274
- ```
275
-
276
- Merge results into master `tasks.csv`, delete `wave-1.csv`.
277
-
278
- #### Wave 2 (Sequential)
279
-
280
- Filter for `wave == 2 AND status == pending`. If all wave 1 tasks failed, use degraded mode (requirement/seed text only).
281
-
282
- Build `prev_context` from wave 1 findings. Format: `[Task N: Title] summary...` per completed task. Inject decomposition strategy and `--phases N` constraint (light mode) into assembly prompt.
283
-
284
- Write `wave-2.csv` with `prev_context` column → execute `spawn_agents_on_csv` → merge → delete temp CSV.
285
-
286
- **Light mode**: Assembly agent produces roadmap.md with phases, milestones, success criteria.
287
- **Full mode**: Document chain agent produces 7-phase spec package + glossary.json. If agent fails, export partial output and log quality issues (do NOT abort).
288
-
289
- #### Phase 2.5: Spec Package Generation (Full Mode Only)
290
-
291
- After Wave 2 completes, read `~/.maestro/workflows/spec-generate.md` and follow its process to generate the 7-phase specification document chain:
292
-
293
- 1. **Product Brief** (`product-brief.md`): Vision, goals, scope, multi-perspective synthesis
294
- 2. **PRD** (`requirements/`): `_index.md` + individual `REQ-*.md` + `NFR-*.md` files with RFC 2119 keywords and acceptance criteria
295
- 3. **Architecture** (`architecture/`): `_index.md` + individual `ADR-*.md` files, state machine, config model, error handling, observability
296
- 4. **Data Model**: Entity definitions and relationships
297
- 5. **API Specification**: Endpoint definitions and contracts
298
- 6. **UI Wireframes**: Interface layout descriptions
299
- 7. **Epic-to-Roadmap** (`epics/`): `_index.md` + individual `EPIC-*.md` with cross-Epic dependency map (Mermaid) and MVP subset tagged
300
-
301
- Additional outputs:
302
- - `glossary.json` with 5+ core terms for cross-document terminology consistency
303
- - `spec-summary.md` with one-page executive summary
304
- - All documents have valid YAML frontmatter with `session_id`
305
-
306
- Output location: `.workflow/.spec/SPEC-{slug}-{date}/`
307
-
308
- ### Phase 3: Results Aggregation
309
-
310
- Export master `tasks.csv` as `results.csv`.
311
-
312
- **Interactive refinement** (skip if AUTO_YES): Present overview, collect feedback via `request_user_input` (max 3 rounds).
313
-
314
- Each round:
315
- ```json
316
- {
317
- "questions": [{
318
- "id": "refinement_round_N",
319
- "header": "Roadmap Refinement (Round N/3)",
320
- "question": "Review the generated roadmap. Any adjustments needed?",
321
- "options": [
322
- { "label": "Approve", "description": "Accept the current roadmap as-is" },
323
- { "label": "Refine", "description": "Provide specific changes to apply" },
324
- { "label": "Regenerate", "description": "Discard and regenerate from scratch" }
325
- ]
326
- }]
327
- }
328
- ```
329
- If user selects "Refine", apply changes and re-present. After 3 rounds, force proceed with current output.
330
-
331
- **Full mode only — Readiness Assessment**: Score spec package on 4 dimensions (25% each):
332
-
333
- | Dimension | Weight | Checks |
334
- |-----------|--------|--------|
335
- | Completeness | 25% | All 7 phases produced, glossary has 5+ terms, all REQ/NFR/ADR/EPIC files present |
336
- | Consistency | 25% | Glossary terms used consistently, cross-references valid, no contradictions |
337
- | Traceability | 25% | Every requirement maps to an epic, every epic maps to a roadmap phase, traceability matrix complete |
338
- | Depth | 25% | Acceptance criteria present, architecture covers error handling/observability, NFRs have measurable targets |
339
-
340
- Gate thresholds:
341
- - **Pass** (>=80%): Spec package ready for implementation
342
- - **Review** (60-79%): Proceed with documented caveats, note gaps in `readiness-report.md`
343
- - **Fail** (<60%): Attempt auto-fix (up to 2 iterations), then present manual fix options via `request_user_input`
344
-
345
- Output: `readiness-report.md` with per-dimension scores and traceability matrix
346
-
347
- Generate `context.md`:
348
-
349
- **Light mode template**:
350
- ```markdown
351
- # Roadmap Generation Report
352
-
353
- ## Summary
354
- - Requirements: {requirement_summary}
355
- - Strategy: {progressive|direct}
356
- - Analysis agents: 3 ({completed_count} completed)
357
- - Phases generated: {phase_count}
358
- - Milestones: {milestone_count}
359
-
360
- ## Analysis Findings
361
- ### Scope Analysis
362
- {findings}
363
- ### Risk Analysis
364
- {findings}
365
- ### Dependency Analysis
366
- {findings}
367
-
368
- ## Roadmap
369
- - Phases: {phase_count}
370
- - Strategy: {strategy}
371
- - MVP scope: {mvp_description}
372
- - Deferred: {deferred_items}
373
- ```
374
-
375
- **Full mode template**:
376
- ```markdown
377
- # Spec Generate Report
378
-
379
- ## Summary
380
- - Topic: {topic}
381
- - Research agents: 3 ({completed_count} completed)
382
- - Document phases: 7
383
- - Quality score: {score}% ({gate})
384
-
385
- ## Research Findings
386
- ### Domain Research
387
- {findings}
388
- ### Competitive Analysis
389
- {findings}
390
- ### Tech Stack Analysis
391
- {findings}
392
-
393
- ## Document Chain Output
394
- - Product Brief: {status}
395
- - Requirements: {req_count} REQs + {nfr_count} NFRs
396
- - Architecture: {adr_count} ADRs
397
- - Epics: {epic_count} Epics
398
- - Roadmap: {phase_count} phases
399
-
400
- ## Readiness
401
- - Completeness: {score}%
402
- - Consistency: {score}%
403
- - Traceability: {score}%
404
- - Depth: {score}%
405
- - Overall: {score}% ({gate})
406
- ```
407
-
408
- **Write outputs**:
409
- - `.workflow/roadmap.md` (both modes)
410
- - `.workflow/.spec/SPEC-{slug}-{date}/` (full mode only)
411
- - Ensure `.workflow/scratch/` exists
412
- - Update `state.json` milestones array and `current_milestone`
413
-
414
- Display summary with next steps:
415
- ```
416
- === ROADMAP CREATED ===
417
- Mode: {light|full}
418
- Strategy: {progressive|direct}
419
- Phases: {phase_count} across {milestone_count} milestones
420
- Roadmap: .workflow/roadmap.md
421
- [Full] Spec: .workflow/.spec/SPEC-{slug}-{date}/
422
- [Full] Quality: {score}% ({gate})
423
- ```
424
-
425
- **Next-step routing:**
426
-
427
- | Condition | Next Step |
428
- |-----------|-----------|
429
- | Roadmap approved, need analysis | `$maestro-analyze "1"` |
430
- | Simple project, ready to plan | `$maestro-plan "1"` |
431
- | Need UI design first | `$maestro-ui-design "1"` |
432
- | View project dashboard | `$manage-status` |
433
- | Need project setup (full mode) | `$maestro-init` |
434
-
435
- ### Shared Discovery Board Protocol
436
-
437
- #### Standard Discovery Types
438
-
439
- | Type | Dedup Key | Data Schema | Description |
440
- |------|-----------|-------------|-------------|
441
- | `code_pattern` | `data.name` | `{name, file, description}` | Reusable code pattern found |
442
- | `integration_point` | `data.file` | `{file, description, exports[]}` | Module connection point |
443
- | `convention` | singleton | `{naming, imports, formatting}` | Project code conventions |
444
- | `tech_stack` | singleton | `{framework, language, tools[]}` | Technology stack info |
445
-
446
- #### Light Mode Discovery Types
447
-
448
- | Type | Dedup Key | Data Schema | Description |
449
- |------|-----------|-------------|-------------|
450
- | `scope_boundary` | `data.feature` | `{feature, inclusion, rationale}` | Scope decision |
451
- | `risk_factor` | `data.name` | `{name, severity, probability, mitigation}` | Identified risk |
452
- | `dependency_constraint` | `data.from+data.to` | `{from, to, type, strength}` | Feature dependency |
453
- | `external_dependency` | `data.name` | `{name, type, risk, alternative}` | External system dependency |
454
-
455
- #### Full Mode Discovery Types
456
-
457
- | Type | Dedup Key | Data Schema | Description |
458
- |------|-----------|-------------|-------------|
459
- | `domain_term` | `data.term` | `{term, definition, aliases}` | Domain terminology |
460
- | `competitor` | `data.name` | `{name, features[], gaps[]}` | Competitive product |
461
- | `market_trend` | `data.name` | `{name, impact, relevance}` | Market trend |
462
- | `tech_constraint` | `data.name` | `{name, type, severity, mitigation}` | Technical constraint |
463
-
464
- #### Protocol
465
-
466
- Read `{session_folder}/discoveries.ndjson` before own analysis. Deduplicate by type + dedup key before writing. Append-only — never modify or delete.
467
-
468
- ```bash
469
- # Light mode example
470
- echo '{"ts":"<ISO>","worker":"{id}","type":"risk_factor","data":{"name":"OAuth provider rate limits","severity":"medium","probability":"high","mitigation":"Implement token caching and retry logic"}}' >> {session_folder}/discoveries.ndjson
471
-
472
- # Full mode example
473
- echo '{"ts":"<ISO>","worker":"{id}","type":"domain_term","data":{"term":"workflow","definition":"A sequence of orchestrated tasks","aliases":["pipeline","process"]}}' >> {session_folder}/discoveries.ndjson
474
- ```
475
- </execution>
476
-
477
- <error_codes>
478
- | Error | Resolution |
479
- |-------|------------|
480
- | No requirement/idea text provided | Abort with error: "Requirement text or @file required" |
481
- | Brainstorm session not found | Abort with error: "Session {id} not found" -- list available sessions |
482
- | @file not found | Abort with error: "File {path} not found" |
483
- | roadmap.md not found (--revise/--review) | Run maestro-roadmap first to create |
484
- | Revision invalidates completed phase | Warn user, ask to confirm or adjust |
485
- | .workflow/ not initialized (full mode) | Run maestro-init first |
486
- | Wave 1 agent timeout | Mark as failed, Wave 2 uses available findings |
487
- | All Wave 1 agents failed | Wave 2 runs in degraded mode (seed input only) |
488
- | Wave 2 agent failed (light) | Abort with error: "Roadmap generation failed" |
489
- | Wave 2 agent failed (full) | Export partial output, log quality issues |
490
- | Circular dependency detected | Prompt user to re-decompose (light mode) |
491
- | CSV parse error | Validate format, show line number |
492
- | discoveries.ndjson corrupt | Ignore malformed lines |
493
- | Max refinement rounds (3) | Force proceed with current output |
494
- | Readiness score < 60% (full) | Log issues, proceed with available output |
495
- </error_codes>
496
-
497
- <success_criteria>
498
-
499
- **Both modes**:
500
- - [ ] Input parsed from text, @file, or brainstorm session
501
- - [ ] Wave 1 agents completed (analysis or research)
502
- - [ ] Wave 2 agent produced output
503
- - [ ] Interactive refinement offered (or skipped with -y)
504
- - [ ] .workflow/roadmap.md written
505
- - [ ] state.json updated with milestones
506
- - [ ] context.md generated
507
- - [ ] Completion report displayed with next steps
508
-
509
- **Light mode additional**:
510
- - [ ] Uncertainty assessed and decomposition strategy selected
511
- - [ ] Roadmap has phases with milestones and success criteria
512
-
513
- **Full mode additional**:
514
- - [ ] spec-config.json created with session metadata
515
- - [ ] Spec package written to .workflow/.spec/SPEC-{slug}-{date}/
516
- - [ ] Readiness check scored on 4 dimensions
517
- - [ ] Quality score and gate reported
518
- </success_criteria>
1
+ ---
2
+ name: maestro-roadmap
3
+ description: Generate roadmap from requirements (light or full mode)
4
+ argument-hint: "\"<requirements>\" [--mode light|full] [-y|--yes] [-c] [--phases N] [--skip-research] [--from-brainstorm SESSION-ID] [--revise [instructions]] [--review]"
5
+ allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
6
+ ---
7
+
8
+ <purpose>
9
+ Unified 2-wave roadmap generation using `spawn_agents_on_csv` with dual modes:
10
+
11
+ - **Light** (default): Wave 1 parallel analysis (scope, risk, dependency). Wave 2 assembly -> roadmap.md.
12
+ - **Full** (`--mode full`): Wave 1 parallel research (domain, competitive, tech stack). Wave 2 synthesis -> 7-phase spec chain + roadmap.md.
13
+
14
+ Additional: `--revise` (modify existing roadmap), `--review` (read-only health check).
15
+ </purpose>
16
+
17
+ <context>
18
+ $ARGUMENTS -- requirement/idea text or @file reference, plus optional flags.
19
+
20
+ **Flags**:
21
+ - `--mode light|full`: Execution mode (default: light)
22
+ - `-y, --yes`: Skip all confirmations
23
+ - `-m progressive|direct|auto`: Decomposition strategy (default: auto, light only)
24
+ - `--phases N`: Target phase count (light only)
25
+ - `--revise [instructions]`: Revise existing roadmap preserving completed phases (light only)
26
+ - `--review`: Read-only roadmap health assessment (light only)
27
+ - `--skip-research`: Skip Wave 1, jump to doc generation (full only)
28
+ - `--from-brainstorm SESSION-ID`: Import guidance-specification.md as seed
29
+
30
+ **Session**: `.workflow/.csv-wave/{YYYYMMDD}-roadmap[-full]-{slug}/`
31
+ **Output**: tasks.csv, results.csv, discoveries.ndjson, context.md, `.workflow/roadmap.md`
32
+ **Full mode additional**: Spec package in `.workflow/.spec/SPEC-{slug}-{date}/`
33
+ </context>
34
+
35
+ <csv_schema>
36
+
37
+ ### tasks.csv -- Light Mode
38
+
39
+ ```csv
40
+ id,title,description,analysis_focus,deps,context_from,wave,status,findings,error
41
+ "1","Scope Analysis","Identify features, MVP boundaries, must-have vs nice-to-have, size estimates.","scope","","","1","","",""
42
+ "2","Risk Analysis","Technical/project risks, unknowns, feasibility, risk levels, mitigations.","risk","","","1","","",""
43
+ "3","Dependency Analysis","Feature dependencies, ordering constraints, parallel-safe groups, external deps.","dependency","","","1","","",""
44
+ "4","Roadmap Assembly","Synthesize findings into roadmap.md: phases, milestones, success criteria.","","1;2;3","1;2;3","2","","",""
45
+ ```
46
+
47
+ ### tasks.csv -- Full Mode
48
+
49
+ ```csv
50
+ id,title,description,research_focus,doc_phase,deps,context_from,wave,status,findings,output_file,error
51
+ "1","Domain Research","Target users, market needs, existing solutions, terminology.","domain","","","","1","","","",""
52
+ "2","Competitive Analysis","Feature comparison, UX patterns, gaps, opportunities.","competitive","","","","1","","","",""
53
+ "3","Tech Stack Analysis","Languages, frameworks, databases, constraints, scalability.","tech_stack","","","","1","","","",""
54
+ "4","Document Chain","7-phase spec: Product Brief, PRD (REQ-*/NFR-*), Architecture (ADR-*), Data Model, API, UI Wireframes, Epic-to-Roadmap (EPIC-*). + glossary.json.","","1-7","1;2;3","1;2;3","2","","","",""
55
+ ```
56
+
57
+ **Shared column semantics**:
58
+ - Input: id (unique string), title, description (detailed instructions), deps (semicolon-sep IDs), context_from (IDs whose findings needed), wave (1=analysis/research, 2=assembly/synthesis)
59
+ - Output: status (pending->completed/failed/skipped), findings (max 500 chars), error
60
+ - Light-only: analysis_focus (scope/risk/dependency)
61
+ - Full-only: research_focus (domain/competitive/tech_stack), doc_phase (1-7), output_file
62
+
63
+ Wave 1: 3 analysis/research rows (parallel). Wave 2: 1 assembly/synthesis row.
64
+ </csv_schema>
65
+
66
+ <invariants>
67
+ 1. **Wave order sacred**: Never execute wave 2 before wave 1 completes
68
+ 2. **CSV is source of truth**: Master tasks.csv holds all state
69
+ 3. **Context propagation**: prev_context from master CSV, not memory
70
+ 4. **Discovery board append-only**: Never modify/delete discoveries.ndjson
71
+ 5. **Graceful degradation**: Wave 1 fails -> Wave 2 proceeds with seed input only
72
+ </invariants>
73
+
74
+ <state_machine>
75
+
76
+ <states>
77
+ S_PARSE -- 解析参数、检测 mode/operation PERSIST: --
78
+ S_INPUT -- 解析输入(text/@file/brainstorm) PERSIST: --
79
+ S_CSV_GEN -- 生成 tasks.csv PERSIST: tasks.csv
80
+ S_WAVE_1 -- Analysis/Research (parallel spawn) PERSIST: findings + tasks.csv
81
+ S_WAVE_2 -- Assembly/Synthesis (single agent spawn) PERSIST: roadmap.md [+ spec package]
82
+ S_SPEC_GEN -- Spec package generation (full mode only) PERSIST: .workflow/.spec/SPEC-*/
83
+ S_AGGREGATE -- 精炼、评估、输出 PERSIST: context.md + .workflow/roadmap.md
84
+ </states>
85
+
86
+ <transitions>
87
+
88
+ S_PARSE:
89
+ -> S_INPUT WHEN: create mode (default)
90
+ -> REVISE_FLOW WHEN: --revise (load roadmap.md, apply changes, preserve completed phases)
91
+ -> REVIEW_FLOW WHEN: --review (read-only health assessment)
92
+
93
+ S_INPUT:
94
+ -> S_CSV_GEN DO: parse requirement (text/@file), import brainstorm if --from-brainstorm, codebase detection, load specs
95
+
96
+ S_CSV_GEN:
97
+ -> S_WAVE_1 WHEN: normal pipeline DO: generate mode-specific CSV
98
+ -> S_WAVE_2 WHEN: --skip-research DO: generate wave 2 only
99
+
100
+ S_WAVE_1:
101
+ -> S_WAVE_2 DO: A_SPAWN_WAVE_1
102
+
103
+ S_WAVE_2:
104
+ -> S_SPEC_GEN WHEN: full mode DO: A_SPAWN_WAVE_2
105
+ -> S_AGGREGATE WHEN: light mode DO: A_SPAWN_WAVE_2
106
+
107
+ S_SPEC_GEN:
108
+ -> S_AGGREGATE DO: generate 7-phase spec package per spec-generate.md
109
+
110
+ S_AGGREGATE:
111
+ -> END DO: A_AGGREGATE_RESULTS
112
+
113
+ </transitions>
114
+
115
+ <actions>
116
+
117
+ ### A_SPAWN_WAVE_1
118
+
119
+ Filter wave==1 -> write wave-1.csv -> `spawn_agents_on_csv`.
120
+
121
+ **Light mode agents**: scope analysis (feature inventory + priority), risk analysis (unknowns + mitigations), dependency analysis (dependency graph + critical path).
122
+ **Full mode agents**: domain research (users, market, solutions), competitive analysis (feature matrix, gaps), tech stack analysis (feasibility, constraints).
123
+
124
+ Merge results -> master tasks.csv.
125
+
126
+ ### A_SPAWN_WAVE_2
127
+
128
+ Build prev_context from wave 1. Inject strategy + --phases constraint (light mode). Spawn.
129
+
130
+ **Light mode**: Assembly agent produces roadmap.md with phases (goal, depends-on, requirements, success criteria), milestones, scope decisions.
131
+
132
+ **Strategy selection** via uncertainty assessment (5 factors):
133
+ | Factor | Low | Medium | High |
134
+ |--------|-----|--------|------|
135
+ | Scope clarity | explicit | some ambiguity | vague/open-ended |
136
+ | Technical risk | proven stack | some unknowns | new technology |
137
+ | Dependency unknown | all mapped | some unclear | many external |
138
+ | Domain familiarity | expert | moderate | new domain |
139
+ | Requirement stability | locked | some flux | evolving |
140
+
141
+ >=3 high -> progressive, >=3 low -> direct, else -> ask (or auto if -y).
142
+ **Full mode**: Document chain agent produces 7-phase spec package + glossary.json.
143
+
144
+ ### A_AGGREGATE_RESULTS
145
+
146
+ 1. Export results.csv
147
+ 2. Interactive refinement (max 3 rounds, skip if -y): Approve / Refine / Regenerate
148
+ 3. **Full mode readiness** (4 dimensions, 25% each): Completeness, Consistency, Traceability, Depth. Gate: >=80% pass, 60-79% review with caveats, <60% auto-fix attempt
149
+ 4. Generate context.md (light: summary + analysis findings + roadmap stats; full: research findings + doc chain status + readiness scores)
150
+ 5. Write .workflow/roadmap.md (both modes)
151
+ 6. Write spec package to .workflow/.spec/SPEC-{slug}-{date}/ (full mode):
152
+ ```
153
+ SPEC-{slug}-{date}/
154
+ +-- spec-config.json, product-brief.md, glossary.json, spec-summary.md
155
+ +-- requirements/ (_index.md, REQ-NNN-{slug}.md, NFR-{type}-NNN-{slug}.md)
156
+ +-- architecture/ (_index.md, ADR-NNN-{slug}.md)
157
+ +-- epics/ (_index.md, EPIC-NNN-{slug}.md)
158
+ +-- readiness-report.md
159
+ ```
160
+ 7. Update state.json milestones + current_milestone
161
+ 8. Next-step routing: need analysis -> maestro-analyze; ready to plan -> maestro-plan; UI first -> maestro-ui-design; full mode setup -> maestro-init
162
+
163
+ </actions>
164
+
165
+ </state_machine>
166
+
167
+ <discovery_board>
168
+
169
+ | Type | Dedup Key | Data |
170
+ |------|-----------|------|
171
+ | scope_boundary | data.feature | {feature, inclusion, rationale} |
172
+ | risk_factor | data.name | {name, severity, probability, mitigation} |
173
+ | dependency_constraint | data.from+data.to | {from, to, type, strength} |
174
+ | domain_term | data.term | {term, definition, aliases} |
175
+ | competitor | data.name | {name, features[], gaps[]} |
176
+ | tech_constraint | data.name | {name, type, severity, mitigation} |
177
+
178
+ Protocol: read before analysis, append-only, dedup by type+key.
179
+ </discovery_board>
180
+
181
+ <error_codes>
182
+ | Condition | Recovery |
183
+ |-----------|----------|
184
+ | No requirement text provided | Abort: "Requirement text or @file required" |
185
+ | Brainstorm session not found | Abort with available sessions list |
186
+ | roadmap.md not found (--revise/--review) | Run maestro-roadmap first |
187
+ | All Wave 1 agents failed | Wave 2 in degraded mode (seed only) |
188
+ | Wave 2 agent failed (light) | Abort: "Roadmap generation failed" |
189
+ | Wave 2 agent failed (full) | Export partial output, log issues |
190
+ | Readiness < 60% (full) | Log issues, proceed with available output |
191
+ </error_codes>
192
+
193
+ <success_criteria>
194
+ - [ ] Wave 1 agents completed (analysis or research)
195
+ - [ ] Wave 2 produced output (roadmap.md + optional spec package)
196
+ - [ ] .workflow/roadmap.md written, state.json updated
197
+ - [ ] context.md generated
198
+ - [ ] Light: uncertainty assessed, strategy selected, phases with milestones + success criteria
199
+ - [ ] Full: spec package in .workflow/.spec/, readiness scored on 4 dimensions
200
+ </success_criteria>
201
+ </output>