maestro-flow 0.4.11 → 0.4.13

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 (253) hide show
  1. package/.agents/agents/cli-explore-agent.md +1 -3
  2. package/.agents/agents/cross-role-reviewer.md +173 -0
  3. package/.agents/agents/role-design-author.md +220 -0
  4. package/.agents/agents/ui-design-agent.md +1 -18
  5. package/.agents/agents/workflow-analyzer.md +1 -1
  6. package/.agents/agents/workflow-external-researcher.md +1 -1
  7. package/.agents/skills/learn-decompose/SKILL.md +6 -6
  8. package/.agents/skills/learn-follow/SKILL.md +4 -4
  9. package/.agents/skills/learn-investigate/SKILL.md +6 -6
  10. package/.agents/skills/learn-retro/SKILL.md +7 -7
  11. package/.agents/skills/learn-second-opinion/SKILL.md +4 -4
  12. package/.agents/skills/maestro/SKILL.md +61 -27
  13. package/.agents/skills/maestro-amend/SKILL.md +1 -0
  14. package/.agents/skills/maestro-analyze/SKILL.md +37 -4
  15. package/.agents/skills/maestro-blueprint/SKILL.md +133 -0
  16. package/.agents/skills/maestro-brainstorm/SKILL.md +120 -103
  17. package/.agents/skills/maestro-fork/SKILL.md +1 -1
  18. package/.agents/skills/maestro-guard/SKILL.md +3 -2
  19. package/.agents/skills/maestro-help/SKILL.md +48 -14
  20. package/.agents/skills/maestro-help/index/catalog.json +29 -11
  21. package/.agents/skills/maestro-help/phases/01-parse-intent.md +1 -1
  22. package/.agents/skills/maestro-help/phases/02-search-present.md +6 -4
  23. package/.agents/skills/maestro-help/phases/03-workflow-guide.md +60 -33
  24. package/.agents/skills/maestro-impeccable/SKILL.md +13 -11
  25. package/.agents/skills/maestro-init/SKILL.md +3 -3
  26. package/.agents/skills/maestro-milestone-audit/SKILL.md +5 -3
  27. package/.agents/skills/maestro-milestone-complete/SKILL.md +7 -5
  28. package/.agents/skills/maestro-milestone-release/SKILL.md +1 -1
  29. package/.agents/skills/maestro-plan/SKILL.md +16 -4
  30. package/.agents/skills/maestro-ralph/SKILL.md +297 -226
  31. package/.agents/skills/maestro-ralph-execute/SKILL.md +82 -67
  32. package/.agents/skills/maestro-roadmap/SKILL.md +43 -81
  33. package/.agents/skills/manage-harvest/SKILL.md +1 -0
  34. package/.agents/skills/manage-issue-discover/SKILL.md +1 -1
  35. package/.agents/skills/manage-knowhow/SKILL.md +1 -1
  36. package/.agents/skills/manage-learn/SKILL.md +4 -4
  37. package/.agents/skills/quality-auto-test/SKILL.md +6 -6
  38. package/.agents/skills/quality-refactor/SKILL.md +1 -1
  39. package/.agents/skills/quality-retrospective/SKILL.md +2 -2
  40. package/.agents/skills/security-audit/SKILL.md +24 -0
  41. package/.agents/skills/spec-remove/SKILL.md +6 -2
  42. package/.agents/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
  43. package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  44. package/.agents/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  45. package/.agents/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  46. package/.agents/skills/team-lifecycle-v4/templates/epics.md +2 -2
  47. package/.agents/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  48. package/.agents/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  49. package/.agy/agents/cli-explore-agent.md +1 -3
  50. package/.agy/agents/cross-role-reviewer.md +170 -0
  51. package/.agy/agents/role-design-author.md +217 -0
  52. package/.agy/agents/ui-design-agent.md +1 -18
  53. package/.agy/agents/workflow-analyzer.md +1 -1
  54. package/.agy/agents/workflow-external-researcher.md +1 -1
  55. package/.agy/skills/learn-decompose/SKILL.md +6 -6
  56. package/.agy/skills/learn-follow/SKILL.md +4 -4
  57. package/.agy/skills/learn-investigate/SKILL.md +6 -6
  58. package/.agy/skills/learn-retro/SKILL.md +7 -7
  59. package/.agy/skills/learn-second-opinion/SKILL.md +4 -4
  60. package/.agy/skills/maestro/SKILL.md +61 -27
  61. package/.agy/skills/maestro-amend/SKILL.md +1 -0
  62. package/.agy/skills/maestro-analyze/SKILL.md +37 -4
  63. package/.agy/skills/maestro-blueprint/SKILL.md +133 -0
  64. package/.agy/skills/maestro-brainstorm/SKILL.md +120 -103
  65. package/.agy/skills/maestro-fork/SKILL.md +1 -1
  66. package/.agy/skills/maestro-guard/SKILL.md +3 -2
  67. package/.agy/skills/maestro-help/SKILL.md +48 -14
  68. package/.agy/skills/maestro-help/index/catalog.json +29 -11
  69. package/.agy/skills/maestro-help/phases/01-parse-intent.md +1 -1
  70. package/.agy/skills/maestro-help/phases/02-search-present.md +6 -4
  71. package/.agy/skills/maestro-help/phases/03-workflow-guide.md +60 -33
  72. package/.agy/skills/maestro-impeccable/SKILL.md +13 -11
  73. package/.agy/skills/maestro-init/SKILL.md +3 -3
  74. package/.agy/skills/maestro-milestone-audit/SKILL.md +5 -3
  75. package/.agy/skills/maestro-milestone-complete/SKILL.md +7 -5
  76. package/.agy/skills/maestro-milestone-release/SKILL.md +1 -1
  77. package/.agy/skills/maestro-plan/SKILL.md +16 -4
  78. package/.agy/skills/maestro-ralph/SKILL.md +297 -226
  79. package/.agy/skills/maestro-ralph-execute/SKILL.md +82 -67
  80. package/.agy/skills/maestro-roadmap/SKILL.md +43 -81
  81. package/.agy/skills/manage-harvest/SKILL.md +1 -0
  82. package/.agy/skills/manage-issue-discover/SKILL.md +1 -1
  83. package/.agy/skills/manage-knowhow/SKILL.md +1 -1
  84. package/.agy/skills/manage-learn/SKILL.md +4 -4
  85. package/.agy/skills/quality-auto-test/SKILL.md +6 -6
  86. package/.agy/skills/quality-refactor/SKILL.md +1 -1
  87. package/.agy/skills/quality-retrospective/SKILL.md +2 -2
  88. package/.agy/skills/security-audit/SKILL.md +24 -0
  89. package/.agy/skills/spec-remove/SKILL.md +6 -2
  90. package/.agy/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
  91. package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  92. package/.agy/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  93. package/.agy/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  94. package/.agy/skills/team-lifecycle-v4/templates/epics.md +2 -2
  95. package/.agy/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  96. package/.agy/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  97. package/.claude/agents/cli-explore-agent.md +1 -3
  98. package/.claude/agents/cross-role-reviewer.md +171 -0
  99. package/.claude/agents/role-design-author.md +218 -0
  100. package/.claude/agents/ui-design-agent.md +1 -18
  101. package/.claude/agents/workflow-analyzer.md +1 -1
  102. package/.claude/agents/workflow-external-researcher.md +1 -1
  103. package/.claude/commands/learn-decompose.md +6 -6
  104. package/.claude/commands/learn-follow.md +4 -4
  105. package/.claude/commands/learn-investigate.md +6 -6
  106. package/.claude/commands/learn-retro.md +7 -7
  107. package/.claude/commands/learn-second-opinion.md +4 -4
  108. package/.claude/commands/maestro-amend.md +1 -0
  109. package/.claude/commands/maestro-analyze.md +37 -4
  110. package/.claude/commands/maestro-blueprint.md +131 -0
  111. package/.claude/commands/maestro-brainstorm.md +133 -116
  112. package/.claude/commands/maestro-fork.md +1 -1
  113. package/.claude/commands/maestro-guard.md +3 -2
  114. package/.claude/commands/maestro-impeccable.md +13 -11
  115. package/.claude/commands/maestro-init.md +3 -3
  116. package/.claude/commands/maestro-milestone-audit.md +5 -3
  117. package/.claude/commands/maestro-milestone-complete.md +7 -5
  118. package/.claude/commands/maestro-milestone-release.md +1 -1
  119. package/.claude/commands/maestro-plan.md +16 -4
  120. package/.claude/commands/maestro-ralph-execute.md +82 -67
  121. package/.claude/commands/maestro-ralph.md +297 -226
  122. package/.claude/commands/maestro-roadmap.md +43 -81
  123. package/.claude/commands/maestro.md +61 -27
  124. package/.claude/commands/manage-harvest.md +1 -0
  125. package/.claude/commands/manage-issue-discover.md +1 -1
  126. package/.claude/commands/manage-knowhow.md +1 -1
  127. package/.claude/commands/manage-learn.md +4 -4
  128. package/.claude/commands/quality-auto-test.md +6 -6
  129. package/.claude/commands/quality-refactor.md +1 -1
  130. package/.claude/commands/quality-retrospective.md +2 -2
  131. package/.claude/commands/security-audit.md +24 -0
  132. package/.claude/commands/spec-remove.md +6 -2
  133. package/.claude/skills/maestro-help/SKILL.md +48 -14
  134. package/.claude/skills/maestro-help/index/catalog.json +29 -11
  135. package/.claude/skills/maestro-help/phases/01-parse-intent.md +1 -1
  136. package/.claude/skills/maestro-help/phases/02-search-present.md +6 -4
  137. package/.claude/skills/maestro-help/phases/03-workflow-guide.md +60 -33
  138. package/.claude/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
  139. package/.claude/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  140. package/.claude/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  141. package/.claude/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  142. package/.claude/skills/team-lifecycle-v4/templates/epics.md +2 -2
  143. package/.claude/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  144. package/.claude/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  145. package/.codex/skills/learn-decompose/SKILL.md +4 -4
  146. package/.codex/skills/learn-follow/SKILL.md +3 -3
  147. package/.codex/skills/learn-investigate/SKILL.md +3 -3
  148. package/.codex/skills/learn-retro/SKILL.md +3 -3
  149. package/.codex/skills/learn-second-opinion/SKILL.md +3 -3
  150. package/.codex/skills/maestro/SKILL.md +75 -38
  151. package/.codex/skills/maestro-amend/SKILL.md +157 -0
  152. package/.codex/skills/maestro-analyze/SKILL.md +72 -23
  153. package/.codex/skills/maestro-blueprint/SKILL.md +123 -0
  154. package/.codex/skills/maestro-brainstorm/SKILL.md +277 -46
  155. package/.codex/skills/maestro-composer/SKILL.md +1 -1
  156. package/.codex/skills/maestro-execute/SKILL.md +13 -4
  157. package/.codex/skills/maestro-fork/SKILL.md +2 -0
  158. package/.codex/skills/maestro-guard/SKILL.md +3 -2
  159. package/.codex/skills/maestro-help/SKILL.md +28 -18
  160. package/.codex/skills/maestro-help/catalog.json +29 -11
  161. package/.codex/skills/maestro-impeccable/SKILL.md +13 -11
  162. package/.codex/skills/maestro-init/SKILL.md +7 -7
  163. package/.codex/skills/maestro-plan/SKILL.md +27 -9
  164. package/.codex/skills/maestro-ralph/SKILL.md +740 -601
  165. package/.codex/skills/maestro-roadmap/SKILL.md +56 -72
  166. package/.codex/skills/maestro-update/SKILL.md +169 -0
  167. package/.codex/skills/maestro-verify/SKILL.md +11 -2
  168. package/.codex/skills/manage-codebase-rebuild/SKILL.md +9 -5
  169. package/.codex/skills/manage-harvest/SKILL.md +11 -3
  170. package/.codex/skills/manage-issue-discover/SKILL.md +1 -1
  171. package/.codex/skills/manage-knowhow/SKILL.md +1 -1
  172. package/.codex/skills/manage-learn/SKILL.md +3 -3
  173. package/.codex/skills/quality-refactor/SKILL.md +2 -2
  174. package/.codex/skills/quality-retrospective/SKILL.md +12 -5
  175. package/.codex/skills/security-audit/SKILL.md +24 -0
  176. package/.codex/skills/spec-remove/SKILL.md +8 -2
  177. package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +2 -2
  178. package/.codex/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  179. package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  180. package/.codex/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  181. package/.codex/skills/team-lifecycle-v4/templates/epics.md +2 -2
  182. package/.codex/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  183. package/.codex/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  184. package/README.md +8 -8
  185. package/README.zh-CN.md +8 -8
  186. package/dashboard/dist-server/dashboard/src/server/routes/settings.js +3 -3
  187. package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
  188. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  189. package/dist/src/agents/cli-agent-runner.js +13 -7
  190. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  191. package/dist/src/commands/spec.d.ts.map +1 -1
  192. package/dist/src/commands/spec.js +8 -1
  193. package/dist/src/commands/spec.js.map +1 -1
  194. package/dist/src/tools/spec-init.d.ts +16 -2
  195. package/dist/src/tools/spec-init.d.ts.map +1 -1
  196. package/dist/src/tools/spec-init.js +58 -187
  197. package/dist/src/tools/spec-init.js.map +1 -1
  198. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  199. package/dist/src/tools/spec-loader.js +16 -16
  200. package/dist/src/tools/spec-loader.js.map +1 -1
  201. package/dist/src/tools/spec-seeds.d.ts +33 -0
  202. package/dist/src/tools/spec-seeds.d.ts.map +1 -0
  203. package/dist/src/tools/spec-seeds.js +200 -0
  204. package/dist/src/tools/spec-seeds.js.map +1 -0
  205. package/dist/src/tools/spec-writer.d.ts.map +1 -1
  206. package/dist/src/tools/spec-writer.js +7 -9
  207. package/dist/src/tools/spec-writer.js.map +1 -1
  208. package/dist/src/utils/update-notices.js +12 -0
  209. package/dist/src/utils/update-notices.js.map +1 -1
  210. package/package.json +1 -1
  211. package/templates/business-test-report.json +1 -1
  212. package/templates/index.json +1 -1
  213. package/templates/roadmap.md +15 -9
  214. package/templates/state.json +18 -17
  215. package/workflows/agy-instructions.md +2 -0
  216. package/workflows/analyze.md +79 -11
  217. package/workflows/auto-test.md +12 -7
  218. package/workflows/blueprint.md +431 -0
  219. package/workflows/brainstorm.md +617 -496
  220. package/workflows/business-test.md +7 -7
  221. package/workflows/claude-instructions.md +2 -0
  222. package/workflows/codebase-rebuild.md +4 -4
  223. package/workflows/codex-instructions.md +16 -83
  224. package/workflows/debug.md +1 -1
  225. package/workflows/harvest.md +184 -10
  226. package/workflows/impeccable.md +2 -0
  227. package/workflows/init.md +9 -8
  228. package/workflows/issue-analyze.md +14 -100
  229. package/workflows/issue-discover.md +2 -3
  230. package/workflows/issue-execute.md +1 -1
  231. package/workflows/issue-gaps-analyze.md +2 -0
  232. package/workflows/learn.md +1 -1
  233. package/workflows/maestro-chain-execute.md +10 -228
  234. package/workflows/maestro.md +2 -1
  235. package/workflows/milestone-audit.md +12 -4
  236. package/workflows/milestone-complete.md +14 -9
  237. package/workflows/milestone-release.md +82 -0
  238. package/workflows/plan.md +91 -25
  239. package/workflows/retrospective.md +1 -1
  240. package/workflows/roadmap-common.md +1 -1
  241. package/workflows/roadmap.md +14 -4
  242. package/workflows/spec-generate.md +26 -13
  243. package/workflows/specs-add.md +6 -1
  244. package/workflows/specs-load.md +6 -1
  245. package/workflows/specs-setup.md +6 -1
  246. package/workflows/sync.md +13 -0
  247. package/workflows/tools-spec.md +4 -0
  248. package/workflows/ui-design.md +5 -5
  249. package/workflows/ui-style.md +1 -1
  250. package/workflows/wiki-manage.md +2 -0
  251. package/.agents/agents/conceptual-planning-agent.md +0 -247
  252. package/.agy/agents/conceptual-planning-agent.md +0 -244
  253. package/.claude/agents/conceptual-planning-agent.md +0 -245
