maestro-flow 0.4.11 → 0.4.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 (166) hide show
  1. package/.agents/agents/cli-explore-agent.md +1 -3
  2. package/.agents/agents/cross-role-reviewer.md +173 -0
  3. package/.agents/agents/role-design-author.md +218 -0
  4. package/.agents/agents/ui-design-agent.md +1 -18
  5. package/.agents/agents/workflow-analyzer.md +1 -1
  6. package/.agents/agents/workflow-external-researcher.md +1 -1
  7. package/.agents/skills/maestro/SKILL.md +61 -27
  8. package/.agents/skills/maestro-analyze/SKILL.md +30 -4
  9. package/.agents/skills/maestro-blueprint/SKILL.md +132 -0
  10. package/.agents/skills/maestro-brainstorm/SKILL.md +119 -103
  11. package/.agents/skills/maestro-help/SKILL.md +48 -14
  12. package/.agents/skills/maestro-help/index/catalog.json +29 -11
  13. package/.agents/skills/maestro-help/phases/01-parse-intent.md +1 -1
  14. package/.agents/skills/maestro-help/phases/02-search-present.md +6 -4
  15. package/.agents/skills/maestro-help/phases/03-workflow-guide.md +60 -33
  16. package/.agents/skills/maestro-init/SKILL.md +3 -3
  17. package/.agents/skills/maestro-milestone-audit/SKILL.md +5 -3
  18. package/.agents/skills/maestro-milestone-complete/SKILL.md +7 -5
  19. package/.agents/skills/maestro-plan/SKILL.md +14 -4
  20. package/.agents/skills/maestro-ralph/SKILL.md +297 -226
  21. package/.agents/skills/maestro-ralph-execute/SKILL.md +81 -67
  22. package/.agents/skills/maestro-roadmap/SKILL.md +42 -81
  23. package/.agents/skills/quality-auto-test/SKILL.md +1 -1
  24. package/.agents/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
  25. package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  26. package/.agents/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  27. package/.agents/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  28. package/.agents/skills/team-lifecycle-v4/templates/epics.md +2 -2
  29. package/.agents/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  30. package/.agents/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  31. package/.agy/agents/cli-explore-agent.md +1 -3
  32. package/.agy/agents/cross-role-reviewer.md +170 -0
  33. package/.agy/agents/role-design-author.md +215 -0
  34. package/.agy/agents/ui-design-agent.md +1 -18
  35. package/.agy/agents/workflow-analyzer.md +1 -1
  36. package/.agy/agents/workflow-external-researcher.md +1 -1
  37. package/.agy/skills/maestro/SKILL.md +61 -27
  38. package/.agy/skills/maestro-analyze/SKILL.md +30 -4
  39. package/.agy/skills/maestro-blueprint/SKILL.md +132 -0
  40. package/.agy/skills/maestro-brainstorm/SKILL.md +119 -103
  41. package/.agy/skills/maestro-help/SKILL.md +48 -14
  42. package/.agy/skills/maestro-help/index/catalog.json +29 -11
  43. package/.agy/skills/maestro-help/phases/01-parse-intent.md +1 -1
  44. package/.agy/skills/maestro-help/phases/02-search-present.md +6 -4
  45. package/.agy/skills/maestro-help/phases/03-workflow-guide.md +60 -33
  46. package/.agy/skills/maestro-init/SKILL.md +3 -3
  47. package/.agy/skills/maestro-milestone-audit/SKILL.md +5 -3
  48. package/.agy/skills/maestro-milestone-complete/SKILL.md +7 -5
  49. package/.agy/skills/maestro-plan/SKILL.md +14 -4
  50. package/.agy/skills/maestro-ralph/SKILL.md +297 -226
  51. package/.agy/skills/maestro-ralph-execute/SKILL.md +81 -67
  52. package/.agy/skills/maestro-roadmap/SKILL.md +42 -81
  53. package/.agy/skills/quality-auto-test/SKILL.md +1 -1
  54. package/.agy/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
  55. package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  56. package/.agy/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  57. package/.agy/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  58. package/.agy/skills/team-lifecycle-v4/templates/epics.md +2 -2
  59. package/.agy/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  60. package/.agy/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  61. package/.claude/agents/cli-explore-agent.md +1 -3
  62. package/.claude/agents/cross-role-reviewer.md +171 -0
  63. package/.claude/agents/role-design-author.md +216 -0
  64. package/.claude/agents/ui-design-agent.md +1 -18
  65. package/.claude/agents/workflow-analyzer.md +1 -1
  66. package/.claude/agents/workflow-external-researcher.md +1 -1
  67. package/.claude/commands/maestro-analyze.md +30 -4
  68. package/.claude/commands/maestro-blueprint.md +130 -0
  69. package/.claude/commands/maestro-brainstorm.md +132 -116
  70. package/.claude/commands/maestro-init.md +3 -3
  71. package/.claude/commands/maestro-milestone-audit.md +5 -3
  72. package/.claude/commands/maestro-milestone-complete.md +7 -5
  73. package/.claude/commands/maestro-plan.md +14 -4
  74. package/.claude/commands/maestro-ralph-execute.md +81 -67
  75. package/.claude/commands/maestro-ralph.md +297 -226
  76. package/.claude/commands/maestro-roadmap.md +42 -81
  77. package/.claude/commands/maestro.md +61 -27
  78. package/.claude/commands/quality-auto-test.md +1 -1
  79. package/.claude/skills/maestro-help/SKILL.md +48 -14
  80. package/.claude/skills/maestro-help/index/catalog.json +29 -11
  81. package/.claude/skills/maestro-help/phases/01-parse-intent.md +1 -1
  82. package/.claude/skills/maestro-help/phases/02-search-present.md +6 -4
  83. package/.claude/skills/maestro-help/phases/03-workflow-guide.md +60 -33
  84. package/.claude/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
  85. package/.claude/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  86. package/.claude/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  87. package/.claude/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  88. package/.claude/skills/team-lifecycle-v4/templates/epics.md +2 -2
  89. package/.claude/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  90. package/.claude/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  91. package/.codex/skills/maestro/SKILL.md +75 -38
  92. package/.codex/skills/maestro-amend/SKILL.md +157 -0
  93. package/.codex/skills/maestro-analyze/SKILL.md +71 -23
  94. package/.codex/skills/maestro-blueprint/SKILL.md +122 -0
  95. package/.codex/skills/maestro-brainstorm/SKILL.md +135 -45
  96. package/.codex/skills/maestro-composer/SKILL.md +1 -1
  97. package/.codex/skills/maestro-execute/SKILL.md +13 -4
  98. package/.codex/skills/maestro-help/SKILL.md +28 -18
  99. package/.codex/skills/maestro-help/catalog.json +29 -11
  100. package/.codex/skills/maestro-init/SKILL.md +7 -7
  101. package/.codex/skills/maestro-plan/SKILL.md +27 -9
  102. package/.codex/skills/maestro-ralph/SKILL.md +740 -601
  103. package/.codex/skills/maestro-roadmap/SKILL.md +55 -72
  104. package/.codex/skills/maestro-update/SKILL.md +169 -0
  105. package/.codex/skills/maestro-verify/SKILL.md +11 -2
  106. package/.codex/skills/manage-codebase-rebuild/SKILL.md +2 -2
  107. package/.codex/skills/manage-harvest/SKILL.md +10 -2
  108. package/.codex/skills/quality-retrospective/SKILL.md +9 -2
  109. package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +2 -2
  110. package/.codex/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  111. package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  112. package/.codex/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  113. package/.codex/skills/team-lifecycle-v4/templates/epics.md +2 -2
  114. package/.codex/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  115. package/.codex/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  116. package/README.md +8 -8
  117. package/README.zh-CN.md +8 -8
  118. package/dashboard/dist-server/dashboard/src/server/routes/settings.js +3 -3
  119. package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
  120. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  121. package/dist/src/agents/cli-agent-runner.js +13 -7
  122. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  123. package/dist/src/commands/spec.d.ts.map +1 -1
  124. package/dist/src/commands/spec.js +8 -1
  125. package/dist/src/commands/spec.js.map +1 -1
  126. package/dist/src/tools/spec-init.d.ts +16 -2
  127. package/dist/src/tools/spec-init.d.ts.map +1 -1
  128. package/dist/src/tools/spec-init.js +58 -187
  129. package/dist/src/tools/spec-init.js.map +1 -1
  130. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  131. package/dist/src/tools/spec-loader.js +16 -16
  132. package/dist/src/tools/spec-loader.js.map +1 -1
  133. package/dist/src/tools/spec-seeds.d.ts +33 -0
  134. package/dist/src/tools/spec-seeds.d.ts.map +1 -0
  135. package/dist/src/tools/spec-seeds.js +200 -0
  136. package/dist/src/tools/spec-seeds.js.map +1 -0
  137. package/dist/src/tools/spec-writer.d.ts.map +1 -1
  138. package/dist/src/tools/spec-writer.js +7 -9
  139. package/dist/src/tools/spec-writer.js.map +1 -1
  140. package/dist/src/utils/update-notices.js +12 -0
  141. package/dist/src/utils/update-notices.js.map +1 -1
  142. package/package.json +1 -1
  143. package/templates/business-test-report.json +1 -1
  144. package/templates/index.json +1 -1
  145. package/templates/roadmap.md +15 -9
  146. package/templates/state.json +18 -17
  147. package/workflows/analyze.md +79 -11
  148. package/workflows/auto-test.md +6 -6
  149. package/workflows/blueprint.md +431 -0
  150. package/workflows/brainstorm.md +603 -496
  151. package/workflows/business-test.md +7 -7
  152. package/workflows/codebase-rebuild.md +4 -4
  153. package/workflows/harvest.md +184 -10
  154. package/workflows/init.md +9 -8
  155. package/workflows/maestro.md +1 -1
  156. package/workflows/milestone-audit.md +12 -4
  157. package/workflows/milestone-complete.md +11 -6
  158. package/workflows/plan.md +88 -22
  159. package/workflows/roadmap-common.md +1 -1
  160. package/workflows/roadmap.md +13 -3
  161. package/workflows/spec-generate.md +24 -13
  162. package/workflows/ui-design.md +2 -2
  163. package/workflows/ui-style.md +1 -1
  164. package/.agents/agents/conceptual-planning-agent.md +0 -247
  165. package/.agy/agents/conceptual-planning-agent.md +0 -244
  166. package/.claude/agents/conceptual-planning-agent.md +0 -245
