maestro-flow 0.3.11 → 0.3.12

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 (164) hide show
  1. package/.claude/agents/conceptual-planning-agent.md +1 -0
  2. package/.claude/agents/workflow-analyzer.md +114 -114
  3. package/.claude/agents/workflow-collab-planner.md +144 -144
  4. package/.claude/agents/workflow-debugger.md +102 -103
  5. package/.claude/agents/workflow-executor.md +127 -128
  6. package/.claude/agents/workflow-integration-checker.md +82 -82
  7. package/.claude/agents/workflow-nyquist-auditor.md +85 -84
  8. package/.claude/agents/workflow-phase-researcher.md +85 -85
  9. package/.claude/agents/workflow-plan-checker.md +90 -90
  10. package/.claude/agents/workflow-planner.md +178 -178
  11. package/.claude/agents/workflow-roadmapper.md +81 -83
  12. package/.claude/agents/workflow-verifier.md +119 -119
  13. package/.claude/commands/learn-retro.md +2 -2
  14. package/.claude/commands/learn-second-opinion.md +2 -2
  15. package/.claude/commands/maestro-brainstorm.md +1 -0
  16. package/.claude/commands/maestro-fork.md +133 -111
  17. package/.claude/commands/maestro-merge.md +85 -77
  18. package/.claude/commands/maestro-plan.md +88 -2
  19. package/.claude/commands/maestro-roadmap.md +113 -2
  20. package/.claude/commands/maestro.md +1 -0
  21. package/.claude/commands/quality-business-test.md +5 -5
  22. package/.claude/commands/quality-debug.md +3 -2
  23. package/.claude/commands/quality-retrospective.md +6 -4
  24. package/.claude/commands/quality-review.md +1 -1
  25. package/.claude/commands/quality-test-gen.md +5 -4
  26. package/.codex/skills/maestro-brainstorm/SKILL.md +1 -1
  27. package/.codex/skills/maestro-fork/SKILL.md +98 -68
  28. package/.codex/skills/maestro-init/SKILL.md +4 -3
  29. package/.codex/skills/maestro-merge/SKILL.md +69 -62
  30. package/.codex/skills/maestro-ui-design/SKILL.md +1 -1
  31. package/.codex/skills/maestro-verify/SKILL.md +12 -12
  32. package/.codex/skills/manage-learn/SKILL.md +1 -1
  33. package/.codex/skills/manage-status/SKILL.md +4 -4
  34. package/.codex/skills/quality-business-test/SKILL.md +2 -2
  35. package/.codex/skills/quality-integration-test/SKILL.md +1 -1
  36. package/.codex/skills/quality-retrospective/SKILL.md +7 -7
  37. package/.codex/skills/quality-review/SKILL.md +2 -2
  38. package/.codex/skills/quality-test/SKILL.md +2 -2
  39. package/.codex/skills/quality-test-gen/SKILL.md +1 -1
  40. package/README.md +2 -0
  41. package/README.zh-CN.md +2 -0
  42. package/dashboard/dist/assets/{ArtifactsPage-DZNCi6tn.js → ArtifactsPage-CUrrDGgN.js} +1 -1
  43. package/dashboard/dist/assets/ChatInput-pUOLJIKE.js +49 -0
  44. package/dashboard/dist/assets/ChatPage-B8Xqkt0v.js +27 -0
  45. package/dashboard/dist/assets/{CollabPage-B4NAHXS2.js → CollabPage-DIUXeazv.js} +1 -1
  46. package/dashboard/dist/assets/{ExecutionPanel-CFt4LJyq.js → ExecutionPanel-VmYeADFj.js} +1 -1
  47. package/dashboard/dist/assets/KanbanPage-DLq8v7hg.js +21 -0
  48. package/dashboard/dist/assets/{MarkdownRenderer-X4af_WNb.js → MarkdownRenderer-D7AehrnR.js} +1 -1
  49. package/dashboard/dist/assets/{McpPage-BKfCVIyU.js → McpPage-BY0SjTgw.js} +2 -2
  50. package/dashboard/dist/assets/{OutputPanel-BlBQFJSW.js → OutputPanel-B-Rjwgmv.js} +1 -1
  51. package/dashboard/dist/assets/{ProblemsPanel-De3DLvoI.js → ProblemsPanel-GEpF-oi4.js} +1 -1
  52. package/dashboard/dist/assets/RequirementBoardPage-xs8uDM7I.js +6 -0
  53. package/dashboard/dist/assets/{RequirementPage-Bllxe2XI.js → RequirementPage-BKDSFwjA.js} +5 -10
  54. package/dashboard/dist/assets/SpecsPage-DLFb9ZH0.js +36 -0
  55. package/dashboard/dist/assets/SupervisorPage-SOki_kgz.js +6 -0
  56. package/dashboard/dist/assets/TeamsPage-BO2kP70F.js +11 -0
  57. package/dashboard/dist/assets/{TreeBrowser-Q12qobZs.js → TreeBrowser-B9DHdULE.js} +1 -1
  58. package/dashboard/dist/assets/{WorkflowPage-D_Fzdy3_.js → WorkflowPage-C8hWbYim.js} +1 -1
  59. package/dashboard/dist/assets/{check-u6fGOwQO.js → check-DJDk3A2a.js} +1 -1
  60. package/dashboard/dist/assets/{chevron-right-Csu22t58.js → chevron-right-C7bVDreZ.js} +1 -1
  61. package/dashboard/dist/assets/{circle-CMrkbRNg.js → circle-Qfgy4LB_.js} +1 -1
  62. package/dashboard/dist/assets/{circle-alert-c3tH1P4z.js → circle-alert-Na1vf6qQ.js} +1 -1
  63. package/dashboard/dist/assets/{circle-check-gYxxSYuH.js → circle-check-CEGgy3NV.js} +1 -1
  64. package/dashboard/dist/assets/{circle-check-big-TDSeWstm.js → circle-check-big-3JB8zRYj.js} +1 -1
  65. package/dashboard/dist/assets/{code-CFN2uX9V.js → code-Ble63Idz.js} +1 -1
  66. package/dashboard/dist/assets/{columns-3-38xIDlzy.js → columns-3-BUcKlxve.js} +1 -1
  67. package/dashboard/dist/assets/{download-DC7KkKyP.js → download-CMqkfn8x.js} +1 -1
  68. package/dashboard/dist/assets/{folder-CWq_lAnf.js → folder-B9ewx9LL.js} +1 -1
  69. package/dashboard/dist/assets/index-C2Mcb4TJ.js +231 -0
  70. package/dashboard/dist/assets/index-DyBbPc18.css +1 -0
  71. package/dashboard/dist/assets/{index-Do71weNR.js → index-JTmGteaT.js} +1 -1
  72. package/dashboard/dist/assets/{list-CgIP_2A-.js → list-DI8Wn2aT.js} +1 -1
  73. package/dashboard/dist/assets/loader-B5F6PzFT.js +11 -0
  74. package/dashboard/dist/assets/{minus-DYoN5UGk.js → minus-Lp_BfctG.js} +1 -1
  75. package/dashboard/dist/assets/{pen-line-Bh_WKYHm.js → pen-line-Ch7sphzZ.js} +1 -1
  76. package/dashboard/dist/assets/pencil-_yRMHmGT.js +6 -0
  77. package/dashboard/dist/assets/{proxy-BKxDAKTj.js → proxy-D72Y8a4Y.js} +1 -1
  78. package/dashboard/dist/assets/{search-SieXnOgr.js → search-BS6fI6Bg.js} +1 -1
  79. package/dashboard/dist/assets/{shallow-Bme1JY57.js → shallow-BXasQBvr.js} +1 -1
  80. package/dashboard/dist/assets/table-CeGlFjlP.js +6 -0
  81. package/dashboard/dist/assets/{terminal-BB3Xfuv5.js → terminal-BJic2yW-.js} +1 -1
  82. package/dashboard/dist/assets/{trash-2-C8f4vFFM.js → trash-2-Czz4X8Fb.js} +1 -1
  83. package/dashboard/dist/assets/{zap-4uwlzVm0.js → zap-C3H0jVFA.js} +1 -1
  84. package/dashboard/dist/index.html +2 -2
  85. package/dashboard/dist-server/dashboard/src/server/agents/agent-manager.js +16 -1
  86. package/dashboard/dist-server/dashboard/src/server/agents/agent-manager.js.map +1 -1
  87. package/dashboard/dist-server/dashboard/src/server/agents/delegate-broker-monitor.js +1 -2
  88. package/dashboard/dist-server/dashboard/src/server/agents/delegate-broker-monitor.js.map +1 -1
  89. package/dashboard/dist-server/dashboard/src/server/commander/commander-prompts.d.ts +1 -1
  90. package/dashboard/dist-server/dashboard/src/server/commander/commander-prompts.js +2 -1
  91. package/dashboard/dist-server/dashboard/src/server/commander/commander-prompts.js.map +1 -1
  92. package/dashboard/dist-server/dashboard/src/server/index.js +3 -0
  93. package/dashboard/dist-server/dashboard/src/server/index.js.map +1 -1
  94. package/dashboard/dist-server/dashboard/src/server/routes/collab.js +124 -0
  95. package/dashboard/dist-server/dashboard/src/server/routes/collab.js.map +1 -1
  96. package/dashboard/dist-server/dashboard/src/server/ws/handlers/team-handler.d.ts +10 -0
  97. package/dashboard/dist-server/dashboard/src/server/ws/handlers/team-handler.js +73 -0
  98. package/dashboard/dist-server/dashboard/src/server/ws/handlers/team-handler.js.map +1 -0
  99. package/dashboard/dist-server/dashboard/src/shared/collab-types.d.ts +31 -0
  100. package/dashboard/dist-server/dashboard/src/shared/collab-types.js +28 -0
  101. package/dashboard/dist-server/dashboard/src/shared/collab-types.js.map +1 -1
  102. package/dashboard/dist-server/dashboard/src/shared/constants.js +5 -0
  103. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  104. package/dashboard/dist-server/dashboard/src/shared/coordinate-types.d.ts +22 -0
  105. package/dashboard/dist-server/dashboard/src/shared/issue-types.d.ts +12 -0
  106. package/dashboard/dist-server/dashboard/src/shared/issue-types.js +12 -0
  107. package/dashboard/dist-server/dashboard/src/shared/issue-types.js.map +1 -1
  108. package/dashboard/dist-server/dashboard/src/shared/team-types.d.ts +1 -0
  109. package/dashboard/dist-server/dashboard/src/shared/team-types.js +7 -0
  110. package/dashboard/dist-server/dashboard/src/shared/team-types.js.map +1 -1
  111. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +27 -1
  112. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
  113. package/dashboard/dist-server/shared/agent-types.d.ts +4 -0
  114. package/dashboard/dist-server/src/hooks/constants.d.ts +1 -1
  115. package/dashboard/dist-server/src/hooks/constants.js +2 -2
  116. package/dashboard/dist-server/src/hooks/constants.js.map +1 -1
  117. package/dist/shared/agent-types.d.ts +4 -0
  118. package/dist/shared/agent-types.d.ts.map +1 -1
  119. package/dist/src/commands/install-backend.d.ts.map +1 -1
  120. package/dist/src/commands/install-backend.js +29 -18
  121. package/dist/src/commands/install-backend.js.map +1 -1
  122. package/dist/src/hooks/__tests__/statusline-visual-test.js +23 -1
  123. package/dist/src/hooks/__tests__/statusline-visual-test.js.map +1 -1
  124. package/dist/src/hooks/constants.d.ts +1 -1
  125. package/dist/src/hooks/constants.d.ts.map +1 -1
  126. package/dist/src/hooks/constants.js +2 -2
  127. package/dist/src/hooks/constants.js.map +1 -1
  128. package/dist/src/hooks/skill-context.d.ts +3 -0
  129. package/dist/src/hooks/skill-context.d.ts.map +1 -1
  130. package/dist/src/hooks/skill-context.js +95 -9
  131. package/dist/src/hooks/skill-context.js.map +1 -1
  132. package/dist/src/hooks/statusline.d.ts.map +1 -1
  133. package/dist/src/hooks/statusline.js +6 -3
  134. package/dist/src/hooks/statusline.js.map +1 -1
  135. package/dist/src/tools/merge-validator.d.ts.map +1 -1
  136. package/dist/src/tools/merge-validator.js +114 -16
  137. package/dist/src/tools/merge-validator.js.map +1 -1
  138. package/package.json +1 -1
  139. package/shared/agent-types.ts +4 -0
  140. package/templates/worktree-scope.json +9 -10
  141. package/templates/worktrees.json +26 -27
  142. package/workflows/brainstorm.md +10 -1
  143. package/workflows/debug.md +16 -6
  144. package/workflows/fork.md +100 -36
  145. package/workflows/integration-test.md +14 -2
  146. package/workflows/issue.md +14 -4
  147. package/workflows/learn.md +19 -5
  148. package/workflows/maestro.md +1 -0
  149. package/workflows/merge.md +113 -55
  150. package/workflows/retrospective.md +61 -22
  151. package/workflows/review.md +17 -4
  152. package/workflows/test.md +12 -2
  153. package/workflows/ui-style.md +9 -2
  154. package/dashboard/dist/assets/ChatInput-Bvr-FeEq.js +0 -49
  155. package/dashboard/dist/assets/ChatPage-D9zTkJZo.js +0 -22
  156. package/dashboard/dist/assets/KanbanPage-C8USth6H.js +0 -21
  157. package/dashboard/dist/assets/RequirementBoardPage-Bf1trzqs.js +0 -11
  158. package/dashboard/dist/assets/SpecsPage-9lwxKT27.js +0 -36
  159. package/dashboard/dist/assets/SupervisorPage-SusdfHFq.js +0 -6
  160. package/dashboard/dist/assets/TeamsPage-DsuM6OwC.js +0 -6
  161. package/dashboard/dist/assets/arrow-left-Bqtb2hle.js +0 -6
  162. package/dashboard/dist/assets/index-DWG-WrzT.js +0 -231
  163. package/dashboard/dist/assets/index-GUNJodSR.css +0 -1
  164. package/dashboard/dist/assets/table-llyEtj-7.js +0 -6
