maestro-flow 0.3.8 → 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 (211) 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 +6 -6
  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 -97
  9. package/.claude/commands/maestro-fork.md +111 -0
  10. package/.claude/commands/maestro-init.md +6 -6
  11. package/.claude/commands/maestro-merge.md +77 -0
  12. package/.claude/commands/maestro-milestone-audit.md +72 -60
  13. package/.claude/commands/maestro-milestone-complete.md +67 -59
  14. package/.claude/commands/maestro-milestone-release.md +6 -6
  15. package/.claude/commands/maestro-plan.md +151 -130
  16. package/.claude/commands/maestro-quick.md +4 -4
  17. package/.claude/commands/maestro-roadmap.md +5 -5
  18. package/.claude/commands/maestro-spec-generate.md +5 -5
  19. package/.claude/commands/maestro-ui-design.md +3 -3
  20. package/.claude/commands/maestro-verify.md +106 -87
  21. package/.claude/commands/maestro.md +10 -4
  22. package/.claude/commands/manage-codebase-rebuild.md +4 -4
  23. package/.claude/commands/manage-codebase-refresh.md +1 -1
  24. package/.claude/commands/manage-harvest.md +5 -5
  25. package/.claude/commands/manage-issue-discover.md +1 -1
  26. package/.claude/commands/manage-issue-execute.md +6 -6
  27. package/.claude/commands/manage-issue.md +6 -6
  28. package/.claude/commands/manage-learn.md +2 -2
  29. package/.claude/commands/manage-memory-capture.md +4 -4
  30. package/.claude/commands/manage-memory.md +2 -2
  31. package/.claude/commands/manage-status.md +24 -24
  32. package/.claude/commands/quality-business-test.md +5 -5
  33. package/.claude/commands/quality-debug.md +4 -4
  34. package/.claude/commands/quality-integration-test.md +4 -4
  35. package/.claude/commands/quality-refactor.md +3 -3
  36. package/.claude/commands/quality-retrospective.md +2 -2
  37. package/.claude/commands/quality-review.md +4 -4
  38. package/.claude/commands/quality-sync.md +3 -3
  39. package/.claude/commands/quality-test-gen.md +4 -4
  40. package/.claude/commands/quality-test.md +9 -9
  41. package/.claude/commands/spec-add.md +2 -2
  42. package/.claude/commands/spec-load.md +1 -1
  43. package/.claude/commands/spec-setup.md +5 -5
  44. package/.claude/commands/wiki-connect.md +3 -3
  45. package/.claude/commands/wiki-digest.md +4 -4
  46. package/.codex/skills/maestro-analyze/SKILL.md +52 -14
  47. package/.codex/skills/maestro-execute/SKILL.md +27 -26
  48. package/.codex/skills/maestro-milestone-audit/SKILL.md +103 -209
  49. package/.codex/skills/maestro-milestone-complete/SKILL.md +149 -158
  50. package/.codex/skills/maestro-plan/SKILL.md +47 -17
  51. package/.codex/skills/maestro-roadmap/SKILL.md +3 -2
  52. package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +2 -2
  53. package/.codex/skills/team-executor/roles/executor/commands/monitor.md +1 -1
  54. package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +2 -2
  55. package/.codex/skills/team-lifecycle-v4/specs/knowledge-transfer.md +2 -2
  56. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +1 -1
  57. package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +1 -1
  58. package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +1 -1
  59. package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +1 -1
  60. package/README.md +19 -14
  61. package/README.zh-CN.md +16 -12
  62. package/bin/maestro-mcp.js +1 -1
  63. package/chains/_intent-map.json +21 -9
  64. package/chains/_router.json +30 -77
  65. package/chains/brainstorm-driven.json +17 -6
  66. package/chains/full-lifecycle.json +22 -23
  67. package/chains/milestone-close.json +20 -7
  68. package/chains/milestone-fork-merge.json +50 -0
  69. package/chains/roadmap-driven.json +17 -6
  70. package/chains/spec-driven.json +17 -6
  71. package/dashboard/dist/assets/{ArtifactsPage-BmPOu8sO.js → ArtifactsPage-DZNCi6tn.js} +12 -7
  72. package/dashboard/dist/assets/ChatInput-Bvr-FeEq.js +49 -0
  73. package/dashboard/dist/assets/ChatPage-D9zTkJZo.js +22 -0
  74. package/dashboard/dist/assets/CollabPage-B4NAHXS2.js +1 -0
  75. package/dashboard/dist/assets/ExecutionPanel-CFt4LJyq.js +1 -0
  76. package/dashboard/dist/assets/KanbanPage-C8USth6H.js +21 -0
  77. package/dashboard/dist/assets/{MarkdownRenderer-BjZ43aSa.js → MarkdownRenderer-X4af_WNb.js} +1 -1
  78. package/dashboard/dist/assets/McpPage-BKfCVIyU.js +21 -0
  79. package/dashboard/dist/assets/OutputPanel-BlBQFJSW.js +1 -0
  80. package/dashboard/dist/assets/ProblemsPanel-De3DLvoI.js +1 -0
  81. package/dashboard/dist/assets/{RequirementBoardPage-B7yRL0s_.js → RequirementBoardPage-Bf1trzqs.js} +2 -2
  82. package/dashboard/dist/assets/{RequirementPage-D8J_-b6O.js → RequirementPage-Bllxe2XI.js} +10 -5
  83. package/dashboard/dist/assets/{SpecsPage-6lO8v8_C.js → SpecsPage-9lwxKT27.js} +2 -2
  84. package/dashboard/dist/assets/{SupervisorPage-Ds5N378a.js → SupervisorPage-SusdfHFq.js} +1 -1
  85. package/dashboard/dist/assets/{TeamsPage-DrkKr17T.js → TeamsPage-DsuM6OwC.js} +2 -2
  86. package/dashboard/dist/assets/TreeBrowser-Q12qobZs.js +6 -0
  87. package/dashboard/dist/assets/WorkflowPage-D_Fzdy3_.js +6 -0
  88. package/dashboard/dist/assets/{arrow-left-CadP5YgU.js → arrow-left-Bqtb2hle.js} +1 -1
  89. package/dashboard/dist/assets/{check-5xufDzS8.js → check-u6fGOwQO.js} +1 -1
  90. package/dashboard/dist/assets/{chevron-right-CYbpR4ev.js → chevron-right-Csu22t58.js} +1 -1
  91. package/dashboard/dist/assets/{circle-Bm-5Q-Yh.js → circle-CMrkbRNg.js} +1 -1
  92. package/dashboard/dist/assets/{circle-alert-BqcYuT7x.js → circle-alert-c3tH1P4z.js} +1 -1
  93. package/dashboard/dist/assets/{circle-check-big-yyzAFysU.js → circle-check-big-TDSeWstm.js} +1 -1
  94. package/dashboard/dist/assets/{circle-check-DEVzW_lm.js → circle-check-gYxxSYuH.js} +1 -1
  95. package/dashboard/dist/assets/{code-BBdC8Wmw.js → code-CFN2uX9V.js} +1 -1
  96. package/dashboard/dist/assets/{columns-3-CQ9Trztr.js → columns-3-38xIDlzy.js} +1 -1
  97. package/dashboard/dist/assets/{download-DayuF-sn.js → download-DC7KkKyP.js} +1 -1
  98. package/dashboard/dist/assets/{folder-CqXeSKeC.js → folder-CWq_lAnf.js} +1 -1
  99. package/dashboard/dist/assets/index-DWG-WrzT.js +231 -0
  100. package/dashboard/dist/assets/{index-Dru5HYy0.js → index-Do71weNR.js} +1 -1
  101. package/dashboard/dist/assets/index-GUNJodSR.css +1 -0
  102. package/dashboard/dist/assets/{list-DBOD6IUt.js → list-CgIP_2A-.js} +1 -1
  103. package/dashboard/dist/assets/{minus-fQI1Syn2.js → minus-DYoN5UGk.js} +1 -1
  104. package/dashboard/dist/assets/{pen-line-Bkbbngl5.js → pen-line-Bh_WKYHm.js} +1 -1
  105. package/dashboard/dist/assets/{proxy-teW12DdZ.js → proxy-BKxDAKTj.js} +1 -1
  106. package/dashboard/dist/assets/{search-Bq3ygFUW.js → search-SieXnOgr.js} +1 -1
  107. package/dashboard/dist/assets/{shallow-22ZN8sFt.js → shallow-Bme1JY57.js} +1 -1
  108. package/dashboard/dist/assets/{table-BEYtdWc4.js → table-llyEtj-7.js} +1 -1
  109. package/dashboard/dist/assets/terminal-BB3Xfuv5.js +6 -0
  110. package/dashboard/dist/assets/{trash-2-DMqGBgcF.js → trash-2-C8f4vFFM.js} +1 -1
  111. package/dashboard/dist/assets/{zap-9DVkGVtt.js → zap-4uwlzVm0.js} +1 -1
  112. package/dashboard/dist/index.html +2 -2
  113. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +8 -4
  114. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
  115. package/dashboard/dist-server/dashboard/src/server/agents/entry-normalizer.d.ts +1 -0
  116. package/dashboard/dist-server/dashboard/src/server/agents/entry-normalizer.js +2 -1
  117. package/dashboard/dist-server/dashboard/src/server/agents/entry-normalizer.js.map +1 -1
  118. package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js +20 -10
  119. package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js.map +1 -1
  120. package/dashboard/dist-server/dashboard/src/server/routes/git.d.ts +2 -0
  121. package/dashboard/dist-server/dashboard/src/server/routes/git.js +79 -0
  122. package/dashboard/dist-server/dashboard/src/server/routes/git.js.map +1 -0
  123. package/dashboard/dist-server/dashboard/src/server/routes/index.js +3 -0
  124. package/dashboard/dist-server/dashboard/src/server/routes/index.js.map +1 -1
  125. package/dashboard/dist-server/dashboard/src/server/routes/workspace.js +43 -0
  126. package/dashboard/dist-server/dashboard/src/server/routes/workspace.js.map +1 -1
  127. package/dashboard/dist-server/dashboard/src/server/state/state-manager.js +43 -3
  128. package/dashboard/dist-server/dashboard/src/server/state/state-manager.js.map +1 -1
  129. package/dashboard/package.json +59 -59
  130. package/dist/src/cli.js +3 -1
  131. package/dist/src/cli.js.map +1 -1
  132. package/dist/src/commands/{team.d.ts → collab.d.ts} +2 -2
  133. package/dist/src/commands/collab.d.ts.map +1 -0
  134. package/dist/src/commands/{team.js → collab.js} +391 -24
  135. package/dist/src/commands/collab.js.map +1 -0
  136. package/dist/src/commands/msg.d.ts.map +1 -1
  137. package/dist/src/commands/msg.js +4 -3
  138. package/dist/src/commands/msg.js.map +1 -1
  139. package/dist/src/hooks/team-monitor.d.ts.map +1 -1
  140. package/dist/src/hooks/team-monitor.js +16 -0
  141. package/dist/src/hooks/team-monitor.js.map +1 -1
  142. package/dist/src/tools/collab-adapter.d.ts +85 -0
  143. package/dist/src/tools/collab-adapter.d.ts.map +1 -0
  144. package/dist/src/tools/collab-adapter.js +320 -0
  145. package/dist/src/tools/collab-adapter.js.map +1 -0
  146. package/dist/src/tools/namespace-guard.d.ts +2 -0
  147. package/dist/src/tools/namespace-guard.d.ts.map +1 -1
  148. package/dist/src/tools/namespace-guard.js +12 -0
  149. package/dist/src/tools/namespace-guard.js.map +1 -1
  150. package/dist/src/tools/phase-gate-evaluator.d.ts +45 -0
  151. package/dist/src/tools/phase-gate-evaluator.d.ts.map +1 -0
  152. package/dist/src/tools/phase-gate-evaluator.js +42 -0
  153. package/dist/src/tools/phase-gate-evaluator.js.map +1 -0
  154. package/dist/src/tools/team-members.d.ts +18 -0
  155. package/dist/src/tools/team-members.d.ts.map +1 -1
  156. package/dist/src/tools/team-members.js +50 -0
  157. package/dist/src/tools/team-members.js.map +1 -1
  158. package/dist/src/tools/team-tasks.d.ts +120 -0
  159. package/dist/src/tools/team-tasks.d.ts.map +1 -0
  160. package/dist/src/tools/team-tasks.js +365 -0
  161. package/dist/src/tools/team-tasks.js.map +1 -0
  162. package/dist/src/tools/transition-recorder.d.ts +3 -0
  163. package/dist/src/tools/transition-recorder.d.ts.map +1 -1
  164. package/dist/src/tools/transition-recorder.js +52 -1
  165. package/dist/src/tools/transition-recorder.js.map +1 -1
  166. package/dist/src/utils/get-version.d.ts.map +1 -1
  167. package/dist/src/utils/get-version.js +15 -4
  168. package/dist/src/utils/get-version.js.map +1 -1
  169. package/package.json +1 -1
  170. package/templates/config.json +7 -0
  171. package/templates/worktree-scope.json +10 -0
  172. package/templates/worktrees.json +27 -0
  173. package/workflows/analyze.md +86 -36
  174. package/workflows/brainstorm.md +17 -37
  175. package/workflows/execute.md +94 -28
  176. package/workflows/fork.md +309 -0
  177. package/workflows/init.md +10 -1
  178. package/workflows/issue.md +66 -7
  179. package/workflows/maestro-coordinate.md +23 -16
  180. package/workflows/maestro.md +52 -35
  181. package/workflows/merge.md +285 -0
  182. package/workflows/milestone-audit.md +89 -70
  183. package/workflows/milestone-complete.md +89 -156
  184. package/workflows/plan.md +122 -17
  185. package/workflows/retrospective.md +3 -3
  186. package/workflows/roadmap.md +11 -3
  187. package/workflows/spec-generate.md +9 -0
  188. package/workflows/status.md +76 -27
  189. package/workflows/ui-design.md +14 -12
  190. package/workflows/verify.md +44 -8
  191. package/.claude/commands/maestro-phase-add.md +0 -63
  192. package/.claude/commands/maestro-phase-transition.md +0 -75
  193. package/.codex/skills/maestro-phase-add/SKILL.md +0 -154
  194. package/.codex/skills/maestro-phase-transition/SKILL.md +0 -173
  195. package/chains/singles/phase-add.json +0 -31
  196. package/chains/singles/phase-transition.json +0 -23
  197. package/dashboard/dist/assets/ChatInput-CL8YDfOU.js +0 -67
  198. package/dashboard/dist/assets/ChatPage-CT-ozBK2.js +0 -8
  199. package/dashboard/dist/assets/CollabPage-C0rWMden.js +0 -1
  200. package/dashboard/dist/assets/KanbanPage-C6WbAlwI.js +0 -16
  201. package/dashboard/dist/assets/McpPage-BPIXADQi.js +0 -16
  202. package/dashboard/dist/assets/TreeBrowser-g_QUKemL.js +0 -11
  203. package/dashboard/dist/assets/WorkflowPage-X8aNkDEr.js +0 -6
  204. package/dashboard/dist/assets/git-branch-SqFf4Ru5.js +0 -6
  205. package/dashboard/dist/assets/index-D2Mtyw7I.css +0 -1
  206. package/dashboard/dist/assets/index-nufWop4p.js +0 -231
  207. package/dashboard/dist/assets/wrench-B84-zdLI.js +0 -11
  208. package/dist/src/commands/team.d.ts.map +0 -1
  209. package/dist/src/commands/team.js.map +0 -1
  210. package/workflows/phase-add.md +0 -252
  211. package/workflows/phase-transition.md +0 -399
