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
@@ -0,0 +1,111 @@
1
+ ---
2
+ name: maestro-fork
3
+ description: Create a worktree for milestone-level parallel development, or sync existing worktree with main
4
+ argument-hint: "-m <milestone-number> [--base <branch>] [--sync]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Agent
13
+ - AskUserQuestion
14
+ ---
15
+ <purpose>
16
+ Create a git worktree for an entire milestone, enabling inter-milestone parallel development. All phases within the milestone are owned by the worktree and executed sequentially inside it.
17
+
18
+ Since `.workflow/` is gitignored, this command explicitly copies project context and all milestone phase directories into the worktree. Per-phase parallelism within a milestone is NOT supported.
19
+
20
+ Also supports `--sync` mode to pull latest main branch changes and shared artifacts into an active worktree (prevents source and artifact drift for long-lived worktrees).
21
+
22
+ Produces `.workflow/worktrees.json` registry in the main worktree and `.workflow/worktree-scope.json` marker in the worktree.
23
+ </purpose>
24
+
25
+ <required_reading>
26
+ @~/.maestro/workflows/fork.md
27
+ </required_reading>
28
+
29
+ <deferred_reading>
30
+ - [worktrees.json](~/.maestro/templates/worktrees.json) — read when updating registry
31
+ - [worktree-scope.json](~/.maestro/templates/worktree-scope.json) — read when writing scope marker
32
+ </deferred_reading>
33
+
34
+ <context>
35
+ $ARGUMENTS -- milestone name and optional flags.
36
+
37
+ **Modes:**
38
+
39
+ | Mode | Trigger | Behavior |
40
+ |------|---------|----------|
41
+ | Fork | `-m 2` or `2` | Create worktree for all phases in milestone 2 |
42
+ | Sync | `-m 2 --sync` | Sync existing milestone 2 worktree with main branch |
43
+
44
+ **Flags:**
45
+ - `-m <N>` or bare `<N>`: Milestone number (1-based, maps to `state.json.milestones[]`)
46
+ - `--base <branch>`: Override base branch for worktree creation (default: HEAD)
47
+ - `--sync`: Sync mode — pull main into existing worktree, re-copy shared artifacts
48
+
49
+ **Milestone resolution:** `state.json.milestones[N-1]` → `{name, title, phases: [...]}`
50
+
51
+ **Worktree layout:**
52
+ ```
53
+ .worktrees/m{N}-{slug}/
54
+ ├── .workflow/
55
+ │ ├── worktree-scope.json (scope marker — lists all owned phases)
56
+ │ ├── state.json (scoped to this milestone)
57
+ │ ├── project.md (read-only copy)
58
+ │ ├── roadmap.md (read-only copy)
59
+ │ ├── config.json (read-only copy)
60
+ │ ├── specs/ (read-only copy)
61
+ │ └── phases/
62
+ │ ├── {NN}-{slug}/ (owned — all phases in milestone)
63
+ │ └── {dep}-{dep-slug}/ (read-only dependency reference from prior milestones)
64
+ └── <source code> (git worktree checkout)
65
+ ```
66
+ </context>
67
+
68
+ <execution>
69
+ Follow '~/.maestro/workflows/fork.md' completely.
70
+
71
+ **Next-step routing on completion:**
72
+
73
+ Fork mode:
74
+ - Enter worktree → `cd {wt.path} && /maestro-analyze {first_phase}`
75
+ - Automated → `maestro delegate "run full lifecycle for milestone" --cd {wt.path} --mode write`
76
+ - Status → Skill({ skill: "manage-status" })
77
+
78
+ Sync mode:
79
+ - Sync complete → resume work in worktree
80
+ - Conflicts found → resolve manually, then retry
81
+ </execution>
82
+
83
+ <error_codes>
84
+ | Code | Severity | Condition | Recovery |
85
+ |------|----------|-----------|----------|
86
+ | E001 | error | Project not initialized | Run maestro-init first |
87
+ | E002 | error | No roadmap found | Run maestro-roadmap first |
88
+ | E003 | error | Running inside a worktree | Run from main worktree |
89
+ | E004 | error | No milestone number provided | Provide `-m <N>` |
90
+ | E005 | error | No milestones defined in state.json | Run maestro-roadmap first |
91
+ | E006 | error | Milestone number out of range | Check available milestones |
92
+ | E007 | error | No active worktree for milestone (--sync) | Check worktrees.json |
93
+ | E008 | error | Milestone already has active worktree | Merge or cleanup first |
94
+ </error_codes>
95
+
96
+ <success_criteria>
97
+ Fork mode:
98
+ - [ ] Milestone phases identified from roadmap
99
+ - [ ] Git worktree created with branch (`milestone/{slug}`)
100
+ - [ ] `.workflow/` context copied into worktree (all milestone phases + dependency phases)
101
+ - [ ] `worktree-scope.json` written with all owned phase numbers
102
+ - [ ] Scoped `state.json` written (current_phase = first pending phase)
103
+ - [ ] `worktrees.json` registry updated in main worktree
104
+ - [ ] Milestone phase indexes marked as "forked" in main worktree
105
+ - [ ] Summary displayed with next-step commands
106
+
107
+ Sync mode:
108
+ - [ ] Git merge main into worktree branch
109
+ - [ ] Shared artifacts re-copied (project.md, roadmap.md, config.json, specs/)
110
+ - [ ] Conflicts reported if any
111
+ </success_criteria>
@@ -48,13 +48,13 @@ Created:
48
48
  .workflow/specs/