@@ -12,7 +12,7 @@ allowed-tools:
12
12
  - AskUserQuestion
13
13
  ---
14
14
  <purpose>
15
- Guided reading: walk through content section-by-section using forcing questions to extract patterns, identify assumptions, and build an understanding map. Findings persist to `specs/learnings.md` as `<spec-entry>` blocks.
15
+ Guided reading: walk through content section-by-section using forcing questions to extract patterns, identify assumptions, and build an understanding map. Findings persist to `.workflow/specs/learnings.md` as `<spec-entry>` blocks.
16
16
  </purpose>
17
17
 
18
18
  <context>
@@ -30,8 +30,8 @@ $ARGUMENTS — target and optional flags.
30
30
  - `--depth deep`: every function, every branch, every assumption
31
31
  - `--save-wiki`: create wiki note entry with reading notes
32
32
 
33
- **Storage read**: target file + wiki forward/backlinks + `coding-conventions.md` + `specs/learnings.md` (dedup)
34
- **Storage write**: `.workflow/knowhow/KNW-follow-{slug}-{date}.md` + append `specs/learnings.md`
33
+ **Storage read**: target file + wiki forward/backlinks + `coding-conventions.md` + `.workflow/specs/learnings.md` (dedup)
34
+ **Storage write**: `.workflow/knowhow/KNW-follow-{slug}-{date}.md` + append `.workflow/specs/learnings.md`
35
35
  </context>