@@ -53,5 +53,5 @@ Follow '~/.maestro/workflows/codebase-refresh.md' completely.
53
53
  - [ ] Only affected docs refreshed (selective mapper re-run)
54
54
  - [ ] doc-index.json timestamps updated per affected entry
55
55
  - [ ] state.json updated with codebase_last_refreshed timestamp
56
- - [ ] Next step routing: Skill({ skill: "manage-status" }) or Skill({ skill: "spec-load" }) to use updated docs
56
+ - [ ] Next step routing: `/manage-status` or `/spec-load` to use updated docs
57
57
  </success_criteria>
@@ -89,16 +89,16 @@ Follow '~/.maestro/workflows/harvest.md' Stages 1–8 in order. Key invariants:
89
89
 
90
90
  **Next-step routing on completion:**
91
91
  - Review wiki entries → `maestro wiki list --type note`
92
- - Connect wiki graph → `Skill({ skill: "wiki-connect", args: "--fix" })`
93
- - Triage issues → `Skill({ skill: "manage-issue", args: "list --source harvest" })`
94
- - View specs → `Skill({ skill: "spec-load", args: "--category general" })`
95
- - Full retrospective → `Skill({ skill: "quality-retrospective" })`
92
+ - Connect wiki graph → `/wiki-connect --fix`
93
+ - Triage issues → `/manage-issue list --source harvest`
94
+ - View specs → `/spec-load --category general`
95
+ - Full retrospective → `/quality-retrospective`
96
96
  </execution>