@@ -1,77 +1,85 @@
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
+ ---
2
+ name: maestro-merge
3
+ description: Two-phase merge of milestone worktree branch back — git merge first, scratch 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 scratch artifacts, and reconcile the artifact registry. 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 (merge artifact entries, 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 milestone has incomplete artifacts
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 worktree entries)
37
+ 2. Validate milestone artifact completeness (all EXC artifacts completed)
38
+ 3. Pre-merge rebase (`git merge main` in worktree)
39
+ 4. Phase 1: Git merge (source code only)
40
+ 5. Phase 2: Scratch artifact sync (only after git merge succeeds)
41
+ 6. Atomic artifact registry reconciliation
42
+ 7. Cleanup (worktree remove + branch delete)
43
+
44
+ **Phase 2 — Artifact sync detail:**
45
+ - Copy worktree `scratch/*` dirs back to main `.workflow/scratch/`
46
+ - Merge worktree `state.json.artifacts[]` entries into main `state.json.artifacts[]`
47
+ - Dedup by artifact id; worktree version wins for same id
48
+ - Update milestone status in main `state.json.milestones[]` (remove "forked" flag)
49
+ - Mark `harvested` status from worktree artifacts
50
+
51
+ **Conflict handling:**
52
+ 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.
53
+ </context>
54
+
55
+ <execution>
56
+ Follow '~/.maestro/workflows/merge.md' completely.
57
+
58
+ **Next-step routing on completion:**
59
+ - View dashboard Skill({ skill: "manage-status" })
60
+ - Audit milestone Skill({ skill: "maestro-milestone-audit" })
61
+ </execution>
62
+
63
+ <error_codes>
64
+ | Code | Severity | Condition | Recovery |
65
+ |------|----------|-----------|----------|
66
+ | E001 | error | Running inside a worktree | Run from main worktree |
67
+ | E002 | error | No worktree registry found | Nothing to merge |
68
+ | E003 | error | --continue but no merge state | Start fresh merge |
69
+ | E004 | error | No milestone number provided | Provide `-m <N>` |
70
+ | W001 | warning | Stale registry entries found | Auto-cleaned |
71
+ | W002 | warning | Incomplete artifacts (without --force) | Confirm or use --force |
72
+ | W003 | warning | Conflict pulling main into worktree | Resolve in worktree first |
73
+ </error_codes>
74
+
75
+ <success_criteria>
76
+ - [ ] Registry health check passed (stale entries cleaned)
77
+ - [ ] Pre-merge rebase successful (worktree has latest main)
78
+ - [ ] Git merge completed without conflicts (or conflicts resolved via --continue)
79
+ - [ ] All scratch artifacts synced to main `.workflow/scratch/`
80
+ - [ ] `state.json.artifacts[]` reconciled (worktree entries merged into main)
81
+ - [ ] Milestone `"forked"` flag removed in `state.json.milestones[]`
82
+ - [ ] `roadmap.md` completed phases marked
83
+ - [ ] Worktree removed and branch deleted (unless --no-cleanup)
84
+ - [ ] `worktrees.json` registry updated (entry removed)
85
+ </success_criteria>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro-plan
3
3
  description: Explore, clarify, plan, check, and confirm a phase execution plan