36
36
 
37
37
  <state_machine>
@@ -64,7 +64,7 @@ S_EXTRACT:
64
64
  → S_PERSIST DO: A_EXTRACT_PATTERNS
65
65
 
66
66
  S_PERSIST:
67
- → END DO: write KNW-follow + append specs/learnings.md [+ wiki note if --save-wiki]
67
+ → END DO: write KNW-follow + append .workflow/specs/learnings.md [+ wiki note if --save-wiki]
68
68
 
69
69
  </transitions>
70
70
 
@@ -28,9 +28,9 @@ $ARGUMENTS — question text and optional flags.
28
28
  - `.workflow/knowhow/KNW-investigate-{slug}/evidence.ndjson` — structured evidence (one JSON line per item)
29
29
  - `.workflow/knowhow/KNW-investigate-{slug}/understanding.md` — evolving understanding
30
30
  - `.workflow/knowhow/KNW-investigate-{slug}/report.md` — final report
31
- - `specs/learnings.md` — appended `<spec-entry>` blocks
31
+ - `.workflow/specs/learnings.md` — appended `<spec-entry>` blocks
32
32
 
33
- **Storage read**: source files in scope + `maestro wiki search` + `specs/learnings.md` + `debug-notes.md` + `codebase/architecture.md`
33
+ **Storage read**: source files in scope + `maestro wiki search` + `.workflow/specs/learnings.md` + `debug-notes.md` + `codebase/architecture.md`
34
34
  </context>