@@ -33,19 +33,23 @@ Also read `session.auto_mode` from status.json — if true, treat as `-y`.
33
33
 
34
34
  | Type | Execution | Flow after |
35
35
  |------|-----------|------------|
36
- | decision (ralph-only) | `Skill("maestro-ralph")` — ralph re-evaluates | Execution ends here |
37
- | internal | `Skill({ skill, args })` synchronous | Self-invoke next |
38
- | external | `maestro delegate --to claude --mode write` | STOP → callback self-invoke |
39
-
40
- HARD RULE: External nodes ALWAYS append `-y` to skill args inside the prompt — delegate sessions are non-interactive.
41
- HARD RULE: External nodes ALWAYS delegate to `claude` only Claude Code can execute slash-command skills.
36
+ | decision (ralph-only) | `Skill("maestro-ralph")` | Execution ends here |
37
+ | internal (default) | `Read({file_path: step.command_path})` + 内联解释执行 | Self-invoke next |
38
+ | external (opt-in) | `maestro delegate --to claude --mode write` (STOP → callback) | Self-invoke next |
39
+
40
+ HARD RULES:
41
+ - internal step MUST 通过 `Read({command_path})` 把命令 .md 加载进当前会话,再按内容执行;禁止 `Skill({skill})` 调用
42
+ - `command_path` 由 ralph 在 A_BUILD_STEPS 写入 status.json;ralph-execute 不再自行解析(缺失 → 报错 E002)
43
+ - external 仅在 `step.type == "external"` 显式声明时使用,并 always append `-y` 到 prompt args
44
+ - 每个 step 必须产出 `--- COMPLETION STATUS ---` 块,否则视为 NEEDS_RETRY
42
45
  </context>
