maestro-flow 0.5.37 → 0.5.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/maestro/SKILL.md +11 -5
- package/.agents/skills/maestro-ralph/SKILL.md +80 -12
- package/.agents/skills/maestro-ralph-execute/SKILL.md +17 -6
- package/.agents/skills/manage-drift-realign/SKILL.md +153 -0
- package/.agy/skills/maestro/SKILL.md +11 -5
- package/.agy/skills/maestro-ralph/SKILL.md +80 -12
- package/.agy/skills/maestro-ralph-execute/SKILL.md +17 -6
- package/.agy/skills/manage-drift-realign/SKILL.md +153 -0
- package/.claude/commands/maestro-ralph-execute.md +17 -6
- package/.claude/commands/maestro-ralph.md +80 -12
- package/.claude/commands/maestro.md +11 -5
- package/.claude/commands/manage-drift-realign.md +151 -0
- package/.codex/skills/maestro/SKILL.md +16 -8
- package/.codex/skills/maestro-ralph/SKILL.md +138 -11
- package/.codex/skills/maestro-ralph-execute/SKILL.md +17 -6
- package/.codex/skills/manage-drift-realign/SKILL.md +471 -0
- package/README.md +25 -8
- package/README.zh-CN.md +6 -6
- package/dashboard/dist-server/src/commands/install-backend.d.ts +10 -0
- package/dashboard/dist-server/src/commands/install-backend.js +69 -0
- package/dashboard/dist-server/src/commands/install-backend.js.map +1 -1
- package/dashboard/dist-server/src/core/component-defs.d.ts +11 -0
- package/dashboard/dist-server/src/core/component-defs.js +34 -2
- package/dashboard/dist-server/src/core/component-defs.js.map +1 -1
- package/dist/src/cli.js +3 -2
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/install-backend.d.ts +10 -0
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +69 -0
- package/dist/src/commands/install-backend.js.map +1 -1
- package/dist/src/commands/install.js +1 -0
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/ralph.d.ts.map +1 -1
- package/dist/src/commands/ralph.js +8 -0
- package/dist/src/commands/ralph.js.map +1 -1
- package/dist/src/commands/timeline.d.ts +14 -0
- package/dist/src/commands/timeline.d.ts.map +1 -0
- package/dist/src/commands/timeline.js +377 -0
- package/dist/src/commands/timeline.js.map +1 -0
- package/dist/src/core/component-defs.d.ts +11 -0
- package/dist/src/core/component-defs.d.ts.map +1 -1
- package/dist/src/core/component-defs.js +34 -2
- package/dist/src/core/component-defs.js.map +1 -1
- package/dist/src/core/install-executor.d.ts.map +1 -1
- package/dist/src/core/install-executor.js +11 -1
- package/dist/src/core/install-executor.js.map +1 -1
- package/dist/src/core/install-profile.d.ts.map +1 -1
- package/dist/src/core/install-profile.js +52 -17
- package/dist/src/core/install-profile.js.map +1 -1
- package/dist/src/i18n/locales/en.d.ts.map +1 -1
- package/dist/src/i18n/locales/en.js +4 -1
- package/dist/src/i18n/locales/en.js.map +1 -1
- package/dist/src/i18n/locales/zh.d.ts.map +1 -1
- package/dist/src/i18n/locales/zh.js +4 -1
- package/dist/src/i18n/locales/zh.js.map +1 -1
- package/dist/src/i18n/types.d.ts +3 -0
- package/dist/src/i18n/types.d.ts.map +1 -1
- package/dist/src/ralph/cmd-complete.d.ts +4 -0
- package/dist/src/ralph/cmd-complete.d.ts.map +1 -1
- package/dist/src/ralph/cmd-complete.js +8 -0
- package/dist/src/ralph/cmd-complete.js.map +1 -1
- package/dist/src/ralph/cmd-next.js +58 -8
- package/dist/src/ralph/cmd-next.js.map +1 -1
- package/dist/src/ralph/status-schema.d.ts +29 -2
- package/dist/src/ralph/status-schema.d.ts.map +1 -1
- package/dist/src/ralph/status-schema.js +1 -1
- package/dist/src/tui/install-ui/ComponentGrid.d.ts.map +1 -1
- package/dist/src/tui/install-ui/ComponentGrid.js +71 -38
- package/dist/src/tui/install-ui/ComponentGrid.js.map +1 -1
- package/dist/src/tui/install-ui/ComponentGrid.logic.d.ts +12 -3
- package/dist/src/tui/install-ui/ComponentGrid.logic.d.ts.map +1 -1
- package/dist/src/tui/install-ui/ComponentGrid.logic.js +21 -4
- package/dist/src/tui/install-ui/ComponentGrid.logic.js.map +1 -1
- package/dist/src/tui/install-ui/CyberItem.d.ts +3 -1
- package/dist/src/tui/install-ui/CyberItem.d.ts.map +1 -1
- package/dist/src/tui/install-ui/CyberItem.js +6 -5
- package/dist/src/tui/install-ui/CyberItem.js.map +1 -1
- package/dist/src/tui/install-ui/GroupedHub.d.ts +9 -0
- package/dist/src/tui/install-ui/GroupedHub.d.ts.map +1 -1
- package/dist/src/tui/install-ui/GroupedHub.js +54 -47
- package/dist/src/tui/install-ui/GroupedHub.js.map +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.js +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.js +54 -5
- package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/tui/install-ui/types.d.ts +1 -0
- package/dist/src/tui/install-ui/types.d.ts.map +1 -1
- package/dist/src/tui/install-ui/types.js.map +1 -1
- package/dist/src/tui/install-ui/useInstallFlowState.d.ts +8 -2
- package/dist/src/tui/install-ui/useInstallFlowState.d.ts.map +1 -1
- package/dist/src/tui/install-ui/useInstallFlowState.js +145 -15
- package/dist/src/tui/install-ui/useInstallFlowState.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/workflows/agy-instructions.md +127 -88
- package/workflows/analyze.md +2 -2
- package/workflows/auto-test.md +7 -1
- package/workflows/blueprint.md +22 -19
- package/workflows/brainstorm.md +11 -3
- package/workflows/business-test.md +4 -0
- package/workflows/codebase-rebuild.md +8 -1
- package/workflows/codebase-refresh.md +7 -1
- package/workflows/codex-instructions.md +1 -1
- package/workflows/debug.md +5 -2
- package/workflows/domain-add.md +6 -0
- package/workflows/drift-realign.md +396 -0
- package/workflows/execute.md +5 -4
- package/workflows/explore-usage.md +2 -2
- package/workflows/finish-work.md +6 -6
- package/workflows/fork.md +2 -2
- package/workflows/grill.md +6 -5
- package/workflows/harvest.md +2 -2
- package/workflows/impeccable.md +3 -2
- package/workflows/init.md +7 -7
- package/workflows/integration-test.md +1 -0
- package/workflows/issue-gaps-analyze.codex.md +2 -0
- package/workflows/issue-gaps-analyze.md +4 -4
- package/workflows/issue-plan.md +1 -1
- package/workflows/knowhow.md +7 -1
- package/workflows/knowledge-audit.md +1 -1
- package/workflows/maestro-super.md +2 -2
- package/workflows/maestro.md +3 -3
- package/workflows/map.md +2 -2
- package/workflows/milestone-audit.md +1 -1
- package/workflows/milestone-complete.md +1 -1
- package/workflows/plan.md +7 -6
- package/workflows/quick.md +8 -6
- package/workflows/ralph-amend-goal.md +177 -0
- package/workflows/refactor.md +2 -0
- package/workflows/retrospective.md +7 -3
- package/workflows/review.md +6 -4
- package/workflows/roadmap-common.md +3 -3
- package/workflows/roadmap.md +8 -5
- package/workflows/spec-generate.md +23 -18
- package/workflows/specs-load.md +1 -1
- package/workflows/specs-setup.md +2 -0
- package/workflows/sync.md +4 -2
- package/workflows/test-gen.md +1 -1
- package/workflows/test.md +1 -1
- package/workflows/ui-codify-extract.md +1 -0
- package/workflows/ui-codify-knowhow.md +1 -1
- package/workflows/ui-codify-package.md +1 -1
- package/workflows/ui-codify.md +9 -7
- package/workflows/ui-design.md +9 -7
- package/workflows/ui-style.md +6 -4
- package/workflows/verify.md +4 -4
- package/workflows/wiki-connect.md +2 -0
- package/workflows/wiki-digest.md +5 -3
- package/workflows/wiki-manage.md +4 -0
- package/workflows/maestro.codex.md +0 -365
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-ralph
|
|
3
3
|
description: Use when the optimal command sequence is unclear and needs automated state-based determination
|
|
4
|
-
argument-hint: "<intent> [-y] | status | continue"
|
|
4
|
+
argument-hint: "<intent> [-y] | status | continue | --amend [change]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Write
|
|
@@ -17,6 +17,10 @@ Closed-loop decision engine: read project state → infer position → build ada
|
|
|
17
17
|
Ralph builds/evaluates; ralph-execute runs steps. Session: `.workflow/.maestro/ralph-{YYYYMMDD-HHmmss}/status.json`.
|
|
18
18
|
</purpose>
|
|
19
19
|
|
|
20
|
+
<deferred_reading>
|
|
21
|
+
- [ralph-amend-goal.md](~/.maestro/workflows/ralph-amend-goal.md) — read when `--amend` flag active for goal amendment flow
|
|
22
|
+
</deferred_reading>
|
|
23
|
+
|
|
20
24
|
<context>
|
|
21
25
|
$ARGUMENTS — intent text, flags, or keywords.
|
|
22
26
|
|
|
@@ -24,8 +28,9 @@ $ARGUMENTS — intent text, flags, or keywords.
|
|
|
24
28
|
```
|
|
25
29
|
-y flag → auto_confirm = true # 唯一来源:用户显式传入;ralph 不内部推断(invariant 14)
|
|
26
30
|
--roadmap → wants_roadmap = true (强制多发布 roadmap 路径;roadmap 默认 opt-in)
|
|
31
|
+
--amend / -a → amend_mode = true (running session 存在时触发目标修改流程)
|
|
27
32
|
.md/.txt path → input_doc (supplementary context only, NEVER substitutes lifecycle stages)
|
|
28
|
-
Remaining → intent
|
|
33
|
+
Remaining → intent (amend_mode 时为 change_request)
|
|
29
34
|
```
|
|
30
35
|
|
|
31
36
|
**State files:**
|
|
@@ -71,6 +76,7 @@ S_CONFIRM — 用户确认 PERSIST: —
|
|
|
71
76
|
S_DISPATCH — 移交 maestro-ralph-execute PERSIST: —
|
|
72
77
|
S_DECISION_EVAL — 委托评估质量门 PERSIST: —
|
|
73
78
|
S_APPLY_VERDICT — 应用裁决 + 插入命令 PERSIST: session.steps[], session.passed_gates[]
|
|
79
|
+
S_AMEND_GOAL — 修改 running session 目标 PERSIST: session.task_decomposition, .boundary_contract, .goal_changelog, .steps[]
|
|
74
80
|
S_FALLBACK — 请求用户输入 PERSIST: —
|
|
75
81
|
</states>
|
|
76
82
|
|
|
@@ -79,6 +85,8 @@ S_FALLBACK — 请求用户输入 PERSIST: —
|
|
|
79
85
|
S_PARSE_ROUTE:
|
|
80
86
|
→ S_STATUS WHEN: intent == "status"
|
|
81
87
|
→ S_CONTINUE WHEN: intent == "continue"
|
|
88
|
+
→ S_AMEND_GOAL WHEN: amend_mode == true AND running session exists
|
|
89
|
+
→ S_FALLBACK WHEN: amend_mode == true AND no running session DO: Display: "无运行中的 ralph 会话,--amend 需要活跃 session"
|
|
82
90
|
→ S_DECISION_EVAL WHEN: running session with decision step in "running" status
|
|
83
91
|
→ S_RESOLVE_PHASE WHEN: intent is non-empty ← phase 必须先于 position
|
|
84
92
|
→ S_FALLBACK WHEN: no intent AND no running session
|
|
@@ -165,6 +173,11 @@ S_APPLY_VERDICT:
|
|
|
165
173
|
GUARD: not auto_confirm → AskUserQuestion with override options
|
|
166
174
|
GUARD: post-reground + drifted + confidence_score >= 60 → A_REGROUND_HALT(漂移熔断为安全门,auto_confirm 不跳过)
|
|
167
175
|
|
|
176
|
+
S_AMEND_GOAL:
|
|
177
|
+
→ S_DISPATCH WHEN: change applied + user confirmed DO: A_AMEND_GOAL
|
|
178
|
+
→ END WHEN: user cancels
|
|
179
|
+
GUARD: RISK_LEVEL=high → auto_confirm 无效,必须 AskUserQuestion
|
|
180
|
+
|
|
168
181
|
S_FALLBACK:
|
|
169
182
|
→ S_PARSE_ROUTE WHEN: user provides input DO: AskUserQuestion
|
|
170
183
|
→ END WHEN: user cancels
|
|
@@ -404,7 +417,11 @@ Generate steps from `session.lifecycle_position` to `milestone-complete`(`sess
|
|
|
404
417
|
3.6. **frontend-verify UI 门控**:仅当当前 phase 交付前端(检出 `dashboard/` 目录,或 phase 目标/计划含 UI 关键词 `landing|page|dashboard|frontend|UI|component|界面`)时保留 `frontend-verify` stage + `post-frontend-verify` decision;纯后端 phase 删除该 stage
|
|
405
418
|
4. **决策节点**:每个 Decision after 非空的 stage 之后插入 `{ decision: "<gate>", retry_count: 0, max_retries: 2, command_scope: null, command_path: null }`
|
|
406
419
|
5. **goal-audit 插入**:`task_decomposition` 存在时,在最后一个 evidence-producing stage(execute/review/test)之后、`milestone-complete` 之前插入 `decision:post-goal-audit`
|
|
407
|
-
5.5. **re-grounding
|
|
420
|
+
5.5. **re-grounding 插入**:WHEN `task_decomposition` 存在 AND 执行 step(不含 decision)≥3
|
|
421
|
+
- 从第 3 个执行 step 起每隔 3 个插入 `{ decision: "post-reground", retry_count: 0, max_retries: 0, command_scope: null, command_path: null }`
|
|
422
|
+
- 不在最后一个执行 step 后插入(由 goal-audit 覆盖)
|
|
423
|
+
- 不与已有 quality-gate decision 节点相邻(顺延到下一个 3-step 边界)
|
|
424
|
+
- fix-loop 动态插入的 step **纳入**计数(从插入点起重新计算 3-step 间隔)
|
|
408
425
|
6. **终点硬约束**:`session.milestone` 存在时 chain 以 `milestone-complete` 结尾;`session.milestone=null`(standalone)时跳过 `milestone-audit` + `milestone-complete` stage,chain 以最后一个质量门 stage 结尾
|
|
409
426
|
7. **goal_ref 传播**:`task_decomposition` 存在时,每个 step 按 `step.stage ∈ g.lifecycle` 匹配 `step.goal_ref = g.id`(多匹配取字典序最小);decision 节点不打 goal_ref
|
|
410
427
|
8. **占位符**:independent 保留 `{phase}` `{intent}`;unified 不带 `{phase}`
|
|
@@ -415,7 +432,7 @@ Generate steps from `session.lifecycle_position` to `milestone-complete`(`sess
|
|
|
415
432
|
- 命中 skills → 同上(type=skill)
|
|
416
433
|
- 未命中 → `command_scope = "missing"`, `command_path = null`,A_CREATE_SESSION 报错 E006
|
|
417
434
|
- **不在 build 阶段读取 .md 内容**;`<required_reading>` / `<deferred_reading>` 解析与加载由 `maestro ralph next` CLI 在执行期完成
|
|
418
|
-
10. **每个 step 初始化** `completion_confirmed: false`, `completion_status: null`, `completion_evidence: null`, `deferred_reads: []`, `load: null`(由 `ralph next` 写入)
|
|
435
|
+
10. **每个 step 初始化** `completion_confirmed: false`, `completion_status: null`, `completion_evidence: null`, `completion_summary: null`, `completion_decisions: null`, `completion_caveats: null`, `completion_deferred: null`, `deferred_reads: []`, `load: null`(由 `ralph next` 写入)
|
|
419
436
|
11. **scope_verdict gating**(仅当 chain 起点 = `analyze-macro`):
|
|
420
437
|
- `scope_verdict == large` **且** `wants_roadmap` → 保留 `roadmap` + `analyze`;`plan` 选 phase 列(`{phase}`)
|
|
421
438
|
- 其余(`medium` / `small`,或 `large` 但非 `wants_roadmap`)→ 跳过 `roadmap` + `analyze` 两 stage;`plan` 选 standalone 列(`--from analyze:{analyze_macro_id}`),不带 `{phase}`
|
|
@@ -540,9 +557,12 @@ Runs only when `task_decomposition` present.
|
|
|
540
557
|
|
|
541
558
|
### A_REGROUND_EVALUATE
|
|
542
559
|
|
|
543
|
-
|
|
560
|
+
GUARD: `task_decomposition` 存在(周期触发,见 build rule 5.5)
|
|
544
561
|
|
|
545
|
-
1.
|
|
562
|
+
1. Read status.json:
|
|
563
|
+
- `session.intent`, `session.boundary_contract`
|
|
564
|
+
- `steps[]` WHERE `status=="completed"` → 取 `completion_evidence`, `completion_summary`, `completion_decisions`, `completion_caveats`
|
|
565
|
+
- `task_decomposition[]` WHERE `status=="done"` → 取 `goal`, `done_when`
|
|
546
566
|
2. Delegate read-only audit (run_in_background, STOP, wait):
|
|
547
567
|
```
|
|
548
568
|
maestro delegate "PURPOSE: 意图保真检查 — 对照 intent 验证累积执行是否漂移
|
|
@@ -556,8 +576,10 @@ Runs only when `task_decomposition` present.
|
|
|
556
576
|
definition_of_done = {boundary_contract.definition_of_done}
|
|
557
577
|
in_scope = {boundary_contract.in_scope}
|
|
558
578
|
out_of_scope = {boundary_contract.out_of_scope}
|
|
559
|
-
completed_steps = [{index, skill, stage, completion_evidence}, ...]
|
|
579
|
+
completed_steps = [{index, skill, stage, completion_evidence, completion_summary, completion_decisions, completion_caveats}, ...]
|
|
560
580
|
done_goals = [{id, goal, done_when}, ...]
|
|
581
|
+
accumulated_deferred = [{from_step, item}, ...]
|
|
582
|
+
goal_changelog = {session.goal_changelog ?? []}
|
|
561
583
|
EXPECTED:
|
|
562
584
|
---VERDICT---
|
|
563
585
|
STATUS=aligned|drifted
|
|
@@ -568,7 +590,8 @@ Runs only when `task_decomposition` present.
|
|
|
568
590
|
CONSTRAINTS:
|
|
569
591
|
- 只评估,不修改文件
|
|
570
592
|
- aligned 阈值:≥80% 已完成产出直接服务 intent
|
|
571
|
-
- 单个 step 触碰 out_of_scope → 直接判 drifted
|
|
593
|
+
- 单个 step 触碰 out_of_scope → 直接判 drifted
|
|
594
|
+
- goal_changelog 存在 → 以最新 after.goals 为基准"
|
|
572
595
|
--role analyze --mode analysis
|
|
573
596
|
```
|
|
574
597
|
3. On callback: parse verdict
|
|
@@ -646,6 +669,21 @@ Runs only when `task_decomposition` present.
|
|
|
646
669
|
2. Display: ◆ 已达最大重试次数,debug 已执行。请人工介入。
|
|
647
670
|
3. Display: /maestro-ralph continue 恢复
|
|
648
671
|
|
|
672
|
+
### A_AMEND_GOAL
|
|
673
|
+
|
|
674
|
+
运行中 session 的目标热修改。详细流程由 `<deferred_reading>` 加载 `ralph-amend-goal.md`。
|
|
675
|
+
|
|
676
|
+
| Phase | 行为 | 产出 |
|
|
677
|
+
|-------|------|------|
|
|
678
|
+
| 1. 快照 | 读 `task_decomposition` + `boundary_contract` + 已完成 steps 的 `completion_summary` | Display: 目标列表 + 进度 |
|
|
679
|
+
| 2. 解析 | `change_request` 非空 → 直接用;为空 → AskUserQuestion(修改/新增/移除/调整边界) | `change_type` + `change_request` |
|
|
680
|
+
| 3. Mini Grill | `maestro delegate --role analyze --mode analysis`:评估影响 | RISK_LEVEL + AFFECTED_GOALS + INVALIDATED_STEPS + NEW_GAPS |
|
|
681
|
+
| 4. 确认 | AskUserQuestion:应用并继续 / 仅改目标 / 取消 | 用户选择 |
|
|
682
|
+
| 5. 应用 | 归档旧目标(`superseded`)→ 写入新目标(`origin: CHG-xxx`)→ 重建链路 → write status.json | handoff ralph-execute |
|
|
683
|
+
|
|
684
|
+
GUARD: `RISK_LEVEL == high` → AskUserQuestion 不跳过(auto_confirm 无效)
|
|
685
|
+
GUARD: 已完成(`status: "done"`)的目标不可 supersede(skip + warn)
|
|
686
|
+
|
|
649
687
|
</actions>
|
|
650
688
|
|
|
651
689
|
</state_machine>
|
|
@@ -658,7 +696,7 @@ Runs only when `task_decomposition` present.
|
|
|
658
696
|
{
|
|
659
697
|
"session_id": "ralph-{YYYYMMDD-HHmmss}",
|
|
660
698
|
"source": "ralph", "status": "running",
|
|
661
|
-
"ralph_protocol_version": "
|
|
699
|
+
"ralph_protocol_version": "2", // CLI-driven; absent/0 → legacy; "1" → basic CLI; "2" → structured completion + enhanced anchor
|
|
662
700
|
"active_step_index": null, // CLI-managed; only one step held at a time
|
|
663
701
|
"intent": "", "lifecycle_position": "",
|
|
664
702
|
"phase": null, "phase_is_new": false,
|
|
@@ -693,6 +731,10 @@ Runs only when `task_decomposition` present.
|
|
|
693
731
|
"completion_confirmed": false,
|
|
694
732
|
"completion_status": null,
|
|
695
733
|
"completion_evidence": null,
|
|
734
|
+
"completion_summary": null, // 一句话总结:做了什么(MUST on DONE)
|
|
735
|
+
"completion_decisions": null, // 本 step 做出的关键决策列表
|
|
736
|
+
"completion_caveats": null, // 后续 step 需注意的事项
|
|
737
|
+
"completion_deferred": null, // 被推迟到后续的工作列表
|
|
696
738
|
"completed_at": null,
|
|
697
739
|
"deferred_reads": [], // 由 ralph next CLI 解析 .md 时填充
|
|
698
740
|
"load": null // { loaded_at, required_files[], deferred_files[], resolve_version } —— 由 ralph next 写入
|
|
@@ -706,10 +748,22 @@ Runs only when `task_decomposition` present.
|
|
|
706
748
|
"execution_criteria": [],
|
|
707
749
|
"task_decomposition": [
|
|
708
750
|
{ "id": "G1", "goal": "", "boundary": "", "done_when": "",
|
|
709
|
-
"evidence": "", "lifecycle": [], "status": "pending|done",
|
|
710
|
-
"completion_confirmed": false, "completed_at": null
|
|
751
|
+
"evidence": "", "lifecycle": [], "status": "pending|done|superseded",
|
|
752
|
+
"completion_confirmed": false, "completed_at": null,
|
|
753
|
+
"superseded_by": null, "superseded_at": null, "origin": null }
|
|
711
754
|
],
|
|
712
|
-
"task_decomposition_all_done": false
|
|
755
|
+
"task_decomposition_all_done": false,
|
|
756
|
+
|
|
757
|
+
// goal_changelog: additive; absent → no amendments
|
|
758
|
+
"goal_changelog": [
|
|
759
|
+
{ "id": "CHG-001", "timestamp": "{ISO}",
|
|
760
|
+
"change_type": "modify|add|remove|boundary",
|
|
761
|
+
"reason": "变更描述",
|
|
762
|
+
"impact_assessment": { "risk_level": "low|medium|high",
|
|
763
|
+
"invalidated_steps": [], "new_steps_inserted": 0 },
|
|
764
|
+
"before": { "goals": [{"id":"G1","goal":"...","done_when":"..."}] },
|
|
765
|
+
"after": { "goals": [{"id":"G1v2","goal":"...","done_when":"..."}] } }
|
|
766
|
+
]
|
|
713
767
|
}
|
|
714
768
|
```
|
|
715
769
|
|
|
@@ -841,5 +895,19 @@ decision:post-goal-audit {retry+1}
|
|
|
841
895
|
- [ ] Phase-level deferred chaining:plan/execute step 的 `--from`/`--dir` 注入由 A_RESOLVE_ARGS(ralph-execute)运行时完成;build 阶段标记意图,不预知 artifact ID
|
|
842
896
|
- [ ] Phase-level plan step 运行时获得 `--from analyze:{phase_analyze_id}`(由 ralph-execute 从 state.json 查找注入)
|
|
843
897
|
- [ ] Phase-level execute step 运行时获得 `source_artifact_ref = "plan:{id}"`
|
|
898
|
+
- [ ] 每个 step 含 `completion_summary` + `completion_decisions` + `completion_caveats` + `completion_deferred`(初始 null)
|
|
899
|
+
- [ ] `completion_summary` 在 DONE/DONE_WITH_CONCERNS 时为 MUST(由 CLI `--summary` 参数传入)
|
|
900
|
+
- [ ] session_anchor 包含最近 5 个已完成 step 的 `completion_summary` + `completion_caveats`(滑动窗口)
|
|
901
|
+
- [ ] session_anchor 包含 task_decomposition 全局视图(仅 `status != "superseded"` 的目标)
|
|
902
|
+
- [ ] session_anchor boundary_contract 不截断(`capAnchorList` n=8)
|
|
903
|
+
- [ ] session_anchor 包含 Accumulated Signals(聚合所有 caveats + deferred)
|
|
904
|
+
- [ ] re-grounding 完成 steps 信息含 completion_summary/decisions/caveats
|
|
905
|
+
- [ ] fix-loop 动态插入的 step 纳入 re-grounding 3-step 计数
|
|
906
|
+
- [ ] `--amend` 路由到 S_AMEND_GOAL(需 running session)
|
|
907
|
+
- [ ] A_AMEND_GOAL:5 步流程(快照→解析→mini grill→确认→应用)
|
|
908
|
+
- [ ] 旧目标标 `superseded`(`superseded_by` + `superseded_at`),新目标标 `origin: "CHG-xxx"`
|
|
909
|
+
- [ ] `goal_changelog` 记录完整 before/after 快照 + impact_assessment
|
|
910
|
+
- [ ] `RISK_LEVEL=high` 时 amend 不跳过 auto_confirm
|
|
911
|
+
- [ ] session_anchor 中 superseded 目标仅占一行标注,不展开细节
|
|
844
912
|
|
|
845
913
|
</appendix>
|
|
@@ -46,7 +46,7 @@ $ARGUMENTS — user intent text, or special keywords.
|
|
|
46
46
|
8. **Grill `-y` 透传** — `-y` auto mode 透传 `-y` 到 grill args(grill 自身 Auto mode 用代码代答),不删除 grill stage;grill 仍产出 grill-report/terminology/context-package 供下游 brainstorm
|
|
47
47
|
9. **D-007 milestone 反查** — 数字 phase 的 `milestone_id` 由 `state.json.milestones[].phase_slugs` 反查
|
|
48
48
|
10. **每个 step 必须 `completion_confirmed: true`** — 由 `maestro ralph complete N --status DONE|DONE_WITH_CONCERNS` 写入
|
|
49
|
-
11. **schema** — `ralph_protocol_version: "
|
|
49
|
+
11. **schema** — `ralph_protocol_version: "2"` 标记 CLI-driven session;新增字段全部可选
|
|
50
50
|
12. **Invariant violation = BLOCK** — 违反上述任一 invariant 即阻断当前操作,不可绕过。特别是 invariant 1(dispatch via ralph-execute)和 invariant 2(session before execution)和 invariant 10(completion_confirmed 由 CLI 写入)为硬约束。
|
|
51
51
|
14. **禁止以上下文消耗为由中断执行** — harness 自动处理 context compression,以"上下文不足"或"避免 context overflow"为由中断属于 invariant violation
|
|
52
52
|
13. **Classification evidence** — S_CLASSIFY 的 chain 选择决策 MUST 记录到 status.json 的 `classification_rationale` 字段:匹配了哪个 pattern、排除了哪些备选、confidence level。无记录的分类不可进入 S_CREATE。
|
|
@@ -173,7 +173,7 @@ S_FALLBACK:
|
|
|
173
173
|
```json
|
|
174
174
|
{
|
|
175
175
|
"session_id", "source": "maestro", "intent", "task_type", "chain_name",
|
|
176
|
-
"ralph_protocol_version": "
|
|
176
|
+
"ralph_protocol_version": "2", "active_step_index": null,
|
|
177
177
|
"phase", "phase_is_new": false, "milestone": "",
|
|
178
178
|
"scope_verdict": null, "analyze_macro_id": null, "blueprint_id": null,
|
|
179
179
|
"auto_mode": false, "decomposition_owner": "maestro", "cli_tool": "claude",
|
|
@@ -186,12 +186,18 @@ S_FALLBACK:
|
|
|
186
186
|
"milestone_id": null, "source_artifact_ref": null,
|
|
187
187
|
"status": "pending", "goal_ref": null,
|
|
188
188
|
"completion_confirmed": false, "completion_status": null,
|
|
189
|
-
"completion_evidence": null,
|
|
189
|
+
"completion_evidence": null,
|
|
190
|
+
"completion_summary": null, "completion_decisions": null,
|
|
191
|
+
"completion_caveats": null, "completion_deferred": null,
|
|
192
|
+
"completed_at": null,
|
|
190
193
|
"deferred_reads": [], "load": null
|
|
191
194
|
}],
|
|
192
195
|
"waves": [], "current_step": 0, "status": "running",
|
|
193
196
|
"boundary_contract": {}, "execution_criteria": [],
|
|
194
|
-
"task_decomposition": [
|
|
197
|
+
"task_decomposition": [{ "status": "pending|done|superseded",
|
|
198
|
+
"superseded_by": null, "superseded_at": null, "origin": null }],
|
|
199
|
+
"task_decomposition_all_done": false,
|
|
200
|
+
"goal_changelog": []
|
|
195
201
|
}
|
|
196
202
|
```
|
|
197
203
|
3. Validate: 所有 step 的 `command_scope != "missing"`,否则 raise E005 列出缺失 skill
|
|
@@ -232,7 +238,7 @@ S_FALLBACK:
|
|
|
232
238
|
- [ ] Session dir created with status.json before execution; decomposition fields additive-only
|
|
233
239
|
- [ ] 执行 step 含 `command_scope` + `command_path` + `completion_confirmed`;decision step 由 `step.decision` 标识
|
|
234
240
|
- [ ] `command_scope`/`command_path` 由 `maestro ralph skills --platform claude --json --quiet` 预校验(project 覆盖 global)
|
|
235
|
-
- [ ] Session schema 含 `ralph_protocol_version: "
|
|
241
|
+
- [ ] Session schema 含 `ralph_protocol_version: "2"` + `active_step_index: null` + step.load 占位
|
|
236
242
|
- [ ] 用户传入 `-y` 时透传到 skill args
|
|
237
243
|
- [ ] All chains dispatched via maestro-ralph-execute
|
|
238
244
|
- [ ] Low-complexity intents routed to maestro-quick
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: manage-drift-realign
|
|
3
|
+
description: Detect and realign .workflow/ artifact drift against code reality after refactoring
|
|
4
|
+
argument-hint: "--scope <roadmap|spec|codebase|state|issue|knowhow|project|all> [--since YYYY-MM-DD|commit|HEAD~N] [--depth shallow|deep] [--dry-run] [--report] [--auto-archive] [--interactive]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Agent
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
<purpose>
|
|
16
|
+
检测代码重构/增量变更后,代码现实与 .workflow/ 文档之间的漂移。互补于 `manage-knowledge-audit`(检测知识存储内部矛盾)。本命令通过 git 时间线 + session 历史检测 code↔document 漂移。
|
|
17
|
+
</purpose>
|
|
18
|
+
|
|
19
|
+
<required_reading>
|
|
20
|
+
@~/.maestro/workflows/drift-realign.md
|
|
21
|
+
</required_reading>
|
|
22
|
+
|
|
23
|
+
<deferred_reading>
|
|
24
|
+
- ~/.maestro/workflows/knowledge-audit.md (交叉引用已有审计发现)
|
|
25
|
+
- ~/.maestro/workflows/sync.md (codebase 文档严重漂移时自动触发)
|
|
26
|
+
- ~/.maestro/workflows/codebase-rebuild.md (sync 不足时的回退方案)
|
|
27
|
+
</deferred_reading>
|
|
28
|
+
|
|
29
|
+
<context>
|
|
30
|
+
Arguments: $ARGUMENTS
|
|
31
|
+
|
|
32
|
+
**Scope:** `roadmap` | `spec` | `codebase` | `state` | `issue` | `knowhow` | `project` | `all`(默认 `all`)
|
|
33
|
+
|
|
34
|
+
**`--since`:** 分析起始点。支持日期(`YYYY-MM-DD`)、commit ref(`abc1234`)、相对引用(`HEAD~N`)。默认自动检测:优先读 `state.json` 的 `last_drift_realign` 或 `last_pruned` 时间戳,回退 90 天。
|
|
35
|
+
|
|
36
|
+
**`--depth`:** `shallow`(mtime + 引用检查)vs `deep`(LLM 语义分析)。默认 `shallow`。
|
|
37
|
+
|
|
38
|
+
**`--dry-run`:** 预览模式,不执行任何写入。
|
|
39
|
+
|
|
40
|
+
**`--report`:** 仅生成报告,不进入交互分诊。
|
|
41
|
+
|
|
42
|
+
**`--auto-archive`:** 自动归档陈旧项,跳过逐项确认。
|
|
43
|
+
|
|
44
|
+
**`--interactive`:** 逐项交互分诊(默认)。
|
|
45
|
+
|
|
46
|
+
**互斥规则:** `--report` 覆盖 `--interactive`;`--auto-archive` 覆盖 `--interactive`。
|
|
47
|
+
|
|
48
|
+
**状态文件读取:**
|
|
49
|
+
- `.workflow/state.json`
|
|
50
|
+
- `.workflow/roadmap.md`
|
|
51
|
+
- `.workflow/specs/*.md`
|
|
52
|
+
- `.workflow/codebase/*.md`
|
|
53
|
+
- `.workflow/issues/issues.jsonl`
|
|
54
|
+
- `.workflow/knowhow/*.md`
|
|
55
|
+
- `.workflow/project.md`
|
|
56
|
+
|
|
57
|
+
使用 `maestro timeline` CLI 构建统一的 git+session 时间线。
|
|
58
|
+
</context>
|
|
59
|
+
|
|
60
|
+
<execution>
|
|
61
|
+
Follow `~/.maestro/workflows/drift-realign.md` Stages 1-9 in order.
|
|
62
|
+
|
|
63
|
+
### Phase Gates (MANDATORY, BLOCKING)
|
|
64
|
+
|
|
65
|
+
**GATE 1: Parse → Timeline** (Stages 1-2)
|
|
66
|
+
- REQUIRED: `.workflow/` 存在,scope 解析通过,`--since` 已解析。
|
|
67
|
+
- REQUIRED: `maestro timeline --since <date> --json` 产出有效时间线。
|
|
68
|
+
- BLOCKED if `.workflow/` 缺失 (E001)、scope 非法 (E002)、git 不可用 (E003)。
|
|
69
|
+
|
|
70
|
+
**GATE 2: Timeline → Scan** (Stages 2-3 → Stage 4)
|
|
71
|
+
- REQUIRED: `timeline.json` 已生成且包含事件。
|
|
72
|
+
- REQUIRED: `drift_score` 已计算(LOW/MODERATE/SEVERE)。
|
|
73
|
+
- REQUIRED: 若 SEVERE 且 `--depth shallow`,发出 W002 建议 `--depth deep`。
|
|
74
|
+
- BLOCKED if 时间线为空(`--since` 之后无变更)。
|
|
75
|
+
|
|
76
|
+
**GATE 3: Scan → Triage** (Stage 4 → Stages 5-6)
|
|
77
|
+
- REQUIRED: 4 个并行漂移扫描 agent 全部返回结果(或 W003 部分覆盖)。
|
|
78
|
+
- REQUIRED: `DriftFinding[]` 已合并、去重、按严重度排序。
|
|
79
|
+
- BLOCKED if 所有 agent 均失败。
|
|
80
|
+
|
|
81
|
+
**GATE 4: Triage → Apply** (Stages 6-7 → Stage 8)
|
|
82
|
+
- REQUIRED: 备份 tarball 生成于 `.workflow/.trash/drift-realign-{timestamp}/`。
|
|
83
|
+
- REQUIRED: 所有用户决策已记录(或 `--auto-archive`/`--report` 已生效)。
|
|
84
|
+
- REQUIRED: codebase scope 的 rebuild 动作自动触发 `/quality-sync --full`。
|
|
85
|
+
- BLOCKED if 备份失败 (E005)。
|
|
86
|
+
|
|
87
|
+
### Execution Constraints
|
|
88
|
+
|
|
89
|
+
- **Code-as-Truth**: 代码是唯一真理源。当文档说 X 但代码做 Y 时,文档漂移。
|
|
90
|
+
- **Parallel scan**: Stage 4 在单条消息中派发 4 个 agent(roadmap-scanner、spec-scanner、codebase-scanner、artifact-scanner)。
|
|
91
|
+
- **Auto-rebuild**: 当 codebase-scanner 检测到严重漂移(3+ P0 finding)时,分诊后自动触发 `/quality-sync --full`。若 sync 报告重大结构变更,建议 `/manage-codebase-rebuild`。
|
|
92
|
+
- **Long gap handling**: 当 `drift_window` > 180 天时,自动升级为 `--depth deep` 并警告用户 (W002)。
|
|
93
|
+
|
|
94
|
+
### Platform Inquiry(Stage 2a,交互式)
|
|
95
|
+
|
|
96
|
+
当 `session_summary.by_platform` 包含多个平台且 session 总量 > 20 时,使用 AskUserQuestion 询问用户修改主要在哪个平台进行。用户选择后以 `--platform` 参数重新获取 timeline,缩小后续分析范围。
|
|
97
|
+
|
|
98
|
+
### Session 详情加载策略(Stage 2b)
|
|
99
|
+
|
|
100
|
+
`maestro timeline` 每条 session 事件已包含:`summary`(用户提问摘要)、`edited_files`、`code_paths`、`platform`。这些信息在 `--depth shallow` 模式下足以支撑漂移检测。
|
|
101
|
+
|
|
102
|
+
当 `--depth deep` 时,对与 cold_workflow_files 有 edited_files 交集的 session,通过 `maestro load --type session --id <id> --json` 按需加载完整 body 和 related 字段:
|
|
103
|
+
- 仅加载 edited_files 与 cold_workflow_files 有交集的 session
|
|
104
|
+
- 最多加载 10 个(按交集文件数降序排序)
|
|
105
|
+
- 结果写入 `.workflow/.drift-realign/session-details-{date}.json`
|
|
106
|
+
- scanner agent 在 deep 模式下同时接收 timeline.json + session-details.json
|
|
107
|
+
</execution>
|
|
108
|
+
|
|
109
|
+
<completion>
|
|
110
|
+
### Next-step routing
|
|
111
|
+
|
|
112
|
+
| Condition | Suggestion |
|
|
113
|
+
|-----------|-----------|
|
|
114
|
+
| codebase 文档已重建 | `/manage-status` |
|
|
115
|
+
| spec 标记待更新 | 手动编辑标记的 spec 文件 |
|
|
116
|
+
| roadmap 已过时 | `/maestro-roadmap` 重新生成 |
|
|
117
|
+
| state.json 需清理 | `/manage-knowledge-audit --scope artifact` |
|
|
118
|
+
| 需要完整同步 | `/quality-sync --full` |
|
|
119
|
+
| project.md 已过时 | 编辑 `.workflow/project.md` |
|
|
120
|
+
</completion>
|
|
121
|
+
|
|
122
|
+
<error_codes>
|
|
123
|
+
| Code | Severity | Condition | Recovery |
|
|
124
|
+
|------|----------|-----------|----------|
|
|
125
|
+
| E001 | error | `.workflow/` 未初始化 | 先跑 `/maestro-init` |
|
|
126
|
+
| E002 | error | `--scope` 非法 | 提供有效 scope: roadmap/spec/codebase/state/issue/knowhow/project/all |
|
|
127
|
+
| E003 | error | git 不可用(非 git 仓库) | 初始化 git |
|
|
128
|
+
| E004 | error | `--since` 无法解析 | 检查日期格式或 commit ref |
|
|
129
|
+
| E005 | error | 备份失败 | 检查磁盘空间 |
|
|
130
|
+
| W001 | warning | session 历史不可用(wiki 未索引) | 运行 `maestro wiki rebuild` |
|
|
131
|
+
| W002 | warning | `drift_window` > 180 天 | 建议使用 `--depth deep` |
|
|
132
|
+
| W003 | warning | 部分 scanner agent 失败 | 以部分覆盖继续 |
|
|
133
|
+
| W004 | warning | git log > 1000 commits | 自动截断至最近 1000 条 |
|
|
134
|
+
</error_codes>
|
|
135
|
+
|
|
136
|
+
<success_criteria>
|
|
137
|
+
- [ ] Scope 正确解析,互斥标志校验通过
|
|
138
|
+
- [ ] `maestro timeline` 已调用,`timeline.json` 已生成
|
|
139
|
+
- [ ] `drift_score` 已计算(LOW/MODERATE/SEVERE 已展示)
|
|
140
|
+
- [ ] 4 个并行 scanner agent 已派发
|
|
141
|
+
- [ ] `DriftFinding[]` 已合并并按 P0 > P1 > P2 排序
|
|
142
|
+
- [ ] 如 `--interactive`:用户已分诊所有 finding
|
|
143
|
+
- [ ] 变更前备份 tarball 已生成
|
|
144
|
+
- [ ] archive 动作已将文件移入 `.trash/`
|
|
145
|
+
- [ ] update 动作已注入 TODO 标记及提示
|
|
146
|
+
- [ ] rebuild 动作已自动触发 `/quality-sync --full`
|
|
147
|
+
- [ ] `state.json` 已更新 `last_drift_realign` 时间戳
|
|
148
|
+
- [ ] `drift-report-{date}.md` 已生成
|
|
149
|
+
- [ ] `drift-log.jsonl` 已追加
|
|
150
|
+
- [ ] 摘要展示及下一步路由已输出
|
|
151
|
+
</success_criteria>
|
|
@@ -44,7 +44,7 @@ $ARGUMENTS — user intent text, or special flags.
|
|
|
44
44
|
4. **Goal is tool-created** — `A_DECOMPOSE_TASKS` calls `create_goal` with sub-goal success criteria. `update_goal` on convergence; held while aborted/paused
|
|
45
45
|
5. **status.json 唯一真源** — 不生成 `goal-checklist.md`;step 含 `command_scope` + `command_path` + `completion_confirmed`
|
|
46
46
|
6. **Topology awareness** — chain catalog 含 grill / brainstorm / blueprint / analyze-macro(text) / analyze(numeric) / roadmap / plan(三路径) / execute / ...
|
|
47
|
-
6.5. **Grill
|
|
47
|
+
6.5. **Grill auto_mode 透传** — auto_mode 时为 grill step args 追加 `-y`(grill Auto mode 代码代答),stage 不跳过,产出 grill-report/terminology/context-package
|
|
48
48
|
7. **D-007 milestone 反查** — 数字 phase 步骤的 `milestone_id` 由 `state.json.milestones[].phase_slugs` 反查
|
|
49
49
|
8. **schema 向后兼容** — decomposition 字段可选;`steps[]` 由 post-goal-audit 动态生长(goal_ref tagged);既有字段不删不改;`waves` 保留空数组
|
|
50
50
|
9. **Sequential execution** — one step at a time in index order; each step's result read before the next starts
|
|
@@ -155,7 +155,7 @@ Extract:
|
|
|
155
155
|
|
|
156
156
|
| task_type | When user intent is about... |
|
|
157
157
|
|-----------|---------------------------|
|
|
158
|
-
| `grill` | Stress-test, challenge assumptions, Socratic questioning on a plan/idea (**
|
|
158
|
+
| `grill` | Stress-test, challenge assumptions, Socratic questioning on a plan/idea (**auto_mode: 透传 `-y`,grill Auto mode 代码代答,不跳过**) |
|
|
159
159
|
| `quick` | Simple/small task, add a feature, quick change |
|
|
160
160
|
| `blueprint` | Formal spec generation (Product Brief / PRD / Architecture / Epics) |
|
|
161
161
|
| `analyze_macro` | Broad/medium intent w/o numeric phase — explore impact, produce scope_verdict |
|
|
@@ -213,7 +213,7 @@ Extract:
|
|
|
213
213
|
1. `issue_id` present → prefer issue chains
|
|
214
214
|
2. UI/design/界面/页面/原型 → prefer `ui_design`
|
|
215
215
|
3. 正式规格/spec-generate/7-phase → `blueprint` (single-step) 或 `blueprint-driven`
|
|
216
|
-
4. 压力测试/拷问/grill/stress-test → `grill` (single-step); **auto_mode →
|
|
216
|
+
4. 压力测试/拷问/grill/stress-test → `grill` (single-step); **auto_mode → 透传 `-y`,不跳过**
|
|
217
217
|
5. 头脑风暴/探索 → `brainstorm-driven`
|
|
218
218
|
5. Broad/medium intent + 无数字 phase → `analyze_macro`(产 scope_verdict);后续 large→roadmap链;medium/small→`plan_from_analyze`
|
|
219
219
|
6. 已有 analyze artifact 直达 plan → `plan_from_analyze`
|
|
@@ -292,6 +292,7 @@ Read `.workflow/state.json` and route by condition:
|
|
|
292
292
|
```json
|
|
293
293
|
{
|
|
294
294
|
"session_id", "source": "maestro", "intent", "task_type", "chain_name",
|
|
295
|
+
"ralph_protocol_version": "2", "active_step_index": null,
|
|
295
296
|
"phase", "phase_is_new": false, "milestone": "",
|
|
296
297
|
"scope_verdict": null, "analyze_macro_id": null, "blueprint_id": null,
|
|
297
298
|
"auto_mode": false,
|
|
@@ -306,13 +307,18 @@ Read `.workflow/state.json` and route by condition:
|
|
|
306
307
|
"milestone_id": null, "source_artifact_ref": null,
|
|
307
308
|
"status": "pending", "goal_ref": null,
|
|
308
309
|
"completion_confirmed": false, "completion_status": null,
|
|
309
|
-
"completion_evidence": null,
|
|
310
|
+
"completion_evidence": null,
|
|
311
|
+
"completion_summary": null, "completion_decisions": null,
|
|
312
|
+
"completion_caveats": null, "completion_deferred": null,
|
|
313
|
+
"completed_at": null
|
|
310
314
|
}],
|
|
311
315
|
"waves": [], "current_step": 0, "status": "running",
|
|
312
316
|
"boundary_contract": {}, "execution_criteria": [],
|
|
313
317
|
"task_decomposition": [{ "id": "G1", "goal": "", "done_when": "", "evidence": "",
|
|
314
|
-
"status": "pending|done", "completion_confirmed": false, "completed_at": null
|
|
315
|
-
|
|
318
|
+
"status": "pending|done|superseded", "completion_confirmed": false, "completed_at": null,
|
|
319
|
+
"superseded_by": null, "superseded_at": null, "origin": null }],
|
|
320
|
+
"task_decomposition_all_done": false,
|
|
321
|
+
"goal_changelog": []
|
|
316
322
|
}
|
|
317
323
|
```
|
|
318
324
|
Decomposition fields written ONLY if A_DECOMPOSE_TASKS produced them (additive)
|
|
@@ -348,7 +354,7 @@ Direct in-context skill invocation — **replaces the old spawn/wave/CSV mechani
|
|
|
348
354
|
**--from auto-injection**: 当 step 是 `maestro-plan`,args 含 `{phase}` 但无 `--from` 且无 `--dir`,且 `session.context.analysis_dir` 已填充 → 查 state.json 同 phase+milestone 最新 completed analyze artifact → 注入 `--from analyze:{id}`,写 `step.source_artifact_ref`
|
|
349
355
|
2. Mark step `status="running"`, persist status.json + `update_plan` (this step → in_progress)
|
|
350
356
|
3. **Invoke the skill directly**: execute `$skill {resolved_args}` in coordinator context (NO spawn). Read its produced artifacts directly
|
|
351
|
-
4. On success:
|
|
357
|
+
4. On success: mark step `status="done"`. **Structured completion**: `Bash("maestro ralph complete {idx} --status DONE --summary \"...\" [--decisions \"...\"] [--caveats \"...\"] [--deferred \"...\"]")`(`--summary` MUST,动词开头 ≤100 字)。**Barrier-context update** (when step is a context-producing skill):
|
|
352
358
|
| Skill | Read | Context Updates |
|
|
353
359
|
|-------|------|-----------------|
|
|
354
360
|
| maestro-grill | grill-report.md, state.json | grill_id |
|
|
@@ -470,7 +476,7 @@ S_DECISION_EVAL 入口;镜像 maestro-ralph `A_GOAL_AUDIT_EVALUATE`。Condense
|
|
|
470
476
|
| `deploy` | quality-review → maestro-milestone-release |
|
|
471
477
|
| `blueprint-driven` | maestro-init → [B] maestro-blueprint → [B] maestro-plan --from blueprint:{BLP} → [B] maestro-execute → quality-review → manage-harvest --auto |
|
|
472
478
|
| `analyze-macro-driven` | [B] maestro-analyze "{intent}" → ◆ post-analyze-scope → (large: [B] maestro-roadmap --from analyze:{ANL} → [B] maestro-analyze {phase} → [B] maestro-plan {phase}) / (medium\|small: [B] maestro-plan --from analyze:{ANL}) → [B] maestro-execute → quality-review → manage-harvest --auto |
|
|
473
|
-
| `grill-brainstorm` | [B] maestro-grill → [B] maestro-brainstorm --from grill:{GRL} → [B] maestro-plan → [B] maestro-execute → quality-review → manage-harvest --auto (**auto_mode:
|
|
479
|
+
| `grill-brainstorm` | [B] maestro-grill → [B] maestro-brainstorm --from grill:{GRL} → [B] maestro-plan → [B] maestro-execute → quality-review → manage-harvest --auto (**auto_mode: grill 透传 `-y`,Auto mode 代码代答**) |
|
|
474
480
|
| `brainstorm-driven` | [B] maestro-brainstorm → [B] maestro-plan → [B] maestro-execute → quality-review → manage-harvest --auto |
|
|
475
481
|
| `ui-craft-build` | maestro-impeccable build → [B] maestro-plan → [B] maestro-execute → quality-review → manage-harvest --auto |
|
|
476
482
|
| `roadmap-driven` | maestro-init → [B] maestro-roadmap → [B] maestro-plan → [B] maestro-execute → quality-review → manage-harvest --auto |
|
|
@@ -543,6 +549,8 @@ S_DECISION_EVAL 入口;镜像 maestro-ralph `A_GOAL_AUDIT_EVALUATE`。Condense
|
|
|
543
549
|
- [ ] --dry-run shows chain + sub-goal summary, no execution
|
|
544
550
|
- [ ] --continue resumes from first pending step
|
|
545
551
|
- [ ] update_goal released on convergence (A_APPLY_GOAL_DONE / A_FINALIZE); held while aborted
|
|
552
|
+
- [ ] 每个 step completion 含 `--summary`(MUST)+ `--decisions/--caveats/--deferred`(SHOULD)
|
|
553
|
+
- [ ] task_decomposition 支持 `superseded` 状态 + `goal_changelog` 审计轨迹
|
|
546
554
|
|
|
547
555
|
### Report Format
|
|
548
556
|
|