35
35
 
36
36
  <state_machine>
@@ -43,7 +43,7 @@ S_HYPOTHESIZE — 生成假设列表 PERSIST:
43
43
  S_CLI_EXPLORE — CLI 辅助探索(可选) PERSIST: evidence.ndjson (append)
44
44
  S_TEST — 逐假设测试 PERSIST: evidence.ndjson + understanding.md
45
45
  S_ESCALATE — 3-strike 升级 PERSIST: —
46
- S_REPORT — 综合报告 + persist PERSIST: report.md + specs/learnings.md
46
+ S_REPORT — 综合报告 + persist PERSIST: report.md + .workflow/specs/learnings.md
47
47
  </states>
48
48
 
49
49
  <transitions>
@@ -55,7 +55,7 @@ S_EVIDENCE:
55
55
  → S_PATTERN DO: A_COLLECT_EVIDENCE
56
56
 
57
57
  S_PATTERN:
58
- → S_HYPOTHESIZE DO: match evidence against debug-notes.md + specs/learnings.md patterns
58
+ → S_HYPOTHESIZE DO: match evidence against debug-notes.md + .workflow/specs/learnings.md patterns
59
59
 
60
60
  S_HYPOTHESIZE:
61
61
  → S_CLI_EXPLORE WHEN: CLI tools enabled AND hypotheses non-trivial DO: A_FORM_HYPOTHESES
@@ -83,7 +83,7 @@ S_REPORT:
83
83
  ### A_FRAME_QUESTION
84
84
 
85
85
  1. Parse question, generate slug, create KNW-investigate-{slug}/
86
- 2. Search prior knowledge: `maestro wiki search "<question>"` + search specs/learnings.md + read debug-notes.md
86
+ 2. Search prior knowledge: `maestro wiki search "<question>"` + search .workflow/specs/learnings.md + read debug-notes.md
87
87
  3. Write initial understanding.md (question, prior knowledge summary, scope, timestamp)
88
88
 
89
89
  ### A_COLLECT_EVIDENCE
@@ -124,7 +124,7 @@ For each hypothesis (rank order):
124
124
  ### A_SYNTHESIZE_REPORT
125
125
 
126
126
  Write report.md: Answer (or INCONCLUSIVE), Evidence Trail table, Hypotheses Tested table, Key Learnings, Open Questions.