4
- argument-hint: "[phase] [--collab] [--spec SPEC-xxx] [--auto] [--gaps] [--dir <path>]"
4
+ argument-hint: "[phase] [--collab] [--spec SPEC-xxx] [--auto] [--gaps] [--dir <path>] [--revise [instructions]] [--check <plan-dir>]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -13,7 +13,12 @@ allowed-tools:
13
13
  - AskUserQuestion
14
14
  ---
15
15
  <purpose>
16
- Create a verified execution plan (plan.json + .task/TASK-*.json) through a 5-stage pipeline: Exploration, Clarification, Planning, Plan Checking, and Confirmation. Produces plan.json with waves, task definitions, and user-confirmed execution strategy.
16
+ Create, revise, or verify an execution plan through a 5-stage pipeline: Exploration, Clarification, Planning, Plan Checking, and Confirmation. Produces plan.json with waves, task definitions, and user-confirmed execution strategy.
17
+
18
+ Supports three modes:
19
+ - **Create** (default): Build plan from analysis context or phase requirements
20
+ - **Revise** (`--revise`): Incrementally modify existing plan — edit tasks, adjust waves, add/remove tasks
21
+ - **Check** (`--check`): Standalone plan verification — run plan-checker against existing plan
17
22
 
18
23
  All plan output goes to `.workflow/scratch/plan-{slug}-{date}/`. Registers PLN artifact in state.json. Performs collision detection against other plans in same milestone.
