maestro-flow 0.3.7 → 0.3.9

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 (254) hide show
  1. package/.claude/commands/learn-decompose.md +3 -3
  2. package/.claude/commands/learn-follow.md +5 -5
  3. package/.claude/commands/learn-investigate.md +3 -3
  4. package/.claude/commands/learn-retro.md +303 -0
  5. package/.claude/commands/learn-second-opinion.md +3 -3
  6. package/.claude/commands/maestro-analyze.md +123 -99
  7. package/.claude/commands/maestro-brainstorm.md +2 -2
  8. package/.claude/commands/maestro-execute.md +137 -96
  9. package/.claude/commands/maestro-fork.md +111 -0
  10. package/.claude/commands/maestro-init.md +6 -6
  11. package/.claude/commands/maestro-learn.md +74 -298
  12. package/.claude/commands/maestro-merge.md +77 -0
  13. package/.claude/commands/maestro-milestone-audit.md +72 -60
  14. package/.claude/commands/maestro-milestone-complete.md +67 -59
  15. package/.claude/commands/maestro-milestone-release.md +6 -6
  16. package/.claude/commands/maestro-plan.md +151 -130
  17. package/.claude/commands/maestro-quick.md +4 -4
  18. package/.claude/commands/maestro-roadmap.md +5 -5
  19. package/.claude/commands/maestro-spec-generate.md +5 -5
  20. package/.claude/commands/maestro-ui-design.md +3 -3
  21. package/.claude/commands/maestro-verify.md +106 -87
  22. package/.claude/commands/maestro.md +10 -4
  23. package/.claude/commands/manage-codebase-rebuild.md +4 -4
  24. package/.claude/commands/manage-codebase-refresh.md +1 -1
  25. package/.claude/commands/manage-harvest.md +5 -5
  26. package/.claude/commands/manage-issue-discover.md +1 -1
  27. package/.claude/commands/manage-issue-execute.md +6 -6
  28. package/.claude/commands/manage-issue.md +6 -6
  29. package/.claude/commands/manage-learn.md +23 -17
  30. package/.claude/commands/manage-memory-capture.md +15 -17
  31. package/.claude/commands/manage-memory.md +3 -3
  32. package/.claude/commands/manage-status.md +24 -24
  33. package/.claude/commands/quality-business-test.md +5 -5
  34. package/.claude/commands/quality-debug.md +4 -4
  35. package/.claude/commands/quality-integration-test.md +4 -4
  36. package/.claude/commands/quality-refactor.md +3 -3
  37. package/.claude/commands/quality-retrospective.md +7 -7
  38. package/.claude/commands/quality-review.md +4 -4
  39. package/.claude/commands/quality-sync.md +3 -3
  40. package/.claude/commands/quality-test-gen.md +4 -4
  41. package/.claude/commands/quality-test.md +9 -9
  42. package/.claude/commands/spec-add.md +2 -2
  43. package/.claude/commands/spec-load.md +8 -3
  44. package/.claude/commands/spec-setup.md +5 -5
  45. package/.claude/commands/wiki-connect.md +3 -3
  46. package/.claude/commands/wiki-digest.md +30 -5
  47. package/.codex/skills/maestro-analyze/SKILL.md +52 -14
  48. package/.codex/skills/maestro-execute/SKILL.md +27 -26
  49. package/.codex/skills/maestro-milestone-audit/SKILL.md +103 -209
  50. package/.codex/skills/maestro-milestone-complete/SKILL.md +149 -158
  51. package/.codex/skills/maestro-plan/SKILL.md +47 -17
  52. package/.codex/skills/maestro-roadmap/SKILL.md +3 -2
  53. package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +2 -2
  54. package/.codex/skills/team-executor/roles/executor/commands/monitor.md +1 -1
  55. package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +2 -2
  56. package/.codex/skills/team-lifecycle-v4/specs/knowledge-transfer.md +2 -2
  57. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +1 -1
  58. package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +1 -1
  59. package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +1 -1
  60. package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +1 -1
  61. package/README.md +115 -227
  62. package/README.zh-CN.md +169 -187
  63. package/bin/maestro-mcp.js +1 -1
  64. package/chains/_intent-map.json +21 -9
  65. package/chains/_router.json +30 -77
  66. package/chains/brainstorm-driven.json +17 -6
  67. package/chains/full-lifecycle.json +22 -23
  68. package/chains/milestone-close.json +20 -7
  69. package/chains/milestone-fork-merge.json +50 -0
  70. package/chains/roadmap-driven.json +17 -6
  71. package/chains/spec-driven.json +17 -6
  72. package/dashboard/dist/assets/{ArtifactsPage-A9yzYtpj.js → ArtifactsPage-DZNCi6tn.js} +12 -7
  73. package/dashboard/dist/assets/ChatInput-Bvr-FeEq.js +49 -0
  74. package/dashboard/dist/assets/ChatPage-D9zTkJZo.js +22 -0
  75. package/dashboard/dist/assets/CollabPage-B4NAHXS2.js +1 -0
  76. package/dashboard/dist/assets/ExecutionPanel-CFt4LJyq.js +1 -0
  77. package/dashboard/dist/assets/KanbanPage-C8USth6H.js +21 -0
  78. package/dashboard/dist/assets/{MarkdownRenderer-CCXHaut3.js → MarkdownRenderer-X4af_WNb.js} +1 -1
  79. package/dashboard/dist/assets/McpPage-BKfCVIyU.js +21 -0
  80. package/dashboard/dist/assets/OutputPanel-BlBQFJSW.js +1 -0
  81. package/dashboard/dist/assets/ProblemsPanel-De3DLvoI.js +1 -0
  82. package/dashboard/dist/assets/{RequirementBoardPage-CEOvppGn.js → RequirementBoardPage-Bf1trzqs.js} +2 -2
  83. package/dashboard/dist/assets/{RequirementPage-DpnbTEqY.js → RequirementPage-Bllxe2XI.js} +10 -5
  84. package/dashboard/dist/assets/{SpecsPage-CYqOfFkB.js → SpecsPage-9lwxKT27.js} +2 -2
  85. package/dashboard/dist/assets/{SupervisorPage-B2sZwkq8.js → SupervisorPage-SusdfHFq.js} +1 -1
  86. package/dashboard/dist/assets/{TeamsPage-CkZdCAVZ.js → TeamsPage-DsuM6OwC.js} +2 -2
  87. package/dashboard/dist/assets/TreeBrowser-Q12qobZs.js +6 -0
  88. package/dashboard/dist/assets/WorkflowPage-D_Fzdy3_.js +6 -0
  89. package/dashboard/dist/assets/{arrow-left-6fktHyjN.js → arrow-left-Bqtb2hle.js} +1 -1
  90. package/dashboard/dist/assets/{check-Cbxq2l1-.js → check-u6fGOwQO.js} +1 -1
  91. package/dashboard/dist/assets/{chevron-right-Yts3bi8p.js → chevron-right-Csu22t58.js} +1 -1
  92. package/dashboard/dist/assets/{circle-4Ci4Xolf.js → circle-CMrkbRNg.js} +1 -1
  93. package/dashboard/dist/assets/{circle-alert-B25g9BTL.js → circle-alert-c3tH1P4z.js} +1 -1
  94. package/dashboard/dist/assets/{circle-check-big-DzO2BlL7.js → circle-check-big-TDSeWstm.js} +1 -1
  95. package/dashboard/dist/assets/{circle-check-BA5_XqeV.js → circle-check-gYxxSYuH.js} +1 -1
  96. package/dashboard/dist/assets/{code-zxwuybO8.js → code-CFN2uX9V.js} +1 -1
  97. package/dashboard/dist/assets/{columns-3-DV4oeCfU.js → columns-3-38xIDlzy.js} +1 -1
  98. package/dashboard/dist/assets/{download-CXCyQw8M.js → download-DC7KkKyP.js} +1 -1
  99. package/dashboard/dist/assets/{folder-Bvjj8Vn9.js → folder-CWq_lAnf.js} +1 -1
  100. package/dashboard/dist/assets/index-DWG-WrzT.js +231 -0
  101. package/dashboard/dist/assets/{index-BvScJmJM.js → index-Do71weNR.js} +1 -1
  102. package/dashboard/dist/assets/index-GUNJodSR.css +1 -0
  103. package/dashboard/dist/assets/{list-Dj4i9N75.js → list-CgIP_2A-.js} +1 -1
  104. package/dashboard/dist/assets/{minus-DwlFabsT.js → minus-DYoN5UGk.js} +1 -1
  105. package/dashboard/dist/assets/{pen-line-D7UzECt6.js → pen-line-Bh_WKYHm.js} +1 -1
  106. package/dashboard/dist/assets/{proxy-B9XRqHD9.js → proxy-BKxDAKTj.js} +1 -1
  107. package/dashboard/dist/assets/{search-BQbBTIYl.js → search-SieXnOgr.js} +1 -1
  108. package/dashboard/dist/assets/{shallow-Clb1Lyd_.js → shallow-Bme1JY57.js} +1 -1
  109. package/dashboard/dist/assets/{table-BqxCXid2.js → table-llyEtj-7.js} +1 -1
  110. package/dashboard/dist/assets/terminal-BB3Xfuv5.js +6 -0
  111. package/dashboard/dist/assets/{trash-2-6rN9B-EQ.js → trash-2-C8f4vFFM.js} +1 -1
  112. package/dashboard/dist/assets/{zap-DxUhG-gk.js → zap-4uwlzVm0.js} +1 -1
  113. package/dashboard/dist/index.html +2 -2
  114. package/dashboard/dist-server/dashboard/src/server/agents/agent-sdk-adapter.d.ts +1 -1
  115. package/dashboard/dist-server/dashboard/src/server/agents/agent-sdk-adapter.js +5 -4
  116. package/dashboard/dist-server/dashboard/src/server/agents/agent-sdk-adapter.js.map +1 -1
  117. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +8 -4
  118. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
  119. package/dashboard/dist-server/dashboard/src/server/agents/entry-normalizer.d.ts +1 -0
  120. package/dashboard/dist-server/dashboard/src/server/agents/entry-normalizer.js +2 -1
  121. package/dashboard/dist-server/dashboard/src/server/agents/entry-normalizer.js.map +1 -1
  122. package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js +20 -10
  123. package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js.map +1 -1
  124. package/dashboard/dist-server/dashboard/src/server/agents/tools/issue-mcp-server.d.ts +1 -1
  125. package/dashboard/dist-server/dashboard/src/server/agents/tools/issue-mcp-server.js +3 -4
  126. package/dashboard/dist-server/dashboard/src/server/agents/tools/issue-mcp-server.js.map +1 -1
  127. package/dashboard/dist-server/dashboard/src/server/agents/tools/issue-mcp-server.test.js +4 -4
  128. package/dashboard/dist-server/dashboard/src/server/agents/tools/issue-mcp-server.test.js.map +1 -1
  129. package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js +4 -3
  130. package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js.map +1 -1
  131. package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.test.js +20 -7
  132. package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.test.js.map +1 -1
  133. package/dashboard/dist-server/dashboard/src/server/execution/wave-executor.d.ts +1 -1
  134. package/dashboard/dist-server/dashboard/src/server/execution/wave-executor.js +4 -4
  135. package/dashboard/dist-server/dashboard/src/server/execution/wave-executor.js.map +1 -1
  136. package/dashboard/dist-server/dashboard/src/server/index.js +2 -1
  137. package/dashboard/dist-server/dashboard/src/server/index.js.map +1 -1
  138. package/dashboard/dist-server/dashboard/src/server/routes/git.d.ts +2 -0
  139. package/dashboard/dist-server/dashboard/src/server/routes/git.js +79 -0
  140. package/dashboard/dist-server/dashboard/src/server/routes/git.js.map +1 -0
  141. package/dashboard/dist-server/dashboard/src/server/routes/index.js +3 -0
  142. package/dashboard/dist-server/dashboard/src/server/routes/index.js.map +1 -1
  143. package/dashboard/dist-server/dashboard/src/server/routes/issues.js +14 -14
  144. package/dashboard/dist-server/dashboard/src/server/routes/issues.js.map +1 -1
  145. package/dashboard/dist-server/dashboard/src/server/routes/linear.js +7 -5
  146. package/dashboard/dist-server/dashboard/src/server/routes/linear.js.map +1 -1
  147. package/dashboard/dist-server/dashboard/src/server/routes/workspace.js +43 -0
  148. package/dashboard/dist-server/dashboard/src/server/routes/workspace.js.map +1 -1
  149. package/dashboard/dist-server/dashboard/src/server/state/state-manager.js +186 -25
  150. package/dashboard/dist-server/dashboard/src/server/state/state-manager.js.map +1 -1
  151. package/dashboard/dist-server/dashboard/src/server/utils/issue-store.d.ts +6 -0
  152. package/dashboard/dist-server/dashboard/src/server/utils/issue-store.js +24 -2
  153. package/dashboard/dist-server/dashboard/src/server/utils/issue-store.js.map +1 -1
  154. package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js +4 -7
  155. package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js.map +1 -1
  156. package/dashboard/dist-server/dashboard/src/shared/constants.js +2 -1
  157. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  158. package/dashboard/dist-server/dashboard/src/shared/constants.test.js +5 -5
  159. package/dashboard/dist-server/dashboard/src/shared/constants.test.js.map +1 -1
  160. package/dashboard/dist-server/dashboard/src/shared/issue-types.test.js +4 -4
  161. package/dashboard/dist-server/dashboard/src/shared/issue-types.test.js.map +1 -1
  162. package/dashboard/dist-server/src/commands/delegate.js +7 -1
  163. package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
  164. package/dashboard/package.json +59 -59
  165. package/dist/src/cli.js +3 -1
  166. package/dist/src/cli.js.map +1 -1
  167. package/dist/src/commands/{team.d.ts → collab.d.ts} +2 -2
  168. package/dist/src/commands/collab.d.ts.map +1 -0
  169. package/dist/src/commands/{team.js → collab.js} +391 -24
  170. package/dist/src/commands/collab.js.map +1 -0
  171. package/dist/src/commands/delegate.d.ts.map +1 -1
  172. package/dist/src/commands/delegate.js +7 -1
  173. package/dist/src/commands/delegate.js.map +1 -1
  174. package/dist/src/commands/msg.d.ts.map +1 -1
  175. package/dist/src/commands/msg.js +4 -3
  176. package/dist/src/commands/msg.js.map +1 -1
  177. package/dist/src/hooks/team-monitor.d.ts.map +1 -1
  178. package/dist/src/hooks/team-monitor.js +16 -0
  179. package/dist/src/hooks/team-monitor.js.map +1 -1
  180. package/dist/src/tools/collab-adapter.d.ts +85 -0
  181. package/dist/src/tools/collab-adapter.d.ts.map +1 -0
  182. package/dist/src/tools/collab-adapter.js +320 -0
  183. package/dist/src/tools/collab-adapter.js.map +1 -0
  184. package/dist/src/tools/namespace-guard.d.ts +2 -0
  185. package/dist/src/tools/namespace-guard.d.ts.map +1 -1
  186. package/dist/src/tools/namespace-guard.js +12 -0
  187. package/dist/src/tools/namespace-guard.js.map +1 -1
  188. package/dist/src/tools/phase-gate-evaluator.d.ts +45 -0
  189. package/dist/src/tools/phase-gate-evaluator.d.ts.map +1 -0
  190. package/dist/src/tools/phase-gate-evaluator.js +42 -0
  191. package/dist/src/tools/phase-gate-evaluator.js.map +1 -0
  192. package/dist/src/tools/team-members.d.ts +18 -0
  193. package/dist/src/tools/team-members.d.ts.map +1 -1
  194. package/dist/src/tools/team-members.js +50 -0
  195. package/dist/src/tools/team-members.js.map +1 -1
  196. package/dist/src/tools/team-tasks.d.ts +120 -0
  197. package/dist/src/tools/team-tasks.d.ts.map +1 -0
  198. package/dist/src/tools/team-tasks.js +365 -0
  199. package/dist/src/tools/team-tasks.js.map +1 -0
  200. package/dist/src/tools/transition-recorder.d.ts +3 -0
  201. package/dist/src/tools/transition-recorder.d.ts.map +1 -1
  202. package/dist/src/tools/transition-recorder.js +52 -1
  203. package/dist/src/tools/transition-recorder.js.map +1 -1
  204. package/dist/src/utils/get-version.d.ts.map +1 -1
  205. package/dist/src/utils/get-version.js +15 -4
  206. package/dist/src/utils/get-version.js.map +1 -1
  207. package/package.json +1 -1
  208. package/templates/config.json +7 -0
  209. package/templates/worktree-scope.json +10 -0
  210. package/templates/worktrees.json +27 -0
  211. package/workflows/analyze.md +86 -36
  212. package/workflows/brainstorm.md +17 -37
  213. package/workflows/delegate-usage.md +39 -41
  214. package/workflows/execute.md +247 -61
  215. package/workflows/fork.md +309 -0
  216. package/workflows/init.md +11 -2
  217. package/workflows/issue.md +66 -7
  218. package/workflows/maestro-coordinate.codex.md +1 -1
  219. package/workflows/maestro-coordinate.md +24 -17
  220. package/workflows/maestro.md +54 -37
  221. package/workflows/memory.md +2 -1
  222. package/workflows/merge.md +285 -0
  223. package/workflows/milestone-audit.md +89 -70
  224. package/workflows/milestone-complete.md +89 -156
  225. package/workflows/plan.md +131 -19
  226. package/workflows/retrospective.md +5 -5
  227. package/workflows/roadmap.md +12 -4
  228. package/workflows/spec-generate.md +9 -0
  229. package/workflows/status.md +76 -27
  230. package/workflows/ui-design.md +14 -12
  231. package/workflows/verify.md +44 -8
  232. package/.claude/commands/learn-retro-decision.md +0 -198
  233. package/.claude/commands/learn-retro-git.md +0 -160
  234. package/.claude/commands/maestro-phase-add.md +0 -63
  235. package/.claude/commands/maestro-phase-transition.md +0 -75
  236. package/.codex/skills/maestro-phase-add/SKILL.md +0 -154
  237. package/.codex/skills/maestro-phase-transition/SKILL.md +0 -173
  238. package/chains/singles/phase-add.json +0 -31
  239. package/chains/singles/phase-transition.json +0 -23
  240. package/dashboard/dist/assets/ChatInput-PuCvZZ3y.js +0 -67
  241. package/dashboard/dist/assets/ChatPage-v19GURYH.js +0 -8
  242. package/dashboard/dist/assets/CollabPage-I5k_mCbG.js +0 -1
  243. package/dashboard/dist/assets/KanbanPage-PDDBv5-9.js +0 -16
  244. package/dashboard/dist/assets/McpPage-CiqXpCHg.js +0 -16
  245. package/dashboard/dist/assets/TreeBrowser-0VIMWclo.js +0 -11
  246. package/dashboard/dist/assets/WorkflowPage-Csm23wUS.js +0 -6
  247. package/dashboard/dist/assets/git-branch-DL8p9kVC.js +0 -6
  248. package/dashboard/dist/assets/index-11DuhKhc.js +0 -231
  249. package/dashboard/dist/assets/index-D2Mtyw7I.css +0 -1
  250. package/dashboard/dist/assets/wrench-BScEJFqC.js +0 -11
  251. package/dist/src/commands/team.d.ts.map +0 -1
  252. package/dist/src/commands/team.js.map +0 -1
  253. package/workflows/phase-add.md +0 -252
  254. package/workflows/phase-transition.md +0 -399