43
46
 
44
47
  <invariants>
45
- 1. **Every step via Skill() or delegate** — never simulate or inline a skill's work
46
- 2. **External claude only** — `session.cli_tool` is for analysis delegates, NOT execution
47
- 3. **Self-invocation chain** — continues until all steps complete or session paused
48
- 4. **Status.json updated after every change** resume-safe
48
+ 1. **Internal = Read + inline** — 通过 Read 读取 `step.command_path`,按其指令在当前 session 内执行
49
+ 2. **External = explicit only** — `step.type == "external"` 才走 delegate;默认绝不发起
50
+ 3. **必须显式 completion confirmation** — 每个 step 完成时需有 `STATUS: DONE` 且写入 `step.completion_confirmed = true`
51
+ 4. **Self-invocation chain** 持续直到全部 `completion_confirmed` paused
52
+ 5. **status.json 每步骤后写盘** — resume-safe
49
53
  </invariants>
50
54
 
51
55
  <state_machine>
@@ -54,8 +58,8 @@ HARD RULE: External nodes ALWAYS delegate to `claude` — only Claude Code can e
54
58
  S_LOCATE — 定位 session + 找下一个 pending step PERSIST: —
55
59
  S_RESOLVE_ARGS — 解析占位符 + 丰富参数 PERSIST: step.args (enriched)