19
24
  </purpose>
@@ -37,6 +42,8 @@ $ARGUMENTS — phase number, or no args for milestone-wide planning, with option
37
42
  - `--auto` -- Skip interactive clarification (P2), use defaults
38
43
  - `--gaps` -- Gap closure mode: load verification/issue gaps, skip exploration, plan only gap fixes
39
44
  - `--dir <path>` -- Use arbitrary scratch directory as context source (e.g., from analyze session)
45
+ - `--revise [instructions]` -- Revise existing plan. Auto-discovers latest plan for current phase from state.json, or use with `--dir` to target specific plan. If instructions provided, apply directly (e.g. `--revise "add TASK-005 for error handling"`). If omitted, ask user via AskUserQuestion. Skips P1-P3 (exploration/clarification/planning), loads existing plan.json + tasks, applies targeted modifications, re-runs P4 (plan-checker).
46
+ - `--check <plan-dir>` -- Standalone plan verification. Run plan-checker (P4 only) against existing plan without modification. Also checks roadmap consistency and collision detection. Read-only.
40
47
 
41
48
  **Scope routing:**
42
49
 
@@ -45,6 +52,9 @@ $ARGUMENTS — phase number, or no args for milestone-wide planning, with option
45
52
  | `plan` (no args) | init + roadmap | milestone | Plan all phases in current milestone |
46
53
  | `plan 1` | init + roadmap | phase | Plan phase 1 only |
47
54
  | `plan --dir scratch/analyze-xxx` | none | inherited | Plan against specified analyze session |
55
+ | `plan --revise "instructions"` | existing plan | revise | Modify existing plan with instructions |
56
+ | `plan --revise` | existing plan | revise | Modify existing plan, ask user for instructions |
57
+ | `plan --check scratch/plan-xxx` | existing plan | check | Verify existing plan (read-only) |
48
58
 
49
59
  **Upstream context:**
50
60
  - Reads `context.md` from prior analyze artifact (auto-discovered from state.json or via --dir)
@@ -141,6 +151,80 @@ Next steps:
141
151
  /maestro-execute --dir {dir} -- Execute specific plan
