maestro-flow 0.4.14 → 0.4.15
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/skills/maestro/SKILL.md +11 -31
- package/.agents/skills/maestro-ralph/SKILL.md +49 -47
- package/.agents/skills/maestro-ralph-execute/SKILL.md +31 -57
- package/.agy/skills/maestro/SKILL.md +11 -31
- package/.agy/skills/maestro-ralph/SKILL.md +49 -47
- package/.agy/skills/maestro-ralph-execute/SKILL.md +31 -57
- package/.claude/commands/maestro-ralph-execute.md +31 -57
- package/.claude/commands/maestro-ralph.md +49 -47
- package/.claude/commands/maestro.md +11 -31
- package/dist/src/commands/hooks.d.ts +30 -3
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +138 -11
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/install-backend.d.ts +49 -4
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +163 -53
- package/dist/src/commands/install-backend.js.map +1 -1
- package/dist/src/commands/install.d.ts.map +1 -1
- package/dist/src/commands/install.js +45 -10
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/uninstall.d.ts.map +1 -1
- package/dist/src/commands/uninstall.js +25 -38
- package/dist/src/commands/uninstall.js.map +1 -1
- package/dist/src/core/manifest.d.ts +43 -0
- package/dist/src/core/manifest.d.ts.map +1 -1
- package/dist/src/core/manifest.js +37 -1
- package/dist/src/core/manifest.js.map +1 -1
- package/dist/src/tui/install-ui/ExecutionView.d.ts.map +1 -1
- package/dist/src/tui/install-ui/ExecutionView.js +13 -5
- package/dist/src/tui/install-ui/ExecutionView.js.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.js +87 -45
- package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/tui/uninstall-ui/UninstallFlow.d.ts.map +1 -1
- package/dist/src/tui/uninstall-ui/UninstallFlow.js +12 -28
- package/dist/src/tui/uninstall-ui/UninstallFlow.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro
|
|
3
3
|
description: Auto-route intent to optimal command chain
|
|
4
|
-
argument-hint: "<intent> [-y] [-c] [--dry-run] [--
|
|
4
|
+
argument-hint: "<intent> [-y] [-c] [--dry-run] [--super]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- read_file
|
|
7
7
|
- write_file
|
|
@@ -42,18 +42,16 @@ $ARGUMENTS — user intent text, or special keywords.
|
|
|
42
42
|
- `-y` / `--yes` — Auto mode: skip clarification, skip confirmation, auto-skip on errors
|
|
43
43
|
- `-c` / `--continue` — Resume previous session
|
|
44
44
|
- `--dry-run` — Show chain without executing
|
|
45
|
-
- `--exec <mode>` — `auto` (default), `cli`, `internal`
|
|
46
|
-
- `--tool <name>` — CLI tool for delegates (default: claude)
|
|
47
45
|
- `--super` — Read and follow `maestro-super.md`
|
|
48
46
|
</context>
|
|
49
47
|
|
|
50
48
|
<invariants>
|
|
51
49
|
1. **All chains dispatch via maestro-ralph-execute** — maestro never executes steps directly
|
|
52
50
|
2. **Session before execution** — status.json created before any step runs
|
|
53
|
-
3. **Auto
|
|
51
|
+
3. **Auto flag pass-through** — 仅当用户传入 `-y` 时透传 `-y` 到 skill args
|
|
54
52
|
4. **Decomposition contract shared with maestro-ralph** — broad/lifecycle intents run S_DECOMPOSE producing the SAME additive block (`boundary_contract`, `execution_criteria`, `task_decomposition`)。Reference maestro-ralph `A_DECOMPOSE_TASKS`
|
|
55
53
|
5. **status.json 唯一真源** — 不生成 `goal-checklist.md` 或外部清单
|
|
56
|
-
6.
|
|
54
|
+
6. **执行步骤统一 Read .md 内联** — chain 内每个执行 step 解析 `command_scope`/`command_path`(全局优先 `~/.claude/commands/{name}.md`,fallback 项目),由 ralph-execute `read_file({command_path})` 内联执行;CLI 仅在 decision 节点做只读分析
|
|
57
55
|
7. **Topology awareness** — chain catalog 含 brainstorm / blueprint / analyze-macro(text) / analyze(numeric phase) / roadmap / plan(三路径) / execute / verify / ...;scope_verdict 路由由 ralph 在 `post-analyze-scope` 决定
|
|
58
56
|
8. **D-007 milestone 反查** — 数字 phase 步骤的 `milestone_id` 由 `state.json.milestones[].phase_slugs` 反查得出
|
|
59
57
|
9. **每个 step 必须 `completion_confirmed: true`** — 基于 `--- COMPLETION STATUS ---` 的 `STATUS: DONE`
|
|
@@ -143,7 +141,7 @@ S_FALLBACK:
|
|
|
143
141
|
- 数字 phase 上下文 → `analyze {phase}` → `plan {phase}` → `execute {phase}` → `verify {phase}` → quality pipeline
|
|
144
142
|
- 已有 analyze artifact 想直达执行 → `plan --from analyze:{ANL_ID}` → execute → verify
|
|
145
143
|
- 已有 blueprint artifact → `plan --from blueprint:{BLP_ID}` → execute → verify
|
|
146
|
-
4.
|
|
144
|
+
4. 执行 step 解析 `command_scope` + `command_path`(全局优先 fallback 项目);写入 `step.stage` / `step.scope` / `step.source_artifact_ref`(如 `--from` 注入时)。decision 节点通过 `step.decision` 字段标识
|
|
147
145
|
|
|
148
146
|
### A_CLARIFY
|
|
149
147
|
|
|
@@ -159,9 +157,9 @@ S_FALLBACK:
|
|
|
159
157
|
3. 派生 `execution_criteria` + `task_decomposition`(每个 sub-goal 含 `done_when` + `evidence` + `lifecycle` + `completion_confirmed: false`)
|
|
160
158
|
4. **status.json 唯一真源**:写入 `boundary_contract` / `execution_criteria` / `task_decomposition`;不生成 markdown 清单
|
|
161
159
|
5. 在最后一个 evidence-producing stage(verify/review/test)之后、`milestone-complete` 之前追加 `decision:post-goal-audit`。ralph-execute 在该节点按需动态生长 `steps[]`
|
|
162
|
-
6. **输出 `/goal`
|
|
160
|
+
6. **输出 `/goal` 绑定提示词(不阻塞,用户可在执行过程中随时输入):**
|
|
163
161
|
```
|
|
164
|
-
📋
|
|
162
|
+
📋 任务分解完成。可随时复制下面一行设定目标(执行过程中输入即可):
|
|
165
163
|
|
|
166
164
|
/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。
|
|
167
165
|
```
|
|
@@ -175,13 +173,14 @@ S_FALLBACK:
|
|
|
175
173
|
"session_id", "source": "maestro", "intent", "task_type", "chain_name",
|
|
176
174
|
"phase", "phase_is_new": false, "milestone": "",
|
|
177
175
|
"scope_verdict": null, "analyze_macro_id": null, "blueprint_id": null,
|
|
178
|
-
"auto_mode": false, "
|
|
176
|
+
"auto_mode": false, "cli_tool": "claude", // cli_tool: decision 节点 delegate 评估时的 CLI 工具
|
|
179
177
|
"context": { "scratch_dir": null, "plan_dir": null, "analysis_dir": null,
|
|
180
178
|
"brainstorm_dir": null, "blueprint_dir": null, "issue_id": null },
|
|
181
179
|
"steps": [{
|
|
182
|
-
"index": 0,
|
|
180
|
+
"index": 0,
|
|
183
181
|
"skill": "", "args": "",
|
|
184
182
|
"stage": "", "scope": null,
|
|
183
|
+
"decision": null, // 非 null → decision 节点;null → 执行节点
|
|
185
184
|
"command_scope": "global|project|missing|null",
|
|
186
185
|
"command_path": "~/.claude/commands/{name}.md | .claude/commands/{name}.md | null",
|
|
187
186
|
"milestone_id": null, "source_artifact_ref": null,
|
|
@@ -205,25 +204,6 @@ S_FALLBACK:
|
|
|
205
204
|
|
|
206
205
|
<appendix>
|
|
207
206
|
|
|
208
|
-
### Auto-Yes Flag Map
|
|
209
|
-
|
|
210
|
-
| Command | Auto Flag | Effect |
|
|
211
|
-
|---------|-----------|--------|
|
|
212
|
-
| maestro-init | `-y` | Skip interactive questioning |
|
|
213
|
-
| maestro-analyze | `-y` | Skip scoping, auto-deepen |
|
|
214
|
-
| maestro-brainstorm | `-y` | Skip questions, use defaults |
|
|
215
|
-
| maestro-blueprint | `-y` | Skip interview, use recommended defaults |
|
|
216
|
-
| maestro-roadmap | `-y` | Skip questions (create/revise/review) |
|
|
217
|
-
| maestro-impeccable | `-y` | Auto-select design variant + skip confirmations |
|
|
218
|
-
| maestro-plan | `-y` | Skip confirmations and clarification |
|
|
219
|
-
| maestro-execute | `-y` | Skip confirmations, blocked auto-continue |
|
|
220
|
-
| quality-auto-test | `-y` | Skip plan confirmation |
|
|
221
|
-
| quality-test | `-y --auto-fix` | Auto-trigger gap-fix loop |
|
|
222
|
-
| quality-retrospective | `-y` | Accept all routing recommendations |
|
|
223
|
-
| maestro-milestone-complete | `-y` | Skip knowledge promotion |
|
|
224
|
-
|
|
225
|
-
Unlisted commands have no auto flags.
|
|
226
|
-
|
|
227
207
|
### Error Codes
|
|
228
208
|
|
|
229
209
|
| Code | Severity | Description | Recovery |
|
|
@@ -248,8 +228,8 @@ Unlisted commands have no auto flags.
|
|
|
248
228
|
- [ ] status.json 唯一真源;无 markdown 清单;post-goal-audit 节点在 decomposed 时追加;/goal 提示词以 status.json 为判据
|
|
249
229
|
- [ ] Chain selected and confirmed (or auto-confirmed)
|
|
250
230
|
- [ ] Session dir created with status.json before execution; decomposition fields additive-only
|
|
251
|
-
- [ ]
|
|
252
|
-
- [ ]
|
|
231
|
+
- [ ] 执行 step 含 `command_scope` + `command_path` + `completion_confirmed` 字段;decision step 通过 `step.decision` 字段标识
|
|
232
|
+
- [ ] 用户传入 `-y` 时透传到 skill args
|
|
253
233
|
- [ ] All chains dispatched via maestro-ralph-execute
|
|
254
234
|
- [ ] Low-complexity intents routed to maestro-quick
|
|
255
235
|
- [ ] (super) Requirements validated before roadmap
|
|
@@ -19,7 +19,7 @@ Closed-loop decision engine for the maestro workflow lifecycle.
|
|
|
19
19
|
Reads project state → infers position → builds adaptive chain → delegates execution.
|
|
20
20
|
|
|
21
21
|
Entry points:
|
|
22
|
-
- **`/maestro-ralph "intent"`** — New session: infer → decompose → build →
|
|
22
|
+
- **`/maestro-ralph "intent"`** — New session: infer → decompose → build → emit /goal prompt(如有 decomposition)→ dispatch ralph-execute
|
|
23
23
|
- **`/maestro-ralph continue`** — Wrapper; dispatches to ralph-execute(首选直接 `/maestro-ralph-execute` 推进 step)
|
|
24
24
|
- **`/maestro-ralph status`** — Display session progress
|
|
25
25
|
|
|
@@ -27,10 +27,9 @@ Entry points:
|
|
|
27
27
|
|
|
28
28
|
Initial decomposition (S_DECOMPOSE): boundary-clarified via ≤3 questions for broad intents (重构/全面/迁移/重写). 写入 status.json 的 `boundary_contract` / `execution_criteria` / `task_decomposition`,附 `/goal` prompt。
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
- **decision**:
|
|
33
|
-
- **external**: 仅在显式声明时使用(`maestro delegate --to claude`)
|
|
30
|
+
Step kinds:
|
|
31
|
+
- **执行 step**: ralph-execute `read_file({command_path})` 命令 .md,按内容内联执行
|
|
32
|
+
- **decision step**: `step.decision` 字段非空;回 ralph 评估(CLI 只读分析)
|
|
34
33
|
|
|
35
34
|
Key difference from maestro coordinator:
|
|
36
35
|
- maestro: static chain → one-time selection → runs all steps
|
|
@@ -47,8 +46,8 @@ Mutual invocation with `/maestro-ralph-execute` forms a self-perpetuating work l
|
|
|
47
46
|
│ writes status.json
|
|
48
47
|
│ emits /goal prompt
|
|
49
48
|
▼
|
|
50
|
-
ralph-execute ◀─┐
|
|
51
|
-
│ │ decision → invoke_skill("maestro-ralph")
|
|
49
|
+
ralph-execute ◀─┐ 执行 step → read_file(command_path) inline
|
|
50
|
+
│ │ decision step → invoke_skill("maestro-ralph")
|
|
52
51
|
└─────────┘ writes step.completion_confirmed
|
|
53
52
|
loop until all completion_confirmed | paused
|
|
54
53
|
```
|
|
@@ -72,14 +71,14 @@ Remaining → intent
|
|
|
72
71
|
|
|
73
72
|
<invariants>
|
|
74
73
|
1. **Ralph never executes steps** — only creates sessions and evaluates decisions
|
|
75
|
-
2. **Handoff via invoke_skill("maestro-ralph-execute")** —
|
|
74
|
+
2. **Handoff via invoke_skill("maestro-ralph-execute")** — 创建 session 后始终自动 handoff;decision 评估后始终 handoff
|
|
76
75
|
3. **Decision delegates read-only** — `maestro delegate --role analyze --mode analysis`
|
|
77
|
-
4.
|
|
76
|
+
4. **执行 step 通过 Read 命令 .md 内联执行**
|
|
78
77
|
5. **status.json 是唯一真源** — 不生成 markdown 清单或侧文件
|
|
79
78
|
6. **每个 step 必须 `completion_confirmed: true`** — 基于 `--- COMPLETION STATUS ---` 的 `STATUS: DONE`;缺失则视为未完成
|
|
80
79
|
7. **command_path 在 A_BUILD_STEPS 解析** — 全局优先 `~/.claude/commands/{name}.md`,fallback 项目 `.claude/commands/{name}.md`,写入 status.json
|
|
81
|
-
8.
|
|
82
|
-
9. **Decomposition is outcome-oriented** — sub-goals 为可观测交付,禁止 lifecycle 复刻;`/goal` 用户绑定,ralph
|
|
80
|
+
8. **执行 step 加载契约** — ralph-execute 读 `command_path` 后,必须解析并加载该命令 `<required_reading>` 引用的所有文件("入口 + workflow"形式的核心),并把 `<deferred_reading>` 路径记录到 `step.deferred_reads`;加载完成后输出 `✓ skill {name} 加载完成`。ralph 在 build 阶段只解析路径,不读 .md 内容
|
|
81
|
+
9. **Decomposition is outcome-oriented** — sub-goals 为可观测交付,禁止 lifecycle 复刻;`/goal` 用户绑定,ralph 输出提示词后继续 handoff,用户可在执行过程中随时输入 `/goal`
|
|
83
82
|
10. **planning_mode governs arg granularity** — `unified` → skill args 无 `{phase}`;`independent` → 含 `{phase}`
|
|
84
83
|
11. **task_decomposition 驱动 steps[] 动态生长** — `post-goal-audit` 按 unmet 子目标插入 scoped mini-loop;字段可选/累加,既有字段不删不改
|
|
85
84
|
</invariants>
|
|
@@ -151,9 +150,8 @@ S_BUILD_CHAIN:
|
|
|
151
150
|
→ S_CREATE_SESSION DO: A_BUILD_STEPS
|
|
152
151
|
|
|
153
152
|
S_CREATE_SESSION:
|
|
154
|
-
→
|
|
155
|
-
→
|
|
156
|
-
→ S_DISPATCH WHEN: auto_confirm AND no decomposition DO: A_CREATE_SESSION
|
|
153
|
+
→ S_CONFIRM WHEN: not auto_confirm DO: A_CREATE_SESSION
|
|
154
|
+
→ S_DISPATCH WHEN: auto_confirm DO: A_CREATE_SESSION
|
|
157
155
|
|
|
158
156
|
S_CONFIRM:
|
|
159
157
|
→ S_DISPATCH WHEN: user selects "Proceed"
|
|
@@ -163,7 +161,7 @@ S_CONFIRM:
|
|
|
163
161
|
S_DISPATCH:
|
|
164
162
|
→ END DO: invoke_skill({ skill: "maestro-ralph-execute" })
|
|
165
163
|
|
|
166
|
-
S_DECISION_EVAL:
|
|
164
|
+
S_DECISION_EVAL: (decision 节点 == `step.decision` 非空,下述 gate 名取自该字段)
|
|
167
165
|
→ S_APPLY_VERDICT WHEN: quality-gate (post-verify, post-business-test, post-review, post-test)
|
|
168
166
|
DO: A_DELEGATE_EVALUATE
|
|
169
167
|
→ S_APPLY_VERDICT WHEN: goal-gate (post-goal-audit)
|
|
@@ -202,7 +200,7 @@ S_FALLBACK:
|
|
|
202
200
|
|
|
203
201
|
1. Find latest ralph session (by created_at)
|
|
204
202
|
2. Display: Session, Status, Position, Progress, Current step
|
|
205
|
-
3. List steps: [✓] completion_confirmed, [▸] current, [ ] pending, [◆] decision
|
|
203
|
+
3. List steps: [✓] completion_confirmed, [▸] current, [ ] pending, [◆] decision(`step.decision` 非空);执行 step 附 `command_scope`(global/project) + `command_path`
|
|
206
204
|
4. If `task_decomposition` present (absent → skip):
|
|
207
205
|
```
|
|
208
206
|
Sub-goals ({done}/{total}) source: {session_dir}/status.json#/task_decomposition
|
|
@@ -382,24 +380,26 @@ narrow → derive defaults from intent + codebase, skip questions.
|
|
|
382
380
|
|
|
383
381
|
Generate steps from `session.lifecycle_position` to `milestone-complete`.
|
|
384
382
|
|
|
385
|
-
| Stage | invoke_skill(independent) | invoke_skill(unified) |
|
|
386
|
-
|
|
387
|
-
| brainstorm | `maestro-brainstorm "{intent}"` | *(same)* |
|
|
388
|
-
| blueprint | `maestro-blueprint "{intent}"` | *(same)* |
|
|
389
|
-
| init | `maestro-init` | *(same)* |
|
|
390
|
-
| analyze-macro | `maestro-analyze "{intent}"` | *(same)* |
|
|
391
|
-
| roadmap | `maestro-roadmap --from analyze:{analyze_macro_id}` | *(same)* |
|
|
392
|
-
| analyze | `maestro-analyze {phase}` | `maestro-analyze` |
|
|
393
|
-
| 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` |
|
|
394
|
-
| execute | `maestro-execute {phase}` | `maestro-execute` |
|
|
395
|
-
| verify | `maestro-verify {phase}` | `maestro-verify` |
|
|
396
|
-
| business-test | `quality-auto-test {phase}` | `quality-auto-test` |
|
|
397
|
-
| review | `quality-review {phase}` | `quality-review` |
|
|
398
|
-
| test-gen | `quality-auto-test {phase}` | `quality-auto-test` |
|
|
399
|
-
| test | `quality-test {phase}` | `quality-test` |
|
|
400
|
-
| milestone-audit | `maestro-milestone-audit` | *(same)* |
|
|
401
|
-
| goal-audit | *(decision-only)* | *(same)* |
|
|
402
|
-
| milestone-complete | `maestro-milestone-complete` | *(same)* |
|
|
383
|
+
| Stage | invoke_skill(independent) | invoke_skill(unified) | Decision after | quality_mode |
|
|
384
|
+
|-------|---------------------|-----------------|----------------|--------------|
|
|
385
|
+
| brainstorm | `maestro-brainstorm "{intent}"` | *(same)* | — | all |
|
|
386
|
+
| blueprint | `maestro-blueprint "{intent}"` | *(same)* | — | all |
|
|
387
|
+
| init | `maestro-init` | *(same)* | — | all |
|
|
388
|
+
| analyze-macro | `maestro-analyze "{intent}"` | *(same)* | `post-analyze-scope` | all |
|
|
389
|
+
| roadmap | `maestro-roadmap --from analyze:{analyze_macro_id}` | *(same)* | — | all |
|
|
390
|
+
| analyze | `maestro-analyze {phase}` | `maestro-analyze` | — | all |
|
|
391
|
+
| 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` | — | all |
|
|
392
|
+
| execute | `maestro-execute {phase}` | `maestro-execute` | — | all |
|
|
393
|
+
| verify | `maestro-verify {phase}` | `maestro-verify` | `post-verify` | all |
|
|
394
|
+
| business-test | `quality-auto-test {phase}` | `quality-auto-test` | `post-business-test` | full only |
|
|
395
|
+
| review | `quality-review {phase}` | `quality-review` | `post-review` | all (quick: append `--tier quick`) |
|
|
396
|
+
| test-gen | `quality-auto-test {phase}` | `quality-auto-test` | — | full / standard if coverage<80% |
|
|
397
|
+
| test | `quality-test {phase}` | `quality-test` | `post-test` | full, standard |
|
|
398
|
+
| milestone-audit | `maestro-milestone-audit` | *(same)* | — | all |
|
|
399
|
+
| goal-audit | *(decision-only)* | *(same)* | `post-goal-audit` | all (only if decomposed) |
|
|
400
|
+
| milestone-complete | `maestro-milestone-complete` | *(same)* | `post-milestone` | all |
|
|
401
|
+
|
|
402
|
+
> 所有执行 stage 统一通过 Read .md 内联执行;decision 节点单独作为独立 step 插入(见规则 4)。
|
|
403
403
|
|
|
404
404
|
**Build rules (按顺序应用):**
|
|
405
405
|
|
|
@@ -407,17 +407,17 @@ Generate steps from `session.lifecycle_position` to `milestone-complete`.
|
|
|
407
407
|
1. **起点**:从 `session.lifecycle_position` 开始
|
|
408
408
|
2. **跳过已完成**:跳过当前 milestone+phase 下已有 completed artifact 的 stage(按 `session.phase` 过滤);unified 按 milestone 过滤
|
|
409
409
|
3. **quality_mode 过滤**:按 `session.quality_mode` 排除不匹配 stage
|
|
410
|
-
4. **决策节点**:每个 Decision after 非空的 stage 之后插入 `{
|
|
410
|
+
4. **决策节点**:每个 Decision after 非空的 stage 之后插入 `{ decision: "<gate>", retry_count: 0, max_retries: 2, command_scope: null, command_path: null }`
|
|
411
411
|
5. **goal-audit 插入**:`task_decomposition` 存在时,在最后一个 evidence-producing stage(verify/review/test)之后、`milestone-complete` 之前插入 `decision:post-goal-audit`
|
|
412
412
|
6. **终点硬约束**:chain 以 `milestone-complete` 结尾
|
|
413
413
|
7. **goal_ref 传播**:`task_decomposition` 存在时,每个 step 按 `step.stage ∈ g.lifecycle` 匹配 `step.goal_ref = g.id`(多匹配取字典序最小);decision 节点不打 goal_ref
|
|
414
414
|
8. **占位符**:independent 保留 `{phase}` `{intent}`;unified 不带 `{phase}`
|
|
415
|
-
9. **command_path
|
|
415
|
+
9. **command_path 解析**(每个执行 step,decision 节点跳过):
|
|
416
416
|
- 取 skill 名(args 前的第一个 token)
|
|
417
417
|
- 全局优先:`~/.claude/commands/{name}.md` 存在 → `command_scope = "global"`
|
|
418
418
|
- Fallback:`.claude/commands/{name}.md` 存在 → `command_scope = "project"`
|
|
419
419
|
- 两者都缺 → `command_scope = "missing"`, `command_path = null`,A_CREATE_SESSION 报错 E006
|
|
420
|
-
- **不在 build 阶段读取 .md 内容**;`<required_reading>` / `<deferred_reading>` 解析与加载由 ralph-execute
|
|
420
|
+
- **不在 build 阶段读取 .md 内容**;`<required_reading>` / `<deferred_reading>` 解析与加载由 ralph-execute A_EXEC_STEP 负责(保持入口/工作流分离)
|
|
421
421
|
10. **每个 step 初始化** `completion_confirmed: false`, `completion_status: null`, `completion_evidence: null`, `deferred_reads: []`
|
|
422
422
|
11. **scope_verdict gating**(仅当 chain 起点 = `analyze-macro`):
|
|
423
423
|
- `scope_verdict ∈ {medium, small}` → 跳过 `roadmap` + `analyze` 两 stage;`plan` 选 standalone 列(`--from analyze:{analyze_macro_id}`),不带 `{phase}`
|
|
@@ -436,7 +436,7 @@ Generate steps from `session.lifecycle_position` to `milestone-complete`.
|
|
|
436
436
|
1. Validate: 所有 step 的 `command_scope != "missing"`;否则 raise E006 + 列出缺失 skill
|
|
437
437
|
2. Write `.workflow/.maestro/ralph-{YYYYMMDD-HHmmss}/status.json` (Appendix: Session Schema)
|
|
438
438
|
3. Display chain overview:每步显示 `{index}. {skill} [{type}] [{command_scope}]`
|
|
439
|
-
4. If `task_decomposition` present: display **Goal Prompt block** (Appendix)
|
|
439
|
+
4. If `task_decomposition` present: display **Goal Prompt block** (Appendix),不阻塞流程,继续 handoff
|
|
440
440
|
|
|
441
441
|
### A_DELEGATE_EVALUATE
|
|
442
442
|
|
|
@@ -611,12 +611,14 @@ Runs only when `task_decomposition` present.
|
|
|
611
611
|
"analysis_dir": null, "brainstorm_dir": null, "blueprint_dir": null },
|
|
612
612
|
"steps": [{
|
|
613
613
|
"index": 0,
|
|
614
|
-
"
|
|
615
|
-
"skill": "",
|
|
614
|
+
"skill": "", // 执行 step 有值;decision 节点为空字符串/null
|
|
616
615
|
"args": "",
|
|
617
616
|
"stage": "", // brainstorm|blueprint|init|analyze-macro|roadmap|analyze|plan|execute|verify|...
|
|
618
617
|
"scope": null, // "phase"|"standalone"|"milestone"|null(plan 等需要)
|
|
619
|
-
"
|
|
618
|
+
"decision": null, // 非 null → decision 节点(值为 gate 名,如 "post-verify");null → 执行 step
|
|
619
|
+
"retry_count": 0, // decision 节点专用
|
|
620
|
+
"max_retries": 2, // decision 节点专用
|
|
621
|
+
"command_scope": "global|project|missing|null", // 执行 step;decision 节点固定 null
|
|
620
622
|
"command_path": "~/.claude/commands/{name}.md | .claude/commands/{name}.md | null",
|
|
621
623
|
"milestone_id": null, // D-007 反查注入;仅含 {phase} 占位符的 step 有
|
|
622
624
|
"source_artifact_ref": null, // "analyze:ANL-xxx" | "blueprint:BLP-xxx" | null
|
|
@@ -626,7 +628,7 @@ Runs only when `task_decomposition` present.
|
|
|
626
628
|
"completion_status": null,
|
|
627
629
|
"completion_evidence": null,
|
|
628
630
|
"completed_at": null,
|
|
629
|
-
"deferred_reads": [] // 由 ralph-execute
|
|
631
|
+
"deferred_reads": [] // 由 ralph-execute A_EXEC_STEP 解析 .md 时填充
|
|
630
632
|
}],
|
|
631
633
|
"waves": [], "current_step": 0,
|
|
632
634
|
|
|
@@ -648,7 +650,7 @@ Runs only when `task_decomposition` present.
|
|
|
648
650
|
|
|
649
651
|
### Fix-Loop Templates
|
|
650
652
|
|
|
651
|
-
|
|
653
|
+
所有插入的执行 step 按 A_BUILD_STEPS 规则 9 解析 `command_path` + `command_scope`;`decision:*` 条目为 decision 节点(`step.decision` 字段)。
|
|
652
654
|
|
|
653
655
|
**post-verify:**
|
|
654
656
|
```
|
|
@@ -710,12 +712,12 @@ decision:post-goal-audit {retry+1}
|
|
|
710
712
|
链路概览后逐字显示(仅当 decomposition 已产出):
|
|
711
713
|
|
|
712
714
|
```
|
|
713
|
-
📋
|
|
715
|
+
📋 任务分解完成。可随时复制以下 /goal 设定终止条件(执行过程中输入即可):
|
|
714
716
|
|
|
715
717
|
/goal 直到 {session_dir}/status.json 的 task_decomposition[*] 与 steps[*] 全部 completion_confirmed=true 才停。每轮以 status.json 为唯一行动手册,通过 /maestro-ralph-execute 推进 step;decision 节点由其自动 handoff 回 ralph 评估。禁止手动执行 skill 或修改 boundary_contract.out_of_scope。
|
|
716
718
|
```
|
|
717
719
|
|
|
718
|
-
`/goal` 由用户输入;ralph
|
|
720
|
+
`/goal` 由用户输入;ralph 输出提示词后继续 handoff,不阻塞。
|
|
719
721
|
|
|
720
722
|
### Error Codes
|
|
721
723
|
|
|
@@ -747,8 +749,8 @@ decision:post-goal-audit {retry+1}
|
|
|
747
749
|
- [ ] quality_mode 由 A_DETERMINE_QUALITY_MODE 决定,过滤 build steps
|
|
748
750
|
- [ ] Decomposition: broad intent ≤3 question clarify;narrow auto-derive
|
|
749
751
|
- [ ] status.json 唯一真源:boundary_contract + execution_criteria + task_decomposition;无外部清单
|
|
750
|
-
- [ ]
|
|
751
|
-
- [ ] Ralph build 阶段只解析路径,不读 .md 内容;`<required_reading>` 加载由 ralph-execute
|
|
752
|
+
- [ ] 执行 step 含 `command_scope` + `command_path`(全局优先 fallback 项目);decision step 通过 `step.decision` 字段标识
|
|
753
|
+
- [ ] Ralph build 阶段只解析路径,不读 .md 内容;`<required_reading>` 加载由 ralph-execute A_EXEC_STEP 完成
|
|
752
754
|
- [ ] 每个 step 含 `completion_confirmed` + `completion_status` + `completion_evidence` + `deferred_reads`(初始 false/null/[])
|
|
753
755
|
- [ ] 每个 sub-goal 含 `completion_confirmed`(初始 false)
|
|
754
756
|
- [ ] post-goal-audit decision 仅在 decomposed 时插入,位于 milestone-complete 之前
|
|
@@ -31,32 +31,29 @@ Remaining → session_id (if matches maestro-* or ralph-*)
|
|
|
31
31
|
```
|
|
32
32
|
Also read `session.auto_mode` from status.json — if true, treat as `-y`.
|
|
33
33
|
|
|
34
|
-
**
|
|
34
|
+
**Step kinds:**
|
|
35
35
|
|
|
36
|
-
|
|
|
37
|
-
|
|
38
|
-
| decision
|
|
39
|
-
|
|
|
40
|
-
| external (opt-in) | `maestro delegate --to claude --mode write` (STOP → callback) | Self-invoke next |
|
|
36
|
+
| Kind | Identifier | Execution | Flow after |
|
|
37
|
+
|------|-----------|-----------|------------|
|
|
38
|
+
| decision step | `step.decision` 非空 | `invoke_skill("maestro-ralph")` | Execution ends here |
|
|
39
|
+
| 执行 step | `step.decision == null` | `read_file({file_path: step.command_path})` + 内联解释执行 | Self-invoke next |
|
|
41
40
|
|
|
42
41
|
HARD RULES:
|
|
43
|
-
-
|
|
44
|
-
- **必须遵循 `<required_reading>` / `<deferred_reading>` 标签**:命令 .md 通常采用"入口 + workflow"形式,主体逻辑放在 workflow 文件中并通过 `<required_reading>`
|
|
45
|
-
- decision
|
|
46
|
-
- `command_path` 由 ralph 在 A_BUILD_STEPS 写入 status.json
|
|
47
|
-
- external 仅在 `step.type == "external"` 显式声明时使用,并 always append `-y` 到 prompt args
|
|
42
|
+
- 执行 step:通过 `read_file({command_path})` 把命令 .md 加载进当前会话,再按内容执行
|
|
43
|
+
- **必须遵循 `<required_reading>` / `<deferred_reading>` 标签**:命令 .md 通常采用"入口 + workflow"形式,主体逻辑放在 workflow 文件中并通过 `<required_reading>` 引用;缺失 required_reading 视为加载失败
|
|
44
|
+
- decision step:A_EXEC_DECISION 通过 `invoke_skill({ skill: "maestro-ralph" })` handoff 给 ralph 评估
|
|
45
|
+
- `command_path` 由 ralph 在 A_BUILD_STEPS 写入 status.json(缺失 → 报错 E002)
|
|
48
46
|
- 每个 step 必须产出 `--- COMPLETION STATUS ---` 块,否则视为 NEEDS_RETRY
|
|
49
47
|
</context>
|
|
50
48
|
|
|
51
49
|
<invariants>
|
|
52
|
-
1.
|
|
50
|
+
1. **执行 = Read + inline** — 通过 Read 读取 `step.command_path`,按其指令在当前 session 内执行
|
|
53
51
|
2. **Required reading must be loaded** — 命令 .md 中的 `<required_reading>` 引用的所有文件必须立即 Read;缺一 → 视为加载失败,pause session(E007)
|
|
54
52
|
3. **Deferred reading recorded only** — `<deferred_reading>` 列出的文件路径需记录,执行过程按需 Read;不在加载阶段读取
|
|
55
53
|
4. **Skill loaded confirmation** — 所有 required_reading 加载完成后必须输出一行确认:`✓ skill {step.skill} 加载完成 (required: N, deferred: M)`
|
|
56
|
-
5.
|
|
57
|
-
6.
|
|
58
|
-
7. **
|
|
59
|
-
8. **status.json 每步骤后写盘** — resume-safe
|
|
54
|
+
5. **必须显式 completion confirmation** — 每个 step 完成时需有 `STATUS: DONE` 且写入 `step.completion_confirmed = true`
|
|
55
|
+
6. **Self-invocation chain** — 持续直到全部 `completion_confirmed` 或 paused
|
|
56
|
+
7. **status.json 每步骤后写盘** — resume-safe
|
|
60
57
|
</invariants>
|
|
61
58
|
|
|
62
59
|
<state_machine>
|
|
@@ -82,11 +79,9 @@ S_RESOLVE_ARGS:
|
|
|
82
79
|
→ S_EXECUTE DO: A_RESOLVE_ARGS
|
|
83
80
|
|
|
84
81
|
S_EXECUTE:
|
|
85
|
-
→ END WHEN: step.
|
|
86
|
-
→ S_POST_EXEC WHEN: step.
|
|
87
|
-
→ S_HANDLE_FAIL WHEN: step.
|
|
88
|
-
→ END WHEN: step.type == "external" DO: A_EXEC_EXTERNAL
|
|
89
|
-
(STOP after background delegate; on callback → S_POST_EXEC or S_HANDLE_FAIL)
|
|
82
|
+
→ END WHEN: step.decision != null DO: A_EXEC_DECISION
|
|
83
|
+
→ S_POST_EXEC WHEN: step.decision == null + success DO: A_EXEC_STEP
|
|
84
|
+
→ S_HANDLE_FAIL WHEN: step.decision == null + failure DO: A_EXEC_STEP
|
|
90
85
|
|
|
91
86
|
S_POST_EXEC:
|
|
92
87
|
→ S_LOCATE DO: A_MARK_COMPLETE + invoke_skill("maestro-ralph-execute")
|
|
@@ -155,16 +150,16 @@ Write enriched args back to status.json.
|
|
|
155
150
|
### A_EXEC_DECISION
|
|
156
151
|
|
|
157
152
|
1. Mark step running, write status.json
|
|
158
|
-
2. Display: `[{index}/{total}] ◆ {decision} Retry: {retry}/{max}`
|
|
153
|
+
2. Display: `[{index}/{total}] ◆ {step.decision} Retry: {retry}/{max}`
|
|
159
154
|
3. `invoke_skill({ skill: "maestro-ralph" })` — ralph 评估 + handoff
|
|
160
155
|
4. 执行在此结束
|
|
161
156
|
|
|
162
|
-
###
|
|
157
|
+
### A_EXEC_STEP
|
|
163
158
|
|
|
164
159
|
1. Validate `step.command_path != null`;否则 raise E002,pause session
|
|
165
160
|
2. Mark step running, write status.json
|
|
166
|
-
3. Display: `[{index}/{total}] {step.skill} [
|
|
167
|
-
4. `read_file({ file_path: step.command_path })` — 把命令 .md
|
|
161
|
+
3. Display: `[{index}/{total}] {step.skill} [{step.command_scope}]`
|
|
162
|
+
4. `read_file({ file_path: step.command_path })` — 把命令 .md 全文加载进当前会话
|
|
168
163
|
5. **解析 reading 标签**("入口 + workflow"形式核心步骤):
|
|
169
164
|
- 抽取 frontmatter `argument-hint` / `allowed-tools`
|
|
170
165
|
- 抽取 `<required_reading>` 块的所有 `@path` 引用 → 立刻 `read_file({ file_path: <expanded path> })` 加载(`~/` / `@~/` 展开为用户主目录);任一文件缺失或读取失败 → raise E007,pause session
|
|
@@ -175,30 +170,11 @@ Write enriched args back to status.json.
|
|
|
175
170
|
✓ skill {step.skill} 加载完成 (required: {N}, deferred: {M})
|
|
176
171
|
```
|
|
177
172
|
其中 N = required_reading 引用数,M = deferred_reading 路径数(缺省块按 0 计)
|
|
178
|
-
7. 计算 `effective_args`:`step.args` + auto
|
|
179
|
-
8.
|
|
173
|
+
7. 计算 `effective_args`:`step.args` + (`auto ? " -y" : ""`)
|
|
174
|
+
8. 按读到的指令在本会话中**内联执行**:调用允许的工具完成命令所规定的工作;执行过程中如触发 deferred_reading 引用的资源 → 按需 Read
|
|
180
175
|
9. 执行结束:要求最后一段必须包含 `--- COMPLETION STATUS ---` 块(见 A_MARK_COMPLETE)
|
|
181
176
|
10. Return success / failure
|
|
182
177
|
|
|
183
|
-
**Auto flag map**: 所有 lifecycle skill → `-y`; `quality-test` → `-y --auto-fix`; 未列出 → 无 flag
|
|
184
|
-
|
|
185
|
-
### A_EXEC_EXTERNAL
|
|
186
|
-
|
|
187
|
-
仅当 `step.type == "external"` 时使用(默认链路不产生)。
|
|
188
|
-
|
|
189
|
-
1. Mark step running, write status.json
|
|
190
|
-
2. Display: `[{index}/{total}] ⚡ {step.skill} [external]`
|
|
191
|
-
3. 始终在 prompt 内追加 `-y`(delegate session 非交互):`flag = flag_map[step.skill] || "-y"`
|
|
192
|
-
4. Execute:
|
|
193
|
-
```
|
|
194
|
-
shell({
|
|
195
|
-
command: `maestro delegate "/${step.skill} ${effective_args}" --to claude --mode write`,
|
|
196
|
-
run_in_background: true, timeout: 600000
|
|
197
|
-
})
|
|
198
|
-
STOP — wait for callback.
|
|
199
|
-
```
|
|
200
|
-
5. On callback: 把回调输出视为 step 的执行结果 → S_POST_EXEC / S_HANDLE_FAIL
|
|
201
|
-
|
|
202
178
|
### A_MARK_COMPLETE
|
|
203
179
|
|
|
204
180
|
1. 从 step 输出中提取 `--- COMPLETION STATUS ---` 块(required)
|
|
@@ -242,14 +218,14 @@ Write enriched args back to status.json.
|
|
|
242
218
|
Session: {session_id} [{source}]
|
|
243
219
|
Steps: {completed}/{total} confirmed: {confirmed}/{completed}
|
|
244
220
|
|
|
245
|
-
[✓] 0. maestro-plan 1 [
|
|
246
|
-
[✓] 1. maestro-execute 1 [
|
|
247
|
-
[✓] 2. maestro-verify 1 [
|
|
221
|
+
[✓] 0. maestro-plan 1 [global]
|
|
222
|
+
[✓] 1. maestro-execute 1 [project]
|
|
223
|
+
[✓] 2. maestro-verify 1 [global]
|
|
248
224
|
[✓] 3. ◆ post-verify [decision]
|
|
249
225
|
...
|
|
250
226
|
============================================================
|
|
251
227
|
```
|
|
252
|
-
Icons: `✓` confirmed, `—` skipped, `✗` failed, `◆` decision
|
|
228
|
+
Icons: `✓` confirmed, `—` skipped, `✗` failed, `◆` decision
|
|
253
229
|
|
|
254
230
|
</actions>
|
|
255
231
|
|
|
@@ -262,9 +238,8 @@ Write enriched args back to status.json.
|
|
|
262
238
|
| Code | Severity | Description | Recovery |
|
|
263
239
|
|------|----------|-------------|----------|
|
|
264
240
|
| E001 | error | No running session found | Suggest /maestro or /maestro-ralph |
|
|
265
|
-
| E002 | error | step.command_path missing for
|
|
241
|
+
| E002 | error | step.command_path missing for 执行 step | Pause, ask ralph to rebuild step |
|
|
266
242
|
| E003 | error | status.json corrupt | Show path, manual check |
|
|
267
|
-
| E004 | error | Delegate failed + user abort | Mark paused, suggest resume |
|
|
268
243
|
| E005 | error | COMPLETION STATUS block missing | Trigger NEEDS_RETRY |
|
|
269
244
|
| E007 | error | required_reading file 缺失或读取失败 | List missing paths, pause session |
|
|
270
245
|
| W001 | warning | Step completed with concerns | Log and continue |
|
|
@@ -273,14 +248,13 @@ Write enriched args back to status.json.
|
|
|
273
248
|
### Success Criteria
|
|
274
249
|
|
|
275
250
|
- [ ] Session discovery covers maestro-* and ralph-*
|
|
276
|
-
- [ ] `-y` parsed from args 或 session.auto_mode
|
|
251
|
+
- [ ] `-y` parsed from args 或 session.auto_mode;auto=true 时透传 `-y` 到 skill args
|
|
277
252
|
- [ ] Placeholders resolved;per-skill enrichment 正确
|
|
278
|
-
- [ ] Decision
|
|
279
|
-
- [ ]
|
|
280
|
-
- [ ]
|
|
253
|
+
- [ ] Decision 节点(`step.decision != null`)invoke_skill("maestro-ralph") handoff
|
|
254
|
+
- [ ] 执行 step 通过 read_file({step.command_path}) 内联执行
|
|
255
|
+
- [ ] 执行 step Read 后必须解析并加载 `<required_reading>` 引用的文件;缺失 → E007 pause
|
|
281
256
|
- [ ] `<deferred_reading>` 仅记录路径到 `step.deferred_reads`,执行阶段按需 Read
|
|
282
257
|
- [ ] required_reading 加载完成后输出 `✓ skill {name} 加载完成 (required: N, deferred: M)`
|
|
283
|
-
- [ ] External 仅在显式声明时走 delegate,prompt 必带 `-y`
|
|
284
258
|
- [ ] 每个 step 强制 `--- COMPLETION STATUS ---`;缺失 → NEEDS_RETRY
|
|
285
259
|
- [ ] step.completion_confirmed = true 仅在 STATUS: DONE/DONE_WITH_CONCERNS 时设置
|
|
286
260
|
- [ ] step.completion_evidence 记录 artifact path / 输出节选
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro
|
|
3
3
|
description: Auto-route intent to optimal command chain
|
|
4
|
-
argument-hint: <intent> [-y] [-c] [--dry-run] [--
|
|
4
|
+
argument-hint: <intent> [-y] [-c] [--dry-run] [--super]
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- ask_question
|
|
7
7
|
- define_subagent
|
|
@@ -41,18 +41,16 @@ $ARGUMENTS — user intent text, or special keywords.
|
|
|
41
41
|
- `-y` / `--yes` — Auto mode: skip clarification, skip confirmation, auto-skip on errors
|
|
42
42
|
- `-c` / `--continue` — Resume previous session
|
|
43
43
|
- `--dry-run` — Show chain without executing
|
|
44
|
-
- `--exec <mode>` — `auto` (default), `cli`, `internal`
|
|
45
|
-
- `--tool <name>` — CLI tool for delegates (default: claude)
|
|
46
44
|
- `--super` — Read and follow `maestro-super.md`
|
|
47
45
|
</context>
|
|
48
46
|
|
|
49
47
|
<invariants>
|
|
50
48
|
1. **All chains dispatch via maestro-ralph-execute** — maestro never executes steps directly
|
|
51
49
|
2. **Session before execution** — status.json created before any step runs
|
|
52
|
-
3. **Auto
|
|
50
|
+
3. **Auto flag pass-through** — 仅当用户传入 `-y` 时透传 `-y` 到 skill args
|
|
53
51
|
4. **Decomposition contract shared with maestro-ralph** — broad/lifecycle intents run S_DECOMPOSE producing the SAME additive block (`boundary_contract`, `execution_criteria`, `task_decomposition`)。Reference maestro-ralph `A_DECOMPOSE_TASKS`
|
|
54
52
|
5. **status.json 唯一真源** — 不生成 `goal-checklist.md` 或外部清单
|
|
55
|
-
6.
|
|
53
|
+
6. **执行步骤统一 Read .md 内联** — chain 内每个执行 step 解析 `command_scope`/`command_path`(全局优先 `~/.claude/commands/{name}.md`,fallback 项目),由 ralph-execute `view_file({command_path})` 内联执行;CLI 仅在 decision 节点做只读分析
|
|
56
54
|
7. **Topology awareness** — chain catalog 含 brainstorm / blueprint / analyze-macro(text) / analyze(numeric phase) / roadmap / plan(三路径) / execute / verify / ...;scope_verdict 路由由 ralph 在 `post-analyze-scope` 决定
|
|
57
55
|
8. **D-007 milestone 反查** — 数字 phase 步骤的 `milestone_id` 由 `state.json.milestones[].phase_slugs` 反查得出
|
|
58
56
|
9. **每个 step 必须 `completion_confirmed: true`** — 基于 `--- COMPLETION STATUS ---` 的 `STATUS: DONE`
|
|
@@ -142,7 +140,7 @@ S_FALLBACK:
|
|
|
142
140
|
- 数字 phase 上下文 → `analyze {phase}` → `plan {phase}` → `execute {phase}` → `verify {phase}` → quality pipeline
|
|
143
141
|
- 已有 analyze artifact 想直达执行 → `plan --from analyze:{ANL_ID}` → execute → verify
|
|
144
142
|
- 已有 blueprint artifact → `plan --from blueprint:{BLP_ID}` → execute → verify
|
|
145
|
-
4.
|
|
143
|
+
4. 执行 step 解析 `command_scope` + `command_path`(全局优先 fallback 项目);写入 `step.stage` / `step.scope` / `step.source_artifact_ref`(如 `--from` 注入时)。decision 节点通过 `step.decision` 字段标识
|
|
146
144
|
|
|
147
145
|
### A_CLARIFY
|
|
148
146
|
|
|
@@ -158,9 +156,9 @@ S_FALLBACK:
|
|
|
158
156
|
3. 派生 `execution_criteria` + `task_decomposition`(每个 sub-goal 含 `done_when` + `evidence` + `lifecycle` + `completion_confirmed: false`)
|
|
159
157
|
4. **status.json 唯一真源**:写入 `boundary_contract` / `execution_criteria` / `task_decomposition`;不生成 markdown 清单
|
|
160
158
|
5. 在最后一个 evidence-producing stage(verify/review/test)之后、`milestone-complete` 之前追加 `decision:post-goal-audit`。ralph-execute 在该节点按需动态生长 `steps[]`
|
|
161
|
-
6. **输出 `/goal`
|
|
159
|
+
6. **输出 `/goal` 绑定提示词(不阻塞,用户可在执行过程中随时输入):**
|
|
162
160
|
```
|
|
163
|
-
📋
|
|
161
|
+
📋 任务分解完成。可随时复制下面一行设定目标(执行过程中输入即可):
|
|
164
162
|
|
|
165
163
|
/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。
|
|
166
164
|
```
|
|
@@ -174,13 +172,14 @@ S_FALLBACK:
|
|
|
174
172
|
"session_id", "source": "maestro", "intent", "task_type", "chain_name",
|
|
175
173
|
"phase", "phase_is_new": false, "milestone": "",
|
|
176
174
|
"scope_verdict": null, "analyze_macro_id": null, "blueprint_id": null,
|
|
177
|
-
"auto_mode": false, "
|
|
175
|
+
"auto_mode": false, "cli_tool": "claude", // cli_tool: decision 节点 delegate 评估时的 CLI 工具
|
|
178
176
|
"context": { "scratch_dir": null, "plan_dir": null, "analysis_dir": null,
|
|
179
177
|
"brainstorm_dir": null, "blueprint_dir": null, "issue_id": null },
|
|
180
178
|
"steps": [{
|
|
181
|
-
"index": 0,
|
|
179
|
+
"index": 0,
|
|
182
180
|
"skill": "", "args": "",
|
|
183
181
|
"stage": "", "scope": null,
|
|
182
|
+
"decision": null, // 非 null → decision 节点;null → 执行节点
|
|
184
183
|
"command_scope": "global|project|missing|null",
|
|
185
184
|
"command_path": "~/.claude/commands/{name}.md | .claude/commands/{name}.md | null",
|
|
186
185
|
"milestone_id": null, "source_artifact_ref": null,
|
|
@@ -204,25 +203,6 @@ S_FALLBACK:
|
|
|
204
203
|
|
|
205
204
|
<appendix>
|
|
206
205
|
|
|
207
|
-
### Auto-Yes Flag Map
|
|
208
|
-
|
|
209
|
-
| Command | Auto Flag | Effect |
|
|
210
|
-
|---------|-----------|--------|
|
|
211
|
-
| maestro-init | `-y` | Skip interactive questioning |
|
|
212
|
-
| maestro-analyze | `-y` | Skip scoping, auto-deepen |
|
|
213
|
-
| maestro-brainstorm | `-y` | Skip questions, use defaults |
|
|
214
|
-
| maestro-blueprint | `-y` | Skip interview, use recommended defaults |
|
|
215
|
-
| maestro-roadmap | `-y` | Skip questions (create/revise/review) |
|
|
216
|
-
| maestro-impeccable | `-y` | Auto-select design variant + skip confirmations |
|
|
217
|
-
| maestro-plan | `-y` | Skip confirmations and clarification |
|
|
218
|
-
| maestro-execute | `-y` | Skip confirmations, blocked auto-continue |
|
|
219
|
-
| quality-auto-test | `-y` | Skip plan confirmation |
|
|
220
|
-
| quality-test | `-y --auto-fix` | Auto-trigger gap-fix loop |
|
|
221
|
-
| quality-retrospective | `-y` | Accept all routing recommendations |
|
|
222
|
-
| maestro-milestone-complete | `-y` | Skip knowledge promotion |
|
|
223
|
-
|
|
224
|
-
Unlisted commands have no auto flags.
|
|
225
|
-
|
|
226
206
|
### Error Codes
|
|
227
207
|
|
|
228
208
|
| Code | Severity | Description | Recovery |
|
|
@@ -247,8 +227,8 @@ Unlisted commands have no auto flags.
|
|
|
247
227
|
- [ ] status.json 唯一真源;无 markdown 清单;post-goal-audit 节点在 decomposed 时追加;/goal 提示词以 status.json 为判据
|
|
248
228
|
- [ ] Chain selected and confirmed (or auto-confirmed)
|
|
249
229
|
- [ ] Session dir created with status.json before execution; decomposition fields additive-only
|
|
250
|
-
- [ ]
|
|
251
|
-
- [ ]
|
|
230
|
+
- [ ] 执行 step 含 `command_scope` + `command_path` + `completion_confirmed` 字段;decision step 通过 `step.decision` 字段标识
|
|
231
|
+
- [ ] 用户传入 `-y` 时透传到 skill args
|
|
252
232
|
- [ ] All chains dispatched via maestro-ralph-execute
|
|
253
233
|
- [ ] Low-complexity intents routed to maestro-quick
|
|
254
234
|
- [ ] (super) Requirements validated before roadmap
|