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
|
@@ -21,12 +21,12 @@ Entry points:
|
|
|
21
21
|
- **`/maestro-ralph continue`** — Resume via maestro-ralph-execute
|
|
22
22
|
- **`/maestro-ralph status`** — Display session progress
|
|
23
23
|
|
|
24
|
-
Initial decomposition (S_DECOMPOSE):
|
|
24
|
+
Initial decomposition (S_DECOMPOSE): boundary-clarified via ≤3 questions for broad intents (重构/全面/迁移/重写). 写入 status.json 的 `boundary_contract` / `execution_criteria` / `task_decomposition`,附 `/goal` prompt。
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
- **internal
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
26
|
+
Node types:
|
|
27
|
+
- **internal** (default): ralph-execute `Read({command_path})` 命令 .md,按内容内联执行
|
|
28
|
+
- **decision**: 回 ralph 评估
|
|
29
|
+
- **external**: 仅在显式声明时使用(`maestro delegate --to claude`)
|
|
30
30
|
|
|
31
31
|
Key difference from maestro coordinator:
|
|
32
32
|
- maestro: static chain → one-time selection → runs all steps
|
|
@@ -35,23 +35,19 @@ Key difference from maestro coordinator:
|
|
|
35
35
|
Session: `.workflow/.maestro/ralph-{YYYYMMDD-HHmmss}/status.json`
|
|
36
36
|
Mutual invocation with `/maestro-ralph-execute` forms a self-perpetuating work loop.
|
|
37
37
|
|
|
38
|
-
###
|
|
38
|
+
### Execution Flow
|
|
39
39
|
|
|
40
40
|
```
|
|
41
41
|
/maestro-ralph "intent" ─▶ ralph infer → decompose → build chain
|
|
42
|
-
│
|
|
43
|
-
│
|
|
42
|
+
│ resolves command_path per step
|
|
43
|
+
│ writes status.json
|
|
44
44
|
│ emits /goal prompt
|
|
45
45
|
▼
|
|
46
|
-
ralph-execute ◀─┐
|
|
47
|
-
│ │
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
└─────────┘ updates status.json + re-renders checklist
|
|
51
|
-
loop until done | paused
|
|
46
|
+
ralph-execute ◀─┐ internal → Read(command_path) inline
|
|
47
|
+
│ │ decision → Skill("maestro-ralph")
|
|
48
|
+
└─────────┘ writes step.completion_confirmed
|
|
49
|
+
loop until all completion_confirmed | paused
|
|
52
50
|
```
|
|
53
|
-
|
|
54
|
-
`status.json` 是唯一真源;checklist 是渲染视图。决策节点是链路生长点(`post-goal-audit` 插入按子目标的 mini-loop;`post-verify/review/test` 插入修复 loop)。评估只走 ralph,执行只走 ralph-execute,两者不互相替代。
|
|
55
51
|
</purpose>
|
|
56
52
|
|
|
57
53
|
<context>
|
|
@@ -74,10 +70,13 @@ Remaining → intent
|
|
|
74
70
|
1. **Ralph never executes steps** — only creates sessions and evaluates decisions
|
|
75
71
|
2. **Handoff via Skill("maestro-ralph-execute")** — at session creation and after decision evaluation
|
|
76
72
|
3. **Decision delegates read-only** — `maestro delegate --role analyze --mode analysis`
|
|
77
|
-
4. **
|
|
78
|
-
5. **
|
|
79
|
-
6.
|
|
80
|
-
7. **
|
|
73
|
+
4. **Default type = internal** — `external` 仅显式标注时出现,build 不默认生成
|
|
74
|
+
5. **status.json 是唯一真源** — 不生成 markdown 清单或侧文件
|
|
75
|
+
6. **每个 step 必须 `completion_confirmed: true`** — 基于 `--- COMPLETION STATUS ---` 的 `STATUS: DONE`;缺失则视为未完成
|
|
76
|
+
7. **command_path 在 A_BUILD_STEPS 解析** — 全局优先 `~/.claude/commands/{name}.md`,fallback 项目 `.claude/commands/{name}.md`,写入 status.json
|
|
77
|
+
8. **Decomposition is outcome-oriented** — sub-goals 为可观测交付,禁止 lifecycle 复刻;`/goal` 用户绑定,ralph 只发提示词
|
|
78
|
+
9. **planning_mode governs arg granularity** — `unified` → skill args 无 `{phase}`;`independent` → 含 `{phase}`
|
|
79
|
+
10. **task_decomposition 驱动 steps[] 动态生长** — `post-goal-audit` 按 unmet 子目标插入 scoped mini-loop;字段可选/累加,既有字段不删不改
|
|
81
80
|
</invariants>
|
|
82
81
|
|
|
83
82
|
<state_machine>
|
|
@@ -86,9 +85,11 @@ Remaining → intent
|
|
|
86
85
|
S_PARSE_ROUTE — 解析参数、路由入口 PERSIST: —
|
|
87
86
|
S_STATUS — 显示 session 进度 PERSIST: —
|
|
88
87
|
S_CONTINUE — 恢复执行 PERSIST: —
|
|
89
|
-
S_RESOLVE_PHASE —
|
|
88
|
+
S_RESOLVE_PHASE — 解析 phase + phase_is_new + D-007 milestone PERSIST: session.phase, session.phase_is_new, session.milestone
|
|
90
89
|
S_INFER — 基于已解析 phase 推断 lifecycle_position PERSIST: session.lifecycle_position
|
|
90
|
+
S_RESOLVE_SCOPE — 读 macro analyze conclusions.scope_verdict PERSIST: session.scope_verdict, session.analyze_macro_id
|
|
91
91
|
S_QUALITY_MODE — 决定质量管线模式 PERSIST: session.quality_mode
|
|
92
|
+
S_PLANNING_MODE — 决定统一/独立规划模式 PERSIST: session.planning_mode
|
|
92
93
|
S_DECOMPOSE — 边界澄清、写执行准则+子目标清单 PERSIST: session.boundary_contract, .execution_criteria, .task_decomposition
|
|
93
94
|
S_BUILD_CHAIN — 构建步骤链 PERSIST: session.steps[]
|
|
94
95
|
S_CREATE_SESSION — 写 status.json PERSIST: session (全量)
|
|
@@ -121,17 +122,25 @@ S_RESOLVE_PHASE:
|
|
|
121
122
|
GUARD: auto_confirm does NOT skip phase ambiguity
|
|
122
123
|
|
|
123
124
|
S_INFER:
|
|
124
|
-
→
|
|
125
|
+
→ S_RESOLVE_SCOPE WHEN: position resolved DO: A_INFER_POSITION
|
|
125
126
|
→ S_FALLBACK WHEN: cannot infer
|
|
126
127
|
|
|
128
|
+
S_RESOLVE_SCOPE:
|
|
129
|
+
→ S_QUALITY_MODE DO: A_RESOLVE_SCOPE_VERDICT
|
|
130
|
+
GUARD: position ∈ {brainstorm, blueprint, init} → skip (scope_verdict = null)
|
|
131
|
+
|
|
127
132
|
S_QUALITY_MODE:
|
|
128
|
-
→
|
|
133
|
+
→ S_PLANNING_MODE DO: A_DETERMINE_QUALITY_MODE
|
|
134
|
+
|
|
135
|
+
S_PLANNING_MODE:
|
|
136
|
+
→ S_DECOMPOSE DO: A_DETERMINE_PLANNING_MODE
|
|
137
|
+
GUARD: lifecycle_position ∈ {brainstorm, blueprint, init, analyze-macro, roadmap} → skip (force independent)
|
|
129
138
|
|
|
130
139
|
S_DECOMPOSE:
|
|
131
140
|
→ S_BUILD_CHAIN DO: A_DECOMPOSE_TASKS
|
|
132
|
-
GUARD: broad intent
|
|
133
|
-
GUARD: narrow intent
|
|
134
|
-
GUARD: position ∈ {brainstorm, init} → skip decomposition
|
|
141
|
+
GUARD: broad intent → MUST clarify boundary even if auto_confirm
|
|
142
|
+
GUARD: narrow intent → auto-derive, skip questions
|
|
143
|
+
GUARD: position ∈ {brainstorm, blueprint, init} → skip decomposition
|
|
135
144
|
|
|
136
145
|
S_BUILD_CHAIN:
|
|
137
146
|
→ S_CREATE_SESSION DO: A_BUILD_STEPS
|
|
@@ -153,6 +162,8 @@ S_DECISION_EVAL:
|
|
|
153
162
|
DO: A_DELEGATE_EVALUATE
|
|
154
163
|
→ S_APPLY_VERDICT WHEN: goal-gate (post-goal-audit)
|
|
155
164
|
DO: A_GOAL_AUDIT_EVALUATE
|
|
165
|
+
→ S_APPLY_VERDICT WHEN: scope-gate (post-analyze-scope)
|
|
166
|
+
DO: A_SCOPE_EVALUATE
|
|
156
167
|
→ S_APPLY_VERDICT WHEN: structural (post-milestone, post-debug-escalate)
|
|
157
168
|
DO: A_STRUCTURAL_EVALUATE
|
|
158
169
|
|
|
@@ -160,10 +171,12 @@ S_APPLY_VERDICT:
|
|
|
160
171
|
→ S_DISPATCH WHEN: verdict == "proceed" DO: A_APPLY_PROCEED
|
|
161
172
|
→ S_DISPATCH WHEN: post-goal-audit + unmet sub-goals DO: A_APPLY_GOAL_FIX
|
|
162
173
|
→ S_DISPATCH WHEN: post-goal-audit + all sub-goals met DO: A_APPLY_GOAL_DONE
|
|
174
|
+
→ S_DISPATCH WHEN: post-analyze-scope DO: A_APPLY_SCOPE_VERDICT
|
|
163
175
|
→ S_DISPATCH WHEN: verdict == "fix" DO: A_APPLY_FIX
|
|
164
176
|
→ S_DISPATCH WHEN: verdict == "escalate" DO: A_APPLY_ESCALATE
|
|
165
|
-
→ S_DISPATCH WHEN: post-milestone + next milestone DO: A_ADVANCE_MILESTONE
|
|
166
|
-
→ END WHEN: post-milestone + no next milestone DO: mark completed
|
|
177
|
+
→ S_DISPATCH WHEN: post-milestone + standard + next milestone DO: A_ADVANCE_MILESTONE
|
|
178
|
+
→ END WHEN: post-milestone + standard + no next milestone DO: mark completed
|
|
179
|
+
→ END WHEN: post-milestone + adhoc DO: mark completed (adhoc self-contained)
|
|
167
180
|
→ END WHEN: post-debug-escalate (always STOP) DO: A_PAUSE_ESCALATE
|
|
168
181
|
GUARD: retry_count >= max_retries → force escalate
|
|
169
182
|
GUARD: confidence_score < 60 AND proceed → override to fix
|
|
@@ -183,41 +196,53 @@ S_FALLBACK:
|
|
|
183
196
|
|
|
184
197
|
1. Find latest ralph session (by created_at)
|
|
185
198
|
2. Display: Session, Status, Position, Progress, Current step
|
|
186
|
-
3. List steps: [✓]
|
|
187
|
-
4. If `task_decomposition` present (
|
|
199
|
+
3. List steps: [✓] completion_confirmed, [▸] current, [ ] pending, [◆] decision;附 `command_scope`(global/project) + `command_path`
|
|
200
|
+
4. If `task_decomposition` present (absent → skip):
|
|
188
201
|
```
|
|
189
202
|
Sub-goals ({done}/{total}) source: {session_dir}/status.json#/task_decomposition
|
|
190
|
-
[x] G1 done_when={done_when} evidence={evidence}
|
|
191
|
-
[ ] G2 done_when={done_when} evidence={evidence} ◀ unmet
|
|
192
|
-
...
|
|
193
|
-
Checklist view: {session_dir}/goal-checklist.md (regenerated from status.json)
|
|
203
|
+
[x] G1 done_when={done_when} evidence={evidence} confirmed={completion_confirmed}
|
|
204
|
+
[ ] G2 done_when={done_when} evidence={evidence} confirmed=false ◀ unmet
|
|
194
205
|
```
|
|
195
|
-
Reads state directly from `status.json.task_decomposition[*].status` — checklist is just a view, status.json wins on conflict.
|
|
196
206
|
|
|
197
207
|
### A_RESOLVE_PHASE
|
|
198
208
|
|
|
199
|
-
|
|
209
|
+
前置于 A_INFER_POSITION。产出 `phase` + `phase_is_new` + `milestone`(D-007 反查)三元组。
|
|
200
210
|
|
|
201
|
-
**Priority
|
|
211
|
+
**Priority:**
|
|
202
212
|
|
|
203
213
|
| Step | 行为 | phase_is_new |
|
|
204
214
|
|------|------|--------------|
|
|
205
|
-
| 1 | intent 匹配 `phase\s*(\d+)`
|
|
206
|
-
| 2 | intent
|
|
215
|
+
| 1 | intent 匹配 `phase\s*(\d+)` → 取 state.json 对应 phase | false |
|
|
216
|
+
| 2 | intent 派生短语 → 在 `state.json.milestones[*].phase_slugs` / `artifacts[*].path` 查找 | false (匹配) / true (无匹配) |
|
|
207
217
|
| 3 | 未派生 → 取最新 in-progress artifact 的 phase | false |
|
|
208
218
|
| 4 | 仍无 → state.json 首个 incomplete phase | false |
|
|
209
|
-
| 5 | position 将是 brainstorm/init/roadmap → phase = null | n/a |
|
|
210
|
-
| 6 | 仍模糊 → `AskUserQuestion
|
|
219
|
+
| 5 | position 将是 brainstorm/blueprint/init/roadmap/analyze-macro → phase = null | n/a |
|
|
220
|
+
| 6 | 仍模糊 → `AskUserQuestion` | 由用户回答确定 |
|
|
221
|
+
|
|
222
|
+
**D-007 Phase→Milestone 反查**(数字 phase 已解析时):
|
|
223
|
+
```
|
|
224
|
+
resolve_milestone(phase_number):
|
|
225
|
+
for ms in state.json.milestones:
|
|
226
|
+
if str(phase_number) in ms.phase_slugs: return ms.id
|
|
227
|
+
return state.json.current_milestone # fallback
|
|
228
|
+
```
|
|
229
|
+
写入 `session.milestone`;禁止直接使用 `current_milestone` 当做 phase 所属 milestone。
|
|
211
230
|
|
|
212
|
-
**写入 session**: `phase
|
|
231
|
+
**写入 session**: `phase`, `phase_is_new`, `milestone`。
|
|
213
232
|
|
|
214
233
|
**新派生 phase 时 milestone 处理**:
|
|
215
|
-
-
|
|
216
|
-
-
|
|
234
|
+
- state.json 当前 milestone 仍 active → 沿用,新增 phase
|
|
235
|
+
- intent 派生新 milestone 名 → 写入 session 仅作标签;`state.json.milestones` 由 `maestro-roadmap` / `maestro-milestone-release` 创建
|
|
217
236
|
|
|
218
237
|
### A_INFER_POSITION
|
|
219
238
|
|
|
220
|
-
**Intent-based
|
|
239
|
+
**Intent-based overrides** (按顺序匹配,先命中先用):
|
|
240
|
+
|
|
241
|
+
| Pattern | Position |
|
|
242
|
+
|---------|----------|
|
|
243
|
+
| brainstorm / 头脑风暴 / 探索 / ideate / 设计思路 | `brainstorm` |
|
|
244
|
+
| blueprint / 规格 / 正式文档 / spec-generate / 7-phase | `blueprint` |
|
|
245
|
+
| broad/medium intent 无数字 phase (重构/全面/重写/迁移/新功能 X) | `analyze-macro` |
|
|
221
246
|
|
|
222
247
|
**Bootstrap detection:**
|
|
223
248
|
|
|
@@ -232,16 +257,32 @@ S_FALLBACK:
|
|
|
232
257
|
|
|
233
258
|
| Condition | Position |
|
|
234
259
|
|-----------|----------|
|
|
235
|
-
| `phase_is_new == true` (
|
|
236
|
-
| no milestones
|
|
237
|
-
|
|
|
260
|
+
| `phase_is_new == true` (新 phase) | `analyze` |
|
|
261
|
+
| no milestones AND no roadmap.md AND has analyze macro artifact | `roadmap` |
|
|
262
|
+
| no milestones AND no roadmap.md AND no analyze artifact | `analyze-macro` |
|
|
263
|
+
| `phase == null` (brainstorm/blueprint/init/roadmap/analyze-macro override 已定) | n/a |
|
|
238
264
|
| phase 已存在 + 无任何 artifact | `analyze` |
|
|
239
265
|
| phase 已存在 + 最新 artifact = analyze | `plan` |
|
|
240
266
|
| phase 已存在 + 最新 artifact = plan | `execute` |
|
|
241
267
|
| phase 已存在 + 最新 artifact = execute | `verify` |
|
|
242
268
|
| phase 已存在 + 最新 artifact = verify | → refine from result files |
|
|
243
269
|
|
|
244
|
-
**关键不变量**:artifact
|
|
270
|
+
**关键不变量**:artifact 过滤按 `session.phase`,不读 `state.json.current_phase`。`phase_is_new` → 直接 `analyze`。
|
|
271
|
+
|
|
272
|
+
### A_RESOLVE_SCOPE_VERDICT
|
|
273
|
+
|
|
274
|
+
仅当 `lifecycle_position ∈ {analyze-macro, roadmap, plan}` 且存在最新 analyze artifact 时执行。
|
|
275
|
+
|
|
276
|
+
1. 定位最新 macro analyze artifact(`type=="analyze"` 且 `scope=="macro"`,按 created_at DESC)→ 记 `session.analyze_macro_id = ANL-xxx`
|
|
277
|
+
2. 读 `{artifact_path}/conclusions.json` 的 `scope_verdict` 字段(`large | medium | small`)
|
|
278
|
+
3. 写入 `session.scope_verdict`;缺失时设 `unknown`
|
|
279
|
+
4. 路由建议(A_BUILD_STEPS 据此决定是否插入 roadmap、plan 是否走 `--from`):
|
|
280
|
+
|
|
281
|
+
| scope_verdict | 链路 |
|
|
282
|
+
|---------------|------|
|
|
283
|
+
| `large` | analyze-macro → roadmap → analyze → plan → execute → ... |
|
|
284
|
+
| `medium` / `small` | analyze-macro → plan --from analyze:{ANL_ID} → execute → ...(跳过 roadmap + analyze-phase) |
|
|
285
|
+
| `unknown` | 默认走 large 路径,post-analyze-scope 决策节点再纠正 |
|
|
245
286
|
|
|
246
287
|
**Refine from verify results:**
|
|
247
288
|
|
|
@@ -266,9 +307,37 @@ S_FALLBACK:
|
|
|
266
307
|
|
|
267
308
|
写入 `session.quality_mode`。A_BUILD_STEPS 据此过滤 stage(见下)。
|
|
268
309
|
|
|
310
|
+
### A_DETERMINE_PLANNING_MODE
|
|
311
|
+
|
|
312
|
+
决定里程碑的规划粒度:一次性规划整个里程碑(统一)还是逐 phase 走完整生命周期(独立)。
|
|
313
|
+
|
|
314
|
+
**Auto-resolve rules (按优先级):**
|
|
315
|
+
|
|
316
|
+
| Condition | Mode | Reason |
|
|
317
|
+
|-----------|------|--------|
|
|
318
|
+
| lifecycle_position ∈ {brainstorm, init, roadmap} | `independent` | 前期阶段不涉及多 phase 规划 |
|
|
319
|
+
| `phase_is_new == true` | `independent` | 新 phase 尚无里程碑上下文 |
|
|
320
|
+
| intent 显式指定 phase 编号(如 "phase 2"、"P3") | `independent` | 用户明确针对单个 phase |
|
|
321
|
+
| milestone 仅含 1 个 phase(读 state.json) | `independent` | 统一无意义 |
|
|
322
|
+
| milestone 含多个 phase + `auto_confirm` | `unified` | 自动模式倾向高效 |
|
|
323
|
+
| milestone 含多个 phase + 非 `auto_confirm` | → AskUserQuestion | 征询用户选择 |
|
|
324
|
+
|
|
325
|
+
**AskUserQuestion** (仅当 milestone 含 ≥2 phase 且非 auto_confirm):
|
|
326
|
+
|
|
327
|
+
```
|
|
328
|
+
question: "当前里程碑含 {N} 个 phase,选择规划模式?"
|
|
329
|
+
options:
|
|
330
|
+
- label: "统一规划 (Recommended)"
|
|
331
|
+
description: "一次性分析+规划整个里程碑所有 phase,analyze/plan 走里程碑级,适合 phase 间关联紧密"
|
|
332
|
+
- label: "独立规划"
|
|
333
|
+
description: "逐个 phase 走完整生命周期(analyze→plan→execute→verify→...),适合 phase 间独立性高"
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
写入 `session.planning_mode`(`"unified"` 或 `"independent"`)。`A_BUILD_STEPS` 据此决定 skill args 是否携带 `{phase}` 占位符。
|
|
337
|
+
|
|
269
338
|
### A_DECOMPOSE_TASKS
|
|
270
339
|
|
|
271
|
-
|
|
340
|
+
Runs once before chain build; additive to status.json.
|
|
272
341
|
|
|
273
342
|
**1. Classify intent breadth:**
|
|
274
343
|
|
|
@@ -288,7 +357,7 @@ Build the boundary contract + outcome sub-goal checklist that `/goal` will track
|
|
|
288
357
|
|
|
289
358
|
narrow → derive defaults from intent + codebase, skip questions.
|
|
290
359
|
|
|
291
|
-
**3. Derive `execution_criteria
|
|
360
|
+
**3. Derive `execution_criteria`**: backward-compat、scope-freeze、test/coverage bar、fix-don't-hide、incremental commit。
|
|
292
361
|
|
|
293
362
|
**4. Derive `task_decomposition`** (子目标清单 — outcome-oriented, NOT lifecycle stages). Each entry:
|
|
294
363
|
```json
|
|
@@ -297,60 +366,70 @@ narrow → derive defaults from intent + codebase, skip questions.
|
|
|
297
366
|
"evidence": "verification.json|review.json|uat.md|<test path>",
|
|
298
367
|
"lifecycle": ["analyze","execute","verify"], "status": "pending" }
|
|
299
368
|
```
|
|
300
|
-
|
|
369
|
+
`done_when` 必须客观可验证,且引用 ralph 已产出的 artifact;`lifecycle` 字段映射到产出 evidence 的生命周期 stage。
|
|
301
370
|
|
|
302
|
-
**5. Persist** (additive)
|
|
371
|
+
**5. Persist** (additive): `boundary_contract`, `execution_criteria`, `task_decomposition`。每个 sub-goal 含 `status: "pending"` + `completion_confirmed: false`。
|
|
303
372
|
|
|
304
|
-
**6. Stage** the Goal
|
|
373
|
+
**6. Stage** the Goal Prompt (Appendix) for A_CREATE_SESSION to emit.
|
|
305
374
|
|
|
306
375
|
### A_BUILD_STEPS
|
|
307
376
|
|
|
308
|
-
Generate steps from `session.lifecycle_position` to `milestone-complete
|
|
309
|
-
|
|
310
|
-
| Stage | Skill | Type | Decision after | quality_mode |
|
|
311
|
-
|
|
312
|
-
| brainstorm | `maestro-brainstorm "{intent}"` |
|
|
313
|
-
|
|
|
314
|
-
|
|
|
315
|
-
| analyze | `maestro-analyze {
|
|
316
|
-
|
|
|
317
|
-
|
|
|
318
|
-
|
|
|
319
|
-
|
|
|
320
|
-
|
|
|
321
|
-
| test
|
|
322
|
-
|
|
|
323
|
-
|
|
|
324
|
-
|
|
|
325
|
-
| milestone-
|
|
326
|
-
|
|
327
|
-
|
|
377
|
+
Generate steps from `session.lifecycle_position` to `milestone-complete`.
|
|
378
|
+
|
|
379
|
+
| Stage | Skill (independent) | Skill (unified) | Type | Decision after | quality_mode |
|
|
380
|
+
|-------|---------------------|-----------------|------|----------------|--------------|
|
|
381
|
+
| brainstorm | `maestro-brainstorm "{intent}"` | *(same)* | internal | — | all |
|
|
382
|
+
| blueprint | `maestro-blueprint "{intent}"` | *(same)* | internal | — | all |
|
|
383
|
+
| init | `maestro-init` | *(same)* | internal | — | all |
|
|
384
|
+
| analyze-macro | `maestro-analyze "{intent}"` | *(same)* | internal | `post-analyze-scope` | all |
|
|
385
|
+
| roadmap | `maestro-roadmap --from analyze:{analyze_macro_id}` | *(same)* | internal | — | all |
|
|
386
|
+
| analyze | `maestro-analyze {phase}` | `maestro-analyze` | internal | — | all |
|
|
387
|
+
| plan | `maestro-plan {phase}` *(scope=phase)* / `maestro-plan --from analyze:{analyze_macro_id}` *(scope=standalone)* / `maestro-plan --from blueprint:{blueprint_id}` *(scope=standalone)* | `maestro-plan` | internal | — | all |
|
|
388
|
+
| execute | `maestro-execute {phase}` | `maestro-execute` | internal | — | all |
|
|
389
|
+
| verify | `maestro-verify {phase}` | `maestro-verify` | internal | `post-verify` | all |
|
|
390
|
+
| business-test | `quality-auto-test {phase}` | `quality-auto-test` | internal | `post-business-test` | full only |
|
|
391
|
+
| review | `quality-review {phase}` | `quality-review` | internal | `post-review` | all (quick: append `--tier quick`) |
|
|
392
|
+
| test-gen | `quality-auto-test {phase}` | `quality-auto-test` | internal | — | full / standard if coverage<80% |
|
|
393
|
+
| test | `quality-test {phase}` | `quality-test` | internal | `post-test` | full, standard |
|
|
394
|
+
| milestone-audit | `maestro-milestone-audit` | *(same)* | internal | — | all |
|
|
395
|
+
| goal-audit | *(decision-only)* | *(same)* | decision | `post-goal-audit` | all (only if decomposed) |
|
|
396
|
+
| milestone-complete | `maestro-milestone-complete` | *(same)* | internal | `post-milestone` | all |
|
|
328
397
|
|
|
329
398
|
**Build rules (按顺序应用):**
|
|
330
399
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
400
|
+
0. **planning_mode 选列**:`unified` → Skill (unified) 列;`independent` → Skill (independent) 列
|
|
401
|
+
1. **起点**:从 `session.lifecycle_position` 开始
|
|
402
|
+
2. **跳过已完成**:跳过当前 milestone+phase 下已有 completed artifact 的 stage(按 `session.phase` 过滤);unified 按 milestone 过滤
|
|
403
|
+
3. **quality_mode 过滤**:按 `session.quality_mode` 排除不匹配 stage
|
|
334
404
|
4. **决策节点**:每个 Decision after 非空的 stage 之后插入 `{ type: "decision", decision: "<gate>", retry_count: 0, max_retries: 2 }`
|
|
335
|
-
5. **goal-audit
|
|
336
|
-
6. **终点硬约束**:chain
|
|
337
|
-
7.
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
-
|
|
341
|
-
-
|
|
342
|
-
|
|
343
|
-
|
|
405
|
+
5. **goal-audit 插入**:`task_decomposition` 存在时,在最后一个 evidence-producing stage(verify/review/test)之后、`milestone-complete` 之前插入 `decision:post-goal-audit`
|
|
406
|
+
6. **终点硬约束**:chain 以 `milestone-complete` 结尾
|
|
407
|
+
7. **goal_ref 传播**:`task_decomposition` 存在时,每个 step 按 `step.stage ∈ g.lifecycle` 匹配 `step.goal_ref = g.id`(多匹配取字典序最小);decision 节点不打 goal_ref
|
|
408
|
+
8. **占位符**:independent 保留 `{phase}` `{intent}`;unified 不带 `{phase}`
|
|
409
|
+
9. **command_path 解析**(每个非 decision step):
|
|
410
|
+
- 取 skill 名(args 前的第一个 token)
|
|
411
|
+
- 全局优先:`~/.claude/commands/{name}.md` 存在 → `command_scope = "global"`
|
|
412
|
+
- Fallback:`.claude/commands/{name}.md` 存在 → `command_scope = "project"`
|
|
413
|
+
- 两者都缺 → `command_scope = "missing"`, `command_path = null`,A_CREATE_SESSION 报错 E006
|
|
414
|
+
10. **每个 step 初始化** `completion_confirmed: false`, `completion_status: null`, `completion_evidence: null`
|
|
415
|
+
11. **scope_verdict gating**(仅当 chain 起点 = `analyze-macro`):
|
|
416
|
+
- `scope_verdict ∈ {medium, small}` → 跳过 `roadmap` + `analyze` 两 stage;`plan` 选 standalone 列(`--from analyze:{analyze_macro_id}`),不带 `{phase}`
|
|
417
|
+
- `scope_verdict == large` → 保留 `roadmap` + `analyze`;`plan` 选 phase 列(`{phase}`)
|
|
418
|
+
- `scope_verdict == unknown` → 默认 large 路径;由 `post-analyze-scope` 决策节点在 macro analyze 完成后纠正(A_APPLY_SCOPE_VERDICT)
|
|
419
|
+
12. **--from 自动注入**:
|
|
420
|
+
- `analyze_macro_id` 存在且当前 step 是 `roadmap` → args 改为 `--from analyze:{analyze_macro_id}`
|
|
421
|
+
- `analyze_macro_id` 存在且 `scope_verdict ∈ {medium, small}` 且当前 step 是 `plan` → args 改为 `--from analyze:{analyze_macro_id}`
|
|
422
|
+
- `blueprint_id` 存在 → 当前 step 是 `plan` → args 改为 `--from blueprint:{blueprint_id}`(优先级低于 phase 数字参数)
|
|
423
|
+
- 写入 `step.source_artifact_ref` 以便审计
|
|
424
|
+
13. **D-007 Milestone-ref 标注**:每个含 `{phase}` 占位符的 step → `step.milestone_id = session.milestone`(由 A_RESOLVE_PHASE 反查得出),禁止读 `current_milestone`
|
|
425
|
+
14. **动态插入步骤**(A_APPLY_*)同样应用规则 7-13
|
|
344
426
|
|
|
345
427
|
### A_CREATE_SESSION
|
|
346
428
|
|
|
347
|
-
1.
|
|
348
|
-
2.
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
- Stable filename within session (so `/goal` condition string survives context compaction)
|
|
352
|
-
3. Display chain overview with step list
|
|
353
|
-
4. If `task_decomposition` present: display the **Goal Prompt block** (Appendix: Goal Prompt Template) — the copy-paste `/goal …` line binds status.json + checklist as a Stop-hook target
|
|
429
|
+
1. Validate: 所有 step 的 `command_scope != "missing"`;否则 raise E006 + 列出缺失 skill
|
|
430
|
+
2. Write `.workflow/.maestro/ralph-{YYYYMMDD-HHmmss}/status.json` (Appendix: Session Schema)
|
|
431
|
+
3. Display chain overview:每步显示 `{index}. {skill} [{type}] [{command_scope}]`
|
|
432
|
+
4. If `task_decomposition` present: display the **Goal Prompt block** (Appendix: Goal Prompt Template)
|
|
354
433
|
|
|
355
434
|
### A_DELEGATE_EVALUATE
|
|
356
435
|
|
|
@@ -384,45 +463,64 @@ Type rationale: `internal` = Skill(), lightweight/interactive; `external` = dele
|
|
|
384
463
|
|
|
385
464
|
### A_STRUCTURAL_EVALUATE
|
|
386
465
|
|
|
387
|
-
**post-milestone:**
|
|
466
|
+
**post-milestone:**
|
|
467
|
+
1. Read state.json → resolve completed milestone object
|
|
468
|
+
2. Determine milestone type: `milestone_obj.type` (default `"standard"` if missing)
|
|
469
|
+
3. **Standard milestone** (`type != "adhoc"`): next milestone exists? → insert lifecycle steps / complete
|
|
470
|
+
4. **Adhoc milestone** (`type == "adhoc"`): always END — adhoc milestones are self-contained, no successor to advance to. Set `current_milestone = null`.
|
|
471
|
+
|
|
388
472
|
**post-debug-escalate:** Always STOP → set paused, display "请人工介入"
|
|
389
473
|
|
|
474
|
+
### A_SCOPE_EVALUATE
|
|
475
|
+
|
|
476
|
+
仅由 `post-analyze-scope` 决策节点触发;macro analyze 完成后读 `conclusions.json.scope_verdict` 决定下游链路。
|
|
477
|
+
|
|
478
|
+
1. 定位刚完成的 macro analyze artifact → `analyze_macro_id`, `conclusions_path = {artifact_path}/conclusions.json`
|
|
479
|
+
2. 读取 `conclusions.scope_verdict`(`large | medium | small`),缺失 → `unknown`
|
|
480
|
+
3. 写入 `session.scope_verdict` + `session.analyze_macro_id`
|
|
481
|
+
4. Append `{session_dir}/decisions.ndjson`:
|
|
482
|
+
```json
|
|
483
|
+
{ "id": "DEC-{timestamp}", "type": "scope-gate",
|
|
484
|
+
"source": "ralph", "node_id": "post-analyze-scope",
|
|
485
|
+
"verdict": "{scope_verdict}", "analyze_macro_id": "{ANL_ID}" }
|
|
486
|
+
```
|
|
487
|
+
5. → A_APPLY_SCOPE_VERDICT
|
|
488
|
+
|
|
390
489
|
### A_GOAL_AUDIT_EVALUATE
|
|
391
490
|
|
|
392
|
-
|
|
491
|
+
Runs only when `task_decomposition` present.
|
|
393
492
|
|
|
394
|
-
1. Read `session.task_decomposition` from status.json
|
|
395
|
-
2. For each sub-goal `status != "done"`: resolve
|
|
493
|
+
1. Read `session.task_decomposition` from status.json
|
|
494
|
+
2. For each sub-goal `status != "done"`: resolve `evidence` artifact under current phase scratch dir
|
|
396
495
|
3. Delegate read-only audit (run_in_background, STOP, wait):
|
|
397
496
|
```
|
|
398
|
-
maestro delegate "PURPOSE:
|
|
497
|
+
maestro delegate "PURPOSE: 审计未完成子目标,判定 met / unmet
|
|
399
498
|
TASK:
|
|
400
|
-
1. 读取 status.json.task_decomposition
|
|
401
|
-
2.
|
|
402
|
-
3. 输出 met / unmet
|
|
499
|
+
1. 读取 status.json.task_decomposition 中 status!=done 的子目标
|
|
500
|
+
2. 打开 evidence 产物,对照 done_when 严格判定
|
|
501
|
+
3. 输出 met / unmet,unmet 给出 gap + target_phase
|
|
403
502
|
CONTEXT:
|
|
404
503
|
status.json = {session_dir}/status.json
|
|
405
|
-
checklist = {goal_checklist_path} (人类可读视图,仅供参考)
|
|
406
504
|
evidence = {evidence artifacts}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
EXPECTED
|
|
505
|
+
execution_criteria = {execution_criteria}
|
|
506
|
+
boundary_contract = {boundary_contract}
|
|
507
|
+
EXPECTED:
|
|
410
508
|
---VERDICT---
|
|
411
509
|
STATUS=all_met|has_unmet
|
|
412
|
-
UNMET=[{id:G2,gap:'...',target_phase:execute}, ...]
|
|
510
|
+
UNMET=[{id:G2,gap:'...',target_phase:execute}, ...]
|
|
413
511
|
CONFIDENCE_SCORE=0-100
|
|
414
512
|
---END---
|
|
415
513
|
CONSTRAINTS:
|
|
416
|
-
-
|
|
417
|
-
- 严格按 done_when 判定;evidence 缺失 →
|
|
514
|
+
- 只评估,不修改文件
|
|
515
|
+
- 严格按 done_when 判定;evidence 缺失 → unmet
|
|
418
516
|
- 不得建议超出 boundary_contract 的修改
|
|
419
517
|
"
|
|
420
518
|
--role analyze --mode analysis
|
|
421
519
|
```
|
|
422
|
-
4. On callback:
|
|
423
|
-
5.
|
|
520
|
+
4. On callback: 对每个 met 子目标,set `task_decomposition[i].status="done"` + `completion_confirmed=true` + `completed_at=now`
|
|
521
|
+
5. Append `{session_dir}/decisions.ndjson` with `"type": "goal-gate"`, `unmet_count`, `unmet_ids`
|
|
424
522
|
6. Verdict: `all_met` → A_APPLY_GOAL_DONE; `has_unmet` → A_APPLY_GOAL_FIX
|
|
425
|
-
GUARD: retry_count >= max_retries AND still unmet → A_APPLY_ESCALATE
|
|
523
|
+
GUARD: retry_count >= max_retries AND still unmet → A_APPLY_ESCALATE
|
|
426
524
|
|
|
427
525
|
### A_APPLY_PROCEED
|
|
428
526
|
|
|
@@ -440,22 +538,33 @@ Re-checks sub-goals against `status.json` (source of truth) and decides whether
|
|
|
440
538
|
1. Insert `[quality-debug "{gap_summary}", decision:post-debug-escalate]`
|
|
441
539
|
2. Increment retry_count, reindex, write status.json
|
|
442
540
|
|
|
443
|
-
###
|
|
541
|
+
### A_APPLY_SCOPE_VERDICT
|
|
444
542
|
|
|
445
|
-
|
|
543
|
+
由 `post-analyze-scope` 触发,依据 `session.scope_verdict` 重塑下游链路。
|
|
446
544
|
|
|
447
|
-
1.
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
545
|
+
1. 读 `session.scope_verdict`
|
|
546
|
+
2. 路径 A(`large`):保持当前链;为后续 `roadmap` step 注入 `--from analyze:{analyze_macro_id}`;为后续 `plan` step 选 phase 列;继续推进
|
|
547
|
+
3. 路径 B(`medium` / `small`):
|
|
548
|
+
- 删除 `goal-audit` 之前所有未完成的 `roadmap` + `analyze` (phase) step
|
|
549
|
+
- 把下一个未完成的 `plan` step 改为 `maestro-plan --from analyze:{analyze_macro_id}`,去掉 `{phase}`,`source_artifact_ref = analyze:{analyze_macro_id}`
|
|
550
|
+
- 后续 `execute` / `verify` 等沿用同一 standalone scope(不带 `{phase}`,由 plan 写出的 task 列表驱动)
|
|
551
|
+
4. 路径 C(`unknown`):
|
|
552
|
+
- 非 auto_confirm → AskUserQuestion 二选一(large / medium-small);auto_confirm → 默认 large
|
|
553
|
+
5. Reindex steps,标 decision completed,write status.json
|
|
554
|
+
6. Display: ◆ Scope verdict: {verdict} → {kept|collapsed to standalone via analyze:{ANL_ID}}
|
|
555
|
+
|
|
556
|
+
### A_APPLY_GOAL_FIX
|
|
557
|
+
|
|
558
|
+
1. 对每个 unmet 子目标 `G{n}`(按 `target_phase` 分组去重):在 `goal-audit` 节点前插入 scoped mini-loop(见 Appendix: Fix-Loop Templates → post-goal-audit),每条插入 step `goal_ref: "G{n}"`,按 A_BUILD_STEPS 规则 9 解析 `command_path`
|
|
559
|
+
2. 重新追加 `decision:post-goal-audit {retry+1}`
|
|
560
|
+
3. Reindex steps, increment retry_count, write status.json
|
|
561
|
+
4. Display: ◆ Goal audit: {k} unmet → +{N} steps inserted (G{ids}), retry {r}/{max}
|
|
452
562
|
|
|
453
563
|
### A_APPLY_GOAL_DONE
|
|
454
564
|
|
|
455
|
-
1.
|
|
456
|
-
2.
|
|
457
|
-
3.
|
|
458
|
-
4. Display: ◆ Goal audit: 全部子目标达成 ✓ — status.json + checklist 已同步 ALL_GOALS_DONE
|
|
565
|
+
1. status.json: set 每个 `task_decomposition[*].status="done"`, `completion_confirmed=true`, `completed_at=now`,顶层 `task_decomposition_all_done=true`
|
|
566
|
+
2. Mark goal-audit decision completed;proceed to `milestone-complete`
|
|
567
|
+
3. Display: ◆ Goal audit: all met ✓
|
|
459
568
|
|
|
460
569
|
### A_ADVANCE_MILESTONE
|
|
461
570
|
|
|
@@ -482,18 +591,38 @@ Re-checks sub-goals against `status.json` (source of truth) and decides whether
|
|
|
482
591
|
"session_id": "ralph-{YYYYMMDD-HHmmss}",
|
|
483
592
|
"source": "ralph", "status": "running",
|
|
484
593
|
"intent": "", "lifecycle_position": "",
|
|
485
|
-
"phase": null, "phase_is_new": false,
|
|
594
|
+
"phase": null, "phase_is_new": false,
|
|
595
|
+
"milestone": "", // D-007 反查结果,禁止读 current_milestone
|
|
486
596
|
"auto_mode": false,
|
|
487
|
-
"quality_mode": "standard",
|
|
597
|
+
"quality_mode": "standard", // "full" | "standard" | "quick"
|
|
598
|
+
"planning_mode": "independent", // "unified" | "independent"
|
|
599
|
+
"scope_verdict": null, // "large" | "medium" | "small" | "unknown" | null
|
|
600
|
+
"analyze_macro_id": null, // "ANL-xxx" 来自最新 macro analyze
|
|
601
|
+
"blueprint_id": null, // "BLP-xxx" 若存在
|
|
488
602
|
"cli_tool": "claude", "passed_gates": [],
|
|
489
603
|
"context": { "issue_id": null, "scratch_dir": null, "plan_dir": null,
|
|
490
|
-
"analysis_dir": null, "brainstorm_dir": null },
|
|
491
|
-
"steps": [{
|
|
492
|
-
"
|
|
493
|
-
"
|
|
604
|
+
"analysis_dir": null, "brainstorm_dir": null, "blueprint_dir": null },
|
|
605
|
+
"steps": [{
|
|
606
|
+
"index": 0,
|
|
607
|
+
"type": "internal|external|decision",
|
|
608
|
+
"skill": "",
|
|
609
|
+
"args": "",
|
|
610
|
+
"stage": "", // brainstorm|blueprint|init|analyze-macro|roadmap|analyze|plan|execute|verify|...
|
|
611
|
+
"scope": null, // "phase"|"standalone"|"milestone"|null(plan 等需要)
|
|
612
|
+
"command_scope": "global|project|missing|null",
|
|
613
|
+
"command_path": "~/.claude/commands/{name}.md | .claude/commands/{name}.md | null",
|
|
614
|
+
"milestone_id": null, // D-007 反查注入;仅含 {phase} 占位符的 step 有
|
|
615
|
+
"source_artifact_ref": null, // "analyze:ANL-xxx" | "blueprint:BLP-xxx" | null
|
|
616
|
+
"status": "pending|running|completed|skipped|failed",
|
|
617
|
+
"goal_ref": null,
|
|
618
|
+
"completion_confirmed": false,
|
|
619
|
+
"completion_status": null,
|
|
620
|
+
"completion_evidence": null,
|
|
621
|
+
"completed_at": null
|
|
622
|
+
}],
|
|
494
623
|
"waves": [], "current_step": 0,
|
|
495
624
|
|
|
496
|
-
|
|
625
|
+
// Optional decomposition block (additive; absent → decomposition off)
|
|
497
626
|
"boundary_contract": {
|
|
498
627
|
"in_scope": [], "out_of_scope": [], "constraints": [], "definition_of_done": ""
|
|
499
628
|
},
|
|
@@ -501,25 +630,23 @@ Re-checks sub-goals against `status.json` (source of truth) and decides whether
|
|
|
501
630
|
"task_decomposition": [
|
|
502
631
|
{ "id": "G1", "goal": "", "boundary": "", "done_when": "",
|
|
503
632
|
"evidence": "", "lifecycle": [], "status": "pending|done",
|
|
504
|
-
"completed_at": null }
|
|
633
|
+
"completion_confirmed": false, "completed_at": null }
|
|
505
634
|
],
|
|
506
|
-
"task_decomposition_all_done": false
|
|
507
|
-
"goal_checklist_path": "",
|
|
508
|
-
"goal_checklist_synced_at": null
|
|
635
|
+
"task_decomposition_all_done": false
|
|
509
636
|
}
|
|
510
637
|
```
|
|
511
638
|
|
|
512
|
-
|
|
513
|
-
- Schema 加字段 = 可选(缺省 = 旧行为);不删/不改既有字段名。
|
|
514
|
-
- `steps[]` 是活数组:`post-goal-audit` 与 `post-verify/review/test` 等决策节点按需追加+重排,子目标收敛即停。`goal_ref`(可选)回溯每条动态插入步骤所属子目标。
|
|
639
|
+
新增字段可选,缺省=旧行为;既有字段名不删不改。
|
|
515
640
|
|
|
516
641
|
### Fix-Loop Templates
|
|
517
642
|
|
|
643
|
+
所有插入 step 默认 `type: "internal"`,按 A_BUILD_STEPS 规则 9 解析 `command_path` + `command_scope`。
|
|
644
|
+
|
|
518
645
|
**post-verify:**
|
|
519
646
|
```
|
|
520
647
|
quality-debug "{gap_summary}"
|
|
521
648
|
maestro-plan --gaps {phase}
|
|
522
|
-
maestro-execute {phase}
|
|
649
|
+
maestro-execute {phase}
|
|
523
650
|
maestro-verify {phase}
|
|
524
651
|
decision:post-verify {retry+1}
|
|
525
652
|
```
|
|
@@ -528,7 +655,7 @@ decision:post-verify {retry+1}
|
|
|
528
655
|
```
|
|
529
656
|
quality-debug --from-business-test "{gap_summary}"
|
|
530
657
|
maestro-plan --gaps {phase}
|
|
531
|
-
maestro-execute {phase}
|
|
658
|
+
maestro-execute {phase}
|
|
532
659
|
maestro-verify {phase}
|
|
533
660
|
decision:post-verify {retry: 0}
|
|
534
661
|
quality-auto-test {phase}
|
|
@@ -539,7 +666,7 @@ decision:post-business-test {retry+1}
|
|
|
539
666
|
```
|
|
540
667
|
quality-debug "{gap_summary}"
|
|
541
668
|
maestro-plan --gaps {phase}
|
|
542
|
-
maestro-execute {phase}
|
|
669
|
+
maestro-execute {phase}
|
|
543
670
|
quality-review {phase}
|
|
544
671
|
decision:post-review {retry+1}
|
|
545
672
|
```
|
|
@@ -548,7 +675,7 @@ decision:post-review {retry+1}
|
|
|
548
675
|
```
|
|
549
676
|
quality-debug --from-uat "{gap_summary}"
|
|
550
677
|
maestro-plan --gaps {phase}
|
|
551
|
-
maestro-execute {phase}
|
|
678
|
+
maestro-execute {phase}
|
|
552
679
|
maestro-verify {phase}
|
|
553
680
|
decision:post-verify {retry: 0}
|
|
554
681
|
quality-auto-test {phase}
|
|
@@ -560,73 +687,15 @@ quality-test {phase}
|
|
|
560
687
|
decision:post-test {retry+1}
|
|
561
688
|
```
|
|
562
689
|
|
|
563
|
-
**post-goal-audit:** (per unmet sub-goal group
|
|
690
|
+
**post-goal-audit:** (per unmet sub-goal group)
|
|
564
691
|
```
|
|
565
|
-
# for each unmet sub-goal G{n}, scoped to
|
|
692
|
+
# for each unmet sub-goal G{n}, scoped to target_phase:
|
|
566
693
|
maestro-plan --gaps {target_phase} "G{n}: {gap}" [goal_ref: G{n}]
|
|
567
|
-
maestro-execute {target_phase}
|
|
568
|
-
maestro-verify {target_phase}
|
|
569
|
-
# after all unmet groups inserted
|
|
694
|
+
maestro-execute {target_phase} [goal_ref: G{n}]
|
|
695
|
+
maestro-verify {target_phase} [goal_ref: G{n}]
|
|
696
|
+
# after all unmet groups inserted:
|
|
570
697
|
decision:post-goal-audit {retry+1}
|
|
571
698
|
```
|
|
572
|
-
Notes: only unmet sub-goals' phases are re-run (no full-pipeline replay); inserted steps carry `goal_ref` for traceability; loop exits when audit returns `all_met` (→ A_APPLY_GOAL_DONE) or retry hits max (→ escalate to human). This keeps growth bounded.
|
|
573
|
-
|
|
574
|
-
### Goal Checklist Template (status.json projection)
|
|
575
|
-
|
|
576
|
-
`{session_dir}/goal-checklist.md` 是 `status.json` 的只读投影:不要手改,永远从 JSON 重渲染。文件名在 session 内稳定,`/goal` 条件字符串跨上下文压缩仍可用。
|
|
577
|
-
|
|
578
|
-
```markdown
|
|
579
|
-
# Ralph Goal Checklist — {session_id}
|
|
580
|
-
<!-- AUTO-GENERATED from status.json. Source: ../status.json#/task_decomposition -->
|
|
581
|
-
|
|
582
|
-
> Intent : {intent}
|
|
583
|
-
> Source : `{session_dir}/status.json` (authoritative)
|
|
584
|
-
> Last sync : {ISO} Phase: {phase} Milestone: {milestone}
|
|
585
|
-
|
|
586
|
-
## Resume / 恢复入口
|
|
587
|
-
**不要直接执行 skill,调用入口:**
|
|
588
|
-
```
|
|
589
|
-
/maestro-ralph continue
|
|
590
|
-
```
|
|
591
|
-
ralph 评估下一步门控,ralph-execute 跑实际步骤。Stop hook 触发时也走这条路径。
|
|
592
|
-
|
|
593
|
-
## 执行准则 / Execution Criteria
|
|
594
|
-
<!-- status.json#/execution_criteria -->
|
|
595
|
-
- {criterion 1}
|
|
596
|
-
- {criterion 2}
|
|
597
|
-
|
|
598
|
-
## 边界契约 / Boundary Contract
|
|
599
|
-
<!-- status.json#/boundary_contract -->
|
|
600
|
-
- In scope : {in_scope}
|
|
601
|
-
- Out of scope : {out_of_scope}
|
|
602
|
-
- Constraints : {constraints}
|
|
603
|
-
- Definition of Done : {definition_of_done}
|
|
604
|
-
|
|
605
|
-
## 子目标 / Sub-goals ({done}/{total})
|
|
606
|
-
<!-- status.json#/task_decomposition -->
|
|
607
|
-
- [ ] G1 — {goal}
|
|
608
|
-
done_when : {done_when}
|
|
609
|
-
evidence : {evidence}
|
|
610
|
-
lifecycle : {lifecycle}
|
|
611
|
-
<!-- ref: status.json#/task_decomposition/0 status=pending -->
|
|
612
|
-
- [x] G2 — {goal}
|
|
613
|
-
done_when : {done_when}
|
|
614
|
-
evidence : {evidence}
|
|
615
|
-
<!-- ref: status.json#/task_decomposition/1 status=done completed_at={ISO} -->
|
|
616
|
-
- [ ] G3 — ...
|
|
617
|
-
|
|
618
|
-
<!-- A_APPLY_GOAL_DONE 在全部 status=done 时在文件末尾追加 ALL_GOALS_DONE -->
|
|
619
|
-
```
|
|
620
|
-
|
|
621
|
-
### Sync Rule (status.json ↔ goal-checklist.md)
|
|
622
|
-
|
|
623
|
-
单向投影;status.json 为真源;冲突时直接重渲染,不合并。
|
|
624
|
-
|
|
625
|
-
1. 只有 ralph / ralph-execute 写 `task_decomposition[*].status`;markdown 不可写入状态。
|
|
626
|
-
2. `task_decomposition` / `execution_criteria` / `boundary_contract` 任一变化 → 立即重渲染 checklist。
|
|
627
|
-
3. 全部 `status="done"` → 在文件末追加 `ALL_GOALS_DONE` 哨兵行。
|
|
628
|
-
4. 检测到 checklist 缺失或与 JSON 漂移 → 直接重渲染覆盖;视 markdown 为可丢弃产物。
|
|
629
|
-
5. ralph-execute(可选、向后兼容):完成 `lifecycle` 覆盖某子目标的 step 后,校验 evidence;满足则置 `status="done"` + 重渲染。无 `task_decomposition` 字段 → 不动作。
|
|
630
699
|
|
|
631
700
|
### Goal Prompt Template
|
|
632
701
|
|
|
@@ -635,12 +704,12 @@ ralph 评估下一步门控,ralph-execute 跑实际步骤。Stop hook 触发
|
|
|
635
704
|
```
|
|
636
705
|
📋 任务分解完成。复制下面一行设定目标,会话在子目标全部达成前不停:
|
|
637
706
|
|
|
638
|
-
/goal 目标达成条件: {session_dir}/status.json 中 task_decomposition[*].status
|
|
707
|
+
/goal 目标达成条件: {session_dir}/status.json 中 task_decomposition[*].status == "done" 且 task_decomposition[*].completion_confirmed == true 且 steps[*].completion_confirmed == true。未达成时:阅读 {session_dir}/status.json 取得 execution_criteria / boundary_contract / task_decomposition / steps 作为行动手册,调用 /maestro-ralph continue 推进;严禁手动执行 skill 或越界修改 status.json.boundary_contract.out_of_scope。
|
|
639
708
|
|
|
640
709
|
随后运行 /maestro-ralph continue 立即开始执行。
|
|
641
710
|
```
|
|
642
711
|
|
|
643
|
-
`/goal`
|
|
712
|
+
`/goal` 由用户输入;ralph 只输出此提示词。判据以 status.json 为权威。
|
|
644
713
|
|
|
645
714
|
### Error Codes
|
|
646
715
|
|
|
@@ -651,6 +720,7 @@ ralph 评估下一步门控,ralph-execute 跑实际步骤。Stop hook 触发
|
|
|
651
720
|
| E003 | error | Artifact dir not found for decision | Show glob, ask |
|
|
652
721
|
| E004 | error | Delegate verdict parse failed | Fallback: "fix" |
|
|
653
722
|
| E005 | error | Delegate execution failed | Fallback: "fix" |
|
|
723
|
+
| E006 | error | command_scope == "missing" for one or more steps | List missing skills, abort build |
|
|
654
724
|
| W001 | warning | Decision expanded chain | Auto-handled |
|
|
655
725
|
| W002 | warning | Max retries, escalating | Auto-handled |
|
|
656
726
|
| W003 | warning | Multiple running sessions | Use latest, warn |
|
|
@@ -658,26 +728,27 @@ ralph 评估下一步门控,ralph-execute 跑实际步骤。Stop hook 触发
|
|
|
658
728
|
|
|
659
729
|
### Success Criteria
|
|
660
730
|
|
|
661
|
-
- [ ] Phase 先于 position
|
|
662
|
-
- [ ]
|
|
663
|
-
- [ ]
|
|
664
|
-
- [ ]
|
|
665
|
-
- [ ]
|
|
666
|
-
- [ ]
|
|
667
|
-
- [ ]
|
|
668
|
-
- [ ]
|
|
669
|
-
- [ ]
|
|
670
|
-
- [ ]
|
|
671
|
-
- [ ]
|
|
672
|
-
- [ ]
|
|
673
|
-
- [ ]
|
|
674
|
-
- [ ]
|
|
675
|
-
- [ ]
|
|
676
|
-
- [ ]
|
|
677
|
-
- [ ]
|
|
678
|
-
- [ ]
|
|
679
|
-
- [ ]
|
|
680
|
-
- [ ]
|
|
681
|
-
- [ ]
|
|
731
|
+
- [ ] Phase 先于 position 解析;phase_is_new 标记写入 session
|
|
732
|
+
- [ ] D-007 反查:phase 数字 → `session.milestone`,禁止读 current_milestone;写入 step.milestone_id
|
|
733
|
+
- [ ] phase_is_new=true → lifecycle_position 强制 `analyze`
|
|
734
|
+
- [ ] Intent overrides 识别 brainstorm / blueprint / analyze-macro
|
|
735
|
+
- [ ] A_RESOLVE_SCOPE_VERDICT 读 macro analyze conclusions.scope_verdict,写入 session.scope_verdict + analyze_macro_id
|
|
736
|
+
- [ ] 链路起点 = analyze-macro 时:large→roadmap+analyze+plan(phase);medium/small→直跳 plan --from analyze:{ANL_ID}(跳过 roadmap+analyze)
|
|
737
|
+
- [ ] post-analyze-scope decision 节点在 macro analyze 之后插入;A_SCOPE_EVALUATE/A_APPLY_SCOPE_VERDICT 重塑链路
|
|
738
|
+
- [ ] plan step args 支持三路径:`{phase}` / `--from analyze:{ANL_ID}` / `--from blueprint:{BLP_ID}`,写入 step.source_artifact_ref
|
|
739
|
+
- [ ] roadmap step args 自动注入 `--from analyze:{analyze_macro_id}`(若存在)
|
|
740
|
+
- [ ] artifact 过滤按 session.phase;unified 按 milestone
|
|
741
|
+
- [ ] quality_mode 由 A_DETERMINE_QUALITY_MODE 决定,过滤 build steps
|
|
742
|
+
- [ ] Decomposition: broad intent ≤3 question clarify;narrow auto-derive
|
|
743
|
+
- [ ] status.json 唯一真源:boundary_contract + execution_criteria + task_decomposition;无外部清单
|
|
744
|
+
- [ ] 每个 step 默认 `type: "internal"`,含 `command_scope` + `command_path`(全局优先 fallback 项目)
|
|
745
|
+
- [ ] 每个 step 含 `completion_confirmed` + `completion_status` + `completion_evidence`(初始 false/null)
|
|
746
|
+
- [ ] 每个 sub-goal 含 `completion_confirmed`(初始 false)
|
|
747
|
+
- [ ] post-goal-audit decision 仅在 decomposed 时插入,位于 milestone-complete 之前
|
|
748
|
+
- [ ] Unmet sub-goals 动态 grow steps[](goal_ref tagged);max retries → escalate
|
|
749
|
+
- [ ] planning_mode 显式决定;unified=无 `{phase}`, independent=带 `{phase}`
|
|
750
|
+
- [ ] Chain 必须以 `milestone-complete` 结尾
|
|
751
|
+
- [ ] Decision nodes 由 maestro delegate --role analyze 评估
|
|
752
|
+
- [ ] Ralph 不执行 step,只 evaluate;Skill("maestro-ralph-execute") handoff
|
|
682
753
|
|
|
683
754
|
</appendix>
|