@@ -8,9 +8,9 @@ allowed-tools:
8
8
  - Grep
9
9
  ---
10
10
  <purpose>
11
- Display a unified project dashboard showing phase progress, task counts, active work, and intelligent next-step suggestions.
12
- Reads all state files from `.workflow/` and renders a formatted overview with progress bars and status tables.
13
- Provides situational awareness before continuing work.
11
+ Display a unified project dashboard showing artifact progress, task counts, active work, and intelligent next-step suggestions.
12
+ Reads state.json artifact registry and roadmap to render a formatted overview with progress and status tables.
13
+ Provides situational awareness before continuing work. Uses virtual phase view derived from artifact registry.
14
14
  </purpose>
15
15
 
16
16
  <required_reading>
@@ -21,10 +21,10 @@ Provides situational awareness before continuing work.
21
21
  $ARGUMENTS (no arguments required)
22
22
 
23
23
  **State files read:**
24
- - `.workflow/state.json` -- project-level state machine
24
+ - `.workflow/state.json` -- project-level state machine + artifact registry
25
25
  - `.workflow/roadmap.md` -- milestone and phase structure
26
- - `.workflow/phases/*/index.json` -- per-phase metadata and progress
27
- - `.workflow/phases/*/.task/TASK-*.json` -- individual task statuses
26
+ - `.workflow/scratch/*/plan.json` -- plan metadata (via artifact registry paths)
27
+ - `.workflow/scratch/*/.task/TASK-*.json` -- individual task statuses
28
28
  </context>
