maestro-flow 0.3.22 → 0.3.23

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 (144) hide show
  1. package/.claude/commands/maestro-analyze.md +1 -1
  2. package/.claude/commands/maestro-brainstorm.md +1 -1
  3. package/.claude/commands/maestro-composer.md +3 -3
  4. package/.claude/commands/maestro-init.md +4 -4
  5. package/.claude/commands/maestro-roadmap.md +164 -108
  6. package/.claude/commands/maestro.md +19 -10
  7. package/.claude/commands/quality-business-test.md +2 -2
  8. package/.claude/skills/team-quality-assurance/roles/scout/role.md +1 -1
  9. package/.claude/skills/team-review/roles/reviewer/role.md +1 -1
  10. package/.claude/skills/team-review/roles/scanner/role.md +1 -1
  11. package/.claude/skills/team-tech-debt/roles/scanner/role.md +3 -3
  12. package/.codex/skills/maestro/SKILL.md +12 -9
  13. package/.codex/skills/maestro-brainstorm/SKILL.md +1 -1
  14. package/.codex/skills/maestro-composer/SKILL.md +3 -3
  15. package/.codex/skills/maestro-init/SKILL.md +1 -1
  16. package/.codex/skills/maestro-link-coordinate/SKILL.md +1 -1
  17. package/.codex/skills/maestro-player/SKILL.md +2 -2
  18. package/.codex/skills/maestro-roadmap/SKILL.md +443 -332
  19. package/.codex/skills/quality-business-test/SKILL.md +2 -2
  20. package/.codex/skills/team-coordinate/roles/coordinator/role.md +1 -1
  21. package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +1 -1
  22. package/.codex/skills/team-quality-assurance/roles/scout/role.md +1 -1
  23. package/.codex/skills/team-review/roles/reviewer/role.md +1 -1
  24. package/.codex/skills/team-review/roles/scanner/role.md +1 -1
  25. package/.codex/skills/team-tech-debt/roles/scanner/role.md +3 -3
  26. package/chains/singles/spec-generate.json +3 -3
  27. package/chains/spec-driven.json +2 -2
  28. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +4 -0
  29. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
  30. package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js +2 -2
  31. package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js.map +1 -1
  32. package/dashboard/dist-server/dashboard/src/server/routes/install-utils.d.ts +5 -12
  33. package/dashboard/dist-server/dashboard/src/server/routes/install-utils.js +10 -65
  34. package/dashboard/dist-server/dashboard/src/server/routes/install-utils.js.map +1 -1
  35. package/dashboard/dist-server/dashboard/src/server/routes/install.js +17 -11
  36. package/dashboard/dist-server/dashboard/src/server/routes/install.js.map +1 -1
  37. package/dashboard/dist-server/src/agents/cli-agent-runner.d.ts +4 -0
  38. package/dashboard/dist-server/src/agents/cli-agent-runner.js +4 -2
  39. package/dashboard/dist-server/src/agents/cli-agent-runner.js.map +1 -1
  40. package/dashboard/dist-server/src/commands/delegate.d.ts +2 -0
  41. package/dashboard/dist-server/src/commands/delegate.js +20 -4
  42. package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
  43. package/dashboard/dist-server/src/config/cli-tools-config.d.ts +64 -3
  44. package/dashboard/dist-server/src/config/cli-tools-config.js +226 -9
  45. package/dashboard/dist-server/src/config/cli-tools-config.js.map +1 -1
  46. package/dist/src/agents/cli-agent-runner.d.ts +4 -0
  47. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  48. package/dist/src/agents/cli-agent-runner.js +4 -2
  49. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  50. package/dist/src/cli.js +2 -0
  51. package/dist/src/cli.js.map +1 -1
  52. package/dist/src/commands/cli.d.ts.map +1 -1
  53. package/dist/src/commands/cli.js +21 -4
  54. package/dist/src/commands/cli.js.map +1 -1
  55. package/dist/src/commands/delegate.d.ts +2 -0
  56. package/dist/src/commands/delegate.d.ts.map +1 -1
  57. package/dist/src/commands/delegate.js +20 -4
  58. package/dist/src/commands/delegate.js.map +1 -1
  59. package/dist/src/commands/install-backend.d.ts +5 -16
  60. package/dist/src/commands/install-backend.d.ts.map +1 -1
  61. package/dist/src/commands/install-backend.js +8 -104
  62. package/dist/src/commands/install-backend.js.map +1 -1
  63. package/dist/src/commands/install-ui/ExecutionView.js +1 -1
  64. package/dist/src/commands/install-ui/ExecutionView.js.map +1 -1
  65. package/dist/src/commands/install-ui/InstallExecution.d.ts +1 -0
  66. package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
  67. package/dist/src/commands/install-ui/InstallExecution.js +19 -4
  68. package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
  69. package/dist/src/commands/install-ui/InstallResult.d.ts.map +1 -1
  70. package/dist/src/commands/install-ui/InstallResult.js +1 -1
  71. package/dist/src/commands/install-ui/InstallResult.js.map +1 -1
  72. package/dist/src/commands/install.d.ts.map +1 -1
  73. package/dist/src/commands/install.js +23 -3
  74. package/dist/src/commands/install.js.map +1 -1
  75. package/dist/src/commands/tools-ui/CommandReference.d.ts +7 -0
  76. package/dist/src/commands/tools-ui/CommandReference.d.ts.map +1 -0
  77. package/dist/src/commands/tools-ui/CommandReference.js +33 -0
  78. package/dist/src/commands/tools-ui/CommandReference.js.map +1 -0
  79. package/dist/src/commands/tools-ui/ConfigSources.d.ts +6 -0
  80. package/dist/src/commands/tools-ui/ConfigSources.d.ts.map +1 -0
  81. package/dist/src/commands/tools-ui/ConfigSources.js +27 -0
  82. package/dist/src/commands/tools-ui/ConfigSources.js.map +1 -0
  83. package/dist/src/commands/tools-ui/RegisterSettings.d.ts +8 -0
  84. package/dist/src/commands/tools-ui/RegisterSettings.d.ts.map +1 -0
  85. package/dist/src/commands/tools-ui/RegisterSettings.js +125 -0
  86. package/dist/src/commands/tools-ui/RegisterSettings.js.map +1 -0
  87. package/dist/src/commands/tools-ui/RoleMappings.d.ts +9 -0
  88. package/dist/src/commands/tools-ui/RoleMappings.d.ts.map +1 -0
  89. package/dist/src/commands/tools-ui/RoleMappings.js +104 -0
  90. package/dist/src/commands/tools-ui/RoleMappings.js.map +1 -0
  91. package/dist/src/commands/tools-ui/ToolsDashboard.d.ts +8 -0
  92. package/dist/src/commands/tools-ui/ToolsDashboard.d.ts.map +1 -0
  93. package/dist/src/commands/tools-ui/ToolsDashboard.js +60 -0
  94. package/dist/src/commands/tools-ui/ToolsDashboard.js.map +1 -0
  95. package/dist/src/commands/tools-ui/ToolsOverview.d.ts +9 -0
  96. package/dist/src/commands/tools-ui/ToolsOverview.d.ts.map +1 -0
  97. package/dist/src/commands/tools-ui/ToolsOverview.js +84 -0
  98. package/dist/src/commands/tools-ui/ToolsOverview.js.map +1 -0
  99. package/dist/src/commands/tools.d.ts +3 -0
  100. package/dist/src/commands/tools.d.ts.map +1 -0
  101. package/dist/src/commands/tools.js +78 -0
  102. package/dist/src/commands/tools.js.map +1 -0
  103. package/dist/src/config/cli-tools-config.d.ts +64 -3
  104. package/dist/src/config/cli-tools-config.d.ts.map +1 -1
  105. package/dist/src/config/cli-tools-config.js +226 -9
  106. package/dist/src/config/cli-tools-config.js.map +1 -1
  107. package/dist/src/core/component-defs.d.ts +16 -0
  108. package/dist/src/core/component-defs.d.ts.map +1 -0
  109. package/dist/src/core/component-defs.js +142 -0
  110. package/dist/src/core/component-defs.js.map +1 -0
  111. package/dist/src/core/manifest.d.ts +8 -1
  112. package/dist/src/core/manifest.d.ts.map +1 -1
  113. package/dist/src/core/manifest.js +29 -40
  114. package/dist/src/core/manifest.js.map +1 -1
  115. package/dist/src/core/tag-injector.d.ts +72 -0
  116. package/dist/src/core/tag-injector.d.ts.map +1 -0
  117. package/dist/src/core/tag-injector.js +228 -0
  118. package/dist/src/core/tag-injector.js.map +1 -0
  119. package/dist/src/index.d.ts +4 -0
  120. package/dist/src/index.d.ts.map +1 -1
  121. package/dist/src/index.js +2 -0
  122. package/dist/src/index.js.map +1 -1
  123. package/dist/tsconfig.tsbuildinfo +1 -0
  124. package/package.json +1 -1
  125. package/templates/cli/prompts/workflow-skill-conflict-patterns.txt +1 -1
  126. package/templates/cli/prompts/workflow-skill-lessons-learned.txt +1 -1
  127. package/templates/search-tools.md +1 -1
  128. package/templates/workflows/specs/node-catalog.md +1 -1
  129. package/workflows/brainstorm.md +1 -1
  130. package/{.claude/CLAUDE.md → workflows/claude-instructions.md} +25 -26
  131. package/workflows/cli-tools-usage.md +16 -2
  132. package/workflows/codex-instructions.md +150 -0
  133. package/workflows/delegate-usage.md +16 -2
  134. package/workflows/execute.md +28 -14
  135. package/workflows/init.md +2 -2
  136. package/workflows/issue-discover.md +2 -2
  137. package/workflows/maestro-super.md +120 -0
  138. package/workflows/maestro.codex.md +4 -4
  139. package/workflows/maestro.md +5 -5
  140. package/workflows/roadmap-common.md +197 -0
  141. package/workflows/roadmap.md +190 -355
  142. package/workflows/spec-generate.md +457 -544
  143. package/.claude/commands/maestro-spec-generate.md +0 -78
  144. package/.codex/skills/maestro-spec-generate/SKILL.md +0 -355