142
152
  /maestro-plan {phase} -- Re-plan with modifications
143
153
  ```
154
+
155
+ ### Mode: Revise (`--revise [instructions]`)
156
+
157
+ Incrementally modify an existing plan without rebuilding from scratch.
158
+
159
+ **Plan discovery:**
160
+ - With `--dir`: use specified plan directory
161
+ - Without `--dir`: auto-discover latest completed plan for current phase from `state.json.artifacts[]` (type=plan, status=completed, matching phase)
162
+
163
+ **Execution flow:**
164
+
165
+ 1. **Load existing plan**
166
+ - Read `plan.json` + all `.task/TASK-*.json` from discovered directory
167
+ - Show current plan summary: task count, waves, status per task
168
+
169
+ 2. **Obtain revision instructions**
170
+ - If `--revise "instructions"` provided → parse as change directive
171
+ - If `--revise` without instructions → AskUserQuestion for what to change:
172
+ - Add/remove tasks
173
+ - Modify task scope, action, implementation
174
+ - Reorder waves or adjust dependencies
175
+ - Update convergence criteria
176
+ - Parse instructions into concrete changes
177
+
178
+ 3. **Apply targeted changes**
179
+ - Modify affected TASK files in-place
180
+ - If tasks added/removed: re-sequence task IDs, regenerate wave assignments
181
+ - Update plan.json summary (task count, wave structure)
182
+ - Preserve unmodified tasks completely
183
+
184
+ 4. **Re-run plan-checker (P4)**
185
+ - Validate modified plan with same checker as create mode
186
+ - Re-run collision detection against same-milestone plans
187
+ - Present check results for confirmation
188
+
189
+ 5. **Update artifact**
190
+ - Overwrite plan files in existing scratch directory
191
+ - Update artifact timestamp in state.json (no new artifact created)
192
+
193
+ ### Mode: Check (`--check <plan-dir>`)
194
+
195
+ Read-only plan verification without modification.
196
+
197
+ **Execution flow:**
198
+
199
+ 1. **Load plan**
200
+ - Read `plan.json` + `.task/TASK-*.json` from specified directory
201
+ - Read `.workflow/roadmap.md` for consistency comparison
202
+
203
+ 2. **Run checks**
204
+ - Plan-checker (P4 pipeline stage) — task quality, convergence criteria
205
+ - Roadmap consistency — plan tasks align with phase scope and requirements
206
+ - Collision detection — file overlaps with other plans in same milestone
207
+ - Dependency integrity — no broken cross-task dependencies
208
+
209
+ 3. **Produce check report**
210
+ ```
211
+ === PLAN CHECK ===
212
+ Plan: {plan_dir}/plan.json
213
+ Tasks: {total} ({completed} done, {pending} pending)
214
+
215
+ Checker: {PASS|WARN|FAIL} ({issues} issues)
216
+ Roadmap: {aligned|drift detected}
217
+ Collision: {clear|{N} overlaps}
218
+
219
+ Issues:
220
+ 1. [{severity}] {description}
221
+
222
+ Suggested actions:
223
+ /maestro-plan --revise "fix instructions" -- Apply fixes
224
+ /maestro-execute --dir {plan_dir} -- Execute as-is
225
+ ```
226
+
227
+ **No file modifications.** Pure verification + report.
144
228
  </execution>
145
229
 
146
230
  <error_codes>
@@ -148,6 +232,8 @@ Next steps:
148
232
  |------|----------|-----------|----------|
149
233
  | E001 | error | No args and no roadmap (cannot determine scope) | Provide phase number or topic, or create roadmap |
150
234
  | E003 | error | --gaps requires prior verification/issues to exist | Run maestro-verify first |
235
+ | E004 | error | No plan found to revise (--revise without target) | Use --dir to specify plan, or create plan first |
236
+ | E005 | error | Plan directory not found (--check) | Check path, use --dir |
151
237
  | W001 | warning | Exploration agent returned incomplete results | Retry exploration or proceed with available context |
152
238
  | W002 | warning | Plan-checker found minor issues, continuing | Review plan-checker feedback, adjust plan if needed |
153
239
  | W003 | warning | Wiki search unavailable or returned no results | Continue without prior knowledge context |
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro-roadmap
3
3
  description: Interactive roadmap creation with iterative refinement — lightweight alternative to spec-generate
4
- argument-hint: "<requirement> [-y] [-c] [-m progressive|direct|auto] [--from-brainstorm SESSION-ID]"
4
+ argument-hint: "<requirement> [-y] [-c] [-m progressive|direct|auto] [--from-brainstorm SESSION-ID] [--revise [instructions]] [--review]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -13,7 +13,12 @@ allowed-tools:
13
13
  - AskUserQuestion
14
14
  ---
15
15
  <purpose>
16
- Create a project roadmap through interactive requirement decomposition and iterative refinement. This is the lightweight path for structured decomposition — directly from requirements to roadmap without full specification documents. For the heavy path with formal specs, use maestro-spec-generate instead.
16
+ Create or revise a project roadmap through interactive requirement decomposition and iterative refinement. This is the lightweight path for structured decomposition — directly from requirements to roadmap without full specification documents. For the heavy path with formal specs, use maestro-spec-generate instead.
17
+
18
+ Supports three modes:
19
+ - **Create** (default): Build roadmap from requirements
20
+ - **Revise** (`--revise`): Modify existing roadmap while preserving completed phase progress
21
+ - **Review** (`--review`): Health assessment of current roadmap — actual vs planned, drift detection, adjustment recommendations (read-only)
17
22
 
18
23
  Produces `.workflow/roadmap.md` with milestone/phase structure ready for maestro-plan.
19
24
  </purpose>
@@ -31,11 +36,14 @@ $ARGUMENTS -- requirement text, @file reference, or brainstorm session reference
31
36
  - `-c` / `--continue`: Resume from last checkpoint
32
37
  - `-m progressive|direct|auto`: Decomposition strategy (default: auto)
33
38
  - `--from-brainstorm SESSION-ID`: Import guidance-specification.md from a brainstorm session as seed
39
+ - `--revise [instructions]`: Revise existing roadmap. If instructions provided, apply directly (e.g. `--revise "add phase 4 for perf optimization"` or `--revise "split phase 2 into 2a and 2b"`). If omitted, ask user for revision instructions via AskUserQuestion. Preserves completed phase progress.
40
+ - `--review`: Roadmap health assessment — compare actual vs planned progress, detect drift, assess remaining phases (read-only, produces review report)
34
41
 
35
42
  **Input types:**
36
43
  - Direct text: `"Implement user authentication system with OAuth and 2FA"`
37
44
  - File reference: `@requirements.md`
38
45
  - Brainstorm import: `--from-brainstorm WFS-xxx`
46
+ - No args + `--revise` / `--review`: Operate on existing `.workflow/roadmap.md`
39
47
 
40
48
  **Relationship to pipeline:**
41
49
  ```