97
97
 
98
98
  <error_codes>
99
99
  | Code | Severity | Condition | Recovery |
100
100
  |------|----------|-----------|----------|
101
- | E001 | error | `.workflow/` not initialized | Run `Skill({ skill: "maestro-init" })` first |
101
+ | E001 | error | `.workflow/` not initialized | Run `/maestro-init` first |
102
102
  | E002 | error | Invalid `--to` target (must be: wiki, spec, issue, auto) | Display valid options |
103
103
  | E003 | error | Invalid `--source` type | Display valid source types from registry |
104
104
  | E004 | error | Session ID not found in any source path | Show available sessions with `--source all` |
@@ -73,5 +73,5 @@ Follow '~/.maestro/workflows/issue-discover.md' completely.
73
73
  - [ ] Findings deduplicated before issue creation
74
74
  - [ ] Issues appended to issues.jsonl with correct schema
75
75
  - [ ] Discovery session fully traceable via session directory
76
- - [ ] Next step routing: Skill({ skill: "manage-issue-analyze", args: "<ISS-ID>" }) for root cause analysis, or Skill({ skill: "manage-issue", args: "list" }) to review all issues
76
+ - [ ] Next step routing: `/manage-issue-analyze <ISS-ID>` for root cause analysis, or `/manage-issue list` to review all issues
77
77
  </success_criteria>