29
29
 
30
30
  <execution>
@@ -33,29 +33,29 @@ Follow '~/.maestro/workflows/status.md' completely.
33
33
  **Next-step decision table:**
34
34
  | Current state | Suggested command | Reason |
35
35
  |---------------|-------------------|--------|
36
- | No phases planned | Skill({ skill: "maestro-brainstorm", args: "1" }) or Skill({ skill: "maestro-plan", args: "1" }) | Explore ideas or start planning first phase |
37
- | Phase pending, needs analysis | Skill({ skill: "maestro-analyze", args: "<N>" }) | Evaluate feasibility before planning |
38
- | Phase pending, needs decisions | Skill({ skill: "maestro-analyze", args: "<N> -q" }) | Quick decision extraction |
39
- | Phase planned, not executed | Skill({ skill: "maestro-execute", args: "<N>" }) | Execute the planned phase |
40
- | Phase executing, tasks blocked | Skill({ skill: "quality-debug", args: "<N>" }) | Unblock stuck tasks |
41
- | Phase executed, not verified | Skill({ skill: "maestro-verify", args: "<N>" }) | Verify execution results |
42
- | Phase verified with gaps | Skill({ skill: "maestro-plan", args: "<N> --gaps" }) | Plan gap fixes |
43
- | Phase verified, not reviewed | Skill({ skill: "quality-review", args: "<N>" }) | Code quality review before UAT |
44
- | Phase reviewed, verdict BLOCK | Skill({ skill: "maestro-plan", args: "<N> --gaps" }) | Fix critical review findings first |
45
- | Phase reviewed, verdict PASS/WARN | Skill({ skill: "quality-test", args: "<N>" }) | Proceed to UAT testing |
46
- | Phase verified, low test coverage | Skill({ skill: "quality-test-gen", args: "<N>" }) | Generate missing automated tests |
47
- | UAT passed | Skill({ skill: "maestro-phase-transition" }) | Move to next phase |
48
- | UAT has failures | Skill({ skill: "quality-debug", args: "--from-uat <N>" }) | Debug UAT gaps with parallel agents |
49
- | Need integration test cycle | Skill({ skill: "quality-integration-test", args: "<N>" }) | Self-iterating integration tests |
50
- | All phases in milestone complete | Skill({ skill: "maestro-milestone-audit" }) | Cross-phase integration check |
51
- | Milestone audit passed | Skill({ skill: "maestro-milestone-complete" }) | Archive milestone, advance |
52
- | Ad-hoc small task | Skill({ skill: "maestro-quick", args: "<task>" }) | Quick execute without full pipeline |
36
+ | No phases planned | `/maestro-brainstorm 1` or `/maestro-plan 1` | Explore ideas or start planning first phase |
37
+ | Phase pending, needs analysis | `/maestro-analyze <N>` | Evaluate feasibility before planning |
38
+ | Phase pending, needs decisions | `/maestro-analyze <N> -q` | Quick decision extraction |
39
+ | Phase planned, not executed | `/maestro-execute <N>` | Execute the planned phase |
40
+ | Phase executing, tasks blocked | `/quality-debug <N>` | Unblock stuck tasks |
41
+ | Phase executed, not verified | `/maestro-verify <N>` | Verify execution results |
42
+ | Phase verified with gaps | `/maestro-plan <N> --gaps` | Plan gap fixes |
43
+ | Phase verified, not reviewed | `/quality-review <N>` | Code quality review before UAT |
44
+ | Phase reviewed, verdict BLOCK | `/maestro-plan <N> --gaps` | Fix critical review findings first |
45
+ | Phase reviewed, verdict PASS/WARN | `/quality-test <N>` | Proceed to UAT testing |
46
+ | Phase verified, low test coverage | `/quality-test-gen <N>` | Generate missing automated tests |
47
+ | UAT passed, all phases done | `/maestro-milestone-audit` | Cross-phase integration check |
48
+ | UAT has failures | `/quality-debug --from-uat <N>` | Debug UAT gaps with parallel agents |
49
+ | Need integration test cycle | `/quality-integration-test <N>` | Self-iterating integration tests |
50
+ | All phases in milestone complete | `/maestro-milestone-audit` | Cross-phase integration check |
51
+ | Milestone audit passed | `/maestro-milestone-complete` | Archive milestone, advance |
52
+ | Ad-hoc small task | `/maestro-quick <task>` | Quick execute without full pipeline |
53
53
  </execution>