56
60
  S_EXECUTE — 执行当前 step PERSIST: step.status = "running", session.current_step
57
- S_POST_EXEC — 标记完成 + 传播上下文 PERSIST: step.status, session.context
58
- S_HANDLE_FAIL — 处理失败(重试/跳过/中止) PERSIST: step.status, session.status
61
+ S_POST_EXEC — 标记完成 + 传播上下文 PERSIST: step.completion_*, step.status, session.context
62
+ S_HANDLE_FAIL — 处理失败 PERSIST: step.status, session.status
59
63
  S_COMPLETE — 所有 step 完成 PERSIST: session.status = "completed"
60
64
  S_FALLBACK — 无 session 可执行 PERSIST: —
61
65
  </states>
@@ -127,9 +131,9 @@ S_FALLBACK:
127
131
  | maestro-brainstorm | topic | `"{intent}"` |
128
132
  | maestro-roadmap | description | `"{intent}"` |
129
133
  | maestro-analyze | phase or topic | `{phase}` or `"{intent}"` |
130
- | maestro-plan | phase or --dir | `{phase}`, or `--dir {scratch_dir}` if standalone |
131
- | maestro-execute | phase or --dir | `{phase}`, or `--dir {scratch_dir}` if standalone |
132
- | quality-debug | gap context | Read previous step's error/gap from artifact dir |
134
+ | maestro-plan | phase or --dir | `{phase}`, or `--dir {scratch_dir}` |
135
+ | maestro-execute | phase or --dir | `{phase}`, or `--dir {scratch_dir}` |
136
+ | quality-debug | gap context | Read previous step's error/gap |
133
137
  | quality-* | phase | `{phase}` |
134
138
 
135
139
  **Artifact dir resolution for --dir:**
@@ -139,91 +143,97 @@ plan commands: latest type=="analyze" → --dir .workflow/scratch/{path}
139
143
  execute commands: latest type=="plan" → --dir .workflow/scratch/{path}