@@ -48,9 +48,9 @@ $ARGUMENTS -- ISS-ID (required) + optional flags.
48
48
  Follow '~/.maestro/workflows/issue-execute.md' completely.
49
49
 
50
50
  **Next-step routing on completion:**
51
- - Execution succeeded → Skill({ skill: "manage-issue", args: "close <ISS-ID> --resolution fixed" })
52
- - Execution failed → Skill({ skill: "quality-debug", args: "<failure description>" }) then retry
53
- - Want verification → Skill({ skill: "maestro-verify", args: "{phase}" })
51
+ - Execution succeeded → `/manage-issue close <ISS-ID> --resolution fixed`
52
+ - Execution failed → `/quality-debug <failure description>` then retry
53
+ - Want verification → `/maestro-verify {phase}`
54
54
  </execution>
55
55
 
56
56
  <error_codes>
@@ -67,7 +67,7 @@ Follow '~/.maestro/workflows/issue-execute.md' completely.
67
67
  - [ ] Solution executed (or dry-run displayed)
68
68
  - [ ] Issue status updated in issues.jsonl (in_progress -> resolved or open on failure)
69
69
  - [ ] Result summary displayed with next-step routing:
70
- - Execution succeeded → Skill({ skill: "manage-issue", args: "close <ISS-ID> --resolution fixed" })
71
- - Execution failed → Skill({ skill: "quality-debug", args: "<failure description>" }) then retry
72
- - Want verification → Skill({ skill: "maestro-verify", args: "{phase}" })
70
+ - Execution succeeded → `/manage-issue close <ISS-ID> --resolution fixed`
71
+ - Execution failed → `/quality-debug <failure description>` then retry
72
+ - Want verification → `/maestro-verify {phase}`
73
73
  </success_criteria>