54
54
 
55
55
  <error_codes>
56
56
  | Code | Severity | Description | Stage |
57
57
  |------|----------|-------------|-------|
58
- | E001 | fatal | `.workflow/` not initialized -- run Skill({ skill: "maestro-init" }) first | parse_input |
58
+ | E001 | fatal | `.workflow/` not initialized -- run `/maestro-init` first | parse_input |
59
59
  | E002 | fatal | `state.json` missing or corrupt -- project state unrecoverable | parse_input |
60
60
  </error_codes>
61
61
 
@@ -70,11 +70,11 @@ Context files:
70
70
  Follow '~/.maestro/workflows/business-test.md' completely.
71
71
 
72
72
  **Next-step routing on completion:**
73
- - All requirements verified → Skill({ skill: "maestro-phase-transition", args: "{phase}" })
74
- - Failures found → Skill({ skill: "quality-debug", args: "--from-business-test {phase}" })
75
- - Re-run all pass → Skill({ skill: "maestro-verify", args: "{phase}" })
76
- - Low coverage → Skill({ skill: "quality-test-gen", args: "{phase}" })
77
- - Need integration tests → Skill({ skill: "quality-integration-test", args: "{phase}" })
73
+ - All requirements verified → `/maestro-phase-transition {phase}`
74
+ - Failures found → `/quality-debug --from-business-test {phase}`
75
+ - Re-run all pass → `/maestro-verify {phase}`
76
+ - Low coverage → `/quality-test-gen {phase}`
77
+ - Need integration tests → `/quality-integration-test {phase}`
78
78
  </execution>
79
79
 
80
80
  <error_codes>
@@ -49,10 +49,10 @@ User's issue: $ARGUMENTS
49
49
  Follow '~/.maestro/workflows/debug.md' completely.
50
50
 
51
51
  **Next-step routing on completion:**
52
- - Root cause found, fix needed → Skill({ skill: "maestro-plan", args: "{phase} --gaps" })
53
- - Root cause found (from UAT), auto-fix → Skill({ skill: "quality-test", args: "{phase} --auto-fix" })
54
- - Inconclusive, need more info → Skill({ skill: "quality-debug", args: "{issue} -c" }) (resume session)
55
- - Standalone fix already applied → Skill({ skill: "maestro-verify", args: "{phase}" })
52
+ - Root cause found, fix needed → `/maestro-plan {phase} --gaps`
53
+ - Root cause found (from UAT), auto-fix → `/quality-test {phase} --auto-fix`
54
+ - Inconclusive, need more info → `/quality-debug {issue} -c` (resume session)
55
+ - Standalone fix already applied → `/maestro-verify {phase}`
56
56
 
57
57
  Note: Debug output (.debug/) is auto-loaded by maestro-plan --gaps.
58
58
  </execution>
@@ -54,10 +54,10 @@ Phase: $ARGUMENTS (required -- phase number)
54
54
  Follow '~/.maestro/workflows/integration-test.md' completely.
55
55
 
56
56
  **Next-step routing on completion:**
57
- - Converged (pass rate met) → Skill({ skill: "maestro-phase-transition", args: "{phase}" })
58
- - Max iterations, pass rate close → Skill({ skill: "quality-debug", args: "{phase}" }) (investigate remaining failures)
59
- - Regressions detected → Skill({ skill: "quality-debug", args: "{phase}" })
60
- - Stuck 3+ iterations → Skill({ skill: "maestro-analyze", args: "{phase} -q" }) (reassess approach)
57
+ - Converged (pass rate met) → `/maestro-phase-transition {phase}`
58
+ - Max iterations, pass rate close → `/quality-debug {phase}` (investigate remaining failures)
59
+ - Regressions detected → `/quality-debug {phase}`
60
+ - Stuck 3+ iterations → `/maestro-analyze {phase} -q` (reassess approach)
61
61
  </execution>
62
62
 
63
63
  <error_codes>