140
144
  ```
141
145
 
142
- Write enriched args back to status.json (resume-safe).
146
+ Write enriched args back to status.json.
143
147
 
144
148
  ### A_EXEC_DECISION
145
149
 
146
150
  1. Mark step running, write status.json
147
- 2. Display: `[{index}/{total}] ◆ {skill} [decision] Retry: {retry}/{max}`
148
- 3. `Skill({ skill: "maestro-ralph" })` — ralph detects running decision → evaluates → handoff
149
- 4. **This execution ends here** — ralph handles the handoff back
151
+ 2. Display: `[{index}/{total}] ◆ {decision} Retry: {retry}/{max}`
152
+ 3. `Skill({ skill: "maestro-ralph" })` — ralph 评估 + handoff
153
+ 4. 执行在此结束
150
154
 
151
155
  ### A_EXEC_INTERNAL
152
156
 
153
- 1. Mark step running, write status.json
154
- 2. Display: `[{index}/{total}] {skill} [internal]`
155
- 3. Resolve auto flag: `auto ? (flag_map[skill] || "") : ""`
156
- 4. `Skill({ skill: next.skill, args: effective_args })`
157
- 5. Return success/failure
157
+ 1. Validate `step.command_path != null`;否则 raise E002,pause session
158
+ 2. Mark step running, write status.json
159
+ 3. Display: `[{index}/{total}] {step.skill} [internal · {step.command_scope}]`
160
+ 4. `Read({ file_path: step.command_path })` — 把命令 .md 全文加载进当前会话
161
+ 5. 解析 frontmatter `argument-hint` 与 `<purpose>/<state_machine>/<actions>` 等指令块
162
+ 6. 计算 `effective_args`:`step.args` + auto flag(`auto ? (flag_map[step.skill] || "") : ""`)
163
+ 7. 按读到的指令在本会话中**内联执行**:调用允许的工具完成命令所规定的工作,不再发起 Skill() 或 delegate
164
+ 8. 执行结束:要求最后一段必须包含 `--- COMPLETION STATUS ---` 块(见 A_MARK_COMPLETE)
165
+ 9. Return success / failure
158
166
 
159
- **Auto flag map:** all lifecycle skills → `-y`; `quality-test` → `-y --auto-fix`; unlisted internal no flag
167
+ **Auto flag map**: 所有 lifecycle skill → `-y`; `quality-test` → `-y --auto-fix`; 未列出 flag
160
168
 
161
169
  ### A_EXEC_EXTERNAL
162
170
 
171
+ 仅当 `step.type == "external"` 时使用(默认链路不产生)。
172
+
163
173
  1. Mark step running, write status.json
164
- 2. Display: `[{index}/{total}] ⚡ {skill} [external]`
165
- 3. Always append `-y` to skill args (delegates are non-interactive): `flag = flag_map[skill] || "-y"`
174
+ 2. Display: `[{index}/{total}] ⚡ {step.skill} [external]`
175
+ 3. 始终在 prompt 内追加 `-y`(delegate session 非交互):`flag = flag_map[step.skill] || "-y"`
166
176
  4. Execute:
167
177
  ```
168
178
  Bash({
169
- command: `maestro delegate "/${skill} ${effective_args}" --to claude --mode write`,
179
+ command: `maestro delegate "/${step.skill} ${effective_args}" --to claude --mode write`,
170
180
  run_in_background: true, timeout: 600000
171
181
  })
172
182
  STOP — wait for callback.