127
- Append to specs/learnings.md: confirmed → roles="implement", disproved → roles="analyze" (gotcha).
127
+ Append to .workflow/specs/learnings.md: confirmed → roles="implement", disproved → roles="analyze" (gotcha).
128
128
 
129
129
  </actions>
130
130
 
@@ -14,7 +14,7 @@ allowed-tools:
14
14
  <purpose>
15
15
  Unified retrospective combining git activity analysis and decision quality evaluation. Works on raw git history and wiki/spec data. Two lenses (git, decision), usable independently or together.
16
16
 
17
- All insights persist to `specs/learnings.md` as `<spec-entry>` blocks.
17
+ All insights persist to `.workflow/specs/learnings.md` as `<spec-entry>` blocks.
18
18
  </purpose>
19
19
 
20
20
  <context>
@@ -28,9 +28,9 @@ $ARGUMENTS — lens selection and scope flags.
28
28
  **Storage write**:
29
29
  - `.workflow/knowhow/KNW-retro-{date}.md` — unified report
30
30
  - `.workflow/knowhow/KNW-retro-{date}.json` — structured metrics
31
- - `specs/learnings.md` — appended `<spec-entry>` blocks (source: retro-git / retro-decision)
31
+ - `.workflow/specs/learnings.md` — appended `<spec-entry>` blocks (source: retro-git / retro-decision)
32
32
 
33
- **Storage read**: git history, `.workflow/state.json`, prior `KNW-retro-*.json`, `specs/learnings.md`, wiki specs, `architecture-constraints.md`, phase context files
33
+ **Storage read**: git history, `.workflow/state.json`, prior `KNW-retro-*.json`, `.workflow/specs/learnings.md`, wiki specs, `architecture-constraints.md`, phase context files
34
34
  </context>
35
35
 
36
36
  <state_machine>
@@ -40,7 +40,7 @@ S_PARSE — 解析 lens + flags PERSIST: —
40
40
  S_GIT — git 活动分析(lens=git/all 时) PERSIST: metrics
41
41
  S_DECISION — 决策质量评估(lens=decision/all 时) PERSIST: evaluations
42
42
  S_REPORT — 生成统一报告 PERSIST: .md + .json
43
- S_PERSIST — 写 spec-entry 块 PERSIST: specs/learnings.md
43
+ S_PERSIST — 写 spec-entry 块 PERSIST: .workflow/specs/learnings.md
44
44
  </states>
45
45
 
46
46
  <transitions>
@@ -60,7 +60,7 @@ S_REPORT:
60
60
  → S_PERSIST DO: write KNW-retro-{date}.md + .json
61
61
 
62
62
  S_PERSIST:
63
- → END DO: append insights to specs/learnings.md via `maestro spec add learning`
63
+ → END DO: append insights to .workflow/specs/learnings.md via `maestro spec add learning`
64
64
  RULE: INS-id = hash(lens + metric_or_decision_id + date) for cross-session stability
65
65
 
66
66
  </transitions>
@@ -102,7 +102,7 @@ maestro wiki search "decision" --json
102
102
  maestro wiki list --type spec --json
103
103
  git log --oneline --all --grep="decision\|chose\|decided" -20