@@ -33,9 +33,9 @@ If not provided, prompt user for scope.
33
33
  Follow '~/.maestro/workflows/refactor.md' completely.
34
34
 
35
35
  **Next-step routing on completion:**
36
- - All tests pass → Skill({ skill: "quality-sync" }) (update codebase docs)
37
- - Test failures after refactor → Skill({ skill: "quality-debug", args: "{scope}" })
38
- - No test suite available → Skill({ skill: "quality-test-gen", args: "{phase}" })
36
+ - All tests pass → `/quality-sync` (update codebase docs)
37
+ - Test failures after refactor → `/quality-debug {scope}`
38
+ - No test suite available → `/quality-test-gen {phase}`
39
39
  </execution>
40
40
 
41
41
  <error_codes>
@@ -22,7 +22,7 @@ Post-execution multi-perspective retrospective (复盘) for completed phases. Co
22
22
 
23
23
  <deferred_reading>
24
24
  - @~/.maestro/workflows/issue.md (issues.jsonl schema for auto-creation)
25
- - @~/.maestro/workflows/memory.md (Part B for note routing via manage-memory-capture)
25
+ - @~/.maestro/workflows/learn.md (tip routing via manage-learn tip)
26
26
  - @~/.maestro/workflows/verify.md (verification.json schema for quality lens parsing)
27
27
  - @~/.maestro/workflows/review.md (review.json schema for quality lens parsing)
28
28
  </deferred_reading>
@@ -47,7 +47,7 @@ Arguments: $ARGUMENTS
47
47
  - `.workflow/phases/{NN}-{slug}/retrospective.json` — structured record
48
48
  - `.workflow/specs/SPEC-retro-*.md` — spec stubs (one per spec-routed insight)
49
49
  - `.workflow/issues/issues.jsonl` — appended issue rows (`source: "retrospective"`)
50
- - `.workflow/memory/TIP-*.md` — memory tips (via `manage-memory-capture` skill)
50
+ - `.workflow/learning/lessons.jsonl` — tips routed via `manage-learn tip` (formerly manage-memory-capture)
51
51
  - `.workflow/learning/lessons.jsonl` — append-only insight log
52
52
  - `.workflow/learning/learning-index.json` — searchable index
53
53
 
@@ -64,7 +64,7 @@ Follow `~/.maestro/workflows/retrospective.md` Stages 1–8 in order. Key invari
64
64
  1. **Read-only until Stage 6** — Stages 1–5 must not write anything except the in-memory retrospective record.
65
65
  2. **Parallel lens dispatch** — Stage 4 spawns one Agent per active lens in a single message (multiple Agent tool calls). All agents use `subagent_type: "general-purpose"` and `run_in_background: false`.
66
66
  3. **Match canonical issues schema** — Stage 6 issue routing must produce rows that pass `jq` parsing and match the schema in `workflows/issue.md` Step 4 exactly (status `"open"`, full `issue_history` entry, all required fields).
67
- 4. **Reuse `manage-memory-capture` for note routing** — do not duplicate the memory pipeline; invoke via `Skill()`.
67
+ 4. **Reuse `manage-learn tip` for note routing** — do not duplicate the learning pipeline; invoke via `Skill({ skill: "manage-learn", args: "tip ..." })`.
68
68
  5. **Backward-compat with phase-transition** — append a one-line summary per insight to `.workflow/specs/learnings.md` if and only if that file already exists. Never create it.
69
69
  6. **Stable insight IDs** — `INS-{8 hex}` from `hash(phase_num + lens + title)` so re-runs do not duplicate.
70
70
  7. **Archive before overwrite** — if existing `retrospective.{md,json}` are being replaced, move them to `{phase_dir}/.history/` with a timestamp suffix first.
@@ -73,14 +73,14 @@ Follow `~/.maestro/workflows/retrospective.md` Stages 1–8 in order. Key invari
73
73
  <error_codes>
74
74
  | Code | Severity | Description | Stage |
75
75
  |------|----------|-------------|-------|
76
- | E001 | error | `.workflow/` not initialized — run `Skill({ skill: "maestro-init" })` first | parse_input |
76
+ | E001 | error | `.workflow/` not initialized — run `/maestro-init` first | parse_input |
77
77
  | E002 | error | Unknown `--lens` name (allowed: technical, process, quality, decision) | parse_input |
78
78
  | E003 | error | `--compare` requires a single phase argument | parse_input |
79
79
  | E004 | error | Phase has not executed yet — no `.task/` or `.summaries/` artifacts | load_artifacts |
80
80
  | E005 | error | Phase argument out of range / phase directory not found | scan_unreviewed |
81
81
  | W001 | warning | One or more lens agents failed — proceeding with partial coverage | multi_lens_analysis |
82
82
  | W002 | warning | Existing retrospective.json found and not `--all` — prompted user to overwrite | scan_unreviewed |
83
- | W003 | warning | `manage-memory-capture` did not return parseable TIP id; fell back to direct write | route_outputs |
83
+ | W003 | warning | `manage-learn tip` did not return parseable INS id; fell back to direct write | route_outputs |
84
84
  | W004 | warning | `--compare` target phase has no retrospective.json; delta omitted | load_artifacts |
85
85
  </error_codes>
86
86
 
@@ -94,10 +94,10 @@ Follow `~/.maestro/workflows/retrospective.md` Stages 1–8 in order. Key invari
94
94
  - [ ] If routing enabled (default): every recommendation either created an artifact or was explicitly skipped by user
95
95
  - [ ] Spec stubs (if any) written to `.workflow/specs/SPEC-retro-*.md` with proper frontmatter
96
96
  - [ ] Issue rows (if any) match canonical issues.jsonl schema (status "open", full issue_history, all required fields)
97
- - [ ] Note tips (if any) created via `Skill({ skill: "manage-memory-capture", args: "tip ..." })`
97
+ - [ ] Note tips (if any) created via `Skill({ skill: "manage-learn", args: "tip ..." })`
98
98
  - [ ] `lessons.jsonl` appended with one row per insight regardless of routing target
99
99
  - [ ] `learning-index.json` updated and parseable
100
100
  - [ ] No existing phase artifacts modified (verification.json, review.json, plan.json untouched)
101
101
  - [ ] Confirmation banner displays routing counts and next-step suggestions
102
- - [ ] Next step: `Skill({ skill: "manage-status" })` to review state, or `Skill({ skill: "manage-issue", args: "list --source retrospective" })` to triage created issues, or `Skill({ skill: "manage-learn", args: "list" })` to browse the lessons library
102
+ - [ ] Next step: `/manage-status` to review state, or `/manage-issue list --source retrospective` to triage created issues, or `/manage-learn list` to browse the lessons library
103
103
  </success_criteria>