@@ -63,6 +71,9 @@ Auto-selection: ≥3 high uncertainty factors → Progressive, ≥3 low → Dire
63
71
  </context>
64
72
 
65
73
  <execution>
74
+
75
+ ### Mode: Create (default)
76
+
66
77
  Follow '~/.maestro/workflows/roadmap.md' completely.
67
78
 
68
79
  **Next-step routing on completion:**
@@ -70,6 +81,104 @@ Follow '~/.maestro/workflows/roadmap.md' completely.
70
81
  - Simple project, skip analysis → /maestro-plan 1
71
82
  - Need UI design first → /maestro-ui-design 1
72
83
  - View project dashboard → /manage-status
84
+
85
+ ### Mode: Revise (`--revise [instructions]`)
86
+
87
+ Revise an existing roadmap while preserving completed phase progress.
88
+
89
+ **Pre-conditions:**
90
+ - `.workflow/roadmap.md` exists
91
+ - `.workflow/state.json` exists (for progress tracking)
92
+
93
+ **Execution flow:**
94
+
95
+ 1. **Load current state**
96
+ - Read `.workflow/roadmap.md` — parse milestones, phases, dependencies, progress markers
97
+ - Read `.workflow/state.json` — get artifact registry, current milestone
98
+ - Identify completed vs in-progress vs pending phases
99
+
100
+ 2. **Obtain revision instructions**
101
+ - If `--revise "instructions text"` provided → use directly as change directive
102
+ - If `--revise` without instructions → use AskUserQuestion to ask user what to change
103
+ - Show current roadmap summary with phase statuses
104
+ - Present options: add/remove/reorder phases, modify scope/criteria/deps, move between milestones
105
+ - Capture change instructions from response
106
+
107
+ 3. **Impact analysis**
108
+ - For each proposed change, assess impact on:
109
+ - Phase dependency chain (re-validate no circular deps)
110
+ - Requirement coverage (every Active requirement still mapped)
111
+ - Completed phases (warn if change invalidates completed work)
112
+ - Existing plan artifacts (warn if plan exists for affected phase)
113
+ - Present impact summary for confirmation
114
+
115
+ 4. **Apply revisions**
116
+ - Update `.workflow/roadmap.md` preserving:
117
+ - Completed phase progress markers (✓, completion dates)
118
+ - Phase numbering for completed phases (renumber only pending phases)
119
+ - Cross-references from state.json artifacts
120
+ - Update `state.json` if milestone structure changed
121
+ - Add revision log entry to roadmap.md metadata section
122
+
123
+ 5. **Post-revision validation**
124
+ - Re-check dependency integrity (no circular deps)
125
+ - Re-check requirement coverage (every Active req mapped)
126
+ - Verify completed phases unaffected
127
+
128
+ **Next-step routing on completion:**
129
+ - Phases changed, need re-analysis → `/maestro-analyze {phase}`
130
+ - Phases changed, ready to plan → `/maestro-plan {phase}`
131
+ - Only pending phases adjusted → `/maestro-plan` (continue from where left off)
132
+
133
+ ### Mode: Review (`--review`)
134
+
135
+ Read-only health assessment of the current roadmap.
136
+
137
+ **Pre-conditions:**
138
+ - `.workflow/roadmap.md` exists
139
+
140
+ **Execution flow:**
141
+
142
+ 1. **Load roadmap + execution history**
143
+ - Read `.workflow/roadmap.md` — full structure
144
+ - Read `.workflow/state.json` — artifact registry, milestone progress
145
+ - Cross-reference: for each phase, check ANL/PLN/EXC/VRF artifact status
146
+
147
+ 2. **Assessment dimensions**
148
+ - **Progress tracking**: Actual vs planned per phase, milestone velocity
149
+ - **Drift detection**: Completed phases deviating from original scope (via verify/audit findings)
150
+ - **Relevance check**: Pending phases still aligned with current project goals (from project.md)
151
+ - **Dependency health**: Pending phase dependencies still valid given completed work
152
+ - **Risk assessment**: Identify phases at risk (blocked, scope creep, dependency failures)
153
+
154
+ 3. **Produce review report**
155
+ - Write to `.workflow/scratch/roadmap-review-{date}.md`
156
+ - Format:
157
+ ```
158
+ === ROADMAP REVIEW ===
159
+ Date: {date}
160
+ Milestone: {current}
161
+
162
+ Progress: {completed}/{total} phases ({percentage}%)
163
+ Drift: {none|minor|significant}
164
+ Risk: {low|medium|high}
165
+
166
+ Phase Assessment:
167
+ [✓] Phase 1: {name} — completed, on-scope
168
+ [~] Phase 2: {name} — in-progress, {status notes}
169
+ [ ] Phase 3: {name} — pending, {risk/notes}
170
+
171
+ Recommendations:
172
+ 1. {actionable recommendation}
173
+ 2. ...
174
+
175
+ Suggested actions:
176
+ /maestro-roadmap --revise — Apply recommended changes
177
+ /maestro-plan {phase} — Plan next phase
178
+ /manage-status — View full dashboard
179
+ ```
180
+
181
+ **No state modifications.** Pure assessment + recommendations.
73
182
  </execution>