@@ -48,9 +48,9 @@ Parse subcommand from first token of $ARGUMENTS.
48
48
  Follow '~/.maestro/workflows/issue.md' completely.
49
49
 
50
50
  **Next-step routing on completion:**
51
- - create → Skill({ skill: "manage-issue-analyze", args: "<ISS-ID>" }) or Skill({ skill: "manage-issue-plan", args: "<ISS-ID>" })
52
- - list → Skill({ skill: "manage-issue-analyze", args: "<ISS-ID>" }) for any open issue
53
- - close → Skill({ skill: "manage-status" })
51
+ - create → `/manage-issue-analyze <ISS-ID>` or `/manage-issue-plan <ISS-ID>`
52
+ - list → `/manage-issue-analyze <ISS-ID>` for any open issue
53
+ - close → `/manage-status`
54
54
  </execution>
55
55
 
56
56
  <error_codes>
@@ -67,7 +67,7 @@ Follow '~/.maestro/workflows/issue.md' completely.
67
67
  - [ ] Output displayed in appropriate format (table for list, detail for status)
68
68
  - [ ] Cross-references maintained (link creates bidirectional references)
69
69
  - [ ] Next step routing by subcommand:
70
- - create → Skill({ skill: "manage-issue-analyze", args: "<ISS-ID>" }) or Skill({ skill: "manage-issue-plan", args: "<ISS-ID>" })
71
- - list → Skill({ skill: "manage-issue-analyze", args: "<ISS-ID>" }) for any open issue
72
- - close → Skill({ skill: "manage-status" })
70
+ - create → `/manage-issue-analyze <ISS-ID>` or `/manage-issue-plan <ISS-ID>`
71
+ - list → `/manage-issue-analyze <ISS-ID>` for any open issue
72
+ - close → `/manage-status`
73
73
  </success_criteria>