@@ -94,10 +94,10 @@ Next steps:
94
94
  ```
95
95
 
96
96
  **Next-step routing by verdict:**
97
- - PASS → Skill({ skill: "quality-test", args: "{phase}" })
98
- - PASS + low test coverage → Skill({ skill: "quality-test-gen", args: "{phase}" })
99
- - WARN → Skill({ skill: "quality-test", args: "{phase}" }) (proceed with caveats)
100
- - BLOCK → Skill({ skill: "maestro-plan", args: "{phase} --gaps" }) (fix critical findings first)
97
+ - PASS → `/quality-test {phase}`
98
+ - PASS + low test coverage → `/quality-test-gen {phase}`
99
+ - WARN → `/quality-test {phase}` (proceed with caveats)
100
+ - BLOCK → `/maestro-plan {phase} --gaps` (fix critical findings first)
101
101
  </execution>
102
102
 
103
103
  <error_codes>
@@ -31,14 +31,14 @@ $ARGUMENTS -- optional flags:
31
31
  Follow '~/.maestro/workflows/sync.md' completely.
32
32
 
33
33
  **Next-step routing on completion:**
34
- - Docs refreshed → Skill({ skill: "manage-status" })
35
- - Major structural changes detected → Skill({ skill: "manage-codebase-rebuild" }) (full rebuild recommended)
34
+ - Docs refreshed → `/manage-status`
35
+ - Major structural changes detected → `/manage-codebase-rebuild` (full rebuild recommended)
36
36
  </execution>
37
37
 
38
38
  <error_codes>
39
39
  | Code | Severity | Condition | Recovery |
40
40
  |------|----------|-----------|----------|
41
- | E001 | error | .workflow/ not initialized | Suggest running Skill({ skill: "maestro-init" }) first|
41
+ | E001 | error | .workflow/ not initialized | Suggest running `/maestro-init` first|
42
42
  | W001 | warning | No changes detected since last sync | Report clean state, skip updates |
43
43
  </error_codes>
44
44
 
@@ -46,10 +46,10 @@ Context files:
46
46
  Follow '~/.maestro/workflows/test-gen.md' completely.
47
47
 
48
48
  **Next-step routing on completion:**
49
- - All tests pass → Skill({ skill: "quality-test", args: "{phase}" })
50
- - Bugs discovered (failing tests) → Skill({ skill: "quality-debug", args: "{phase}" })
51
- - Regressions in existing tests → Skill({ skill: "quality-debug", args: "{phase}" })
52
- - Coverage still low → Skill({ skill: "quality-test-gen", args: "{phase} --layer {missing_layer}" })
49
+ - All tests pass → `/quality-test {phase}`
50
+ - Bugs discovered (failing tests) → `/quality-debug {phase}`
51
+ - Regressions in existing tests → `/quality-debug {phase}`
52
+ - Coverage still low → `/quality-test-gen {phase} --layer {missing_layer}`
53
53
  </execution>
54
54
 
55
55
  <error_codes>
@@ -55,22 +55,22 @@ Follow '~/.maestro/workflows/test.md' completely.
55
55
  - When review.json verdict is "BLOCK" and review-finding tests fail, auto-enter gap-fix loop without user confirmation (Step 12 auto-fix condition)
56
56
 
57
57
  **Next-step routing on completion:**
58
- - All tests pass → Skill({ skill: "maestro-phase-transition", args: "{phase}" })
59
- - Issues found, --auto-fix ran and succeeded → Skill({ skill: "maestro-verify", args: "{phase}" })
60
- - Issues found, --auto-fix ran but gaps remain → Skill({ skill: "quality-debug", args: "--from-uat {phase}" })
61
- - Issues found, manual fix needed → Skill({ skill: "quality-debug", args: "--from-uat {phase}" })
62
- - Coverage below threshold → Skill({ skill: "quality-test-gen", args: "{phase}" })
63
- - Need integration tests → Skill({ skill: "quality-integration-test", args: "{phase}" })
58
+ - All tests pass → `/maestro-phase-transition {phase}`
59
+ - Issues found, --auto-fix ran and succeeded → `/maestro-verify {phase}`
60
+ - Issues found, --auto-fix ran but gaps remain → `/quality-debug --from-uat {phase}`
61
+ - Issues found, manual fix needed → `/quality-debug --from-uat {phase}`
62
+ - Coverage below threshold → `/quality-test-gen {phase}`
63
+ - Need integration tests → `/quality-integration-test {phase}`
64
64
  </execution>
65
65
 
66
66
  <error_codes>
67
67
  | Code | Severity | Condition | Recovery |
68
68
  |------|----------|-----------|----------|
69
69
  | E001 | error | Phase or task target required (no active sessions) | Prompt user for phase number |
70
- | E002 | error | Phase not verified yet (no verification.json) | Suggest Skill({ skill: "maestro-verify" }) first |
71
- | E003 | error | Smoke test failed (app won't start) | Suggest Skill({ skill: "quality-debug" }) |
70
+ | E002 | error | Phase not verified yet (no verification.json) | Suggest `/maestro-verify` first |
71
+ | E003 | error | Smoke test failed (app won't start) | Suggest `/quality-debug` |
72
72
  | W001 | warning | One or more test scenarios failed | Auto-diagnose, suggest fix options |
73
- | W002 | warning | Coverage below threshold | Suggest Skill({ skill: "quality-test-gen" }) |
73
+ | W002 | warning | Coverage below threshold | Suggest `/quality-test-gen` |
74
74
  </error_codes>
75
75
 
76
76
  <success_criteria>
@@ -43,7 +43,7 @@ Follow '~/.maestro/workflows/specs-add.md' completely.
43
43
  | Code | Severity | Description | Stage |
44
44
  |------|----------|-------------|-------|
45
45
  | E001 | fatal | Category and content are both required -- usage: `<type> <content>` | parse_input |
46
- | E002 | fatal | `.workflow/specs/` not initialized -- run Skill({ skill: "spec-setup" }) first | validate_entry |
46
+ | E002 | fatal | `.workflow/specs/` not initialized -- run `/spec-setup` first | validate_entry |
47
47
  | E003 | fatal | Invalid category -- must be one of: bug, pattern, decision, rule, debug, test, review, validation | parse_input |
48
48
  </error_codes>
49
49
 
@@ -52,5 +52,5 @@ Follow '~/.maestro/workflows/specs-add.md' completely.
52
52
  - [ ] Entry appended to `.workflow/specs/learnings.md` with timestamp
53
53
  - [ ] Relevant spec file updated (if type is pattern/decision/rule)
54
54
  - [ ] Confirmation report displayed
55
- - [ ] Next step: Skill({ skill: "spec-load", args: "--category {type}" }) to verify, or continue current task
55
+ - [ ] Next step: `/spec-load --category {type}` to verify, or continue current task
56
56
  </success_criteria>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: spec-load
3
- description: Load relevant specs for current context (used by agents before execution)
4
- argument-hint: "[--category <type>] [keyword]"
3
+ description: Load relevant specs and lessons for current context (used by agents before execution)
4
+ argument-hint: "[--category <type>] [--with-lessons] [keyword]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Bash
@@ -36,6 +36,9 @@ $ARGUMENTS -- optional `--category <type>` flag and/or keyword to filter specs
36
36
 
37
37
  **Keyword:** If provided, search within loaded files for matching sections.
38
38
  If no arguments, loads all specs for the active phase/task context.
39
+
40
+ **Flags:**
41
+ - `--with-lessons` — Also search `.workflow/learning/lessons.jsonl` for entries with `category: "gotcha"`, `"antipattern"`, or `"pattern"` relevant to the keyword or current context. Appends matched lessons after spec output. This bridges the gap between specs (prescriptive rules) and lessons (discovered knowledge).
39
42
  </context>
40
43
 
41
44
  <execution>
@@ -45,7 +48,7 @@ Follow '~/.maestro/workflows/specs-load.md' completely.
45
48
  <error_codes>
46
49
  | Code | Severity | Description | Stage |
47
50
  |------|----------|-------------|-------|
48
- | E001 | fatal | `.workflow/specs/` not initialized -- run Skill({ skill: "spec-setup" }) first | detect_context |
51
+ | E001 | fatal | `.workflow/specs/` not initialized -- run `/spec-setup` first | detect_context |
49
52
  | W001 | warning | No matching specs found for keyword -- showing all specs in category instead | load_specs |
50
53
  </error_codes>
51
54
 
@@ -53,6 +56,8 @@ Follow '~/.maestro/workflows/specs-load.md' completely.
53
56
  - [ ] Category filter parsed correctly (or defaults to all)
54
57
  - [ ] Spec files resolved and read
55
58
  - [ ] Keyword filtering applied if provided
59
+ - [ ] If `--with-lessons`: lessons.jsonl searched for gotcha/antipattern/pattern entries matching context
60
+ - [ ] If `--with-lessons`: matched lessons displayed after specs (max 10, newest first)
56
61
  - [ ] Results displayed with file:line references
57
62
  - [ ] Relevant specs loaded into agent context
58
63
  - [ ] Next step: proceed with current task using loaded specs as context
@@ -27,7 +27,7 @@ All output lands in `.workflow/specs/` and `.workflow/project-tech.json`.
27
27
  $ARGUMENTS (no arguments expected)
28
28
 
29
29
  **Preconditions:**
30
- - `.workflow/` directory must exist (created by Skill({ skill: "maestro-init" })) # (see code: E001)
30
+ - `.workflow/` directory must exist (created by `/maestro-init`) # (see code: E001)
31
31
  - Project must contain source files to scan # (see code: E002)
32
32
  </context>
33
33
 
@@ -38,7 +38,7 @@ Follow '~/.maestro/workflows/specs-setup.md' completely.
38
38
  <error_codes>
39
39
  | Code | Severity | Description | Stage |
40
40
  |------|----------|-------------|-------|
41
- | E001 | fatal | `.workflow/` directory not initialized -- run Skill({ skill: "maestro-init" }) first | parse_input |
41
+ | E001 | fatal | `.workflow/` directory not initialized -- run `/maestro-init` first | parse_input |
42
42
  | E002 | fatal | No source files found in project -- nothing to scan | scan_codebase |
43
43
  | W001 | warning | Convention detection uncertain for one or more categories -- marked `[UNCERTAIN]` | generate_specs |
44
44
  </error_codes>
@@ -51,7 +51,7 @@ Follow '~/.maestro/workflows/specs-setup.md' completely.
51
51
  - [ ] `learnings.md` initialized with format instructions
52
52
  - [ ] `project-tech.json` written with detected tech stack
53
53
  - [ ] Report displayed with summary and next steps:
54
- - Build codebase docs → Skill({ skill: "manage-codebase-rebuild" })
55
- - Load specs for task → Skill({ skill: "spec-load" })
56
- - Add new knowledge → Skill({ skill: "spec-add", args: "<type> <content>" })
54
+ - Build codebase docs → `/manage-codebase-rebuild`
55
+ - Load specs for task → `/spec-load`
56
+ - Add new knowledge → `/spec-add <type> <content>`
57
57
  </success_criteria>
@@ -137,15 +137,15 @@ After all updates:
137
137
  3. Display summary
138
138
 
139
139
  **Next-step routing:**
140
- - Generate knowledge digest → `Skill({ skill: "wiki-digest", args: "<topic>" })`
141
- - Follow-along on orphan → `Skill({ skill: "learn-follow", args: "<wiki-id>" })`
140
+ - Generate knowledge digest → `/wiki-digest <topic>`
141
+ - Follow-along on orphan → `/learn-follow <wiki-id>`
142
142
  - View full graph → `maestro wiki graph`
143
143
  </execution>
144
144
 
145
145
  <error_codes>
146
146
  | Code | Severity | Condition | Recovery |
147
147
  |------|----------|-----------|----------|
148
- | E001 | error | No wiki entries found (empty index) | Initialize wiki content first, or run `Skill({ skill: "maestro-init" })` |
148
+ | E001 | error | No wiki entries found (empty index) | Initialize wiki content first, or run `/maestro-init` |
149
149
  | E002 | error | `maestro wiki` CLI not available | Check maestro installation |
150
150
  | W001 | warning | No connection candidates found above threshold | Lower --min-similarity or check if graph is already well-connected |
151
151
  | W002 | warning | Some wiki update calls failed during --fix | Partial application; retry failed entries manually |
@@ -17,6 +17,10 @@ Knowledge synthesis command that generates actionable digests from the wiki know
17
17
  Unlike `maestro wiki list` which shows raw entries, this command synthesizes and interprets the knowledge base, producing a curated summary with gap analysis and recommended next actions.
18
18
  </purpose>
19
19
 
20
+ <deferred_reading>
21
+ - @~/.maestro/workflows/issue.md (issues.jsonl canonical schema for `--create-issues` routing)
22
+ </deferred_reading>
23
+
20
24
  <context>
21
25
  Arguments: $ARGUMENTS
22
26
 
@@ -29,10 +33,12 @@ Arguments: $ARGUMENTS
29
33
  **Flags:**
30
34
  - `--format brief` — Compact summary, one paragraph per theme (default)
31
35
  - `--format full` — Detailed digest with per-entry summaries and full gap analysis
36
+ - `--create-issues` — Auto-create `type: "knowledge-gap"` entries in `.workflow/issues/issues.jsonl` for each identified gap (closes the discovery→action loop)
32
37
 
33
38
  **Storage written:**
34
39
  - `.workflow/learning/digest-{slug}-{YYYY-MM-DD}.md` — Digest document
35
40
  - `.workflow/learning/lessons.jsonl` — Meta-insights about knowledge structure (source: "wiki-digest")
41
+ - `.workflow/issues/issues.jsonl` — Knowledge-gap issues (only when `--create-issues`)
36
42
 
37
43
  **Storage read (via maestro wiki CLI, offline mode):**
38
44
  - `maestro wiki list --json` — All entries (or filtered)
@@ -139,7 +145,24 @@ Produce `.workflow/learning/digest-{slug}-{date}.md`:
139
145
  2. ...
140
146
  ```