74
183
 
75
184
  <error_codes>
@@ -78,6 +187,8 @@ Follow '~/.maestro/workflows/roadmap.md' completely.
78
187
  | E001 | error | Requirement text or @file required | Prompt user for input |
79
188
  | E002 | error | Brainstorm session not found (--from-brainstorm) | Show available sessions |
80
189
  | E003 | error | Circular dependency detected in phases | Prompt user to re-decompose |
190
+ | E004 | error | roadmap.md not found (--revise/--review) | Run maestro-roadmap first |
191
+ | E005 | error | Revision invalidates completed phase work | Warn user, ask to confirm or adjust |
81
192
  | W001 | warning | CLI analysis failed, using fallback | Continue with available data |
82
193
  | W002 | warning | Max refinement rounds (5) reached | Force proceed with current roadmap |
83
194
  | W005 | warning | External research agent failed | Continue without apiResearchContext |
@@ -55,6 +55,7 @@ When `-y` is active, maestro propagates auto flags to downstream commands. Only
55
55
  |---------|-----------|--------|
56
56
  | maestro-analyze | `-y` | Skip interactive scoping, auto-deepen |
57
57
  | maestro-brainstorm | `-y` | Skip interactive questions, use defaults |
58
+ | maestro-roadmap | `-y` | Skip interactive questions, use defaults (create/revise/review) |
58
59
  | maestro-ui-design | `-y` | Skip interactive selection, pick top variant |
59
60
  | maestro-plan | `--auto` | Skip interactive clarification |
60
61
  | maestro-spec-generate | `-y` | Skip interactive questions, use defaults |
@@ -60,10 +60,10 @@ Context files:
60
60
  - `.workflow/.spec/SPEC-xxx/requirements/NFR-*.md` -- Non-functional requirements
61
61
  - `.workflow/.spec/SPEC-xxx/architecture/_index.md` -- API endpoints, data model, state machines
62
62
  - `.workflow/.spec/SPEC-xxx/epics/EPIC-*.md` -- User stories for E2E scenarios
63
- - `.workflow/phases/{NN}-{slug}/index.json` -- Phase metadata, success_criteria
64
- - `.workflow/phases/{NN}-{slug}/plan.json` -- Task overview (degraded mode)
65
- - `.workflow/phases/{NN}-{slug}/verification.json` -- Cross-reference for must_haves
66
- - `.workflow/phases/{NN}-{slug}/.tests/business/` -- Previous business test artifacts
63
+ - Phase artifacts (resolve via `state.json.artifacts[]` → `.workflow/scratch/` paths; fallback to `.workflow/phases/{NN}-{slug}/`):
64
+ - plan.json -- Task overview (degraded mode)
65
+ - verification.json -- Cross-reference for must_haves
66
+ - .tests/business/ -- Previous business test artifacts
67
67
  </context>
68
68
 
69
69
  <execution>
@@ -81,7 +81,7 @@ Follow '~/.maestro/workflows/business-test.md' completely.
81
81
  | Code | Severity | Condition | Recovery |
82
82
  |------|----------|-----------|----------|
83
83
  | E001 | error | Phase number required | Prompt user for phase number |