173
183
  ```
174
- 5. On callback: retrieve output → S_POST_EXEC or S_HANDLE_FAIL
184
+ 5. On callback: 把回调输出视为 step 的执行结果 → S_POST_EXEC / S_HANDLE_FAIL
175
185
 
176
186
  ### A_MARK_COMPLETE
177
187
 
178
- 1. `step.status = "completed"`, `step.completed_at = now`
179
- 2. Scan output for context signals:
180
- - `PHASE: N` → session.phase
181
- - `scratch_dir: path` → context.scratch_dir
182
- - `SPEC-xxx` → context.spec_session_id
183
- 3. Scan output for `--- COMPLETION STATUS ---` block. If found, parse and map:
184
- - `STATUS: DONE``step.status = "completed"`
185
- - `STATUS: DONE_WITH_CONCERNS` → `step.status = "completed"`, `step.concerns = CONCERNS value`
186
- - `STATUS: NEEDS_RETRY` → trigger retry: set `step.status = "pending"`, `step.retried = true` → S_HANDLE_FAIL
187
- - `STATUS: BLOCKED` → `session.status = "paused"`, display blocker reason from CONCERNS
188
- - `STATUS: NEEDS_CONTEXT` → `session.status = "paused"`, display context gap from CONCERNS
189
- - If no `--- COMPLETION STATUS ---` block found → fall back to existing heuristic (backward compatible)
190
- 4. Write status.json
191
- 5. Display: `[{index}/{total}] ✓ {skill} completed`
188
+ 1. step 输出中提取 `--- COMPLETION STATUS ---` 块(required)
189
+ 2. 解析并写入:
190
+ - `STATUS: DONE` → `step.status = "completed"`, `step.completion_confirmed = true`, `step.completion_status = "DONE"`
191
+ - `STATUS: DONE_WITH_CONCERNS` → `step.status = "completed"`, `step.completion_confirmed = true`, `step.completion_status = "DONE_WITH_CONCERNS"`, `step.concerns = <CONCERNS>`
192
+ - `STATUS: NEEDS_RETRY` → `step.status = "pending"`, `step.retried = true`, `step.completion_confirmed = false`, → S_HANDLE_FAIL
193
+ - `STATUS: BLOCKED` / `NEEDS_CONTEXT` `session.status = "paused"`, `step.completion_status` 记录原因, `step.completion_confirmed = false`
194
+ - 缺失 `--- COMPLETION STATUS ---` 视为 NEEDS_RETRY(不允许 heuristic fallback)
195
+ 3. 写入 `step.completion_evidence`(artifact 路径 / 关键输出节选)
196
+ 4. 扫描输出抓取 context 信号:`PHASE: N` → session.phase;`scratch_dir: path` context.scratch_dir;`BLP-xxx` → context.blueprint_session_id
197
+ 5. `step.completed_at = now`,写 status.json
198
+ 6. **Sub-goal evidence 校验**(task_decomposition 存在时):若 `step.goal_ref` 对应子目标的 `lifecycle` 覆盖当前 stage 且 evidence artifact 已生成 暂不直接置 done,仍交由 post-goal-audit 决策;仅在 step 显式确认时更新 `task_decomposition[*].completion_confirmed = false` 占位(保持 pending)
199
+ 7. Display: `[{index}/{total}] {step.skill} completed (confirmed)`
192
200
 
193
201
  ### A_RETRY
194
202
 
195
- 1. `step.retried = true`, `step.status = "pending"`, `step.error = null`
203
+ 1. `step.retried = true`, `step.status = "pending"`, `step.error = null`, `step.completion_confirmed = false`
196
204
  2. Write status.json
197
205
 
198
206
  ### A_SKIP_STEP
199
207
 
200
- 1. `step.status = "skipped"`
208
+ 1. `step.status = "skipped"`, `step.completion_confirmed = false`
201
209
  2. Write status.json
202
210
 
203
211
  ### A_PAUSE_SESSION
204
212
 
205
213
  1. `session.status = "paused"`, write status.json
206
- 2. Display: `[{index}/{total}] ✗ {skill} 失败,会话已暂停。/maestro-ralph continue 恢复。`
214
+ 2. Display: `[{index}/{total}] ✗ {step.skill} 失败,会话已暂停。/maestro-ralph continue 恢复。`
207
215
 
208
216
  ### A_COMPLETE_SESSION
209
217
 
210
- 1. `session.status = "completed"`, write status.json
211
- 2. Display completion report:
218
+ 1. 校验:所有 step `completion_confirmed == true`(除 skipped);task_decomposition 存在时校验 `task_decomposition_all_done == true`
219
+ 2. 任一校验失败 不标 completed,回 S_LOCATE 或 pause
220
+ 3. `session.status = "completed"`, write status.json
221
+ 4. Display completion report:
212
222
  ```
213
223
  ============================================================