141
147
 
142
- ### Stage 7: Persist
148
+ ### Stage 7: Gap → Issue Routing (if --create-issues)
149
+ For each knowledge gap identified in Stage 5:
150
+ 1. Check `.workflow/issues/issues.jsonl` for existing gap with same theme + type
151
+ 2. If not duplicate, append to `issues.jsonl` using the canonical schema from `~/.maestro/workflows/issue.md` Step 4:
152
+ - `id`: `ISS-XXXXXXXX-NNN` format (8 hex hash + sequence)
153
+ - `title`: "Knowledge gap: {gap description}"
154
+ - `type`: "knowledge-gap"
155
+ - `status`: "open"
156
+ - `severity`: "low"
157
+ - `priority`: "low"
158
+ - `source`: "wiki-digest"
159
+ - `description`: "Theme: {theme}, Missing type: {type}. Suggested action: {action}"
160
+ - `tags`: ["knowledge-gap", "{theme-slug}"]
161
+ - `created`: ISO date
162
+ - `issue_history`: initial entry with `action: "created"`, `by: "wiki-digest"`, `timestamp`
163
+ 3. Report created issue count
164
+
165
+ ### Stage 8: Persist
143
166
  1. Write digest file
144
167
  2. Append meta-insights to `lessons.jsonl`:
145
168
  - `source: "wiki-digest"`, `category: "technique"`
@@ -148,10 +171,11 @@ Produce `.workflow/learning/digest-{slug}-{date}.md`:
148
171
  4. Display summary with key findings
149
172
 
150
173
  **Next-step routing:**
151
- - Deep dive on a theme → `Skill({ skill: "learn-follow", args: "<wiki-id>" })`
152
- - Fix graph gaps → `Skill({ skill: "wiki-connect", args: "--fix" })`
153
- - Decompose code for missing patterns → `Skill({ skill: "learn-decompose", args: "<path>" })`
174
+ - Deep dive on a theme → `/learn-follow <wiki-id>`
175
+ - Fix graph gaps → `/wiki-connect --fix`
176
+ - Decompose code for missing patterns → `/learn-decompose <path>`
154
177
  - Create missing entries → `maestro wiki create --type <type> --slug <slug>`
178
+ - Triage gap issues → `/manage-issue list --source wiki-digest`
155
179
  </execution>
156
180
 
157
181
  <error_codes>
@@ -172,9 +196,10 @@ Produce `.workflow/learning/digest-{slug}-{date}.md`:
172
196
  - [ ] Cross-reference with lessons.jsonl completed
173
197
  - [ ] Coverage heatmap generated (type × theme matrix)
174
198
  - [ ] Knowledge gaps identified with suggested actions
199
+ - [ ] If `--create-issues`: gap issues created in `issues.jsonl` (deduped)
175
200
  - [ ] Digest written to `digest-{slug}-{date}.md`
176
201
  - [ ] Meta-insights appended to `lessons.jsonl`
177
202
  - [ ] `learning-index.json` updated
178
- - [ ] No files modified outside `.workflow/learning/`
203
+ - [ ] No files modified outside `.workflow/learning/` and `.workflow/issues/` (issues only when `--create-issues`)
179
204
  - [ ] Summary displayed with key findings and next-step routing
180
205
  </success_criteria>
@@ -176,17 +176,46 @@ const subjectArg = $ARGUMENTS
176
176
  .replace(/--yes|-y|--continue|--concurrency\s+\d+|-c\s+\d+|-q|--quick/g, '')
177
177
  .trim()
178
178
 
179
- // Detect phase mode vs scratch mode
180
- const isPhaseMode = /^\d+$/.test(subjectArg)
181
- const slug = isPhaseMode
182
- ? `phase${subjectArg}`
183
- : subjectArg.toLowerCase().replace(/[^a-z0-9]+/g, '-').substring(0, 40)
179
+ // Auto-bootstrap state.json if missing
180
+ if (!fileExists('.workflow/state.json')) {
181
+ Bash('mkdir -p .workflow/scratch/')
182
+ writeMinimalStateJson() // { project: null, status: "active", current_milestone: null, artifacts: [] }
183
+ }
184
184
 
185
- const dateStr = getUtc8ISOString().substring(0, 10).replace(/-/g, '')
185
+ // Scope determination (per scratch-milestone-architecture)
186
+ const state = JSON.parse(Read('.workflow/state.json'))
187
+ let scope, slug, phaseNum = null
188
+
189
+ if (subjectArg === '') {
190
+ // No args → milestone-wide
191
+ if (state.current_milestone && fileExists('.workflow/roadmap.md')) {
192
+ scope = 'milestone'
193
+ slug = slugify(state.milestones.find(m => m.id === state.current_milestone)?.name || state.current_milestone)
194
+ } else {
195
+ ERROR('E001: No args and no roadmap — provide topic text or create roadmap first')
196
+ }
197
+ } else if (/^\d+$/.test(subjectArg)) {
198
+ // Phase number
199
+ if (state.current_milestone && fileExists('.workflow/roadmap.md')) {
200
+ scope = 'phase'
201
+ phaseNum = parseInt(subjectArg)
202
+ slug = resolvePhaseSlugFromRoadmap(phaseNum) // parse roadmap.md for phase N slug
203
+ } else {
204
+ ERROR('Phase number requires init + roadmap')
205
+ }
206
+ } else {
207
+ // Text → adhoc or standalone
208
+ slug = subjectArg.toLowerCase().replace(/[^a-z0-9]+/g, '-').substring(0, 40)
209
+ scope = state.current_milestone ? 'adhoc' : 'standalone'
210
+ }
211
+
212
+ const dateStr = getUtc8ISOString().substring(0, 10)
186
213
  const sessionId = `analyze-${slug}-${dateStr}`
187
214
  const sessionFolder = `.workflow/.csv-wave/${sessionId}`
215
+ const scratchDir = `.workflow/scratch/analyze-${slug}-${dateStr}`
188
216
 
189
217
  Bash(`mkdir -p ${sessionFolder}`)
218
+ Bash(`mkdir -p ${scratchDir}`)
190
219
  ```
191
220
 
192
221
  ---
@@ -197,14 +226,13 @@ Bash(`mkdir -p ${sessionFolder}`)
197
226
 
198
227
  **Decomposition Rules**:
199
228
 
200
- 1. **Mode detection**: Number = phase mode (resolve `.workflow/phases/{NN}-{slug}/`), text = scratch mode
201
- 2. **Context loading** (phase mode):
229
+ 1. **Scope detection**: Already determined in Session Initialization (milestone/phase/adhoc/standalone)
230
+ 2. **Context loading** (milestone/phase scope):
202
231
  - Read `.workflow/project.md` -- project vision and constraints
203
232
  - Read `.workflow/roadmap.md` -- phase structure and dependencies
204
- - Read phase `index.json` -- goal, success_criteria
205
- - Read `.brainstorming/guidance-specification.md` (if exists) -- detailed requirements from brainstorm
206
- - Read `.brainstorming/feature-index.json` (if exists) -- feature decomposition
207
- - Read prior phases' `context.md` files -- skip already-decided areas
233
+ - Read `.workflow/state.json` `current_milestone`, `artifacts[]`, `accumulated_context`
234
+ - Find prior analyze artifacts from `state.json.artifacts[]` (type=analyze, same milestone) load their `context.md`
235
+ - Find brainstorm artifacts from `state.json.artifacts[]` (type=brainstorm, same milestone) load `guidance-specification.md`
208
236
  - Load project specs: `maestro spec load --category planning`
209
237
 
210
238
  3. **Quick mode routing**: If QUICK_MODE, generate only wave 3 (synthesis/decide) task in CSV. Skip exploration and scoring.
@@ -457,8 +485,18 @@ IF deferred_items.length > 0:
457
485
  Print: "Created {N} deferred issues for tracking"
458
486
  ```
459
487
 
460
- 7. Update phase `index.json` with analysis status (if phase mode)
461
- 8. Display summary
488
+ 7. **Register artifact in state.json**:
489
+ ```
490
+ Read .workflow/state.json
491
+ next_id = max ANL-NNN + 1 (or 1 if none)
492
+ Push artifact: { id: "ANL-{next_id}", type: "analyze", milestone: current_milestone,
493
+ phase: phaseNum, scope: scope, path: scratchDir (relative to .workflow/),
494
+ status: "completed", depends_on: null, harvested: false,
495
+ created_at: session_start, completed_at: now() }
496
+ Write state.json (atomic)
497
+ ```
498
+ 8. Copy final outputs (context.md, analysis.md, conclusions.json) from CSV session folder to `scratchDir`
499
+ 9. Display summary
462
500
 
463
501
  ---
464
502