84
- | E002 | error | Phase directory not found | Verify phase exists in .workflow/phases/ |
84
+ | E002 | error | Phase artifacts not found | Verify phase has artifacts in state.json or .workflow/phases/ |
85
85
  | E003 | error | No spec package AND no success_criteria (can't extract scenarios) | Run maestro-spec-generate or maestro-plan first |
86
86
  | E004 | error | L1 critical failures block L2/L3 progression | Fix blockers first via quality-debug |
87
87
  | W001 | warning | Degraded mode (no spec package, using success_criteria) | Consider running maestro-spec-generate for full coverage |
@@ -40,8 +40,9 @@ User's issue: $ARGUMENTS
40
40
  - `--parallel` -- Spawn parallel debug agents (one per gap cluster)
41
41
 
42
42
  **State files:**
43
- - `.workflow/phases/{NN}-{slug}/uat.md` -- UAT gaps (if --from-uat)
44
- - `.workflow/phases/{NN}-{slug}/.debug/` -- Phase-scoped debug sessions
43
+ - Phase UAT/debug artifacts (resolve via `state.json.artifacts[]` → scratch paths; fallback to `.workflow/phases/{NN}-{slug}/`):
44
+ - uat.md -- UAT gaps (if --from-uat)
45
+ - .debug/ -- Phase-scoped debug sessions
45
46
  - `.workflow/scratch/debug-*/` -- Standalone debug sessions
46
47
  </context>
47
48
 
@@ -43,8 +43,9 @@ Arguments: $ARGUMENTS
43
43
  - `--auto-yes` — accept all routing recommendations without prompting
44
44
 
45
45
  **Storage written:**
46
- - `.workflow/phases/{NN}-{slug}/retrospective.md` — human-readable record
47
- - `.workflow/phases/{NN}-{slug}/retrospective.json`structured record
46
+ - Retrospective output (resolve via `state.json.artifacts[]` → `.workflow/scratch/` path; fallback to `.workflow/phases/{NN}-{slug}/`):
47
+ - retrospective.mdhuman-readable record
48
+ - retrospective.json — structured record
48
49
  - `.workflow/specs/SPEC-retro-*.md` — spec stubs (one per spec-routed insight)
49
50
  - `.workflow/issues/issues.jsonl` — appended issue rows (`source: "retrospective"`)
50
51
  - `.workflow/learning/lessons.jsonl` — tips routed via `manage-learn tip` (formerly manage-memory-capture)
@@ -52,8 +53,9 @@ Arguments: $ARGUMENTS
52
53
  - `.workflow/learning/learning-index.json` — searchable index
53
54
 
54
55
  **Storage read (never modified):**
55
- - `.workflow/phases/{NN}-{slug}/index.json`, `plan.json`, `verification.json`, `review.json`, `uat.md`
56
- - `.workflow/phases/{NN}-{slug}/.task/TASK-*.json`, `.summaries/TASK-*-summary.md`
56
+ - Phase artifacts (resolve via `state.json.artifacts[]` → scratch paths; fallback to `.workflow/phases/{NN}-{slug}/`):
57
+ - index.json, plan.json, verification.json, review.json, uat.md
58
+ - .task/TASK-*.json, .summaries/TASK-*-summary.md
57
59
  - `.workflow/issues/issues.jsonl`, `.workflow/issues/issue-history.jsonl`
58
60
  - `.workflow/state.json`
59
61
  </context>
@@ -53,7 +53,7 @@ Phase: $ARGUMENTS (required — phase number or slug)
53
53
  - `--dimensions <list>` — Comma-separated subset of dimensions to review (overrides level defaults)
54
54
  - `--skip-specs` — Skip loading project specs as review context
55
55
 
56
- Context files resolved from `.workflow/phases/{NN}-{slug}/`:
56
+ Context files resolved via `state.json.artifacts[]` → scratch path (fallback: `.workflow/phases/{NN}-{slug}/`):
57
57
  - index.json (phase metadata, execution results)
58
58
  - plan.json (task overview)
59
59
  - .task/TASK-{NNN}.json (task definitions with file lists)
@@ -36,10 +36,11 @@ Phase: $ARGUMENTS (required -- phase number)
36
36
  - `--layer <unit|e2e|all>` -- Generate only specific test layer (default: all)
37
37
 
38
38
  Context files:
39
- - `.workflow/phases/{NN}-{slug}/verification.json` -- Nyquist gaps (MISSING/PARTIAL)
40
- - `.workflow/phases/{NN}-{slug}/validation.json` -- requirement-to-test mapping
41
- - `.workflow/phases/{NN}-{slug}/.tests/coverage-report.json` -- UAT coverage gaps
42
- - `.workflow/phases/{NN}-{slug}/.summaries/TASK-*.md` -- what was built
39
+ - Phase artifacts (resolve via `state.json.artifacts[]` → scratch paths; fallback to `.workflow/phases/{NN}-{slug}/`):
40
+ - verification.json -- Nyquist gaps (MISSING/PARTIAL)
41
+ - validation.json -- requirement-to-test mapping
42
+ - .tests/coverage-report.json -- UAT coverage gaps
43
+ - .summaries/TASK-*.md -- what was built
43
44
  </context>
44
45
 
45
46
  <execution>
@@ -196,7 +196,7 @@ Bash(`mkdir -p ${sessionFolder}/.brainstorming`)
196
196
 
197
197
  **Decomposition Rules**:
198
198
 
199
- 1. **Mode detection**: Number = phase mode (resolve `.workflow/phases/{NN}-{slug}/`), text = scratch mode
199
+ 1. **Mode detection**: Number = phase mode (resolve via state.json artifact registry to `.workflow/scratch/{type}-{slug}-{date}/`; legacy fallback to `.workflow/phases/{NN}-{slug}/`), text = scratch mode
200
200
  2. **Project specs loading**: Read `.workflow/specs/` for architecture-aware analysis context
201
201
  3. **Role selection**:
202
202