maestro-flow 0.5.37 → 0.5.38

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 (152) hide show
  1. package/.agents/skills/maestro/SKILL.md +11 -5
  2. package/.agents/skills/maestro-ralph/SKILL.md +80 -12
  3. package/.agents/skills/maestro-ralph-execute/SKILL.md +17 -6
  4. package/.agents/skills/manage-drift-realign/SKILL.md +153 -0
  5. package/.agy/skills/maestro/SKILL.md +11 -5
  6. package/.agy/skills/maestro-ralph/SKILL.md +80 -12
  7. package/.agy/skills/maestro-ralph-execute/SKILL.md +17 -6
  8. package/.agy/skills/manage-drift-realign/SKILL.md +153 -0
  9. package/.claude/commands/maestro-ralph-execute.md +17 -6
  10. package/.claude/commands/maestro-ralph.md +80 -12
  11. package/.claude/commands/maestro.md +11 -5
  12. package/.claude/commands/manage-drift-realign.md +151 -0
  13. package/.codex/skills/maestro/SKILL.md +16 -8
  14. package/.codex/skills/maestro-ralph/SKILL.md +138 -11
  15. package/.codex/skills/maestro-ralph-execute/SKILL.md +17 -6
  16. package/.codex/skills/manage-drift-realign/SKILL.md +471 -0
  17. package/README.md +25 -8
  18. package/README.zh-CN.md +6 -6
  19. package/dashboard/dist-server/src/commands/install-backend.d.ts +10 -0
  20. package/dashboard/dist-server/src/commands/install-backend.js +69 -0
  21. package/dashboard/dist-server/src/commands/install-backend.js.map +1 -1
  22. package/dashboard/dist-server/src/core/component-defs.d.ts +11 -0
  23. package/dashboard/dist-server/src/core/component-defs.js +34 -2
  24. package/dashboard/dist-server/src/core/component-defs.js.map +1 -1
  25. package/dist/src/cli.js +3 -2
  26. package/dist/src/cli.js.map +1 -1
  27. package/dist/src/commands/install-backend.d.ts +10 -0
  28. package/dist/src/commands/install-backend.d.ts.map +1 -1
  29. package/dist/src/commands/install-backend.js +69 -0
  30. package/dist/src/commands/install-backend.js.map +1 -1
  31. package/dist/src/commands/install.js +1 -0
  32. package/dist/src/commands/install.js.map +1 -1
  33. package/dist/src/commands/ralph.d.ts.map +1 -1
  34. package/dist/src/commands/ralph.js +8 -0
  35. package/dist/src/commands/ralph.js.map +1 -1
  36. package/dist/src/commands/timeline.d.ts +14 -0
  37. package/dist/src/commands/timeline.d.ts.map +1 -0
  38. package/dist/src/commands/timeline.js +377 -0
  39. package/dist/src/commands/timeline.js.map +1 -0
  40. package/dist/src/core/component-defs.d.ts +11 -0
  41. package/dist/src/core/component-defs.d.ts.map +1 -1
  42. package/dist/src/core/component-defs.js +34 -2
  43. package/dist/src/core/component-defs.js.map +1 -1
  44. package/dist/src/core/install-executor.d.ts.map +1 -1
  45. package/dist/src/core/install-executor.js +11 -1
  46. package/dist/src/core/install-executor.js.map +1 -1
  47. package/dist/src/core/install-profile.d.ts.map +1 -1
  48. package/dist/src/core/install-profile.js +52 -17
  49. package/dist/src/core/install-profile.js.map +1 -1
  50. package/dist/src/i18n/locales/en.d.ts.map +1 -1
  51. package/dist/src/i18n/locales/en.js +4 -1
  52. package/dist/src/i18n/locales/en.js.map +1 -1
  53. package/dist/src/i18n/locales/zh.d.ts.map +1 -1
  54. package/dist/src/i18n/locales/zh.js +4 -1
  55. package/dist/src/i18n/locales/zh.js.map +1 -1
  56. package/dist/src/i18n/types.d.ts +3 -0
  57. package/dist/src/i18n/types.d.ts.map +1 -1
  58. package/dist/src/ralph/cmd-complete.d.ts +4 -0
  59. package/dist/src/ralph/cmd-complete.d.ts.map +1 -1
  60. package/dist/src/ralph/cmd-complete.js +8 -0
  61. package/dist/src/ralph/cmd-complete.js.map +1 -1
  62. package/dist/src/ralph/cmd-next.js +58 -8
  63. package/dist/src/ralph/cmd-next.js.map +1 -1
  64. package/dist/src/ralph/status-schema.d.ts +29 -2
  65. package/dist/src/ralph/status-schema.d.ts.map +1 -1
  66. package/dist/src/ralph/status-schema.js +1 -1
  67. package/dist/src/tui/install-ui/ComponentGrid.d.ts.map +1 -1
  68. package/dist/src/tui/install-ui/ComponentGrid.js +71 -38
  69. package/dist/src/tui/install-ui/ComponentGrid.js.map +1 -1
  70. package/dist/src/tui/install-ui/ComponentGrid.logic.d.ts +12 -3
  71. package/dist/src/tui/install-ui/ComponentGrid.logic.d.ts.map +1 -1
  72. package/dist/src/tui/install-ui/ComponentGrid.logic.js +21 -4
  73. package/dist/src/tui/install-ui/ComponentGrid.logic.js.map +1 -1
  74. package/dist/src/tui/install-ui/CyberItem.d.ts +3 -1
  75. package/dist/src/tui/install-ui/CyberItem.d.ts.map +1 -1
  76. package/dist/src/tui/install-ui/CyberItem.js +6 -5
  77. package/dist/src/tui/install-ui/CyberItem.js.map +1 -1
  78. package/dist/src/tui/install-ui/GroupedHub.d.ts +9 -0
  79. package/dist/src/tui/install-ui/GroupedHub.d.ts.map +1 -1
  80. package/dist/src/tui/install-ui/GroupedHub.js +54 -47
  81. package/dist/src/tui/install-ui/GroupedHub.js.map +1 -1
  82. package/dist/src/tui/install-ui/InstallConfirm.js +1 -1
  83. package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
  84. package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
  85. package/dist/src/tui/install-ui/InstallFlow.js +54 -5
  86. package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
  87. package/dist/src/tui/install-ui/types.d.ts +1 -0
  88. package/dist/src/tui/install-ui/types.d.ts.map +1 -1
  89. package/dist/src/tui/install-ui/types.js.map +1 -1
  90. package/dist/src/tui/install-ui/useInstallFlowState.d.ts +8 -2
  91. package/dist/src/tui/install-ui/useInstallFlowState.d.ts.map +1 -1
  92. package/dist/src/tui/install-ui/useInstallFlowState.js +145 -15
  93. package/dist/src/tui/install-ui/useInstallFlowState.js.map +1 -1
  94. package/dist/src/utils/update-notices.js +12 -0
  95. package/dist/src/utils/update-notices.js.map +1 -1
  96. package/package.json +1 -1
  97. package/workflows/agy-instructions.md +127 -88
  98. package/workflows/analyze.md +2 -2
  99. package/workflows/auto-test.md +7 -1
  100. package/workflows/blueprint.md +22 -19
  101. package/workflows/brainstorm.md +11 -3
  102. package/workflows/business-test.md +4 -0
  103. package/workflows/codebase-rebuild.md +8 -1
  104. package/workflows/codebase-refresh.md +7 -1
  105. package/workflows/codex-instructions.md +1 -1
  106. package/workflows/debug.md +5 -2
  107. package/workflows/domain-add.md +6 -0
  108. package/workflows/drift-realign.md +396 -0
  109. package/workflows/execute.md +5 -4
  110. package/workflows/explore-usage.md +2 -2
  111. package/workflows/finish-work.md +6 -6
  112. package/workflows/fork.md +2 -2
  113. package/workflows/grill.md +6 -5
  114. package/workflows/harvest.md +2 -2
  115. package/workflows/impeccable.md +3 -2
  116. package/workflows/init.md +7 -7
  117. package/workflows/integration-test.md +1 -0
  118. package/workflows/issue-gaps-analyze.codex.md +2 -0
  119. package/workflows/issue-gaps-analyze.md +4 -4
  120. package/workflows/issue-plan.md +1 -1
  121. package/workflows/knowhow.md +7 -1
  122. package/workflows/knowledge-audit.md +1 -1
  123. package/workflows/maestro-super.md +2 -2
  124. package/workflows/maestro.md +3 -3
  125. package/workflows/map.md +2 -2
  126. package/workflows/milestone-audit.md +1 -1
  127. package/workflows/milestone-complete.md +1 -1
  128. package/workflows/plan.md +7 -6
  129. package/workflows/quick.md +8 -6
  130. package/workflows/ralph-amend-goal.md +177 -0
  131. package/workflows/refactor.md +2 -0
  132. package/workflows/retrospective.md +7 -3
  133. package/workflows/review.md +6 -4
  134. package/workflows/roadmap-common.md +3 -3
  135. package/workflows/roadmap.md +8 -5
  136. package/workflows/spec-generate.md +23 -18
  137. package/workflows/specs-load.md +1 -1
  138. package/workflows/specs-setup.md +2 -0
  139. package/workflows/sync.md +4 -2
  140. package/workflows/test-gen.md +1 -1
  141. package/workflows/test.md +1 -1
  142. package/workflows/ui-codify-extract.md +1 -0
  143. package/workflows/ui-codify-knowhow.md +1 -1
  144. package/workflows/ui-codify-package.md +1 -1
  145. package/workflows/ui-codify.md +9 -7
  146. package/workflows/ui-design.md +9 -7
  147. package/workflows/ui-style.md +6 -4
  148. package/workflows/verify.md +4 -4
  149. package/workflows/wiki-connect.md +2 -0
  150. package/workflows/wiki-digest.md +5 -3
  151. package/workflows/wiki-manage.md +4 -0
  152. package/workflows/maestro.codex.md +0 -365