@@ -69,7 +69,7 @@ Follow `~/.maestro/workflows/learn.md` Stages 1–5 in order. Key invariants:
69
69
  <error_codes>
70
70
  | Code | Severity | Description | Stage |
71
71
  |------|----------|-------------|-------|
72
- | E001 | error | `.workflow/` not initialized — run `Skill({ skill: "maestro-init" })` first | parse_input |
72
+ | E001 | error | `.workflow/` not initialized — run `/maestro-init` first | parse_input |
73
73
  | E002 | error | Unknown `--category` value (allowed: pattern, antipattern, decision, tool, gotcha, technique, tip) | parse_input |
74
74
  | E003 | error | `show` mode requires an INS-id argument | show |
75
75
  | E004 | error | Insight id not found in lessons.jsonl | show |
@@ -88,5 +88,5 @@ Follow `~/.maestro/workflows/learn.md` Stages 1–5 in order. Key invariants:
88
88
  - [ ] Show: full insight displayed with phase context and routed-artifact link if any
89
89
  - [ ] No file modifications outside `.workflow/learning/`
90
90
  - [ ] Confirmation banner displayed with INS-id and next-step hints
91
- - [ ] Next step: `Skill({ skill: "manage-learn", args: "list" })` to browse, or `Skill({ skill: "manage-learn", args: "search <query>" })` to find related insights
91
+ - [ ] Next step: `/manage-learn list` to browse, or `/manage-learn search <query>` to find related insights
92
92
  </success_criteria>
@@ -40,8 +40,8 @@ Follow '~/.maestro/workflows/memory.md' Part B (Memory Capture) completely.
40
40
  <error_codes>
41
41
  | Code | Severity | Description | Stage |
42
42
  |------|----------|-------------|-------|
43
- | E001 | error | `.workflow/` not initialized — run Skill({ skill: "maestro-init" }) first | parse_input |
44
- | E002 | error | Tip mode removed — use `Skill({ skill: "manage-learn", args: "tip <text>" })` instead | parse_input |
43
+ | E001 | error | `.workflow/` not initialized — run `/maestro-init` first | parse_input |
44
+ | E002 | error | Tip mode removed — use `/manage-learn tip <text>` instead | parse_input |
45
45
  | W001 | warning | No active workflow session found — compact will capture conversation only | analyze_session |