104
104
  ```
105
- Plus: architecture-constraints.md, phase context Locked/Deferred sections, specs/learnings.md.
105
+ Plus: architecture-constraints.md, phase context Locked/Deferred sections, .workflow/specs/learnings.md.
106
106
  Apply --phase/--tag/--id filters.
107
107
 
108
108
  **Build registry** per decision: id, title, source, date, rationale, alternatives, phase, implementation_evidence [file paths].
@@ -146,7 +146,7 @@ Apply --phase/--tag/--id filters.
146
146
  - [ ] Git lens: metrics computed (commits, LOC, test ratio, churn, sessions), insights distilled
147
147
  - [ ] Decision lens: decisions collected, 3 agents evaluated in parallel, lifecycle classified
148
148
  - [ ] Unified report + structured JSON written
149
- - [ ] specs/learnings.md appended with stable INS-ids
149
+ - [ ] .workflow/specs/learnings.md appended with stable INS-ids
150
150
  </success_criteria>
151
151
 
152
152
  <next_step_routing>
@@ -17,7 +17,7 @@ Structured second-opinion on code, decisions, or plans. Three modes:
17
17
  - **challenge**: single adversarial agent — break assumptions, propose alternatives
18
18
  - **consult**: interactive Q&A — agent studies target, answers your questions
19
19
 
20
- Findings persist to `specs/learnings.md` as `<spec-entry>` blocks.
20
+ Findings persist to `.workflow/specs/learnings.md` as `<spec-entry>` blocks.
21
21
  </purpose>
22
22
 
23
23
  <context>
@@ -45,7 +45,7 @@ S_RESOLVE — 解析 target PERSIST: —
45
45
  S_CONTEXT — 加载 specs/wiki 上下文 PERSIST: —
46
46
  S_EXECUTE — 按 mode 执行分析 PERSIST: —
47
47
  S_SYNTHESIZE — 综合观点、生成报告 PERSIST: outputs
48
- S_PERSIST — 写文件、append specs/learnings.md PERSIST: knowhow files
48
+ S_PERSIST — 写文件、append .workflow/specs/learnings.md PERSIST: knowhow files
49
49
  </states>
50
50
 
51
51
  <transitions>
@@ -66,7 +66,7 @@ S_SYNTHESIZE:
66
66
  → S_PERSIST DO: merge perspectives → agreements, disagreements, verdict, top 3 recommendations
67
67
 
68
68
  S_PERSIST:
69
- → END DO: write KNW-opinion + append <spec-entry> blocks to specs/learnings.md
69
+ → END DO: write KNW-opinion + append <spec-entry> blocks to .workflow/specs/learnings.md
70
70
 
71
71
  </transitions>
72
72
 
@@ -112,7 +112,7 @@ Interactive loop:
112
112
  <success_criteria>
113
113
  - [ ] Mode executed: review (3 parallel agents) / challenge (adversarial) / consult (interactive Q&A)
114
114
  - [ ] Synthesis with agreements, disagreements, verdict
115
- - [ ] Report written + findings appended to specs/learnings.md
115
+ - [ ] Report written + findings appended to .workflow/specs/learnings.md
116
116
  </success_criteria>
117
117
 
118
118
  <next_step_routing>
@@ -148,6 +148,7 @@ On validation failure: fix JSON, retry (max 2).
148
148
  | Code | Condition | Recovery |
149
149
  |------|-----------|----------|
150
150
  | E001 | No signals from any source | Verify artifact paths or provide description |
151
+ | E002 | Signal source path invalid or unreadable | Check `--from-*` path; ensure artifact exists |
151
152
  | E003 | All signals are code bugs, not command gaps | Use /maestro-quick or /maestro-plan --gaps |
152
153
  | E004 | Overlay validation failed after 2 retries | Review JSON manually |
153
154
  | W001 | Some signals skipped (code bugs) | Route to appropriate fix command |
@@ -32,12 +32,23 @@ Use `--gaps` for issue-focused root cause analysis (replaces manage-issue-analyz
32
32
  </deferred_reading>
33
33
 
34
34
  <context>
35
- $ARGUMENTS -- phase number for milestone-scoped, topic text for adhoc/standalone mode, no args for milestone-wide.
35
+ $ARGUMENTS -- phase number for micro mode, topic text for macro/adhoc mode, no args for milestone-wide.
36
+
37
+ **Dual-layer mode:**
38
+ - **Macro mode** (text argument): Explore impact surface of a topic/requirement. Produces coarse-grained context with `scope_verdict` to route next step. Use before roadmap or for standalone analysis.
39
+ - **Micro mode** (numeric argument): Phase-level deep analysis within an existing roadmap. Produces fine-grained context for plan consumption. `analyze 1` = Phase 1 of current milestone.
40
+
41
+ **Disambiguation rule (mode selection):**
42
+ - First positional arg matches `^\d+$` (pure digits, e.g. `1`, `42`) → **micro mode** (treat as phase number)
43
+ - First positional arg is non-numeric text (e.g. `auth-refactor`, `improve search`) → **macro mode** (treat as topic)
44
+ - No positional arg → milestone-wide micro mode (when roadmap present) else macro fallback
45
+ - Mixed input like `"1 phase"` is treated as text → macro mode (only bare numerics trigger micro)
36
46
 
37
47
  **Flags:**
38
48
  - `-y` / `--yes`: Auto mode — skip interactive scoping, use recommended defaults, auto-deepen
39
49
  - `-c` / `--continue`: Resume from existing session (auto-detect session folder + discussion.md)
40
50
  - `-q` / `--quick`: Quick mode — skip exploration + scoring, go straight to decision extraction (context.md only)
51
+ - `--from <source>`: Load upstream context package (brainstorm:ID, blueprint:BLP-xxx, @file, or path)
41
52
  - `--gaps [ISS-ID]`: Issue root cause analysis mode. If ISS-ID provided, analyze single issue. If omitted, analyze all open/registered issues from issues.jsonl.
42
53
 
43
54
  Scope routing, output directory format, artifact registration schema, and output artifact listing are defined in workflow analyze.md (Scope Routing and Output Structure sections).
@@ -46,6 +57,21 @@ Scope routing, output directory format, artifact registration schema, and output
46
57
  `maestro wiki list --category debug` → select relevant → `maestro wiki load`
47
58
  </context>
48
59
 
60
+ <interview_protocol>
61
+ Interview the user relentlessly until shared understanding is reached. Active only in interactive mode; skip when `-y/--yes`, `-c/--continue`, or input is already specific (explicit phase number or unambiguous topic).
62
+
63
+ - One decision per turn via AskUserQuestion with 2–4 options + a (Recommended) default. The user controls termination — keep interviewing until convergence; they can interrupt naturally or via `Other` at any time.
64
+ - Search-first when uncertain: before asking, resolve via `state.json`, `roadmap.md`, `issues.jsonl`, `maestro spec load`, `maestro wiki search`, Grep, Read, or — for open-ended multi-file scans — spawn `Agent(subagent_type: Explore)` / `maestro delegate ... --role explore`. Never ask what code or memory can verify; never bounce your own ambiguity back to the user — search first, then ask only what truly needs human judgment.
65
+ - Writeback cadence: each settled decision is immediately appended/updated in `discussion.md` (top table) and mirrored into `context.md` "Interview Decisions". Do NOT batch writeback to the end — partial decisions must already be on disk before the next question.
66
+ - Walk the decision dependency tree strictly: scope → depth → dimensions → Go/No-Go threshold. Do not open the next branch until the current one is settled.
67
+ - Scope guard: only ask about decisions owned by `analyze`. Do not prejudge plan/execute concerns.
68
+
69
+ Decision points: scope (phase / topic / milestone-wide / adhoc / --gaps) → depth (quick / standard / deep) → dimensions (which of the 6 to keep) → Go/No-Go threshold.
70
+
71
+ Exit: when all decision points are settled (or user explicitly signals to proceed), finalize session metadata. The decision table (populated incrementally during interview) uses this schema:
72
+ `| # | Decision | Choice | Source (user / code / default) |`
73
+ </interview_protocol>
74
+
49
75
  <execution>