214
224
  SESSION COMPLETE
215
225
  ============================================================
216
226
  Session: {session_id} [{source}]
217
- Steps: {completed}/{total}
227
+ Steps: {completed}/{total} confirmed: {confirmed}/{completed}
218
228
 
219
- [✓] 0. maestro-plan 1 [internal]
220
- [✓] 1.maestro-execute 1 [external]
221
- [✓] 2. maestro-verify 1 [internal]
229
+ [✓] 0. maestro-plan 1 [internal · global]
230
+ [✓] 1. maestro-execute 1 [internal · project]
231
+ [✓] 2. maestro-verify 1 [internal · global]
222
232
  [✓] 3. ◆ post-verify [decision]
223
233
  ...
224
234
  ============================================================
225
235
  ```
226
- Icons: `✓` completed, `—` skipped, `✗` failed, `◆` decision, `⚡` external
236
+ Icons: `✓` confirmed, `—` skipped, `✗` failed, `◆` decision, `⚡` external
227
237
 
228
238
  </actions>
229
239
 
@@ -236,22 +246,26 @@ Write enriched args back to status.json (resume-safe).
236
246
  | Code | Severity | Description | Recovery |
237
247
  |------|----------|-------------|----------|
238
248
  | E001 | error | No running session found | Suggest /maestro or /maestro-ralph |
239
- | E002 | error | status.json corrupt | Show path, suggest manual check |
240
- | E003 | error | Delegate failed + user abort | Mark paused, suggest resume |
241
- | W001 | warning | Step completed with warnings | Log and continue |
249
+ | E002 | error | step.command_path missing for internal step | Pause, ask ralph to rebuild step |
250
+ | E003 | error | status.json corrupt | Show path, manual check |
251
+ | E004 | error | Delegate failed + user abort | Mark paused, suggest resume |
252
+ | E005 | error | COMPLETION STATUS block missing | Trigger NEEDS_RETRY |
253
+ | W001 | warning | Step completed with concerns | Log and continue |
242
254
 
243
255
  ### Success Criteria
244
256
 
245
- - [ ] Session discovery covers both maestro-* and ralph-*
246
- - [ ] `-y` parsed from args OR inherited from session.auto_mode
247
- - [ ] Placeholders resolved from session context
248
- - [ ] Per-skill enrichment provides correct args
249
- - [ ] Decision nodes hand off to maestro-ralph via Skill()
250
- - [ ] Internal nodes execute via Skill() with auto flag
251
- - [ ] External nodes delegate to claude with `-y` in prompt args, run_in_background + STOP
252
- - [ ] Context signals propagate to status.json
253
- - [ ] Auto mode: retry once then pause
254
- - [ ] Interactive: AskUserQuestion retry/skip/abort
255
- - [ ] Self-invocation continues until complete or paused
257
+ - [ ] Session discovery covers maestro-* and ralph-*
258
+ - [ ] `-y` parsed from args session.auto_mode
259
+ - [ ] Placeholders resolved;per-skill enrichment 正确
260
+ - [ ] Decision 节点 Skill("maestro-ralph") handoff
261
+ - [ ] Internal 节点通过 Read({step.command_path}) 内联执行,禁止 Skill()
262
+ - [ ] External 仅在显式声明时走 delegate,prompt 必带 `-y`
263
+ - [ ] 每个 step 强制 `--- COMPLETION STATUS ---`;缺失 NEEDS_RETRY
264
+ - [ ] step.completion_confirmed = true 仅在 STATUS: DONE/DONE_WITH_CONCERNS 时设置
265
+ - [ ] step.completion_evidence 记录 artifact path / 输出节选
266
+ - [ ] Context signals 传播 status.json
267
+ - [ ] Auto mode: retry 一次后 pause;interactive 提供 retry/skip/abort
268
+ - [ ] 自调用持续到全部 completion_confirmed 或 paused
269
+ - [ ] A_COMPLETE_SESSION 校验全部 step confirmed + sub-goal all_done
256
270
 
257
271
  </appendix>