46
46
  | W002 | warning | Plan detection found no explicit plan — using inferred plan | analyze_session |
47
47
  </error_codes>
@@ -54,6 +54,6 @@ Follow '~/.maestro/workflows/memory.md' Part B (Memory Capture) completely.
54
54
  - [ ] Execution plan preserved VERBATIM (not summarized)
55
55
  - [ ] All file paths are ABSOLUTE
56
56
  - [ ] Confirmation banner displayed with entry ID
57
- - [ ] Next step: Skill({ skill: "manage-status" }) to resume workflow, or Skill({ skill: "manage-memory", args: "view <entry_id>" }) to verify captured memory
58
- - [ ] For tips: redirect user to `Skill({ skill: "manage-learn", args: "tip <text>" })`
57
+ - [ ] Next step: `/manage-status` to resume workflow, or `/manage-memory view <entry_id>` to verify captured memory
58
+ - [ ] For tips: redirect user to `/manage-learn tip <text>`
59
59
  </success_criteria>
@@ -64,7 +64,7 @@ Follow '~/.maestro/workflows/memory.md' Part A (Memory Management) completely.
64
64
  <error_codes>
65
65
  | Code | Severity | Description | Stage |
66
66
  |------|----------|-------------|-------|
67
- | E001 | error | No memory stores found — run Skill({ skill: "manage-memory-capture" }) or create MEMORY.md | resolve_paths |
67
+ | E001 | error | No memory stores found — run `/manage-memory-capture` or create MEMORY.md | resolve_paths |
68
68
  | E002 | error | Entry ID or filename not found | execute_view, execute_delete |
69
69
  | E003 | error | Prune requires at least one filter (--tag, --type, --before, --after) | execute_prune |
70
70
  | E004 | error | Cannot delete MEMORY.md — use `edit` subcommand instead | execute_delete |
@@ -84,5 +84,5 @@ Follow '~/.maestro/workflows/memory.md' Part A (Memory Management) completely.
84
84
  - [ ] Delete: MEMORY.md protected, confirmation required, references checked
85
85
  - [ ] Prune: workflow-only, filters validated, index updated
86
86
  - [ ] Integrity check catches orphans and broken links
87
- - [ ] Next step: Skill({ skill: "manage-memory-capture", args: "compact" }) to save new memory, or Skill({ skill: "manage-status" }) to continue workflow
87
+ - [ ] Next step: `/manage-memory-capture compact` to save new memory, or `/manage-status` to continue workflow
88
88
  </success_criteria>
@@ -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>
@@ -73,7 +73,7 @@ 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 |
@@ -99,5 +99,5 @@ Follow `~/.maestro/workflows/retrospective.md` Stages 1–8 in order. Key invari
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>
@@ -48,7 +48,7 @@ Follow '~/.maestro/workflows/specs-load.md' completely.
48
48
  <error_codes>
49
49
  | Code | Severity | Description | Stage |
50
50
  |------|----------|-------------|-------|
51
- | 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 |
52
52
  | W001 | warning | No matching specs found for keyword -- showing all specs in category instead | load_specs |
53
53
  </error_codes>
54
54
 
@@ -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 |
@@ -171,11 +171,11 @@ For each knowledge gap identified in Stage 5:
171
171
  4. Display summary with key findings
172
172
 
173
173
  **Next-step routing:**
174
- - Deep dive on a theme → `Skill({ skill: "learn-follow", args: "<wiki-id>" })`
175
- - Fix graph gaps → `Skill({ skill: "wiki-connect", args: "--fix" })`
176
- - 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>`
177
177
  - Create missing entries → `maestro wiki create --type <type> --slug <slug>`
178
- - Triage gap issues → `Skill({ skill: "manage-issue", args: "list --source wiki-digest" })`
178
+ - Triage gap issues → `/manage-issue list --source wiki-digest`
179
179
  </execution>
180
180
 
181
181
  <error_codes>
@@ -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