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