49
49
 
50
50
  Next steps (choose one path to create roadmap):
51
- Skill({ skill: "maestro-spec-generate", args: "<idea>" }) -- Full spec package + roadmap (heavy)
52
- Skill({ skill: "maestro-roadmap", args: "<requirement>" }) -- Direct interactive roadmap (light)
51
+ /maestro-spec-generate <idea> -- Full spec package + roadmap (heavy)
52
+ /maestro-roadmap <requirement> -- Direct interactive roadmap (light)
53
53
 
54
54
  Other commands:
55
- Skill({ skill: "manage-status" }) -- View project dashboard
56
- Skill({ skill: "maestro-brainstorm", args: "<topic>" }) -- Explore ideas first
57
- Skill({ skill: "maestro-quick", args: "<task>" }) -- Quick ad-hoc task
55
+ /manage-status -- View project dashboard
56
+ /maestro-brainstorm <topic> -- Explore ideas first
57
+ /maestro-quick <task> -- Quick ad-hoc task
58
58
  ```
59
59
  </execution>
60
60
 
@@ -70,7 +70,7 @@ Other commands:
70
70
  <success_criteria>
71
71
  - [ ] Deep questioning completed (threads followed, not rushed) — or extracted from document/brainstorm
72
72
  - [ ] `.workflow/project.md` created with Core Value, Requirements (Validated/Active/Out of Scope), Key Decisions
73
- - [ ] `.workflow/state.json` created and initialized to idle state
73
+ - [ ] `.workflow/state.json` created with artifacts[] array, initialized to idle state
74
74
  - [ ] `.workflow/config.json` created with user-selected granularity, workflow agents, gate preferences
75
75
  - [ ] `.workflow/specs/` initialized with convention files
76
76
  - [ ] Research completed (if enabled) — 4 parallel agents spawned
@@ -0,0 +1,77 @@
1
+ ---
2
+ name: maestro-merge
3
+ description: Two-phase merge of milestone worktree branch back — git merge first, artifact sync only on success
4
+ argument-hint: "-m <milestone-number> [--force] [--dry-run] [--no-cleanup] [--continue]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Agent
13
+ - AskUserQuestion
14
+ ---
15
+ <purpose>
16
+ Merge a completed milestone worktree branch back into the main branch, sync workflow artifacts for all phases, and reconcile project state. Uses a two-phase approach: git merge first (source code), artifact sync second (only after git succeeds). This prevents partial state corruption when merge conflicts occur.
17
+
18
+ Includes registry health check, pre-merge rebase (pull main into worktree to minimize conflicts), and atomic state reconciliation (patch, don't overwrite).
19
+ </purpose>
20
+
21
+ <required_reading>
22
+ @~/.maestro/workflows/merge.md
23
+ </required_reading>
24
+
25
+ <context>
26
+ $ARGUMENTS -- milestone name and optional flags.
27
+
28
+ **Flags:**
29
+ - `-m <N>` or bare `<N>`: Milestone number (1-based, maps to registry)
30
+ - `--force`: Merge even if not all phases are completed
31
+ - `--dry-run`: Show what would be merged without executing
32
+ - `--no-cleanup`: Keep worktree and branch after merge (for inspection)
33
+ - `--continue`: Resume a merge that was paused due to git conflict
34
+
35
+ **Merge sequence:**
36
+ 1. Registry health check (remove stale entries)
37
+ 2. Validate phase readiness across all owned phases
38
+ 3. Pre-merge rebase (`git merge main` in worktree)
39
+ 4. Phase 1: Git merge (source code only)
40
+ 5. Phase 2: Artifact sync (only after git merge succeeds)
41
+ 6. Atomic state reconciliation
42
+ 7. Cleanup (worktree remove + branch delete)
43
+
44
+ **Conflict handling:**
45
+ If git merge fails, the command saves state to `.workflow/.merge-state.json` and exits. User resolves conflicts, then runs `maestro-merge --continue` to resume artifact sync.
46
+ </context>
47
+
48
+ <execution>
49
+ Follow '~/.maestro/workflows/merge.md' completely.
50
+
51
+ **Next-step routing on completion:**
52
+ - View dashboard → Skill({ skill: "manage-status" })
53
+ - Audit milestone → Skill({ skill: "maestro-milestone-audit" })
54
+ </execution>
55
+
56
+ <error_codes>
57
+ | Code | Severity | Condition | Recovery |
58
+ |------|----------|-----------|----------|
59
+ | E001 | error | Running inside a worktree | Run from main worktree |
60
+ | E002 | error | No worktree registry found | Nothing to merge |
61
+ | E003 | error | --continue but no merge state | Start fresh merge |
62
+ | E004 | error | No milestone number provided | Provide `-m <N>` |
63
+ | W001 | warning | Stale registry entries found | Auto-cleaned |
64
+ | W002 | warning | Incomplete phases (without --force) | Confirm or use --force |
65
+ | W003 | warning | Conflict pulling main into worktree | Resolve in worktree first |
66
+ </error_codes>
67
+
68
+ <success_criteria>
69
+ - [ ] Registry health check passed (stale entries cleaned)
70
+ - [ ] Pre-merge rebase successful (worktree has latest main)
71
+ - [ ] Git merge completed without conflicts (or conflicts resolved via --continue)
72
+ - [ ] All owned phase artifacts synced to main `.workflow/phases/`
73
+ - [ ] `state.json` reconciled (phases_summary, accumulated_context, transition_history patched)
74
+ - [ ] `roadmap.md` completed phases marked
75
+ - [ ] Worktree removed and branch deleted (unless --no-cleanup)
76
+ - [ ] Registry updated (entry removed)
77
+ </success_criteria>
@@ -1,60 +1,72 @@
1
- ---
2
- name: maestro-milestone-audit
3
- description: Audit current milestone for cross-phase integration gaps
4
- argument-hint: "[<milestone>]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Bash
9
- - Glob
10
- - Grep
11
- - Agent
12
- - AskUserQuestion
13
- ---
14
-
15
- <purpose>
16
- Audit milestone completion with cross-phase integration checks. Identifies which phases belong to the milestone, spawns a workflow-integration-checker agent to validate that all phases work together correctly (shared interfaces, data contracts, dependency chains), and produces an audit report with gap analysis and fix suggestions.
17
- </purpose>
18
-
19
- <required_reading>
20
- @~/.maestro/workflows/milestone-audit.md
21
- </required_reading>
22
-
23
- <context>
24
- Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json).
25
-
26
- **Requires:** All phases in the milestone should be completed or verifying.
27
-
28
- **State files:**
29
- - `.workflow/state.json` -- current_milestone, phases_completed
30
- - `.workflow/roadmap.md` -- milestone-to-phase mapping
31
- - `.workflow/phases/{NN}-{slug}/index.json` -- phase metadata per phase
32
- - `.workflow/phases/{NN}-{slug}/verification.json` -- phase verification results
33
- </context>
34
-
35
- <execution>
36
- Follow '~/.maestro/workflows/milestone-audit.md' completely.
37
-
38
- **Next-step routing on completion:**
39
- - Verdict PASS → Skill({ skill: "maestro-milestone-complete", args: "{milestone}" })
40
- - Verdict FAIL, integration gaps → Skill({ skill: "maestro-plan", args: "{affected_phase} --gaps" })
41
- - Verdict FAIL, incomplete phases → Skill({ skill: "maestro-execute", args: "{incomplete_phase}" })
42
- - Gaps fixed, need re-audit → Skill({ skill: "maestro-milestone-audit", args: "{milestone}" })
43
- </execution>
44
-
45
- <error_codes>
46
- | Code | Severity | Condition | Recovery |
47
- |------|----------|-----------|----------|
48
- | E001 | error | Milestone identifier required | Check arguments format, re-run with correct input |
49
- | E002 | error | Milestone not found in roadmap | Check arguments format, re-run with correct input |
50
- | E003 | error | Phases incomplete for this milestone | Complete remaining phases before audit |
51
- | W001 | warning | Phase lacks completed_at — may not have been formally transitioned | Run phase-transition for the phase first |
52
- </error_codes>
53
-
54
- <success_criteria>
55
- - [ ] All phases in milestone identified and status checked
56
- - [ ] Integration check completed via workflow-integration-checker agent
57
- - [ ] Audit report written with gap analysis and fix suggestions
58
- - [ ] Cross-phase integration issues identified and categorized
59
- - [ ] Clear verdict (PASS/FAIL) with next-step routing
60
- </success_criteria>
1
+ ---
2
+ name: maestro-milestone-audit
3
+ description: Audit current milestone for cross-phase integration gaps
4
+ argument-hint: "[<milestone>]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - Agent
12
+ - AskUserQuestion
13
+ ---
14
+
15
+ <purpose>
16
+ Audit milestone completion using the artifact registry. Checks:
17
+ 1. Phase coverage — every phase in roadmap has plan + execute artifacts (completed)
18
+ 2. Ad-hoc completeness — all adhoc artifacts are completed (or explicitly skipped)
19
+ 3. Execution completeness — all tasks in executed plans are completed
20
+ 4. Cross-artifact integration — interfaces, data contracts, configuration consistency
21
+
22
+ Data source: `state.json.artifacts[]` filtered by current milestone.
23
+ Produces audit report at `.workflow/milestones/{milestone}/audit-report.md`.
24
+ </purpose>
25
+
26
+ <required_reading>
27
+ @~/.maestro/workflows/milestone-audit.md
28
+ </required_reading>
29
+
30
+ <context>
31
+ Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json).
32
+
33
+ **Requires:** All phases in the milestone should have completed execute artifacts.
34
+
35
+ **Data source:**
36
+ - `.workflow/state.json` — artifacts[], current_milestone, milestones[]
37
+ - `.workflow/roadmap.md` — milestone-to-phase mapping
38
+ - Plan scratch dirs — for task status verification
39
+ </context>
40
+
41
+ <execution>
42
+ Follow '~/.maestro/workflows/milestone-audit.md' completely.
43
+
44
+ **Audit checklist (from architecture):**
45
+ 1. Phase coverage: each phase in roadmap has analyze → plan → execute chain
46
+ 2. Ad-hoc completeness: all adhoc artifacts completed or skipped
47
+ 3. Execution completeness: all tasks in executed plans completed
48
+ 4. Cross-artifact integration: interface compatibility, data contracts, config consistency
49
+
50
+ **Next-step routing on completion:**
51
+ - Verdict PASS `/maestro-milestone-complete {milestone}`
52
+ - Verdict FAIL, integration gaps → `/maestro-plan --gaps`
53
+ - Verdict FAIL, incomplete execution → `/maestro-execute`
54
+ </execution>
55
+
56
+ <error_codes>
57
+ | Code | Severity | Condition | Recovery |
58
+ |------|----------|-----------|----------|
59
+ | E001 | error | Milestone identifier required | Check arguments format |
60
+ | E002 | error | Milestone not found in state.json | Check milestone ID |
61
+ | E003 | error | No execute artifacts found for milestone | Run maestro-execute first |
62
+ | W001 | warning | Some phases lack complete artifact chains | Review incomplete phases |
63
+ </error_codes>
64
+
65
+ <success_criteria>
66
+ - [ ] All phases in milestone identified from roadmap
67
+ - [ ] Artifact chains verified (ANL→PLN→EXC) per phase
68
+ - [ ] Ad-hoc artifacts checked for completion
69
+ - [ ] Integration check completed (shared interfaces, data contracts)
70
+ - [ ] Audit report written with clear PASS/FAIL verdict
71
+ - [ ] Next-step routing provided
72
+ </success_criteria>
@@ -1,59 +1,67 @@
1
- ---
2
- name: maestro-milestone-complete
3
- description: Archive completed milestone and prepare for next
4
- argument-hint: "[<milestone>]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Bash
9
- - Glob
10
- - Grep
11
- - Agent
12
- - AskUserQuestion
13
- ---
14
-
15
- <purpose>
16
- Mark a milestone as complete after its audit has passed. Validates that the audit report exists and shows a passing verdict, archives the milestone by updating state.json, generates a milestone summary document capturing key outcomes and learnings, and prepares the project state for the next milestone.
17
- </purpose>
18
-
19
- <required_reading>
20
- @~/.maestro/workflows/milestone-complete.md
21
- </required_reading>
22
-
23
- <context>
24
- Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json).
25
-
26
- **Requires:** Skill({ skill: "maestro-milestone-audit" }) should have passed (all phases completed, no integration gaps).
27
-
28
- **State files:**
29
- - `.workflow/state.json` -- current_milestone, milestones array
30
- - `.workflow/roadmap.md` -- milestone structure
31
- - `.workflow/milestones/{milestone}/audit-report.md` -- audit results
32
- </context>
33
-
34
- <execution>
35
- Follow '~/.maestro/workflows/milestone-complete.md' completely.
36
-
37
- **Next-step routing on completion:**
38
- - Cut a release for this milestone → Skill({ skill: "maestro-milestone-release" })
39
- - Next milestone has phases → Skill({ skill: "maestro-plan", args: "{next_milestone_first_phase}" })
40
- - Need to capture learnings → Skill({ skill: "manage-memory-capture", args: "compact" })
41
- - View updated project stateSkill({ skill: "manage-status" })
42
- </execution>
43
-
44
- <error_codes>
45
- | Code | Severity | Condition | Recovery |
46
- |------|----------|-----------|----------|
47
- | E001 | error | Milestone identifier required | Check arguments format, re-run with correct input |
48
- | E002 | error | Audit not passed (report missing or verdict FAIL) | Run maestro-milestone-audit first |
49
- | E003 | error | Incomplete phases remain in this milestone | Complete remaining phases before milestone completion |
50
- </error_codes>
51
-
52
- <success_criteria>
53
- - [ ] Audit report verified as PASS before proceeding
54
- - [ ] Milestone marked complete in state.json with timestamp
55
- - [ ] Milestone summary generated with outcomes and learnings
56
- - [ ] Roadmap snapshot saved to milestones directory
57
- - [ ] project.md Context updated with milestone summary and key learnings
58
- - [ ] state.json updated with next milestone as current
59
- </success_criteria>
1
+ ---
2
+ name: maestro-milestone-complete
3
+ description: Archive completed milestone and prepare for next
4
+ argument-hint: "[<milestone>]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - Agent
12
+ - AskUserQuestion
13
+ ---
14
+
15
+ <purpose>
16
+ Mark a milestone as complete after its audit has passed. Archives all scratch artifacts to `milestones/{M}/artifacts/`, moves artifact entries from `state.json.artifacts[]` to `milestone_history`, extracts final learnings, and advances to the next milestone.
17
+ </purpose>
18
+
19
+ <required_reading>
20
+ @~/.maestro/workflows/milestone-complete.md
21
+ </required_reading>
22
+
23
+ <context>
24
+ Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json).
25
+
26
+ **Requires:** `/maestro-milestone-audit` should have passed.
27
+
28
+ **State files:**
29
+ - `.workflow/state.json` artifacts[], milestones[], current_milestone, milestone_history[]
30
+ - `.workflow/roadmap.md` milestone structure
31
+ - `.workflow/milestones/{milestone}/audit-report.md` audit results
32
+ </context>
33
+
34
+ <execution>
35
+ Follow '~/.maestro/workflows/milestone-complete.md' completely.
36
+
37
+ **Archive flow:**
38
+ 1. Validate audit passed + all artifacts completed
39
+ 2. Move scratch dirs to `milestones/{M}/artifacts/`
40
+ 3. Move artifact entries to `milestone_history[M].archived_artifacts`
41
+ 4. Extract learnings from summaries`specs/learnings.md`
42
+ 5. Update state.json: advance to next milestone, clear artifacts[]
43
+ 6. Clean scratch dirs
44
+
45
+ **Next-step routing on completion:**
46
+ - Cut a release → `/maestro-milestone-release`
47
+ - Next milestone `/maestro-analyze` or `/maestro-plan 1`
48
+ - View state `/manage-status`
49
+ </execution>
50
+
51
+ <error_codes>
52
+ | Code | Severity | Condition | Recovery |
53
+ |------|----------|-----------|----------|
54
+ | E001 | error | Milestone identifier required | Check arguments |
55
+ | E002 | error | Audit not passed | Run maestro-milestone-audit first |
56
+ | E003 | error | Incomplete artifacts remain | Complete remaining work first |
57
+ </error_codes>
58
+
59
+ <success_criteria>
60
+ - [ ] Audit report verified as PASS
61
+ - [ ] Scratch artifacts moved to milestones/{M}/artifacts/
62
+ - [ ] Artifact entries archived to milestone_history
63
+ - [ ] Learnings extracted to specs/learnings.md
64
+ - [ ] state.json updated: next milestone as current, artifacts[] cleared
65
+ - [ ] Roadmap snapshot saved
66
+ - [ ] project.md Context updated with milestone summary
67
+ </success_criteria>
@@ -14,7 +14,7 @@ allowed-tools:
14
14
  ---
15
15
 
16
16
  <purpose>
17
- Package a completed milestone into a releasable version. Bumps the project version (e.g. `package.json`, `pyproject.toml`, or language-specific manifest), generates or appends a changelog entry from phase/milestone summaries and git log, creates an annotated git tag, and optionally pushes to the remote. Runs after Skill({ skill: "maestro-milestone-complete" }) has archived the milestone; serves as the final delivery step in the SDLC loop.
17
+ Package a completed milestone into a releasable version. Bumps the project version (e.g. `package.json`, `pyproject.toml`, or language-specific manifest), generates or appends a changelog entry from phase/milestone summaries and git log, creates an annotated git tag, and optionally pushes to the remote. Runs after `/maestro-milestone-complete` has archived the milestone; serves as the final delivery step in the SDLC loop.
18
18
  </purpose>
19
19
 
20
20
  <required_reading>
@@ -39,7 +39,7 @@ $ARGUMENTS -- optional explicit version string and flags.
39
39
  - Version manifest -- `package.json` / `pyproject.toml` / `Cargo.toml` / etc. (auto-detected)
40
40
 
41
41
  **Preconditions:**
42
- - Current milestone must be completed (audit PASS + Skill({ skill: "maestro-milestone-complete" }) run)
42
+ - Current milestone must be completed (audit PASS + `/maestro-milestone-complete` run)
43
43
  - Working tree must be clean (no uncommitted changes) unless `--dry-run`
44
44
  </context>
45
45
 
@@ -65,8 +65,8 @@ Changelog: {N} entries written to CHANGELOG.md
65
65
  Manifest: {file_path} updated
66
66
 
67
67
  Next steps:
68
- Skill({ skill: "maestro-plan", args: "{next_phase}" }) -- Start next milestone's first phase
69
- Skill({ skill: "manage-status" }) -- View project dashboard
68
+ /maestro-plan {next_phase} -- Start next milestone's first phase
69
+ /manage-status -- View project dashboard
70
70
  ```
71
71
 
72
72
  For `--dry-run`, print the computed version, changelog diff, and tag name without side effects.
@@ -75,8 +75,8 @@ For `--dry-run`, print the computed version, changelog diff, and tag name withou
75
75
  <error_codes>
76
76
  | Code | Severity | Condition | Recovery |
77
77
  |------|----------|-----------|----------|
78
- | E001 | error | Current milestone not completed (no milestone-complete run) | Run Skill({ skill: "maestro-milestone-complete" }) first |
79
- | E002 | error | Audit verdict not PASS | Re-run Skill({ skill: "maestro-milestone-audit" }) and resolve findings |
78
+ | E001 | error | Current milestone not completed (no milestone-complete run) | Run `/maestro-milestone-complete` first |
79
+ | E002 | error | Audit verdict not PASS | Re-run `/maestro-milestone-audit` and resolve findings |
80
80
  | E003 | error | Working tree not clean (uncommitted changes) | Commit or stash changes, then retry |
81
81
  | E004 | error | Version manifest not found / unsupported | Add supported manifest or pass `<version>` explicitly with `--no-tag` |
82
82
  | E005 | error | Target version not greater than current (would break semver monotonicity) | Choose a higher version or run with explicit `<version>` |