@@ -30,6 +30,7 @@ If existing session at `${PHASE_DIR}/.tests/integration/state.json`: offer resum
30
30
  ### Step 1.3: Load Project Specs
31
31
 
32
32
  ```
33
+ # MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep
33
34
  specs_content = maestro spec load --category test
34
35
  arch_content = maestro spec load --category arch
35
36
  ```
@@ -94,6 +94,7 @@ Write `tasks.csv` to session folder.
94
94
  Filter `wave == 1 && status == pending`. Write `wave-1.csv`.
95
95
 
96
96
  ```javascript
97
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep:
97
98
  spawn_agents_on_csv({
98
99
  csv_path: `${sessionFolder}/wave-1.csv`,
99
100
  id_column: "id",
@@ -121,6 +122,7 @@ Merge results into master `tasks.csv`, delete `wave-1.csv`.
121
122
  Filter `wave == 2 && status == pending`. Build `prev_context` from wave 1 findings of issues in same group. Write `wave-2.csv` with `prev_context` column.
122
123
 
123
124
  ```javascript
125
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep:
124
126
  spawn_agents_on_csv({
125
127
  csv_path: `${sessionFolder}/wave-2.csv`,
126
128
  id_column: "id",
@@ -68,7 +68,7 @@ For each group:
68
68
  Merge keywords from all issues in group: title, description, location, affected_components.
69
69
  Deduplicate keywords.
70
70
 
71
- Standard depth: maestro explore per group (keywords as prompt), fallback grep.
71
+ Standard depth: maestro explore per group (keywords as prompt), fallback grep; flag analysis as [LOW CONFIDENCE] (grep fallback, semantic depth lost).
72
72
  Deep depth: maestro explore multi-prompt + semantic Agent search (error handling,
73
73
  data flow, deps), merge results.
74
74
 
@@ -81,7 +81,7 @@ For each group:
81
81
  ### Step 4: Run Analysis (per group, parallel across groups)
82
82
 
83
83
  ```
84
- Launch analysis for each group in parallel using Agent tool:
84
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Launch analysis for each group in parallel using Agent tool:
85
85
 
86
86
  Agent({
87
87
  subagent_type: "general-purpose",
@@ -97,10 +97,10 @@ Launch analysis for each group in parallel using Agent tool:
97
97
 
98
98
  Alternatively, attempt CLI delegate first per group:
99
99
 
100
- maestro delegate "<same prompt>" --role analyze --mode analysis
100
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: maestro delegate "<same prompt>" --role analyze --mode analysis
101
101
 
102
102
  If delegate fails (timeout, unavailable, parse error):
103
- Fall back to Agent tool with same prompt.
103
+ Fall back to Agent tool with same prompt; set analysis confidence=low and flag as [LOW CONFIDENCE] (delegate failed).
104
104
  Record fallback in analysis metadata: { tool: "agent-fallback", reason: "<error>" }
105
105
 
106
106
  Validate response per issue: all required fields present.
@@ -47,7 +47,7 @@ Otherwise ANALYSIS_CONTEXT = "" (proceed without).
47
47
  ```
48
48
  Delegate planning prompt with issue details + ANALYSIS_CONTEXT:
49
49
 
50
- maestro delegate "Generate step-by-step solution for {ISS-ID}: {ISSUE.title}
50
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: maestro delegate "Generate step-by-step solution for {ISS-ID}: {ISSUE.title}
51
51
  ISSUE: title, description, severity, location, fix_direction
52
52
  {ANALYSIS_CONTEXT}
53
53
  TASK: Break into atomic steps with action types (create|modify|delete|test)
@@ -69,7 +69,13 @@ Full-text search across both stores. Rank: exact match > heading > content.
69
69
 
70
70
  ### Step 5-9: View, Edit, Delete, Prune, Integrity Check
71
71
 
72
- Same logic as before. Workflow entries managed via WikiWriter; system entries via direct file ops.
72
+ MANDATORY: execute View/Edit/Delete/Prune/Integrity-Check logic per spec; REQUIRED produce: per-step result + final store-consistency report; BLOCKED if any step's produce missing.
73
+
74
+ - **View**: Workflow `maestro wiki get <slug>`, System Read file; BLOCKED if entry not found.
75
+ - **Edit**: System store only, direct file edit preserving frontmatter; BLOCKED if frontmatter schema invalid after edit.
76
+ - **Delete**: Workflow `maestro wiki delete <slug>`, System mv to `.workflow/.trash/`; REQUIRED produce backup; BLOCKED if backup missing.
77
+ - **Prune**: Scan `status=deprecated|superseded` entries, list candidates, delete after confirm; REQUIRED produce prune report; BLOCKED if delete without backup.
78
+ - **Integrity Check**: Workflow verify `wiki-index.json` matches disk, System verify MEMORY.md links; REQUIRED produce report {missing[], stale[]}; BLOCKED if missing>0.
73
79
 
74
80
  ---
75
81
 
@@ -350,5 +350,5 @@ Next:
350
350
  4. **Double confirmation** — `--purge` 需 flag + 交互输入 artifact id 双重确认
351
351
  5. **Rescue before delete** — 删 artifact 前若 harvest-log 无记录,强制提示先跑 `/manage-harvest`
352
352
  6. **No dedup re-run** — audit 不做"是否重复"判断(harvest 负责),只做"是否矛盾/失效/老化"
353
- 7. **Graceful degradation** — LLM detector 不可用时跳过 B/G 类语义场景,A/D/F 类正则+图算法仍可执行
353
+ 7. **Graceful degradation** — LLM detector 不可用时跳过 B/G 类语义场景,A/D/F 类正则+图算法仍可执行; Stage 8 报告加 partial_audit: true, skipped: [B,G] 并标 [LOW CONFIDENCE]
354
354
  8. **Idempotent** — 同一存储状态下重跑 `--dry-run` 必须输出一致的 finding 集
@@ -6,7 +6,7 @@ Super mode implies `-y` (all auto flags propagated) plus these additional behavi
6
6
 
7
7
  ## 1. Requirement Expansion
8
8
 
9
- On receiving user intent, autonomously expand incomplete requirements into a complete product scope. Delegate via role (`maestro delegate --role analyze --mode analysis`) for requirement completeness analysis and gap-filling. Accept requirements that add real user value; discard noise.
9
+ On receiving user intent, autonomously expand incomplete requirements into a complete product scope. MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Delegate via role (`maestro delegate --role analyze --mode analysis`) for requirement completeness analysis and gap-filling. Accept requirements that add real user value; discard noise.
10
10
 
11
11
  ## 2. Progressive Document Loading
12
12
 
@@ -14,7 +14,7 @@ Read execution documents (workflow maestro.md, chain steps) incrementally per-ph
14
14
 
15
15
  ## 3. Autonomous Decision-Making
16
16
 
17
- All design/architecture/scope decisions are made via Gemini delegate (`--mode analysis`). No AskUserQuestion calls. Decision criteria: mainstream industry standards, pragmatism, simplicity.
17
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: All design/architecture/scope decisions are made via Gemini delegate (`--mode analysis`). No AskUserQuestion calls. Decision criteria: mainstream industry standards, pragmatism, simplicity.
18
18
 
19
19
  ## 4. Auto-Advance Milestones
20
20
 
@@ -1,7 +1,7 @@
1
1
  # Workflow: maestro
2
2
 
3
3
  Intelligent coordinator that routes user intent to optimal command chain based on project state.
4
- Builds a `ralph_protocol_version: "1"` session: every executable step carries `skill,args,stage,scope,command_scope,command_path`; every cross-step gate is a `step.decision` node. All execution dispatched to unified executor (`maestro-ralph-execute`); the command body (`.claude/commands/maestro.md`) owns session build + dispatch. `--exec` is legacy input only — recorded to `legacy_options.exec_mode`, never changes execution. This brain is consumed for **classification only** (intent → task_type → chain); it does NOT prescribe execution semantics.
4
+ Builds a `ralph_protocol_version: "2"` session: every executable step carries `skill,args,stage,scope,command_scope,command_path`; every cross-step gate is a `step.decision` node. All execution dispatched to unified executor (`maestro-ralph-execute`); the command body (`.claude/commands/maestro.md`) owns session build + dispatch. `--exec` is legacy input only — recorded to `legacy_options.exec_mode`, never changes execution. This brain is consumed for **classification only** (intent → task_type → chain); it does NOT prescribe execution semantics.
5
5
 
6
6
  **Prerequisites:**
7
7
  - None for initial invocation (can bootstrap)
@@ -217,7 +217,7 @@ If user chooses "Execute from step N": set `$START_STEP = N` (used in 3f to set
217
217
 
218
218
  ### 3e: Step-level command resolution (v1)
219
219
 
220
- > **Superseded by `ralph_protocol_version: "1"`.** The command body resolves `command_scope`/`command_path` per execution step via `maestro ralph skills --platform claude --json --quiet`; cross-step gates carry `step.decision`. Do NOT write a per-step `type` field (legacy skill/cli). `--exec` is recorded to `legacy_options.exec_mode` only — it never changes execution. FSM owns step ordering + decision evaluation (control-plane precedence, see command-body invariant 15).
220
+ > **Superseded by `ralph_protocol_version: "2"`.** The command body resolves `command_scope`/`command_path` per execution step via `maestro ralph skills --platform claude --json --quiet`; cross-step gates carry `step.decision`. Do NOT write a per-step `type` field (legacy skill/cli). `--exec` is recorded to `legacy_options.exec_mode` only — it never changes execution. FSM owns step ordering + decision evaluation (control-plane precedence, see command-body invariant 15).
221
221
 
222
222
  ```
223
223
  If execMode is 'cli' or 'internal' → force that type for all steps ("cli" or "skill").
@@ -292,7 +292,7 @@ status.json already created in Step 3g, TodoWrite initialized in Step 3h.
292
292
  Skill({ skill: "maestro-ralph-execute" })
293
293
  ```
294
294
 
295
- The unified executor discovers the latest running session from `.workflow/.maestro/*/status.json` and executes steps in order. maestro sessions (source: "maestro") are `ralph_protocol_version: "1"`: execution steps load via `maestro ralph next`; any `step.decision` node hands off to `Skill("maestro-ralph")` for evaluation (same mechanism as ralph sessions). Decision nodes ARE supported in maestro sessions.
295
+ The unified executor discovers the latest running session from `.workflow/.maestro/*/status.json` and executes steps in order. maestro sessions (source: "maestro") are `ralph_protocol_version: "2"`: execution steps load via `maestro ralph next`; any `step.decision` node hands off to `Skill("maestro-ralph")` for evaluation (same mechanism as ralph sessions). Decision nodes ARE supported in maestro sessions.
296
296
 
297
297
  ---
298
298
 
package/workflows/map.md CHANGED
@@ -19,7 +19,7 @@ Codebase scanning with parallel mapper agents.
19
19
 
20
20
  ## Step 2: Spawn Parallel Mapper Agents
21
21
 
22
- Spawn 4 parallel `workflow-codebase-mapper` agents, each writing to `.workflow/research/`:
22
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Spawn 4 parallel `workflow-codebase-mapper` agents, each writing to `.workflow/research/`:
23
23
 
24
24
  | Agent | Focus | Output | Content |
25
25
  |-------|-------|--------|---------|
@@ -41,7 +41,7 @@ Each agent spawned in parallel as `workflow-codebase-mapper` subagent with specs
41
41
  After all 4 agents complete:
42
42
 
43
43
  1. Verify all 4 documents exist with >10 lines each.
44
- 2. If any missing/empty → log failure, re-spawn that agent (max 1 retry).
44
+ 2. If any missing/empty → log failure, re-spawn that agent (max 1 retry); after retry exhausted, flag SUMMARY as [LOW CONFIDENCE] (incomplete) and list missing docs.
45
45
 
46
46
  ---
47
47
 
@@ -46,7 +46,7 @@ For each execute artifact, read `{path}/.task/TASK-*.json` and verify all tasks
46
46
 
47
47
  ## Step 5: Integration Check
48
48
 
49
- Spawn `workflow-integration-checker` agent:
49
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Spawn `workflow-integration-checker` agent:
50
50
 
51
51
  ```
52
52
  Agent({
@@ -55,7 +55,7 @@
55
55
  - Update `archive.json.pruned = { "at": now, "counts": { open_questions, constraints, insights, references }, "ref": "context-package.pruned.json" }`
56
56
  - Otherwise leave both files untouched and set `archive.json.pruned = { "at": now, "counts": {...zeros}, "ref": null }`
57
57
 
58
- c. If the session dir lacks `archive.json` (legacy session prior to lifecycle convention), skip (a) and (b) silently legacy sessions are not indexed.
58
+ c. If the session dir lacks `archive.json` (legacy session prior to lifecycle convention), skip (a) and (b); log W0xx "legacy session not indexed"; flag archive as [LOW CONFIDENCE] (lifecycle.indexed=false, legacy session).
59
59
 
60
60
  ---
61
61
 
package/workflows/plan.md CHANGED
@@ -148,7 +148,7 @@ When `--tdd` is active:
148
148
  4b. **Load design reference** (if available)
149
149
  - If `${PHASE_DIR}/design-ref/MASTER.md` exists: load MASTER.md, design-tokens.json, animation-tokens.json (optional), layout-templates/layout-*.json
150
150
  - Every UI task must include in `read_first[]`: design-tokens.json, animation-tokens.json, relevant layout-*.json, MASTER.md
151
- - Else if phase goal matches UI keywords (`landing|page|dashboard|frontend|UI|component|界面`): suggest running `maestro-impeccable --chain build` (non-blocking)
151
+ - Else if phase goal matches UI keywords (`landing|page|dashboard|frontend|UI|component|界面`): run `maestro-impeccable --chain build` (REQUIRED when design keywords matched)
152
152
 
153
153
  5. **Load upstream analysis** (if available)
154
154
  - If `${PHASE_DIR}/conclusions.json` exists with non-empty status: load as explorationContext (conclusions + explorations.json + perspectives.json)
@@ -166,13 +166,14 @@ When `--tdd` is active:
166
166
 
167
167
  6. **Parallel exploration** (skip if `--gaps` or upstream analysis loaded)
168
168
  - Exploration angles (1-4 based on complexity): architecture, implementation, integration, risk
169
- - Spawn 1-4 `cli-explore-agent` in parallel, each with phase goal + success_criteria + one angle
169
+ - MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Spawn 1-4 `cli-explore-agent` in parallel, each with phase goal + success_criteria + one angle
170
170
  - Output: `.process/exploration-{angle}.json`, `.process/explorations-manifest.json`, `.process/context-package.json`
171
171
 
172
172
  6b. **CLI supplementary context** (runs in parallel with step 6, skip if `--gaps` or no CLI tools enabled)
173
173
  ```
174
174
  IF no CLI tools enabled: skip
175
175
 
176
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep:
176
177
  Bash({
177
178
  command: 'maestro delegate "PURPOSE: Gather implementation context for planning phase
178
179
  TASK: Identify existing patterns for similar features | Map dependency graph of target modules | Find potential conflict points with other recent changes
@@ -319,7 +320,7 @@ Bidirectional linking (main flow, post-planner): update matching issues in `.wor
319
320
 
320
321
  ### Steps
321
322
 
322
- 1. **Spawn workflow-plan-checker agent**
323
+ 1. MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: **Spawn workflow-plan-checker agent**
323
324
  - Input: plan.json + all .task/TASK-*.json + index.json (success_criteria)
324
325
  - Check dimensions: requirements coverage, feasibility, dependency correctness (no circular deps), convergence criteria quality (grep-verifiable, no subjective language), read_first completeness, action concreteness (no vague references), wave structure (no conflicting files), completeness (no orphan tasks), UI-observable coverage (when plan touches UI: each delivery wave has ≥1 `[UI-observable]` criterion)
325
326
 
@@ -335,7 +336,7 @@ Bidirectional linking (main flow, post-planner): update matching issues in `.wor
335
336
 
336
337
  4. **Plan Readiness Gate** (blocks P4.5)
337
338
 
338
- Block if: requirements_coverage < 40% | task missing read_first/convergence.criteria | no pressure pass | circular deps. If blocked → AskUserQuestion: 修订计划 or 忽略风险并继续 (record residual_risks). Add confidence section to plan.json.
339
+ Block if: requirements_coverage < 40% | task missing read_first/convergence.criteria | no pressure pass | circular deps. If blocked → AskUserQuestion: 修订计划 or 忽略风险并继续 (record residual_risks). Add confidence section to plan.json with `evidence_source: plan-checker findings (round N)`.
339
340
 
340
341
  5. **Update index.json**
341
342
  - Set `index.json.plan` = `{ task_ids, task_count, complexity, waves, executor_assignments: {}, confidence: overall_score }`
@@ -412,9 +413,9 @@ Bidirectional linking (main flow, post-planner): update matching issues in `.wor
412
413
  | E005: Plan directory not found (--check) | Check path, use --dir |
413
414
  | Phase directory not found | Abort with message: "Phase {phase} not found. Run /workflow:init first." |
414
415
  | No context.md | Warn, proceed with exploration only |
415
- | Exploration agent fails | Log error, continue with available explorations |
416
+ | Exploration agent fails | Log error, continue with available explorations; flag plan as [LOW CONFIDENCE] (partial explorations) |
416
417
  | Planner produces invalid JSON | Retry once, then abort with error details |
417
- | Plan-checker exceeds 3 rounds | Accept plan with warnings, note in index.json |
418
+ | Plan-checker exceeds 3 rounds | Accept plan with warnings, note in index.json; flag plan as [LOW CONFIDENCE] (checker unresolved) |
418
419
  | User cancels clarification | Proceed with available context |
419
420
 
420
421
  ---
@@ -215,7 +215,7 @@ Passed inline to planner agent in Step 5.
215
215
 
216
216
  **Spawn workflow-planner in quick mode:**
217
217
 
218
- Spawn `workflow-planner` agent with:
218
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Spawn `workflow-planner` agent with:
219
219
 
220
220
  - **Context**: mode (`quick` or `quick-full`), directory, description, state.json, CLAUDE.md, specs, context.md (if discuss mode)
221
221
  - **Constraints**: single plan with 1-3 atomic tasks, no research phase. Full mode: ~40% context usage + require files/action/convergence.criteria/implementation per task. Default: ~30% context usage.
@@ -243,7 +243,7 @@ Skip entirely if NOT $FULL_MODE.
243
243
  Spawning plan checker...
244
244
  ```
245
245
 
246
- Spawn `workflow-plan-checker` agent to verify plan.json and TASK-*.json:
246
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Spawn `workflow-plan-checker` agent to verify plan.json and TASK-*.json:
247
247
 
248
248
  - **Check dimensions**: requirement coverage, task completeness (files/action/convergence.criteria/implementation), scope sanity (1-3 tasks), context compliance (if discuss mode).
249
249
  - **Return**: `## VERIFICATION PASSED` or `## ISSUES FOUND` with structured issue list.
@@ -263,15 +263,17 @@ If iteration_count < 2:
263
263
 
264
264
  If iteration_count >= 2:
265
265
  - Display: "Max iterations reached. {N} issues remain."
266
- - Offer: 1) Force proceed, 2) Abort
266
+ - Offer: 1) Force proceed, 2) Abort; if Force proceed, flag plan as [LOW CONFIDENCE] (remaining issues)
267
267
 
268
268
  ---
269
269
 
270
+ **GATE Step 6→7**: REQUIRED plan.json verified by plan-checker BEFORE execution; BLOCKED if plan.json not verified
271
+
270
272
  ### Step 7: Spawn Executor
271
273
 
272
274
  **Spawn workflow-executor:**
273
275
 
274
- Spawn `workflow-executor` agent:
276
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Spawn `workflow-executor` agent:
275
277
 
276
278
  - **Read**: plan.json, TASK-*.json, state.json, CLAUDE.md
277
279
  - **Constraints**: execute all tasks, atomic commits per task, write summaries to `${QUICK_DIR}/.summaries/TASK-{NNN}-summary.md`
@@ -296,13 +298,13 @@ Skip entirely if NOT $FULL_MODE.
296
298
  Spawning verifier...
297
299
  ```
298
300
 
299
- Spawn `workflow-verifier` agent: check plan objectives against actual codebase using plan.json and summaries. Write result to `${QUICK_DIR}/verification.json`.
301
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Spawn `workflow-verifier` agent: check plan objectives against actual codebase using plan.json and summaries. Write result to `${QUICK_DIR}/verification.json`.
300
302
 
301
303
  Read verification result:
302
304
  | Status | Action |
303
305
  |--------|--------|
304
306
  | passed | Store "Verified", continue |
305
- | gaps_found | Display gaps, offer: 1) Re-run executor, 2) Accept as-is |
307
+ | gaps_found | Display gaps, offer: 1) Re-run executor, 2) Accept as-is; if Accept as-is, flag execution as [LOW CONFIDENCE] (gaps unresolved) |
306
308
 
307
309
  ---
308
310
 
@@ -0,0 +1,177 @@
1
+ # Ralph Goal Amendment Flow
2
+
3
+ `A_AMEND_GOAL` 详细流程。加载方式:`maestro-ralph.md` S_AMEND_GOAL via `<deferred_reading>`。
4
+
5
+ 触发:`/maestro-ralph --amend [change_request]`
6
+ GUARD: running ralph session 存在
7
+
8
+ ---
9
+
10
+ ## Phase 1 — 快照
11
+
12
+ 1. 定位最新 running ralph session
13
+ 2. Read: `task_decomposition` WHERE `status != "superseded"`, `boundary_contract`, completed steps `completion_summary`
14
+ 3. Display:
15
+ ```
16
+ 📍 Session: {session_id}
17
+ 进度: {completed}/{total} steps
18
+ 目标:
19
+ {for g in active_goals:}
20
+ [{status_icon}] {g.id}: {g.goal} — done_when: {g.done_when}
21
+ {end for}
22
+ 边界: in_scope={count}, out_of_scope={count}
23
+ 修改历史: {goal_changelog.length} 次
24
+ ```
25
+
26
+ ## Phase 2 — 解析
27
+
28
+ | Condition | 行为 |
29
+ |-----------|------|
30
+ | `change_request` 非空 | 直接使用 |
31
+ | `change_request` 为空 | AskUserQuestion(4 选项 + 自由输入追加) |
32
+
33
+ AskUserQuestion options:
34
+
35
+ | label | description |
36
+ |-------|-------------|
37
+ | 修改现有目标 | 调整子目标范围或完成条件 |
38
+ | 新增目标 | 追加新子目标 |
39
+ | 移除目标 | 取消未完成子目标 |
40
+ | 调整边界 | 修改 in_scope / out_of_scope / constraints |
41
+
42
+ ## Phase 3 — Mini Grill
43
+
44
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Delegate (run_in_background, STOP, wait):
45
+
46
+ ```
47
+ maestro delegate "PURPOSE: 评估目标变更影响
48
+ TASK:
49
+ 1. 对比 current_goals 与 change_request,识别冲突/缺口
50
+ 2. 判定已完成 steps 在新目标下是否有效(基于 completion_summary + completion_decisions)
51
+ 3. 判定 pending steps 是否需重建/跳过
52
+ 4. 评估 risk_level
53
+ CONTEXT:
54
+ intent = {session.intent}
55
+ current_goals = {task_decomposition where status != superseded}
56
+ completed_steps = [{index, skill, stage, completion_summary, completion_decisions}]
57
+ pending_steps = [{index, skill, stage, goal_ref}]
58
+ boundary_contract = {boundary_contract}
59
+ change_request = {change_request}
60
+ EXPECTED:
61
+ ---IMPACT---
62
+ CHANGE_TYPE=modify|add|remove|boundary
63
+ AFFECTED_GOALS=[{id, action: modify|supersede|keep, new_goal?, new_done_when?}]
64
+ INVALIDATED_STEPS=[{index, reason}]
65
+ NEW_GAPS=[{goal_id, description, suggested_stages: [analyze|plan|execute|...]}]
66
+ BOUNDARY_CHANGES={in_scope_add:[], out_of_scope_add:[], constraints_add:[]}
67
+ RISK_LEVEL=low|medium|high
68
+ RISK_REASON=...
69
+ ---END---
70
+ CONSTRAINTS:
71
+ - 只评估不修改
72
+ - high: 已完成工作与新目标直接冲突
73
+ - medium: 部分 steps 需跳过/重建,已完成工作可保留
74
+ - low: 纯增量,已有工作不受影响"
75
+ --role analyze --mode analysis
76
+ ```
77
+
78
+ **GATE Phase 3→4**: REQUIRED impact_assessment complete; BLOCKED if delegate output missing
79
+
80
+ ## Phase 4 — 确认
81
+
82
+ Display: 影响摘要(risk_level, affected, invalidated, new_gaps)。AskUserQuestion:
83
+
84
+ | label | description |
85
+ |-------|-------------|
86
+ | 应用并继续 | 归档旧目标 → 写入新目标 → 重建链路 → handoff |
87
+ | 仅改目标 | 更新目标,保留链路不变 |
88
+ | 取消 | 无修改 |
89
+
90
+ GUARD: `RISK_LEVEL == high` → auto_confirm 无效
91
+
92
+ ## Phase 5 — 应用
93
+
94
+ ### 5.1 Changelog entry
95
+
96
+ Append to `session.goal_changelog[]`:
97
+
98
+ ```json
99
+ {
100
+ "id": "CHG-{NNN}",
101
+ "timestamp": "{ISO}",
102
+ "change_type": "{CHANGE_TYPE}",
103
+ "reason": "{change_request}",
104
+ "impact_assessment": { "risk_level": "...", "invalidated_steps": [...], "new_steps_inserted": 0, "evidence_source": "delegate impact assessment output" },
105
+ "before": { "goals": [{"id":"...","goal":"...","done_when":"..."}] },
106
+ "after": { "goals": [{"id":"...","goal":"...","done_when":"..."}] }
107
+ }
108
+ ```
109
+
110
+ `NNN` = `(goal_changelog.length + 1).toString().padStart(3, '0')`
111
+
112
+ **GATE 5.1→5.2**: REQUIRED goal_changelog written; BLOCKED if changelog entry missing
113
+
114
+ ### 5.2 归档
115
+
116
+ 对 AFFECTED_GOALS 中 `action ∈ {modify, supersede}` 的条目:
117
+ - Set `status: "superseded"`, `superseded_by: "CHG-{NNN}"`, `superseded_at: now`
118
+ - GUARD: `status == "done"` 的目标不可 supersede(skip + warn)
119
+
120
+ ### 5.3 写入新目标
121
+
122
+ | action | 处理 |
123
+ |--------|------|
124
+ | `modify` | 新条目 `id: "{original_id}v{version}"`, `origin: "CHG-{NNN}"`, `status: "pending"` |
125
+ | `add` | 新条目 `id: "G{next_num}"`, `origin: "CHG-{NNN}"`, `status: "pending"` |
126
+ | `remove` | 仅 supersede,不新增 |
127
+ | `keep` | 不变 |
128
+
129
+ ### 5.4 重建链路
130
+
131
+ GUARD: 用户选"应用并继续"
132
+
133
+ 1. INVALIDATED_STEPS 中 pending step → set `status: "skipped"`
134
+ 2. NEW_GAPS → 按 `suggested_stages` 插入 steps + decision nodes
135
+ - 按 A_BUILD_STEPS 规则构建(goal_ref + command_path 解析 + command_scope 校验)
136
+ - 插入位置:当前 active step 之后、`post-goal-audit` 之前
137
+ 3. 原链路有 `post-goal-audit` → 保留
138
+ 4. 原链路无 `post-goal-audit` AND `task_decomposition` 存在 → 在 `milestone-complete` 前插入
139
+ 5. Reindex all steps
140
+
141
+ ### 5.5 Boundary
142
+
143
+ `BOUNDARY_CHANGES` 非空时:
144
+ - `in_scope_add` → append to `boundary_contract.in_scope`
145
+ - `out_of_scope_add` → append to `boundary_contract.out_of_scope`
146
+ - `constraints_add` → append to `boundary_contract.constraints`
147
+
148
+ ### 5.6 Persist + Handoff
149
+
150
+ 1. Write status.json
151
+ 2. Display:
152
+ ```
153
+ ◆ Goal amendment: {CHG-NNN}
154
+ {change_type} — {reason}
155
+ Risk: {RISK_LEVEL} | Superseded: {n} | Added: {n} | Skipped steps: {n} | Inserted steps: {n}
156
+ ```
157
+ 3. Handoff → maestro-ralph-execute(平台适配:Claude 用 `Skill()`,Codex 用 `$` 直调)
158
+
159
+ ---
160
+
161
+ ## Anchor 呈现规则
162
+
163
+ Goals Overview 输出格式(CLI `buildSessionAnchor` 自动生成):
164
+
165
+ ```
166
+ **Goals Overview**:
167
+ - [✓] G1: 实现搜索 API — done_when: 测试通过
168
+ - [superseded] G2: 前端搜索页 → 被 CHG-001 替换
169
+ - [○] G2v2: 前端搜索页+迁移兼容 — done_when: 新旧数据均可检索 (via CHG-001)
170
+ - [○] G3: 旧数据迁移脚本 — done_when: 全量测试通过 (via CHG-001)
171
+ - Course corrections: 1 applied
172
+ ```
173
+
174
+ 规则:
175
+ - `superseded` 目标 → 单行标注,不展开细节
176
+ - 新目标 → 标注 `(via CHG-xxx)`
177
+ - re-grounding / goal-audit → 仅取 `status != "superseded"`
@@ -79,6 +79,8 @@ Run full test suite. Record final state in reflection-log.md.
79
79
 
80
80
  ### Step 7: Complete
81
81
 
82
+ Glob plan.json AND .summaries/ MUST exist before marking completed; BLOCKED if missing.
83
+
82
84
  Update index.json: `status="completed"`.
83
85
 
84
86
  Present: tasks completed/blocked, reflection rounds, strategy adjustments, test status, key learnings. If regressions: list affected tests, suggest quality-debug.
@@ -135,7 +135,7 @@ delta = { vs_phase, tasks_completed, gaps_found, issues_opened, rework_iteration
135
135
 
136
136
  ## Stage 4: multi_lens_analysis
137
137
 
138
- Spawn one Agent per active lens **in parallel** (`run_in_background: false`). Each returns JSON.
138
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Spawn one Agent per active lens **in parallel** (`run_in_background: false`). Each returns JSON.
139
139
 
140
140
  ### Lens registry
141
141
 
@@ -233,10 +233,12 @@ Return ONLY a single JSON object, no prose, matching this schema:
233
233
 
234
234
  ### Spawn pattern
235
235
 
236
- Spawn all lenses in parallel. Collect into `lens_results`. If any fails, log W001, proceed with successful lenses.
236
+ Spawn all lenses in parallel. Collect into `lens_results`. If any fails, log W001, proceed with successful lenses; flag retrospective as [LOW CONFIDENCE] (partial lenses).
237
237
 
238
238
  ---
239
239
 
240
+ **GATE Stage 4→5**: REQUIRED lens analyses complete BEFORE synthesis; BLOCKED if lens_results missing
241
+
240
242
  ## Stage 5: synthesize
241
243
 
242
244
  ### Generate insight IDs
@@ -253,6 +255,8 @@ Sections: Header (tweetable, metadata) → Metrics table → Delta table (if --c
253
255
 
254
256
  Write both to `{artifact_dir}/`.
255
257
 
258
+ Glob `{artifact_dir}/retrospective.json` AND `retrospective.md` MUST exist before Stage 8 complete; BLOCKED if missing.
259
+
256
260
  ---
257
261
 
258
262
  ## Stage 6: route_outputs
@@ -307,7 +311,7 @@ Invoke manage-learn tip with:
307
311
  insight.routed_id = "TIP-{captured_id}"
308
312
  ```
309
313
 
310
- Fallback: if skill ID cannot be captured, write tip file directly per `workflows/knowhow.md` Part B Step 3 and update `wiki-index.json` per Step 4.
314
+ Fallback: if skill ID cannot be captured, write tip file directly per `workflows/knowhow.md` Part B Step 3 and update `wiki-index.json` per Step 4; flag tip as [LOW CONFIDENCE] (skill not captured).
311
315
 
312
316
  #### Target: issue
313
317
 
@@ -161,7 +161,7 @@ Each finding: { id: "{PREFIX}-{NNN}", dimension, severity, title, file, line, sn
161
161
  ### Standard Level — Parallel Agent Review
162
162
 
163
163
  ```
164
- Per dimension → spawn workflow-reviewer agent (all parallel):
164
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Per dimension → spawn workflow-reviewer agent (all parallel):
165
165
  Context: dimension, phase_name, phase_goal, review_files, success_criteria,
166
166
  tech_stack, specs_content, verification_gaps
167
167
  Instructions:
@@ -172,7 +172,7 @@ Per dimension → spawn workflow-reviewer agent (all parallel):
172
172
  - Top 20 findings by severity, each with file:line evidence
173
173
  ```
174
174
 
175
- Launch ALL dimension agents in a single message. Collect dimension_results (JSON findings array). Log W001 on agent failure, continue with partial results.
175
+ Launch ALL dimension agents in a single message. Collect dimension_results (JSON findings array). Log W001 on agent failure, continue with partial results; flag review as [LOW CONFIDENCE] (partial results).
176
176
 
177
177
  ### Deep Level — Enhanced Agent Review
178
178
 
@@ -234,6 +234,7 @@ IF cli_targets.length == 0: skip to Step 7
234
234
  # Build concise review prompt from findings
235
235
  finding_summary = cli_targets.map(f => "${f.id}: [${f.severity}] ${f.file}:${f.line} — ${f.title}").join("\n")
236
236
 
237
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep:
237
238
  Bash({
238
239
  command: 'maestro delegate "PURPOSE: Cross-verify code review findings and identify missed issues
239
240
  TASK: For each finding, verify severity is accurate | Check for false positives | Identify any critical issues missed by initial review in the same files
@@ -286,7 +287,7 @@ deep_dive_targets:
286
287
  ```
287
288
  Iterate up to max_iterations (deep=3, standard=1) over unresolved targets:
288
289
 
289
- Per target → spawn workflow-reviewer agent:
290
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Per target → spawn workflow-reviewer agent:
290
291
  Context: original finding JSON, previous analysis (if iteration > 1)
291
292
  Tasks: read affected file, find callers/imports, check test coverage
292
293
  Analyze: root cause, impact radius, remediation (with code example), risk if unfixed
@@ -369,6 +370,7 @@ Write ${PHASE_DIR}/review.json:
369
370
 
370
371
  ```
371
372
  Update index.json.updated_at = now()
373
+ Glob review.json MUST exist before Step 10 complete; BLOCKED if missing.
372
374
  Set index.json.review = { level, verdict, reviewed_at, severity_distribution,
373
375
  findings_count, issues_created count }
374
376
  ```
@@ -433,7 +435,7 @@ Next steps:
433
435
  | No changed files | Abort: "No changed files detected in this phase." |
434
436
  | Reviewer agent fails | Log W001, continue with available dimension results |
435
437
  | All agents fail | Abort: "Review could not complete — all dimension agents failed." |
436
- | Deep-dive agent fails | Log finding as unresolved, skip enrichment |
438
+ | Deep-dive agent fails | Log finding as unresolved, skip enrichment; flag finding as [LOW CONFIDENCE] (enrichment skipped) |
437
439
 
438
440
  ---
439
441
 
@@ -47,7 +47,7 @@ Read project artifacts to understand what has already been built:
47
47
  ## Codebase Exploration (conditional)
48
48
 
49
49
  - Detect if project has source files
50
- - If yes: spawn `cli-explore-agent` for context discovery
50
+ - MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: If yes: spawn `cli-explore-agent` for context discovery
51
51
  - If `project_context.already_shipped` exists: include as "feature audit" directive — agent should verify which shipped features are present in code and identify integration points for new work
52
52
  - Output: relevant files, patterns, tech stack, feature_audit
53
53
 
@@ -55,7 +55,7 @@ Read project artifacts to understand what has already been built:
55
55
 
56
56
  ## External Research — API & Technology Details (Optional)
57
57
 
58
- Spawn `workflow-external-researcher` agent when requirement mentions specific technologies, APIs, or external services.
58
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Spawn `workflow-external-researcher` agent when requirement mentions specific technologies, APIs, or external services.
59
59
 
60
60
  **Trigger**: Technology keywords detected in requirement or codebase exploration found external dependencies. Auto-trigger in auto mode (`-y`). Skip if requirement is purely organizational/conceptual.
61
61
 
@@ -66,7 +66,7 @@ If topics found → spawn `workflow-external-researcher` agent for API research:
66
66
  - Focus on details affecting phase decomposition and dependency ordering
67
67
  - Output → `apiResearchContext` (in-memory)
68
68
 
69
- If no topics or research fails → `apiResearchContext = null`, continue.
69
+ If no topics or research fails → `apiResearchContext = null`, continue; flag roadmap as [LOW CONFIDENCE] (no external research).
70
70
 
71
71
  ---
72
72
 
@@ -1,6 +1,6 @@
1
1
  # Workflow: Roadmap (Light Mode)
2
2
 
3
- Lightweight requirements-to-roadmap path. Shared logic: `@roadmap-common.md`.
3
+ Lightweight requirements-to-roadmap path. Shared logic: `@~/.maestro/workflows/roadmap-common.md`.
4
4
 
5
5
  ---
6
6
 
@@ -27,9 +27,9 @@ Parse flags from `$ARGUMENTS`:
27
27
  - `--from`: enrich from context-package (`requirements`, `constraints[locked]`, `domain`, `non_goals`, `insights`, `open_questions`)
28
28
  - `project_context`: cross-reference `already_shipped`, promote `deferred` items, apply `locked_decisions`
29
29
 
30
- 2. **Codebase Exploration** — follow roadmap-common.md
30
+ 2. **Codebase Exploration** — MANDATORY: execute ~/.maestro/workflows/roadmap-common.md Codebase Exploration logic; REQUIRED produce: codebase context summary; BLOCKED if missing
31
31
 
32
- 3. **External Research** — follow roadmap-common.md
32
+ 3. **External Research** — MANDATORY: execute ~/.maestro/workflows/roadmap-common.md External Research logic; REQUIRED produce: apiResearchContext (or [LOW CONFIDENCE] if none)
33
33
 
34
34
  `apiResearchContext` is passed into:
35
35
  - Step 3 (Decomposition): technology complexity informs phase sizing and ordering
@@ -43,7 +43,7 @@ Parse flags from `$ARGUMENTS`:
43
43
 
44
44
  ## Step 3: Decomposition
45
45
 
46
- Spawn `cli-roadmap-plan-agent` (include `apiResearchContext` if set). Apply **Minimum-Phase Principle** from roadmap-common.md.
46
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Spawn `cli-roadmap-plan-agent` (include `apiResearchContext` if set). Apply **Minimum-Phase Principle** from ~/.maestro/workflows/roadmap-common.md.
47
47
 
48
48
  ---
49
49
 
@@ -58,10 +58,13 @@ Spawn `cli-roadmap-plan-agent` (include `apiResearchContext` if set). Apply **Mi
58
58
 
59
59
  ## Step 5: Write Outputs
60
60
 
61
- Follow roadmap-common.md **Roadmap Write Logic** (overwrite vs edit rules, state.json update, scratch directory).
61
+ MANDATORY: apply ~/.maestro/workflows/roadmap-common.md **Roadmap Write Logic** (overwrite vs edit rules, state.json update, scratch directory); REQUIRED produce: .workflow/roadmap.md; BLOCKED if missing
62
62
 
63
63
  ---
64
64
 
65
+ **GATE Step 5→6**: REQUIRED roadmap.md written BEFORE handoff.
66
+ Glob .workflow/roadmap.md MUST exist before Step 6 handoff; BLOCKED if missing.
67
+
65
68
  ## Step 6: Handoff
66
69
 
67
70
  Display summary and next steps: `maestro-blueprint` | `maestro-plan 1` | `maestro-brainstorm 1` | `manage-status`