50
76
  Follow '~/.maestro/workflows/analyze.md' completely.
51
77
 
@@ -76,15 +102,21 @@ Phase 4: Output context.md for downstream plan --gaps
76
102
 
77
103
  **Handoff:** context.md is consumed by maestro-plan (loads Locked/Free/Deferred decisions). In --gaps mode, context.md contains issue root causes for `plan --gaps` consumption.
78
104
 
105
+ **scope_verdict** (added to context.md in Step 6 Synthesis for macro/adhoc/standalone scopes):
106
+ - `large` (3+ independent subsystems or hard serial dependencies) → suggest `/maestro-roadmap --from analyze:ANL-xxx`
107
+ - `medium` (1-2 subsystems, parallelizable) → suggest `/maestro-plan --from analyze:ANL-xxx`
108
+ - `small` (single-file or few-file change) → suggest `/maestro-plan --from analyze:ANL-xxx`
109
+
79
110
  **Next-step routing on completion:**
80
111
 
81
- Phase/Milestone scope:
112
+ Phase/Milestone scope (micro mode):
82
113
  - Go recommendation, UI work needed → `/maestro-impeccable build {target}`
83
114
  - Go recommendation, ready to plan → `/maestro-plan` or `/maestro-plan {phase}`
84
115
  - No-Go recommendation → revisit requirements or `/maestro-brainstorm {topic}`
85
116
 
86
- Adhoc/Standalone scope:
87
- - Ready to plan → `/maestro-plan --dir {scratch_dir}`
117
+ Macro/Adhoc/Standalone scope:
118
+ - scope_verdict = large → `/maestro-roadmap --from analyze:ANL-xxx`
119
+ - scope_verdict = medium/small → `/maestro-plan --from analyze:ANL-xxx`
88
120
  - Need more exploration → `/maestro-analyze {topic} -c`
89
121
 
90
122
  Gaps scope:
@@ -123,6 +155,7 @@ Gaps mode:
123
155
  - [ ] context.md written with aggregated root causes for plan --gaps
124
156
 
125
157
  Both modes (full + quick):
158
+ - [ ] Interactive mode: interview decision table written to `discussion.md` and mirrored into `context.md` "Interview Decisions"
126
159
  - [ ] context.md written with all decisions classified as Locked/Free/Deferred
127
160
  - [ ] Gray areas identified through phase-specific analysis