@@ -1,355 +1,190 @@
1
- # Workflow: roadmap
2
-
3
- Interactive roadmap creation with iterative refinement. Lightweight path from requirements to roadmap without full specification documents.
4
-
5
- ---
6
-
7
- ## Worktree Guard
8
-
9
- Block if `.workflow/worktree-scope.json` exists — must run from main worktree.
10
-
11
- ## Step 1: Session Initialization
12
-
13
- Parse flags from `$ARGUMENTS`:
14
- - `--yes` / `-y` → auto mode
15
- - `--continue` / `-c` resume from last state
16
- - `--mode` / `-m` `progressive|direct|auto` (default: auto)
17
- - `--from-brainstorm <SESSION-ID>` → import brainstorm session
18
- - Remaining text → requirement (slugified for directory name)
19
-
20
- **Session directory**: `.workflow/.roadmap/RMAP-{slug}-{date}/`
21
-
22
- **Continue mode**: If `-c` and session exists, resume from last state.
23
-
24
- **Brainstorm import**: If `--from-brainstorm`, read `guidance-specification.md` for enriched context (problem statement, features, non-goals, terminology).
25
-
26
- ---
27
-
28
- ## Step 1.5: Load Project Context
29
-
30
- ### 1.5.1: Load Specs
31
- ```
32
- specs_content = maestro spec load --category arch
33
- ```
34
- Ensure phases in Step 2 respect architectural constraints.
35
-
36
- ### 1.5.2: Load Project History (if `.workflow/` exists)
37
-
38
- Read project artifacts to understand what has already been built and what carries forward:
39
-
40
- - `project.md` already_shipped (Validated), current_scope (Active), project_history (Context), locked_decisions (Key Decisions)
41
- - `state.json.accumulated_context` → deferred[] (candidate reqs), key_decisions[] (constraints), blockers[] (risks)
42
- - `.workflow/codebase/` feature inventory from codebase docs
43
-
44
- **Context assembly** pass to Step 2 as `project_context`:
45
- ```json
46
- {
47
- "already_shipped": ["REQ-001: User auth", "REQ-002: API layer"],
48
- "current_scope": ["REQ-003: Payments", "REQ-004: i18n"],
49
- "deferred_from_previous": ["Internationalization deferred from v1.0"],
50
- "locked_decisions": ["JWT stateless auth", "PostgreSQL"],
51
- "learnings": ["JWT has perf issues at scale — consider caching"],
52
- "project_history": "Milestone v1.0 completed 2026-03-15: auth + API layer shipped"
53
- }
54
- ```
55
-
56
- **Rules**:
57
- - NEVER re-plan features listed in `already_shipped` — they are done
58
- - `deferred_from_previous` items are HIGH PRIORITY candidates for new phases
59
- - `locked_decisions` constrain technology choices in decomposition
60
- - `learnings` inform risk assessment and phase sizing
61
-
62
- ---
63
-
64
- ## Step 2: Requirement Understanding & Strategy
65
-
66
- **Objective**: Parse requirement, assess uncertainty, select decomposition strategy.
67
-
68
- 1. **Parse Requirement**
69
- - Extract: goal, constraints, stakeholders, keywords
70
- - If `--from-brainstorm`: enrich from guidance-specification.md
71
- - If `project_context` loaded (Step 1.5.2): merge into requirement analysis
72
- - Cross-reference requirement against `already_shipped` flag overlaps as "already done"
73
- - Promote `deferred_from_previous` items into active requirement scope
74
- - Apply `locked_decisions` as constraints
75
-
76
- 2. **Codebase Exploration (conditional)**
77
- - Detect if project has source files
78
- - If yes: spawn `cli-explore-agent` for context discovery
79
- - If `project_context.already_shipped` exists: include as "feature audit" directive —
80
- agent should verify which shipped features are present in code and identify integration points for new work
81
- - Output: relevant files, patterns, tech stack, feature_audit (existing capabilities mapped to shipped requirements)
82
-
83
- 3. **External Research — API & Technology Details (Optional)**
84
-
85
- Spawn `workflow-external-researcher` agent when requirement mentions specific technologies, APIs, or external services.
86
-
87
- **Trigger**: Technology keywords detected in requirement or codebase exploration found external dependencies. Auto-trigger in auto mode (`-y`). Skip if requirement is purely organizational.
88
-
89
- Extract named technologies/APIs/frameworks/protocols from requirement + codebase exploration.
90
-
91
- If topics found → spawn `workflow-external-researcher` agent for API research:
92
- - Per technology: stable version, core API surface, auth model, integration patterns, limitations, effort signals
93
- - Focus on details affecting phase decomposition and dependency ordering
94
- - Output `apiResearchContext` (in-memory)
95
-
96
- If no topics or research fails → `apiResearchContext = null`, continue.
97
-
98
- `apiResearchContext` is passed into:
99
- - Step 3 (Decomposition): technology complexity informs phase sizing and ordering
100
- - Step 4 (Refinement): API constraints surface realistic dependency chains
101
-
102
- If research fails: `apiResearchContext = null`, continue without external context.
103
-
104
- 4. **Assess Uncertainty**
105
- - Factors: scope_clarity, technical_risk, dependency_unknown, domain_familiarity, requirement_stability (each: low/medium/high)
106
- - >=3 high → progressive, >=3 low → direct, else → ask
107
-
108
- 5. **Strategy Selection** (skip if `-m` specified or `-y`)
109
- - Present uncertainty assessment
110
- - User selects: Progressive or Direct
111
- - `-y`: use recommended strategy
112
-
113
- ---
114
-
115
- ## Step 3: Decomposition
116
-
117
- **Objective**: Break requirement into phases via CLI-assisted analysis.
118
-
119
- Spawn `cli-roadmap-plan-agent`.
120
- If `apiResearchContext` is set: include as "External API Research" context in the agent prompt — technology complexity, API constraints, and integration effort inform phase sizing and dependency ordering.
121
-
122
- ### Minimum-Phase Principle (MANDATORY)
123
-
124
- **Core rule: Phase = synchronization barrier.** Each Phase triggers a full plan→execute→verify→transition serial cycle. More phases = slower delivery. The wave DAG inside each Phase already handles task ordering and parallelism, so only create a new Phase when tasks **cannot** start until a previous Phase's entire output exists.
125
-
126
- **Default: 1 Phase.** Put everything into a single Phase unless a hard dependency forces a split.
127
-
128
- | Rule | Constraint |
129
- |------|-----------|
130
- | **Default** | **1 Phase**. All work in one plan→execute cycle; wave DAG handles internal ordering. |
131
- | **Maximum** | **2 Phases**. Only when a hard dependency boundary exists that cannot be resolved. |
132
- | **Exceptional** | **3 Phases**. Must explicitly justify why 2 is insufficient. |
133
- | **Minimum tasks per phase** | 5 tasks. If a phase would have fewer, merge it into an adjacent phase. |
134
- | **Merge principle** | Same-module, same-concern, or tightly-coupled work belongs in ONE phase. Infra + core logic + API in one phase is fine. |
135
- | **Split principle** | Only split when ALL three hard-dependency conditions are met (see below). |
136
-
137
- **Hard dependency all three conditions required to justify a Phase split:**
138
- 1. **Runtime dependency**: Phase B code at runtime MUST call Phase A's real output (cannot mock/stub).
139
- 2. **Not parallelizable**: A and B cannot develop concurrently via contract/interface/type agreement.
140
- 3. **Full barrier**: ALL of Phase A's tasks must complete before ANY of Phase B's tasks can start.
141
-
142
- If only 1-2 conditions are met keep in the same Phase, use wave dependencies instead.
143
-
144
- **Phase sizing checklist (applied after decomposition, before presenting to user):**
145
- 1. Count total phases. If > 2 → justify each split against the 3 hard-dependency conditions, merge if unjustified.
146
- 2. Count estimated tasks per phase. Any phase < 5 tasks → merge into neighbor.
147
- 3. Verify each phase has a meaningful deliverable boundary (not just "setup" or "cleanup").
148
-
149
- **Scope escalation:**
150
- - **Single project** (any size): 1-2 Phases. Use wave DAG for internal parallelism.
151
- - **Large scope** (monorepo with 2+ independently deployable services): Use **Milestones** to divide scope. Each Milestone follows the 1-2 Phase limit independently.
152
-
153
- **Progressive mode**:
154
- - Progressive layers (MVP Usable → Refined) map to **Milestones**, not Phases.
155
- - Each Milestone contains 1-2 Phases following the minimum-phase principle.
156
- - MVP must be self-contained (no external dependencies)
157
- - Each feature in exactly ONE milestone (no overlap)
158
-
159
- **Direct mode**:
160
- - Topologically-sorted task sequence
161
- - Each task: title, type, scope, inputs, outputs, convergence, depends_on
162
- - parallel_group for truly independent tasks
163
-
164
- **Phase format** (both modes):
165
- ```markdown
166
- ### Phase {N}: {Title}
167
- - **Goal**: <what this phase achieves>
168
- - **Depends on**: <prerequisite phases or "Nothing">
169
- - **Requirements**: <REQ-IDs mapped from project.md Active requirements>
170
- - **Success Criteria** (what must be TRUE):
171
- 1. <observable behavior from user perspective>
172
- 2. <observable behavior from user perspective>
173
- ```
174
-
175
- Phase numbering: integers (1, 2, 3) for planned work, decimals (2.1, 2.2) for inserted phases.
176
- Decimal phases count toward the total phase limit.
177
- Phase directories use `{NN}-{slug}` format (e.g., `01-auth`, `02-api`).
178
-
179
- **Requirements traceability**: Every Active requirement from project.md MUST appear in exactly one phase's Requirements field. If a requirement maps to no phase, surface it as a gap.
180
-
181
- ---
182
-
183
- ## Step 4: Iterative Refinement
184
-
185
- **Objective**: Multi-round user feedback to refine roadmap.
186
-
187
- 1. **Present Roadmap**
188
- - Phase count, milestone structure, dependency graph
189
- - Key success criteria per phase
190
-
191
- 2. **Gather Feedback** (skip if `-y` or `config.gates.confirm_roadmap == false`)
192
- - Options: Approve / Adjust Scope / Reorder / Split-Merge / Re-decompose
193
- - Max 5 rounds
194
-
195
- 3. **Process Feedback**
196
- - **Approve**: Run minimum-phase checklist (Step 3 rules) before accepting. If violations found, auto-merge and inform user.
197
- - **Adjust Scope**: Move features between milestones, modify criteria
198
- - **Reorder**: Change phase sequencing
199
- - **Split/Merge**: Break large phases or combine small ones (enforce min 5 tasks, max 2 phases)
200
- - **Re-decompose**: Return to Step 3 with new strategy
201
-
202
- 4. **Loop** until approved or max rounds reached
203
-
204
- ---
205
-
206
- ## Step 5: Write Outputs
207
-
208
- 1. **Write roadmap.md** to `.workflow/roadmap.md` using @templates/roadmap.md:
209
- ```markdown
210
- # Roadmap: {project_name}
211
-
212
- ## Overview
213
- <one paragraph describing the journey>
214
-
215
- ## Phases
216
- - [ ] **Phase 1: {Title}** - {one-line description}
217
- - [ ] **Phase 2: {Title}** - {one-line description}
218
-
219
- ## Phase Details
220
-
221
- ### Phase 1: {Title}
222
- **Goal**: {what this phase delivers}
223
- **Depends on**: Nothing (first phase)
224
- **Requirements**: {REQ-IDs from project.md Active requirements}
225
- **Success Criteria** (what must be TRUE):
226
- 1. {observable behavior from user perspective}
227
- 2. {observable behavior from user perspective}
228
-
229
- ### Phase 2: {Title}
230
- **Goal**: {what this phase delivers}
231
- **Depends on**: Phase 1
232
- **Requirements**: {REQ-IDs}
233
- **Success Criteria** (what must be TRUE):
234
- 1. {observable behavior}
235
-
236
- ## Scope Decisions
237
- - In scope: <included>
238
- - Deferred: <later milestones>
239
- - Out of scope: <excluded>
240
-
241
- ## Progress
242
- | Phase | Status | Completed |
243
- |-------|--------|-----------|
244
- | 1. {Title} | Not started | - |
245
- ```
246
-
247
- **Requirements traceability**: Cross-check that every Active requirement from project.md maps to exactly one phase. Surface unmapped requirements as gaps.
248
-
249
- 2. **Ensure scratch directory**: `mkdir -p .workflow/scratch/`
250
-
251
- 3. **Update state.json** (if exists): set milestones from roadmap, set `current_milestone` to first milestone
252
-
253
- ---
254
-
255
- ## Step 6: Handoff
256
-
257
- Display summary and offer next steps:
258
-
259
- Display summary (strategy, phase count, milestones, roadmap path) and offer next steps:
260
- - `maestro-init` — set up project (if not yet initialized)
261
- - `maestro-plan 1` — plan first phase
262
- - `maestro-brainstorm 1` — explore first phase ideas
263
- - `manage-status` — view project dashboard
264
-
265
- ---
266
-
267
- ## Mode: Revise (`--revise [instructions]`)
268
-
269
- Revise an existing roadmap while preserving completed phase progress.
270
-
271
- **Pre-conditions:**
272
- - `.workflow/roadmap.md` exists
273
- - `.workflow/state.json` exists (for progress tracking)
274
-
275
- **Execution flow:**
276
-
277
- 1. **Load current state**
278
- - Read `.workflow/roadmap.md` — parse milestones, phases, dependencies, progress markers
279
- - Read `.workflow/state.json` — get artifact registry, current milestone
280
- - Identify completed vs in-progress vs pending phases
281
-
282
- 2. **Obtain revision instructions**
283
- - If `--revise "instructions text"` provided → use directly as change directive
284
- - If `--revise` without instructions → use AskUserQuestion to ask user what to change
285
- - Show current roadmap summary with phase statuses
286
- - Present options: add/remove/reorder phases, modify scope/criteria/deps, move between milestones
287
- - Capture change instructions from response
288
-
289
- 3. **Impact analysis**
290
- - For each proposed change, assess impact on:
291
- - Phase dependency chain (re-validate no circular deps)
292
- - Requirement coverage (every Active requirement still mapped)
293
- - Completed phases (warn if change invalidates completed work)
294
- - Existing plan artifacts (warn if plan exists for affected phase)
295
- - Present impact summary for confirmation
296
-
297
- 4. **Apply revisions**
298
- - Update `.workflow/roadmap.md` preserving:
299
- - Completed phase progress markers (checkmarks, completion dates)
300
- - Phase numbering for completed phases (renumber only pending phases)
301
- - Cross-references from state.json artifacts
302
- - Update `state.json` if milestone structure changed
303
- - Add revision log entry to roadmap.md metadata section
304
-
305
- 5. **Post-revision validation**
306
- - Re-check dependency integrity (no circular deps)
307
- - Re-check requirement coverage (every Active req mapped)
308
- - Verify completed phases unaffected
309
-
310
- **Next-step routing on completion:**
311
- - Phases changed, need re-analysis → `/maestro-analyze {phase}`
312
- - Phases changed, ready to plan → `/maestro-plan {phase}`
313
- - Only pending phases adjusted → `/maestro-plan` (continue from where left off)
314
-
315
- ---
316
-
317
- ## Mode: Review (`--review`)
318
-
319
- Read-only health assessment of the current roadmap.
320
-
321
- **Pre-conditions:**
322
- - `.workflow/roadmap.md` exists
323
-
324
- **Execution flow:**
325
-
326
- 1. **Load roadmap + execution history**
327
- - Read `.workflow/roadmap.md` — full structure
328
- - Read `.workflow/state.json` — artifact registry, milestone progress
329
- - Cross-reference: for each phase, check ANL/PLN/EXC/VRF artifact status
330
-
331
- 2. **Assessment dimensions**
332
- - **Progress tracking**: Actual vs planned per phase, milestone velocity
333
- - **Drift detection**: Completed phases deviating from original scope (via verify/audit findings)
334
- - **Relevance check**: Pending phases still aligned with current project goals (from project.md)
335
- - **Dependency health**: Pending phase dependencies still valid given completed work
336
- - **Risk assessment**: Identify phases at risk (blocked, scope creep, dependency failures)
337
-
338
- 3. **Produce review report**
339
- - Write to `.workflow/scratch/{YYYYMMDD}-roadmap-review.md`
340
- - Format:
341
- ```
342
- === ROADMAP REVIEW ===
343
- Milestone: {current}
344
- Progress: {completed}/{total} phases ({percentage}%)
345
- Drift: {none|minor|significant} | Risk: {low|medium|high}
346
-
347
- Phase Assessment:
348
- [done] Phase 1: {name} — completed, on-scope
349
- [~] Phase 2: {name} — in-progress, {notes}
350
- [ ] Phase 3: {name} — pending, {risk/notes}
351
-
352
- Suggested: /maestro-roadmap --revise | /maestro-plan {phase} | /manage-status
353
- ```
354
-
355
- **No state modifications.** Pure assessment + recommendations.
1
+ # Workflow: Roadmap (Light Mode)
2
+
3
+ Lightweight path from requirements to roadmap without full specification documents.
4
+
5
+ **Shared logic**: `@roadmap-common.md` (worktree guard, context loading, codebase exploration, external research, minimum-phase principle, roadmap write logic)
6
+
7
+ ---
8
+
9
+ ## Step 1: Session Initialization
10
+
11
+ Parse flags from `$ARGUMENTS`:
12
+ - `--yes` / `-y` → auto mode
13
+ - `--continue` / `-c` → resume from last state
14
+ - `--mode` / `-m` → `progressive|direct|auto` (default: auto)
15
+ - `--from-brainstorm <SESSION-ID>`import brainstorm session
16
+ - Remaining textrequirement (slugified for directory name)
17
+
18
+ **Session directory**: `.workflow/.roadmap/RMAP-{slug}-{date}/`
19
+
20
+ **Continue mode**: If `-c` and session exists, resume from last state.
21
+
22
+ **Brainstorm import**: If `--from-brainstorm`, read `guidance-specification.md` for enriched context (problem statement, features, non-goals, terminology).
23
+
24
+ ---
25
+
26
+ ## Step 2: Requirement Understanding & Strategy
27
+
28
+ **Objective**: Parse requirement, assess uncertainty, select decomposition strategy.
29
+
30
+ 1. **Parse Requirement**
31
+ - Extract: goal, constraints, stakeholders, keywords
32
+ - If `--from-brainstorm`: enrich from guidance-specification.md
33
+ - If `project_context` loaded: merge into requirement analysis
34
+ - Cross-reference requirement against `already_shipped` flag overlaps as "already done"
35
+ - Promote `deferred_from_previous` items into active requirement scope
36
+ - Apply `locked_decisions` as constraints
37
+
38
+ 2. **Codebase Exploration** follow roadmap-common.md
39
+
40
+ 3. **External Research** follow roadmap-common.md
41
+
42
+ `apiResearchContext` is passed into:
43
+ - Step 3 (Decomposition): technology complexity informs phase sizing and ordering
44
+ - Step 4 (Refinement): API constraints surface realistic dependency chains
45
+
46
+ 4. **Assess Uncertainty**
47
+ - Factors: scope_clarity, technical_risk, dependency_unknown, domain_familiarity, requirement_stability (each: low/medium/high)
48
+ - >=3 high → progressive, >=3 low → direct, else → ask
49
+
50
+ 5. **Strategy Selection** (skip if `-m` specified or `-y`)
51
+ - Present uncertainty assessment
52
+ - User selects: Progressive or Direct
53
+ - `-y`: use recommended strategy
54
+
55
+ ---
56
+
57
+ ## Step 3: Decomposition
58
+
59
+ **Objective**: Break requirement into phases via CLI-assisted analysis.
60
+
61
+ Spawn `cli-roadmap-plan-agent`.
62
+ If `apiResearchContext` is set: include as "External API Research" context in the agent prompt.
63
+
64
+ Apply **Minimum-Phase Principle** from roadmap-common.md.
65
+
66
+ ---
67
+
68
+ ## Step 4: Iterative Refinement
69
+
70
+ **Objective**: Multi-round user feedback to refine roadmap.
71
+
72
+ 1. **Present Roadmap** phase count, milestone structure, dependency graph, key success criteria
73
+ 2. **Gather Feedback** (skip if `-y` or `config.gates.confirm_roadmap == false`)
74
+ - Options: Approve / Adjust Scope / Reorder / Split-Merge / Re-decompose
75
+ - Max 5 rounds
76
+ 3. **Process Feedback**
77
+ - **Approve**: Run minimum-phase checklist before accepting. If violations found, auto-merge and inform user.
78
+ - **Adjust Scope**: Move features between milestones, modify criteria
79
+ - **Reorder**: Change phase sequencing
80
+ - **Split/Merge**: Break large phases or combine small ones (enforce min 5 tasks, max 2 phases)
81
+ - **Re-decompose**: Return to Step 3 with new strategy
82
+ 4. **Loop** until approved or max rounds reached
83
+
84
+ ---
85
+
86
+ ## Step 5: Write Outputs
87
+
88
+ Follow roadmap-common.md **Roadmap Write Logic** (overwrite vs edit rules, state.json update, scratch directory).
89
+
90
+ ---
91
+
92
+ ## Step 6: Handoff
93
+
94
+ Display summary (strategy, phase count, milestones, roadmap path) and offer next steps:
95
+ - `maestro-init` — set up project (if not yet initialized)
96
+ - `maestro-plan 1` plan first phase
97
+ - `maestro-brainstorm 1` — explore first phase ideas
98
+ - `manage-status` view project dashboard
99
+
100
+ ---
101
+
102
+ ## Mode: Revise (`--revise [instructions]`)
103
+
104
+ Revise an existing roadmap while preserving completed phase progress.
105
+
106
+ **Pre-conditions:**
107
+ - `.workflow/roadmap.md` exists
108
+ - `.workflow/state.json` exists (for progress tracking)
109
+
110
+ **Execution flow:**
111
+
112
+ 1. **Load current state**
113
+ - Read `.workflow/roadmap.md` — parse milestones, phases, dependencies, progress markers
114
+ - Read `.workflow/state.json` — get artifact registry, current milestone
115
+ - Identify completed vs in-progress vs pending phases
116
+
117
+ 2. **Obtain revision instructions**
118
+ - If `--revise "instructions text"` provided → use directly as change directive
119
+ - If `--revise` without instructions → use AskUserQuestion to ask user what to change
120
+ - Show current roadmap summary with phase statuses
121
+ - Present options: add/remove/reorder phases, modify scope/criteria/deps, move between milestones
122
+ - Capture change instructions from response
123
+
124
+ 3. **Impact analysis**
125
+ - For each proposed change, assess impact on:
126
+ - Phase dependency chain (re-validate no circular deps)
127
+ - Requirement coverage (every Active requirement still mapped)
128
+ - Completed phases (warn if change invalidates completed work)
129
+ - Existing plan artifacts (warn if plan exists for affected phase)
130
+ - Present impact summary for confirmation
131
+
132
+ 4. **Apply revisions**
133
+ - Update `.workflow/roadmap.md` preserving:
134
+ - Completed phase progress markers (checkmarks, completion dates)
135
+ - Phase numbering for completed phases (renumber only pending phases)
136
+ - Cross-references from state.json artifacts
137
+ - Update `state.json` if milestone structure changed
138
+ - Add revision log entry to roadmap.md metadata section
139
+
140
+ 5. **Post-revision validation**
141
+ - Re-check dependency integrity (no circular deps)
142
+ - Re-check requirement coverage (every Active req mapped)
143
+ - Verify completed phases unaffected
144
+
145
+ **Next-step routing on completion:**
146
+ - Phases changed, need re-analysis `/maestro-analyze {phase}`
147
+ - Phases changed, ready to plan `/maestro-plan {phase}`
148
+ - Only pending phases adjusted → `/maestro-plan` (continue from where left off)
149
+
150
+ ---
151
+
152
+ ## Mode: Review (`--review`)
153
+
154
+ Read-only health assessment of the current roadmap.
155
+
156
+ **Pre-conditions:**
157
+ - `.workflow/roadmap.md` exists
158
+
159
+ **Execution flow:**
160
+
161
+ 1. **Load roadmap + execution history**
162
+ - Read `.workflow/roadmap.md` full structure
163
+ - Read `.workflow/state.json` — artifact registry, milestone progress
164
+ - Cross-reference: for each phase, check ANL/PLN/EXC/VRF artifact status
165
+
166
+ 2. **Assessment dimensions**
167
+ - **Progress tracking**: Actual vs planned per phase, milestone velocity
168
+ - **Drift detection**: Completed phases deviating from original scope (via verify/audit findings)
169
+ - **Relevance check**: Pending phases still aligned with current project goals (from project.md)
170
+ - **Dependency health**: Pending phase dependencies still valid given completed work
171
+ - **Risk assessment**: Identify phases at risk (blocked, scope creep, dependency failures)
172
+
173
+ 3. **Produce review report**
174
+ - Write to `.workflow/scratch/{YYYYMMDD}-roadmap-review.md`
175
+ - Format:
176
+ ```
177
+ === ROADMAP REVIEW ===
178
+ Milestone: {current}
179
+ Progress: {completed}/{total} phases ({percentage}%)
180
+ Drift: {none|minor|significant} | Risk: {low|medium|high}
181
+
182
+ Phase Assessment:
183
+ [done] Phase 1: {name} — completed, on-scope
184
+ [~] Phase 2: {name} — in-progress, {notes}
185
+ [ ] Phase 3: {name} pending, {risk/notes}
186
+
187
+ Suggested: /maestro-roadmap --revise | /maestro-plan {phase} | /manage-status
188
+ ```
189
+
190
+ **No state modifications.** Pure assessment + recommendations.