128
161
  - [ ] Decision Recording Protocol applied to all decisions
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: maestro-blueprint
3
+ description: Generate formal specification package (Product Brief, PRD, Architecture, Epics) through 6-phase document chain
4
+ argument-hint: "<idea or @file> [-y] [-c] [--from <source>]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Agent
13
+ - AskUserQuestion
14
+ ---
15
+ <purpose>
16
+ Formal specification document chain producing a complete specification package through 6 sequential phases with multi-CLI analysis and interactive refinement. Pure documentation — no code generation, no roadmap generation.
17
+
18
+ Parallel to `brainstorm` as an upstream origin command:
19
+ - **brainstorm** = divergent exploration (lightweight, multi-role creative)
20
+ - **blueprint** = convergent documentation (heavyweight, 6-phase formal spec chain)
21
+
22
+ Output: `.workflow/blueprint/BLP-{slug}-{date}/` containing Product Brief, PRD, Architecture, and Epics.
23
+ </purpose>
24
+
25
+ <required_reading>
26
+ @~/.maestro/workflows/blueprint.md
27
+ </required_reading>
28
+
29
+ <deferred_reading>
30
+ - [blueprint-config.json](~/.maestro/templates/blueprint-config.json) — read when initializing blueprint configuration
31
+ </deferred_reading>
32
+
33
+ <context>
34
+ $ARGUMENTS -- idea text, @file reference, or upstream context source.
35
+
36
+ **Flags:**
37
+ - `-y` / `--yes`: Auto mode — skip interactive questions, use recommended defaults
38
+ - `-c` / `--continue`: Resume from last checkpoint (reads blueprint-config.json)
39
+ - `--from <source>`: Load upstream context package (brainstorm:ID, @file, or path). Consumes context-package.json
40
+ - `--from-brainstorm SESSION-ID`: (backward compat alias for `--from brainstorm:ID`)
41
+
42
+ **Input types:**
43
+ - Direct text: `"Build a real-time collaboration platform with WebSocket"`
44
+ - File reference: `@requirements.md`
45
+ - Context import: `--from brainstorm:BRN-001` or `--from @requirements.md` or `--from path/`
46
+ - Resume: `-c` (resumes from first incomplete phase)
47
+
48
+ **Pipeline position:**
49
+ ```
50
+ maestro-brainstorm (optional upstream)
51
+ ↓ guidance-specification.md / context-package.json
52
+ maestro-blueprint
53
+ ↓ .workflow/blueprint/BLP-{slug}-{date}/
54
+ maestro-analyze → maestro-roadmap → maestro-plan
55
+ ```
56
+
57
+ **Output boundary**: ALL file writes MUST target `.workflow/blueprint/BLP-{slug}-{date}/` or `.workflow/state.json` only. NEVER modify source code or files outside these paths.
58
+
59
+ ### Pre-load specs
60
+ 1. **Architecture specs**: Run `maestro spec load --category arch` to load architecture constraints. Use as context for architecture decisions (Phase 4).
61
+ 2. Optional — proceed without if unavailable.
62
+ </context>
63
+
64
+ <interview_protocol>
65
+ Interview the user relentlessly about every aspect of the spec until shared understanding is reached. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one; if a question can be answered by exploring the codebase, explore the codebase instead. Active only in interactive mode; skip when `-y/--yes`, `-c/--continue`, or input is already specific (clear idea + scope).
66
+
67
+ - Ask one question per turn via AskUserQuestion and wait for the user's feedback before continuing; every question must carry a recommended answer marked `(Recommended)`, 2–4 options total. The user controls termination — keep interviewing until convergence; they can interrupt naturally or via `Other` at any time.
68
+ - Search-first when uncertain: before asking, resolve via `state.json`, existing artifacts, `maestro spec load`, direct codebase exploration (Glob/Grep/Read), or — for open-ended multi-file scans — spawn `Agent(subagent_type: Explore)` / `maestro delegate ... --role explore`. Never ask what code or memory can verify; never bounce your own ambiguity back to the user — search first, then ask only what truly needs human judgment.
69
+ - Writeback cadence: each settled decision is immediately persisted into `blueprint-config.json` before the next question. Do NOT batch writeback to the end — partial decisions must already be on disk.
70
+ - Walk the decision dependency tree depth-first: scope → spec type → focus areas → requirement priorities. Do not open the next branch until the current one is settled.
71
+ - Scope guard: only decide the shape of the specification. Do not pre-resolve roadmap phases or plan tasks — those belong to downstream commands.
72
+
73
+ Decision points: scope (full product / feature set / single feature) → spec type (service / api / library / platform) → focus areas → whether to run codebase exploration.
74
+
75
+ Exit: on consensus or explicit user signal to proceed, finalize blueprint-config.json (decisions already written incrementally) and proceed to Phase 1.
76
+ </interview_protocol>
77
+
78
+ <execution>
79
+ Follow `~/.maestro/workflows/blueprint.md` completely.
80
+
81
+ ### Phase chain
82
+
83
+ ```
84
+ P0: Spec Study → P1: Discovery → P1.5: Req Expansion → P2: Product Brief → P3: PRD → P4: Architecture → P5: Epics → P6: Readiness Check
85
+ ```
86
+
87
+ P6 gate: Pass (>=80%) → Handoff | Review (60-79%) → Handoff w/caveats | Fail (<60%) → P6.5 Auto-Fix (max 2 iter) → re-check
88
+
89
+ ### Next-step routing on completion
90
+
91
+ | Condition | Suggestion |
92
+ |-----------|-----------|
93
+ | Need codebase analysis | /maestro-analyze {topic} --from blueprint:BLP-xxx |
94
+ | Ready for roadmap | /maestro-roadmap --from blueprint:BLP-xxx |
95
+ | Small scope, direct plan | /maestro-plan --from blueprint:BLP-xxx |
96
+ | Need project setup | /maestro-init |
97
+ </execution>
98
+
99
+ <error_codes>
100
+ | Code | Severity | Condition | Recovery |
101
+ |------|----------|-----------|----------|
102
+ | E001 | error | Idea text or @file required | Prompt user for input |
103
+ | E002 | error | Context source not found (--from) | Show available sessions/sources |
104
+ | E006 | error | `.workflow/` not initialized | Run maestro-init first |
105
+ | E007 | error | Phase 6 readiness Fail after 2 auto-fix iterations | Present manual fix options |
106
+ | W001 | warning | CLI analysis failed, using fallback | Continue with available data |
107
+ | W002 | warning | Codebase exploration failed | Continue without codebase context |
108
+ | W003 | warning | Glossary has < 5 terms | Note in readiness check |
109
+ | W004 | warning | Review-level readiness score (60-79%) | Proceed with caveats |
110
+ | W005 | warning | External research agent failed | Continue without apiResearchContext |
111
+ </error_codes>
112
+
113
+ <success_criteria>
114
+ - [ ] Interactive mode: interview decisions persisted in blueprint-config.json
115
+ - [ ] `blueprint-config.json` created with session metadata and phase tracking
116
+ - [ ] `product-brief.md` with vision, goals, scope, multi-perspective synthesis
117
+ - [ ] `glossary.json` with 5+ core terms for cross-document consistency
118
+ - [ ] `requirements/` directory with `_index.md` + individual `REQ-*.md` + `NFR-*.md` files
119
+ - [ ] All requirements have RFC 2119 keywords and acceptance criteria
120
+ - [ ] `architecture/` directory with `_index.md` + individual `ADR-*.md` files
121
+ - [ ] Architecture includes state machine, config model, error handling, observability (service type)
122
+ - [ ] `epics/` directory with `_index.md` + individual `EPIC-*.md` files
123
+ - [ ] Cross-Epic dependency map (Mermaid) and MVP subset tagged
124
+ - [ ] `readiness-report.md` with 4-dimension quality scores and traceability matrix
125
+ - [ ] `blueprint-summary.md` with one-page executive summary
126
+ - [ ] All documents have valid YAML frontmatter with session_id
127
+ - [ ] Glossary terms used consistently across all documents
128
+ - [ ] Readiness gate: Pass (>=80%) or Review (>=60%) with documented caveats
129
+ - [ ] Artifact registered in state.json (type=blueprint)
130
+ - [ ] context-package.json generated for downstream consumption
131
+ </success_criteria>