maestro-flow 0.4.10 → 0.4.11
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 +189 -0
- package/.agents/agents/conceptual-planning-agent.md +247 -0
- package/.agents/agents/impeccable-agent.md +101 -0
- package/.agents/agents/team-supervisor.md +145 -0
- package/.agents/agents/team-worker.md +239 -0
- package/.agents/agents/ui-design-agent.md +289 -0
- package/.agents/agents/workflow-analyzer.md +117 -0
- package/.agents/agents/workflow-codebase-mapper.md +79 -0
- package/.agents/agents/workflow-collab-planner.md +145 -0
- package/.agents/agents/workflow-debugger.md +105 -0
- package/.agents/agents/workflow-executor.md +134 -0
- package/.agents/agents/workflow-external-researcher.md +88 -0
- package/.agents/agents/workflow-integration-checker.md +85 -0
- package/.agents/agents/workflow-nyquist-auditor.md +87 -0
- package/.agents/agents/workflow-phase-researcher.md +87 -0
- package/.agents/agents/workflow-plan-checker.md +92 -0
- package/.agents/agents/workflow-planner.md +197 -0
- package/.agents/agents/workflow-project-researcher.md +76 -0
- package/.agents/agents/workflow-research-synthesizer.md +72 -0
- package/.agents/agents/workflow-reviewer.md +84 -0
- package/.agents/agents/workflow-roadmapper.md +83 -0
- package/.agents/agents/workflow-verifier.md +122 -0
- package/.agents/skills/codify-to-knowhow/SKILL.md +169 -0
- package/.agents/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
- package/.agents/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
- package/.agents/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
- package/.agents/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
- package/.agents/skills/learn-decompose/SKILL.md +118 -0
- package/.agents/skills/learn-follow/SKILL.md +129 -0
- package/.agents/skills/learn-investigate/SKILL.md +154 -0
- package/.agents/skills/learn-retro/SKILL.md +159 -0
- package/.agents/skills/learn-second-opinion/SKILL.md +124 -0
- package/.agents/skills/maestro/SKILL.md +224 -0
- package/.agents/skills/maestro-amend/SKILL.md +165 -0
- package/.agents/skills/maestro-analyze/SKILL.md +135 -0
- package/.agents/skills/maestro-brainstorm/SKILL.md +118 -0
- package/.agents/skills/maestro-collab/SKILL.md +174 -0
- package/.agents/skills/maestro-composer/SKILL.md +181 -0
- package/.agents/skills/maestro-execute/SKILL.md +133 -0
- package/.agents/skills/maestro-fork/SKILL.md +88 -0
- package/.agents/skills/maestro-guard/SKILL.md +103 -0
- package/.agents/skills/maestro-help/SKILL.md +266 -0
- package/.agents/skills/maestro-help/index/catalog.json +184 -0
- package/.agents/skills/maestro-help/phases/01-parse-intent.md +122 -0
- package/.agents/skills/maestro-help/phases/02-search-present.md +181 -0
- package/.agents/skills/maestro-help/phases/03-workflow-guide.md +186 -0
- package/.agents/skills/maestro-impeccable/SKILL.md +251 -0
- package/.agents/skills/maestro-init/SKILL.md +80 -0
- package/.agents/skills/maestro-learn/SKILL.md +142 -0
- package/.agents/skills/maestro-merge/SKILL.md +66 -0
- package/.agents/skills/maestro-milestone-audit/SKILL.md +70 -0
- package/.agents/skills/maestro-milestone-complete/SKILL.md +77 -0
- package/.agents/skills/maestro-milestone-release/SKILL.md +98 -0
- package/.agents/skills/maestro-overlay/SKILL.md +180 -0
- package/.agents/skills/maestro-plan/SKILL.md +172 -0
- package/.agents/skills/maestro-player/SKILL.md +177 -0
- package/.agents/skills/maestro-quick/SKILL.md +67 -0
- package/.agents/skills/maestro-ralph/SKILL.md +685 -0
- package/.agents/skills/maestro-ralph-execute/SKILL.md +259 -0
- package/.agents/skills/maestro-roadmap/SKILL.md +170 -0
- package/.agents/skills/maestro-tools-execute/SKILL.md +119 -0
- package/.agents/skills/maestro-tools-register/SKILL.md +159 -0
- package/.agents/skills/maestro-ui-codify/SKILL.md +82 -0
- package/.agents/skills/maestro-update/SKILL.md +178 -0
- package/.agents/skills/maestro-verify/SKILL.md +111 -0
- package/.agents/skills/manage-codebase-rebuild/SKILL.md +77 -0
- package/.agents/skills/manage-codebase-refresh/SKILL.md +59 -0
- package/.agents/skills/manage-harvest/SKILL.md +96 -0
- package/.agents/skills/manage-issue/SKILL.md +75 -0
- package/.agents/skills/manage-issue-discover/SKILL.md +83 -0
- package/.agents/skills/manage-knowhow/SKILL.md +79 -0
- package/.agents/skills/manage-knowhow-capture/SKILL.md +81 -0
- package/.agents/skills/manage-learn/SKILL.md +67 -0
- package/.agents/skills/manage-status/SKILL.md +54 -0
- package/.agents/skills/manage-wiki/SKILL.md +64 -0
- package/.agents/skills/quality-auto-test/SKILL.md +138 -0
- package/.agents/skills/quality-debug/SKILL.md +122 -0
- package/.agents/skills/quality-refactor/SKILL.md +69 -0
- package/.agents/skills/quality-retrospective/SKILL.md +79 -0
- package/.agents/skills/quality-review/SKILL.md +130 -0
- package/.agents/skills/quality-sync/SKILL.md +53 -0
- package/.agents/skills/quality-test/SKILL.md +119 -0
- package/.agents/skills/security-audit/SKILL.md +157 -0
- package/.agents/skills/skill-iter-tune/SKILL.md +384 -0
- package/.agents/skills/skill-iter-tune/phases/01-setup.md +144 -0
- package/.agents/skills/skill-iter-tune/phases/02-execute.md +292 -0
- package/.agents/skills/skill-iter-tune/phases/03-evaluate.md +312 -0
- package/.agents/skills/skill-iter-tune/phases/04-improve.md +186 -0
- package/.agents/skills/skill-iter-tune/phases/05-report.md +166 -0
- package/.agents/skills/skill-iter-tune/specs/evaluation-criteria.md +63 -0
- package/.agents/skills/skill-iter-tune/templates/eval-prompt.md +134 -0
- package/.agents/skills/skill-iter-tune/templates/execute-prompt.md +97 -0
- package/.agents/skills/spec-add/SKILL.md +70 -0
- package/.agents/skills/spec-load/SKILL.md +73 -0
- package/.agents/skills/spec-remove/SKILL.md +53 -0
- package/.agents/skills/spec-setup/SKILL.md +50 -0
- package/.agents/skills/team-coordinate/SKILL.md +268 -0
- package/.agents/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +247 -0
- package/.agents/skills/team-coordinate/roles/coordinator/commands/dispatch.md +131 -0
- package/.agents/skills/team-coordinate/roles/coordinator/commands/monitor.md +358 -0
- package/.agents/skills/team-coordinate/roles/coordinator/role.md +365 -0
- package/.agents/skills/team-coordinate/specs/knowledge-transfer.md +111 -0
- package/.agents/skills/team-coordinate/specs/pipelines.md +97 -0
- package/.agents/skills/team-coordinate/specs/quality-gates.md +112 -0
- package/.agents/skills/team-coordinate/specs/role-spec-template.md +198 -0
- package/.agents/skills/team-executor/SKILL.md +191 -0
- package/.agents/skills/team-executor/roles/executor/commands/monitor.md +239 -0
- package/.agents/skills/team-executor/roles/executor/role.md +171 -0
- package/.agents/skills/team-executor/specs/session-schema.md +264 -0
- package/.agents/skills/team-lifecycle-v4/SKILL.md +211 -0
- package/.agents/skills/team-lifecycle-v4/roles/analyst/role.md +96 -0
- package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +56 -0
- package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +56 -0
- package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +206 -0
- package/.agents/skills/team-lifecycle-v4/roles/coordinator/role.md +130 -0
- package/.agents/skills/team-lifecycle-v4/roles/executor/commands/fix.md +35 -0
- package/.agents/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -0
- package/.agents/skills/team-lifecycle-v4/roles/executor/role.md +69 -0
- package/.agents/skills/team-lifecycle-v4/roles/planner/role.md +87 -0
- package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-code.md +34 -0
- package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +44 -0
- package/.agents/skills/team-lifecycle-v4/roles/reviewer/role.md +71 -0
- package/.agents/skills/team-lifecycle-v4/roles/supervisor/role.md +194 -0
- package/.agents/skills/team-lifecycle-v4/roles/tester/role.md +89 -0
- package/.agents/skills/team-lifecycle-v4/roles/writer/role.md +97 -0
- package/.agents/skills/team-lifecycle-v4/specs/knowledge-transfer.md +114 -0
- package/.agents/skills/team-lifecycle-v4/specs/pipelines.md +140 -0
- package/.agents/skills/team-lifecycle-v4/specs/quality-gates.md +130 -0
- package/.agents/skills/team-lifecycle-v4/templates/architecture.md +254 -0
- package/.agents/skills/team-lifecycle-v4/templates/epics.md +196 -0
- package/.agents/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
- package/.agents/skills/team-lifecycle-v4/templates/requirements.md +224 -0
- package/.agents/skills/team-quality-assurance/SKILL.md +149 -0
- package/.agents/skills/team-quality-assurance/roles/analyst/role.md +90 -0
- package/.agents/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -0
- package/.agents/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +111 -0
- package/.agents/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +250 -0
- package/.agents/skills/team-quality-assurance/roles/coordinator/role.md +143 -0
- package/.agents/skills/team-quality-assurance/roles/executor/role.md +68 -0
- package/.agents/skills/team-quality-assurance/roles/generator/role.md +70 -0
- package/.agents/skills/team-quality-assurance/roles/scout/role.md +77 -0
- package/.agents/skills/team-quality-assurance/roles/strategist/role.md +73 -0
- package/.agents/skills/team-quality-assurance/specs/pipelines.md +115 -0
- package/.agents/skills/team-quality-assurance/specs/team-config.json +131 -0
- package/.agents/skills/team-review/SKILL.md +149 -0
- package/.agents/skills/team-review/roles/coordinator/commands/analyze.md +71 -0
- package/.agents/skills/team-review/roles/coordinator/commands/dispatch.md +91 -0
- package/.agents/skills/team-review/roles/coordinator/commands/monitor.md +224 -0
- package/.agents/skills/team-review/roles/coordinator/role.md +132 -0
- package/.agents/skills/team-review/roles/fixer/role.md +78 -0
- package/.agents/skills/team-review/roles/reviewer/role.md +70 -0
- package/.agents/skills/team-review/roles/scanner/role.md +81 -0
- package/.agents/skills/team-review/specs/dimensions.md +82 -0
- package/.agents/skills/team-review/specs/finding-schema.json +82 -0
- package/.agents/skills/team-review/specs/pipelines.md +102 -0
- package/.agents/skills/team-review/specs/team-config.json +27 -0
- package/.agents/skills/team-tech-debt/SKILL.md +130 -0
- package/.agents/skills/team-tech-debt/roles/assessor/role.md +79 -0
- package/.agents/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -0
- package/.agents/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +156 -0
- package/.agents/skills/team-tech-debt/roles/coordinator/commands/monitor.md +209 -0
- package/.agents/skills/team-tech-debt/roles/coordinator/role.md +123 -0
- package/.agents/skills/team-tech-debt/roles/executor/role.md +78 -0
- package/.agents/skills/team-tech-debt/roles/planner/role.md +71 -0
- package/.agents/skills/team-tech-debt/roles/scanner/role.md +92 -0
- package/.agents/skills/team-tech-debt/roles/validator/role.md +80 -0
- package/.agents/skills/team-tech-debt/specs/pipelines.md +47 -0
- package/.agents/skills/team-tech-debt/specs/team-config.json +129 -0
- package/.agents/skills/team-testing/SKILL.md +145 -0
- package/.agents/skills/team-testing/roles/analyst/role.md +105 -0
- package/.agents/skills/team-testing/roles/coordinator/commands/analyze.md +70 -0
- package/.agents/skills/team-testing/roles/coordinator/commands/dispatch.md +108 -0
- package/.agents/skills/team-testing/roles/coordinator/commands/monitor.md +257 -0
- package/.agents/skills/team-testing/roles/coordinator/role.md +134 -0
- package/.agents/skills/team-testing/roles/executor/role.md +101 -0
- package/.agents/skills/team-testing/roles/generator/role.md +100 -0
- package/.agents/skills/team-testing/roles/strategist/role.md +85 -0
- package/.agents/skills/team-testing/specs/pipelines.md +101 -0
- package/.agents/skills/team-testing/specs/team-config.json +93 -0
- package/.agents/skills/wiki-connect/SKILL.md +64 -0
- package/.agents/skills/wiki-digest/SKILL.md +70 -0
- package/.agents/skills/workflow-skill-designer/SKILL.md +498 -0
- package/.agents/skills/workflow-skill-designer/phases/01-requirements-analysis.md +356 -0
- package/.agents/skills/workflow-skill-designer/phases/02-orchestrator-design.md +444 -0
- package/.agents/skills/workflow-skill-designer/phases/03-phase-design.md +458 -0
- package/.agents/skills/workflow-skill-designer/phases/04-validation.md +471 -0
- package/.agy/skills/maestro/SKILL.md +13 -11
- package/.agy/skills/maestro-ralph/SKILL.md +222 -87
- package/.claude/commands/maestro-ralph.md +222 -87
- package/.claude/commands/maestro.md +13 -11
- package/.codex/skills/maestro/SKILL.md +23 -17
- package/.codex/skills/maestro-ralph/SKILL.md +177 -67
- package/dist/src/commands/install-backend.d.ts +12 -0
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +144 -0
- package/dist/src/commands/install-backend.js.map +1 -1
- package/dist/src/core/component-defs.d.ts +6 -0
- package/dist/src/core/component-defs.d.ts.map +1 -1
- package/dist/src/core/component-defs.js +97 -0
- package/dist/src/core/component-defs.js.map +1 -1
- package/dist/src/tui/install-ui/ExtraMcpConfig.d.ts +11 -0
- package/dist/src/tui/install-ui/ExtraMcpConfig.d.ts.map +1 -0
- package/dist/src/tui/install-ui/ExtraMcpConfig.js +61 -0
- package/dist/src/tui/install-ui/ExtraMcpConfig.js.map +1 -0
- package/dist/src/tui/install-ui/InstallConfirm.d.ts +3 -0
- package/dist/src/tui/install-ui/InstallConfirm.d.ts.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/InstallExecution.d.ts +2 -0
- package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.js +14 -2
- package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.d.ts +1 -1
- package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.js +16 -3
- package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/tui/install-ui/InstallHub.d.ts +2 -0
- package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallHub.js +8 -0
- package/dist/src/tui/install-ui/InstallHub.js.map +1 -1
- package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallResult.js +3 -1
- package/dist/src/tui/install-ui/InstallResult.js.map +1 -1
- package/dist/src/utils/update-notices.js +19 -0
- package/dist/src/utils/update-notices.js.map +1 -1
- package/package.json +5 -2
|
@@ -21,7 +21,7 @@ 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): broad intents (重构/全面/迁移/重写) are boundary-clarified via ≤3 questions, producing 执行准则 + 子目标清单 written into status.json, plus a `goal-checklist.md` and a copy-paste `/goal` prompt for the user to bind.
|
|
24
|
+
Initial decomposition (S_DECOMPOSE): broad intents (重构/全面/迁移/重写) are boundary-clarified via ≤3 questions, producing 执行准则 + 子目标清单 written into status.json, plus a `goal-checklist.md` (a rendered view of status.json) and a copy-paste `/goal` prompt for the user to bind.
|
|
25
25
|
|
|
26
26
|
Three node types:
|
|
27
27
|
- **internal**: `Skill()` call (synchronous, lightweight)
|
|
@@ -34,6 +34,24 @@ Key difference from maestro coordinator:
|
|
|
34
34
|
|
|
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
|
+
|
|
38
|
+
### 执行方式 / Execution Flow
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
/maestro-ralph "intent" ─▶ ralph infer → decompose → build chain
|
|
42
|
+
│ writes status.json (truth)
|
|
43
|
+
│ renders goal-checklist.md (view)
|
|
44
|
+
│ emits /goal prompt
|
|
45
|
+
▼
|
|
46
|
+
ralph-execute ◀─┐ runs next step:
|
|
47
|
+
│ │ internal → Skill()
|
|
48
|
+
│ │ external → delegate (STOP→callback)
|
|
49
|
+
│ │ decision → Skill("maestro-ralph")
|
|
50
|
+
└─────────┘ updates status.json + re-renders checklist
|
|
51
|
+
loop until done | paused
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`status.json` 是唯一真源;checklist 是渲染视图。决策节点是链路生长点(`post-goal-audit` 插入按子目标的 mini-loop;`post-verify/review/test` 插入修复 loop)。评估只走 ralph,执行只走 ralph-execute,两者不互相替代。
|
|
37
55
|
</purpose>
|
|
38
56
|
|
|
39
57
|
<context>
|
|
@@ -68,8 +86,9 @@ Remaining → intent
|
|
|
68
86
|
S_PARSE_ROUTE — 解析参数、路由入口 PERSIST: —
|
|
69
87
|
S_STATUS — 显示 session 进度 PERSIST: —
|
|
70
88
|
S_CONTINUE — 恢复执行 PERSIST: —
|
|
71
|
-
|
|
72
|
-
|
|
89
|
+
S_RESOLVE_PHASE — 解析目标 phase + 标记 phase_is_new PERSIST: session.phase, session.phase_is_new
|
|
90
|
+
S_INFER — 基于已解析 phase 推断 lifecycle_position PERSIST: session.lifecycle_position
|
|
91
|
+
S_QUALITY_MODE — 决定质量管线模式 PERSIST: session.quality_mode
|
|
73
92
|
S_DECOMPOSE — 边界澄清、写执行准则+子目标清单 PERSIST: session.boundary_contract, .execution_criteria, .task_decomposition
|
|
74
93
|
S_BUILD_CHAIN — 构建步骤链 PERSIST: session.steps[]
|
|
75
94
|
S_CREATE_SESSION — 写 status.json PERSIST: session (全量)
|
|
@@ -86,7 +105,7 @@ S_PARSE_ROUTE:
|
|
|
86
105
|
→ S_STATUS WHEN: intent == "status"
|
|
87
106
|
→ S_CONTINUE WHEN: intent == "continue"
|
|
88
107
|
→ S_DECISION_EVAL WHEN: running session with decision step in "running" status
|
|
89
|
-
→
|
|
108
|
+
→ S_RESOLVE_PHASE WHEN: intent is non-empty ← phase 必须先于 position
|
|
90
109
|
→ S_FALLBACK WHEN: no intent AND no running session
|
|
91
110
|
|
|
92
111
|
S_STATUS:
|
|
@@ -96,15 +115,18 @@ S_CONTINUE:
|
|
|
96
115
|
→ S_DISPATCH WHEN: running session found
|
|
97
116
|
→ S_FALLBACK WHEN: no running session DO: display "无运行中的 ralph 会话"
|
|
98
117
|
|
|
99
|
-
S_INFER:
|
|
100
|
-
→ S_RESOLVE_PHASE WHEN: position resolved DO: A_INFER_POSITION
|
|
101
|
-
→ S_FALLBACK WHEN: cannot infer
|
|
102
|
-
|
|
103
118
|
S_RESOLVE_PHASE:
|
|
104
|
-
→
|
|
119
|
+
→ S_INFER WHEN: phase resolved or null DO: A_RESOLVE_PHASE
|
|
105
120
|
→ S_FALLBACK WHEN: ambiguous
|
|
106
121
|
GUARD: auto_confirm does NOT skip phase ambiguity
|
|
107
122
|
|
|
123
|
+
S_INFER:
|
|
124
|
+
→ S_QUALITY_MODE WHEN: position resolved DO: A_INFER_POSITION
|
|
125
|
+
→ S_FALLBACK WHEN: cannot infer
|
|
126
|
+
|
|
127
|
+
S_QUALITY_MODE:
|
|
128
|
+
→ S_DECOMPOSE DO: A_DETERMINE_QUALITY_MODE
|
|
129
|
+
|
|
108
130
|
S_DECOMPOSE:
|
|
109
131
|
→ S_BUILD_CHAIN DO: A_DECOMPOSE_TASKS
|
|
110
132
|
GUARD: broad intent (重构/全面/重写/迁移/overhaul/migrate/rewrite) → MUST clarify boundary even if auto_confirm
|
|
@@ -162,7 +184,36 @@ S_FALLBACK:
|
|
|
162
184
|
1. Find latest ralph session (by created_at)
|
|
163
185
|
2. Display: Session, Status, Position, Progress, Current step
|
|
164
186
|
3. List steps: [✓] completed, [▸] current, [ ] pending, [◆] decision
|
|
165
|
-
4. If `task_decomposition` present
|
|
187
|
+
4. If `task_decomposition` present (graceful skip if absent — backward compat):
|
|
188
|
+
```
|
|
189
|
+
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)
|
|
194
|
+
```
|
|
195
|
+
Reads state directly from `status.json.task_decomposition[*].status` — checklist is just a view, status.json wins on conflict.
|
|
196
|
+
|
|
197
|
+
### A_RESOLVE_PHASE
|
|
198
|
+
|
|
199
|
+
**前置于 A_INFER_POSITION**——position 推断需要先知道 target phase 是否在 state.json 中已存在。
|
|
200
|
+
|
|
201
|
+
**Priority (产出 `phase` + `phase_is_new` 二元组):**
|
|
202
|
+
|
|
203
|
+
| Step | 行为 | phase_is_new |
|
|
204
|
+
|------|------|--------------|
|
|
205
|
+
| 1 | intent 匹配 `phase\s*(\d+)` 正则 → 取 state.json 中对应 phase | false |
|
|
206
|
+
| 2 | intent 派生短语(如 "docs-site-redesign", "auth-refactor")→ 在 state.json.milestones[*].phases / artifacts[*].path 中查找 | false (匹配) / true (无匹配) |
|
|
207
|
+
| 3 | 未派生 → 取最新 in-progress artifact 的 phase | false |
|
|
208
|
+
| 4 | 仍无 → state.json 首个 incomplete phase | false |
|
|
209
|
+
| 5 | position 将是 brainstorm/init/roadmap → phase = null | n/a |
|
|
210
|
+
| 6 | 仍模糊 → `AskUserQuestion`(新 phase / 已存在 phase 二选一) | 由用户回答确定 |
|
|
211
|
+
|
|
212
|
+
**写入 session**: `phase`(字符串或 null)+ `phase_is_new`(bool)。`phase_is_new=true` 表示当前 milestone 下需要为这个 phase 创建全套生命周期(A_INFER_POSITION 据此强制起始位置)。
|
|
213
|
+
|
|
214
|
+
**新派生 phase 时 milestone 处理**:
|
|
215
|
+
- 若 state.json 当前 milestone 仍 active → 沿用当前 milestone,仅新增 phase
|
|
216
|
+
- 若 intent 同时派生了新 milestone 名(如 "M1-visual-replication")→ 写入 session 但**仅作标签**;state.json.milestones 由后续 `maestro-roadmap` / `maestro-milestone-release` 真实创建。session 层面禁止虚构 milestone 直接改 state.json
|
|
166
217
|
|
|
167
218
|
### A_INFER_POSITION
|
|
168
219
|
|
|
@@ -175,18 +226,22 @@ S_FALLBACK:
|
|
|
175
226
|
| No `.workflow/` + no source files | `brainstorm` |
|
|
176
227
|
| No `.workflow/` + has source files | `init` |
|
|
177
228
|
| Has `.workflow/` but no state.json | `init` |
|
|
178
|
-
| Has state.json | →
|
|
229
|
+
| Has state.json | → phase-aware artifact inference |
|
|
179
230
|
|
|
180
|
-
**
|
|
231
|
+
**Phase-aware artifact inference** (使用 A_RESOLVE_PHASE 已写入的 `session.phase` + `session.phase_is_new`):
|
|
181
232
|
|
|
182
|
-
|
|
|
183
|
-
|
|
233
|
+
| Condition | Position |
|
|
234
|
+
|-----------|----------|
|
|
235
|
+
| `phase_is_new == true` (intent 派生的新 phase, state.json 中无) | **`analyze`** (强制从头起) |
|
|
184
236
|
| no milestones or no roadmap.md | `roadmap` |
|
|
185
|
-
|
|
|
186
|
-
|
|
|
187
|
-
|
|
|
188
|
-
|
|
|
189
|
-
|
|
|
237
|
+
| `phase == null` (brainstorm/init/roadmap 已由 override 决定) | n/a |
|
|
238
|
+
| phase 已存在 + 无任何 artifact | `analyze` |
|
|
239
|
+
| phase 已存在 + 最新 artifact = analyze | `plan` |
|
|
240
|
+
| phase 已存在 + 最新 artifact = plan | `execute` |
|
|
241
|
+
| phase 已存在 + 最新 artifact = execute | `verify` |
|
|
242
|
+
| phase 已存在 + 最新 artifact = verify | → refine from result files |
|
|
243
|
+
|
|
244
|
+
**关键不变量**:artifact 过滤必须用 `session.phase`(A_RESOLVE_PHASE 已写入),而不是 state.json.current_phase。当 `phase_is_new` 时跳过过滤直接走 `analyze`,避免错用其他 phase 的 artifact 推断。
|
|
190
245
|
|
|
191
246
|
**Refine from verify results:**
|
|
192
247
|
|
|
@@ -199,9 +254,17 @@ S_FALLBACK:
|
|
|
199
254
|
| uat.md: all passed | `milestone-audit` |
|
|
200
255
|
| uat.md: has failures | `test-failed` |
|
|
201
256
|
|
|
202
|
-
###
|
|
257
|
+
### A_DETERMINE_QUALITY_MODE
|
|
203
258
|
|
|
204
|
-
|
|
259
|
+
决定下游质量管线长度。读 `session.quality_mode_override`(CLI 标志 `--quality`),无则按规则推断:
|
|
260
|
+
|
|
261
|
+
| Condition | Mode | Pipeline (verify 之后) |
|
|
262
|
+
|-----------|------|-------------------------|
|
|
263
|
+
| Has `specs/REQ-*.md` + 当前 phase 业务范围明确 | `full` | business-test → review → test-gen → test |
|
|
264
|
+
| Default | `standard` | review → test-gen (当 coverage<80%) → test |
|
|
265
|
+
| `--quality quick` | `quick` | review --tier quick |
|
|
266
|
+
|
|
267
|
+
写入 `session.quality_mode`。A_BUILD_STEPS 据此过滤 stage(见下)。
|
|
205
268
|
|
|
206
269
|
### A_DECOMPOSE_TASKS
|
|
207
270
|
|
|
@@ -242,37 +305,52 @@ narrow → derive defaults from intent + codebase, skip questions.
|
|
|
242
305
|
|
|
243
306
|
### A_BUILD_STEPS
|
|
244
307
|
|
|
245
|
-
Generate steps from lifecycle_position to milestone-complete
|
|
246
|
-
|
|
247
|
-
| Stage | Skill | Type | Decision after |
|
|
248
|
-
|
|
249
|
-
| brainstorm | `maestro-brainstorm "{intent}"` | external | — |
|
|
250
|
-
| init | `maestro-init` | internal | — |
|
|
251
|
-
| roadmap | `maestro-roadmap "{intent}"` | internal | — |
|
|
252
|
-
| analyze | `maestro-analyze {phase}` | external | — |
|
|
253
|
-
| plan | `maestro-plan {phase}` | internal | — |
|
|
254
|
-
| execute | `maestro-execute {phase}` | external | — |
|
|
255
|
-
| verify | `maestro-verify {phase}` | internal | `post-verify` |
|
|
256
|
-
| business-test | `quality-auto-test {phase}` | internal | `post-business-test` |
|
|
257
|
-
| review | `quality-review {phase}` | internal | `post-review` |
|
|
258
|
-
| test-gen | `quality-auto-test {phase}` | internal | — |
|
|
259
|
-
| test | `quality-test {phase}` | internal | `post-test` |
|
|
260
|
-
| milestone-audit | `maestro-milestone-audit` | internal | — |
|
|
261
|
-
| goal-audit | *(decision-only, no skill)* | decision | `post-goal-audit` |
|
|
262
|
-
| milestone-complete | `maestro-milestone-complete` | internal | `post-milestone` |
|
|
263
|
-
|
|
264
|
-
`goal-audit` row is inserted **only when `task_decomposition` present**, immediately before `milestone-complete`. It is a pure decision node (no skill step) — its job is to re-check the goal-checklist and **dynamically grow `steps[]`** for unmet sub-goals.
|
|
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}"` | external | — | all |
|
|
313
|
+
| init | `maestro-init` | internal | — | all |
|
|
314
|
+
| roadmap | `maestro-roadmap "{intent}"` | internal | — | all |
|
|
315
|
+
| analyze | `maestro-analyze {phase}` | external | — | all |
|
|
316
|
+
| plan | `maestro-plan {phase}` | internal | — | all |
|
|
317
|
+
| execute | `maestro-execute {phase}` | external | — | all |
|
|
318
|
+
| verify | `maestro-verify {phase}` | internal | `post-verify` | all |
|
|
319
|
+
| business-test | `quality-auto-test {phase}` | internal | `post-business-test` | **full only** |
|
|
320
|
+
| review | `quality-review {phase}` | internal | `post-review` | all (quick: append `--tier quick`) |
|
|
321
|
+
| test-gen | `quality-auto-test {phase}` | internal | — | full / standard if coverage<80% |
|
|
322
|
+
| test | `quality-test {phase}` | internal | `post-test` | full, standard |
|
|
323
|
+
| milestone-audit | `maestro-milestone-audit` | internal | — | all |
|
|
324
|
+
| goal-audit | *(decision-only, no skill)* | decision | `post-goal-audit` | all (only if decomposed) |
|
|
325
|
+
| milestone-complete | `maestro-milestone-complete` | internal | `post-milestone` | all (chain 终点) |
|
|
265
326
|
|
|
266
327
|
Type rationale: `internal` = Skill(), lightweight/interactive; `external` = delegate --to claude, context-isolated heavy computation
|
|
267
328
|
|
|
268
|
-
Build rules
|
|
329
|
+
**Build rules (按顺序应用):**
|
|
330
|
+
|
|
331
|
+
1. **起点**:从 `session.lifecycle_position` 开始;不读 `state.json.current_phase`
|
|
332
|
+
2. **跳过已完成**:跳过当前 milestone+phase 下已有 completed artifact 的 stage(artifact 过滤同样按 `session.phase`,不按 state.json 当前 phase)
|
|
333
|
+
3. **quality_mode 过滤**:按 `session.quality_mode` 排除上表 `quality_mode` 列不包含该模式的 stage(如 standard 不跑 business-test、quick 不跑 test-gen/test)
|
|
334
|
+
4. **决策节点**:每个 Decision after 非空的 stage 之后插入 `{ type: "decision", decision: "<gate>", retry_count: 0, max_retries: 2 }`
|
|
335
|
+
5. **goal-audit 插入**:当且仅当 `task_decomposition` 存在 → 在最后一个 evidence-producing stage(verify/review/test)之后、`milestone-complete` 之前插入 `decision:post-goal-audit`
|
|
336
|
+
6. **终点硬约束**:chain 必须以 `milestone-complete` 步骤结尾(除非 `lifecycle_position` 已是 `milestone-complete` 之后的状态)。生成器在收尾时不论 quality_mode 都必须 append 该 step
|
|
337
|
+
7. **初始 goal_ref 传播**:若 `task_decomposition` 存在,遍历每个新建 step:
|
|
338
|
+
- 计算 `step.stage`(如 execute/verify/review)
|
|
339
|
+
- 对每个 `g ∈ task_decomposition`:若 `step.stage ∈ g.lifecycle` → `step.goal_ref = g.id`
|
|
340
|
+
- 多 G 匹配 → 取 id 字典序最小者;保证 verify/review 等共用 lifecycle 的 step 也有可追溯标签
|
|
341
|
+
- decision 节点不打 goal_ref(goal-audit 自身除外,它的 verdict 直接修改 task_decomposition)
|
|
342
|
+
8. **占位符**:args 用 `{phase}` `{intent}` 等,由 ralph-execute 在执行时解析
|
|
343
|
+
9. **动态插入**:`post-goal-audit` 触发 A_APPLY_GOAL_FIX 时插入的步骤同样按规则 7 打 `goal_ref`(追溯到触发它的子目标 G{n})
|
|
269
344
|
|
|
270
345
|
### A_CREATE_SESSION
|
|
271
346
|
|
|
272
|
-
1. Write `.workflow/.maestro/ralph-{YYYYMMDD-HHmmss}/status.json` (
|
|
273
|
-
2. If `task_decomposition` present:
|
|
347
|
+
1. Write `.workflow/.maestro/ralph-{YYYYMMDD-HHmmss}/status.json` (Appendix: Session Schema) — decomposition fields included only if produced (additive)
|
|
348
|
+
2. If `task_decomposition` present:
|
|
349
|
+
- Set `session.goal_checklist_path = "{session_dir}/goal-checklist.md"` in status.json
|
|
350
|
+
- **Render** checklist from status.json (Appendix: Goal Checklist Template + Sync Rule). This is a one-way projection — status.json drives content; the file is never hand-edited
|
|
351
|
+
- Stable filename within session (so `/goal` condition string survives context compaction)
|
|
274
352
|
3. Display chain overview with step list
|
|
275
|
-
4. If `task_decomposition` present: display the **Goal Prompt block** (Appendix: Goal Prompt Template) — the copy-paste `/goal …` line
|
|
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
|
|
276
354
|
|
|
277
355
|
### A_DELEGATE_EVALUATE
|
|
278
356
|
|
|
@@ -311,20 +389,37 @@ Build rules: start from position, skip completed, insert decision nodes with `{
|
|
|
311
389
|
|
|
312
390
|
### A_GOAL_AUDIT_EVALUATE
|
|
313
391
|
|
|
314
|
-
Re-checks
|
|
392
|
+
Re-checks sub-goals against `status.json` (source of truth) and decides whether `steps[]` must dynamically grow. Only runs when `task_decomposition` present.
|
|
315
393
|
|
|
316
|
-
1. Read `session.task_decomposition`
|
|
394
|
+
1. Read `session.task_decomposition` from status.json (NOT from checklist — checklist is just a view)
|
|
317
395
|
2. For each sub-goal `status != "done"`: resolve its `evidence` artifact (verification.json / review.json / uat.md / test path) under the current phase scratch dir
|
|
318
396
|
3. Delegate read-only audit (run_in_background, STOP, wait):
|
|
319
397
|
```
|
|
320
|
-
maestro delegate "PURPOSE:
|
|
321
|
-
TASK:
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
398
|
+
maestro delegate "PURPOSE: 审计未完成子目标,判定哪些已达成、哪些仍需补步骤
|
|
399
|
+
TASK:
|
|
400
|
+
1. 读取 status.json.task_decomposition 中每个 status!=done 的子目标
|
|
401
|
+
2. 打开其 evidence 产物,对照 done_when 严格判定
|
|
402
|
+
3. 输出 met / unmet 分类,unmet 给出差距 + 应回补的 target_phase
|
|
403
|
+
CONTEXT:
|
|
404
|
+
status.json = {session_dir}/status.json
|
|
405
|
+
checklist = {goal_checklist_path} (人类可读视图,仅供参考)
|
|
406
|
+
evidence = {evidence artifacts}
|
|
407
|
+
执行准则 = {execution_criteria}
|
|
408
|
+
边界契约 = {boundary_contract}
|
|
409
|
+
EXPECTED (单行 verdict 块,严格遵循):
|
|
410
|
+
---VERDICT---
|
|
411
|
+
STATUS=all_met|has_unmet
|
|
412
|
+
UNMET=[{id:G2,gap:'...',target_phase:execute}, ...] # 空数组当 STATUS=all_met
|
|
413
|
+
CONFIDENCE_SCORE=0-100
|
|
414
|
+
---END---
|
|
415
|
+
CONSTRAINTS:
|
|
416
|
+
- 只评估,不修改任何文件
|
|
417
|
+
- 严格按 done_when 判定;evidence 缺失 → 视为 unmet
|
|
418
|
+
- 不得建议超出 boundary_contract 的修改
|
|
419
|
+
"
|
|
325
420
|
--role analyze --mode analysis
|
|
326
421
|
```
|
|
327
|
-
4. On callback: parse UNMET list.
|
|
422
|
+
4. On callback: parse UNMET list. **status.json is the write target** — for each met sub-goal: `task_decomposition[i].status="done"` + `task_decomposition[i].completed_at=now`. Then regenerate checklist view from status.json (see Sync Rule in Appendix).
|
|
328
423
|
5. **Decision log**: append to `{session_dir}/decisions.ndjson` with `"type": "goal-gate"`, `unmet_count`, `unmet_ids`
|
|
329
424
|
6. Verdict: `all_met` → A_APPLY_GOAL_DONE; `has_unmet` → A_APPLY_GOAL_FIX
|
|
330
425
|
GUARD: retry_count >= max_retries AND still unmet → A_APPLY_ESCALATE (insert quality-debug, hand to human)
|
|
@@ -357,10 +452,10 @@ Re-checks the goal-checklist and decides whether `steps[]` must dynamically grow
|
|
|
357
452
|
|
|
358
453
|
### A_APPLY_GOAL_DONE
|
|
359
454
|
|
|
360
|
-
1.
|
|
361
|
-
2.
|
|
455
|
+
1. Write status.json (source of truth): set every `task_decomposition[*].status="done"`, `completed_at=now`, plus top-level `task_decomposition_all_done=true`
|
|
456
|
+
2. Regenerate `goal-checklist.md` from status.json (Sync Rule in Appendix) — all boxes flip to `[x]`, sentinel `ALL_GOALS_DONE` appended at file end
|
|
362
457
|
3. Mark goal-audit decision completed; proceed to `milestone-complete`
|
|
363
|
-
4. Display: ◆ Goal audit: 全部子目标达成 ✓ — checklist
|
|
458
|
+
4. Display: ◆ Goal audit: 全部子目标达成 ✓ — status.json + checklist 已同步 ALL_GOALS_DONE
|
|
364
459
|
|
|
365
460
|
### A_ADVANCE_MILESTONE
|
|
366
461
|
|
|
@@ -387,8 +482,9 @@ Re-checks the goal-checklist and decides whether `steps[]` must dynamically grow
|
|
|
387
482
|
"session_id": "ralph-{YYYYMMDD-HHmmss}",
|
|
388
483
|
"source": "ralph", "status": "running",
|
|
389
484
|
"intent": "", "lifecycle_position": "",
|
|
390
|
-
"phase": null, "milestone": "",
|
|
391
|
-
"auto_mode": false,
|
|
485
|
+
"phase": null, "phase_is_new": false, "milestone": "",
|
|
486
|
+
"auto_mode": false,
|
|
487
|
+
"quality_mode": "standard", // "full" | "standard" | "quick" — 由 A_DETERMINE_QUALITY_MODE 写入
|
|
392
488
|
"cli_tool": "claude", "passed_gates": [],
|
|
393
489
|
"context": { "issue_id": null, "scratch_dir": null, "plan_dir": null,
|
|
394
490
|
"analysis_dir": null, "brainstorm_dir": null },
|
|
@@ -404,15 +500,18 @@ Re-checks the goal-checklist and decides whether `steps[]` must dynamically grow
|
|
|
404
500
|
"execution_criteria": [],
|
|
405
501
|
"task_decomposition": [
|
|
406
502
|
{ "id": "G1", "goal": "", "boundary": "", "done_when": "",
|
|
407
|
-
"evidence": "", "lifecycle": [], "status": "pending|done"
|
|
503
|
+
"evidence": "", "lifecycle": [], "status": "pending|done",
|
|
504
|
+
"completed_at": null }
|
|
408
505
|
],
|
|
409
|
-
"
|
|
506
|
+
"task_decomposition_all_done": false,
|
|
507
|
+
"goal_checklist_path": "",
|
|
508
|
+
"goal_checklist_synced_at": null
|
|
410
509
|
}
|
|
411
510
|
```
|
|
412
511
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
512
|
+
**扩展约定**:
|
|
513
|
+
- Schema 加字段 = 可选(缺省 = 旧行为);不删/不改既有字段名。
|
|
514
|
+
- `steps[]` 是活数组:`post-goal-audit` 与 `post-verify/review/test` 等决策节点按需追加+重排,子目标收敛即停。`goal_ref`(可选)回溯每条动态插入步骤所属子目标。
|
|
416
515
|
|
|
417
516
|
### Fix-Loop Templates
|
|
418
517
|
|
|
@@ -472,48 +571,76 @@ decision:post-goal-audit {retry+1}
|
|
|
472
571
|
```
|
|
473
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.
|
|
474
573
|
|
|
475
|
-
### Goal Checklist Template
|
|
574
|
+
### Goal Checklist Template (status.json projection)
|
|
476
575
|
|
|
477
|
-
|
|
576
|
+
`{session_dir}/goal-checklist.md` 是 `status.json` 的只读投影:不要手改,永远从 JSON 重渲染。文件名在 session 内稳定,`/goal` 条件字符串跨上下文压缩仍可用。
|
|
478
577
|
|
|
479
578
|
```markdown
|
|
480
579
|
# Ralph Goal Checklist — {session_id}
|
|
481
|
-
|
|
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 触发时也走这条路径。
|
|
482
592
|
|
|
483
593
|
## 执行准则 / Execution Criteria
|
|
594
|
+
<!-- status.json#/execution_criteria -->
|
|
484
595
|
- {criterion 1}
|
|
485
596
|
- {criterion 2}
|
|
486
597
|
|
|
487
598
|
## 边界契约 / Boundary Contract
|
|
488
|
-
|
|
489
|
-
-
|
|
490
|
-
-
|
|
491
|
-
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
- [ ]
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
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 -->
|
|
500
619
|
```
|
|
501
620
|
|
|
502
|
-
|
|
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` 字段 → 不动作。
|
|
503
630
|
|
|
504
631
|
### Goal Prompt Template
|
|
505
632
|
|
|
506
|
-
|
|
633
|
+
链路概览后逐字显示(仅当 decomposition 已产出):
|
|
507
634
|
|
|
508
635
|
```
|
|
509
|
-
📋
|
|
636
|
+
📋 任务分解完成。复制下面一行设定目标,会话在子目标全部达成前不停:
|
|
510
637
|
|
|
511
|
-
/goal
|
|
638
|
+
/goal 目标达成条件: {session_dir}/status.json 中 task_decomposition[*].status 全部为 "done"(等价: {session_dir}/goal-checklist.md 末尾含 ALL_GOALS_DONE)。未达成时: 阅读 {session_dir}/goal-checklist.md 取得"执行准则/边界契约/子目标"作为行动手册, 然后调用 /maestro-ralph continue 推进下一步; 严禁手动执行 skill 或越界修改 status.json.boundary_contract.out_of_scope。
|
|
512
639
|
|
|
513
|
-
|
|
640
|
+
随后运行 /maestro-ralph continue 立即开始执行。
|
|
514
641
|
```
|
|
515
642
|
|
|
516
|
-
|
|
643
|
+
`/goal` 是 harness 命令,仅用户能输入;ralph 只能输出此提示词。判据以 status.json 为权威,哨兵为等价信号,避免视图漂移误判。
|
|
517
644
|
|
|
518
645
|
### Error Codes
|
|
519
646
|
|
|
@@ -531,14 +658,22 @@ Displayed verbatim after the chain overview (only when decomposition produced):
|
|
|
531
658
|
|
|
532
659
|
### Success Criteria
|
|
533
660
|
|
|
661
|
+
- [ ] Phase 先于 position 解析(S_RESOLVE_PHASE → S_INFER → S_QUALITY_MODE);phase_is_new 标记写入 session
|
|
662
|
+
- [ ] phase_is_new=true 时 lifecycle_position 强制为 `analyze`(禁止用其他 phase 的 artifact 推断)
|
|
663
|
+
- [ ] artifact 过滤始终按 session.phase(不读 state.json.current_phase)
|
|
664
|
+
- [ ] quality_mode 显式由 A_DETERMINE_QUALITY_MODE 决定(full/standard/quick),过滤 build steps
|
|
534
665
|
- [ ] State parsed, position inferred from bootstrap + artifacts + result files
|
|
535
666
|
- [ ] Decomposition runs as initial step; broad intent boundary-clarified via ≤3 questions (ignores auto_confirm); narrow auto-derives
|
|
536
667
|
- [ ] status.json enriched additively with boundary_contract + execution_criteria + task_decomposition; absent fields = old behavior preserved
|
|
537
|
-
- [ ] goal-checklist.md
|
|
538
|
-
- [ ]
|
|
668
|
+
- [ ] status.json is single source of truth; goal-checklist.md is a regenerated projection (Sync Rule), never hand-edited
|
|
669
|
+
- [ ] goal-checklist.md carries explicit `status.json#/task_decomposition[i]` JSON-pointer refs per entry + last-sync timestamp
|
|
670
|
+
- [ ] Mutations to task_decomposition trigger checklist re-render; ALL_GOALS_DONE sentinel appended only when all entries status=done
|
|
671
|
+
- [ ] Goal Prompt names status.json as the authoritative judgement source, with ALL_GOALS_DONE sentinel as equivalent signal
|
|
539
672
|
- [ ] post-goal-audit decision node inserted before milestone-complete (only when decomposed)
|
|
540
673
|
- [ ] Unmet sub-goals DYNAMICALLY grow steps[] via scoped per-goal mini-loops (goal_ref tagged), looping until all_met or max retries → escalate
|
|
541
|
-
- [ ] Quality pipeline
|
|
674
|
+
- [ ] Quality pipeline 按 quality_mode 生成(full=全管线 / standard=skip business-test / quick=仅 review --tier quick)
|
|
675
|
+
- [ ] Chain 末端硬约束:必须以 `milestone-complete` 结尾(goal-audit decision 紧前)
|
|
676
|
+
- [ ] 初始构建按 task_decomposition[*].lifecycle 给每个 step 打 goal_ref(verify/review 等共用 lifecycle 的 step 也有标签)
|
|
542
677
|
- [ ] Decision nodes delegate-evaluated via maestro delegate --role analyze
|
|
543
678
|
- [ ] Verdict parsed with confidence adjustment
|
|
544
679
|
- [ ] Fix-loop templates applied with retry tracking
|
|
@@ -138,18 +138,20 @@ S_FALLBACK:
|
|
|
138
138
|
|
|
139
139
|
### A_DECOMPOSE_TASKS
|
|
140
140
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
1.
|
|
144
|
-
2.
|
|
145
|
-
3.
|
|
146
|
-
4.
|
|
147
|
-
5.
|
|
148
|
-
6.
|
|
141
|
+
与 maestro-ralph `A_DECOMPOSE_TASKS` 共享分解契约 —— 引用该规范,不重复表格。Condensed:
|
|
142
|
+
|
|
143
|
+
1. 分类意图广度(broad: 重构/全面/重写/迁移/overhaul/migrate/rewrite;narrow: 单文件/函数/bug)。narrow / 单步 / `{status,init,quick}` 链直接跳过
|
|
144
|
+
2. broad/medium → `AskUserQuestion` ≤3 轮:Scope(in/out)| Constraints(兼容/API/perf/test)| Definition of Done
|
|
145
|
+
3. 派生 `execution_criteria`(3-6 条命令式规则)+ `task_decomposition`(outcome 子目标,`done_when` 客观可校验,绑定到 ralph 产物:verification.json / review.json / uat.md / test path)
|
|
146
|
+
4. **status.json 为唯一真源**:写入 `boundary_contract` / `execution_criteria` / `task_decomposition` / `goal_checklist_path`;从 status.json 投影渲染 `{session_dir}/goal-checklist.md`(同 maestro-ralph 的 Sync Rule,含 Resume 区块指向 `/maestro-ralph continue`)
|
|
147
|
+
5. 在链路末尾(evidence 产出步骤之后、milestone-complete/close-out 之前)追加 `{ type: "decision", decision: "post-goal-audit", retry_count: 0, max_retries: 2 }`。ralph-execute 在该节点动态生长 `steps[]` 以收敛未达成子目标
|
|
148
|
+
6. **输出 `/goal` 绑定提示词(参考文档 + 内嵌 ralph 调用):**
|
|
149
149
|
```
|
|
150
|
-
📋
|
|
151
|
-
|
|
150
|
+
📋 任务分解完成。复制下面一行设定目标,会话在子目标全部达成前不停:
|
|
151
|
+
|
|
152
|
+
/goal 目标达成条件: {session_dir}/status.json 中 task_decomposition[*].status 全部为 "done"(等价: {session_dir}/goal-checklist.md 末尾含 ALL_GOALS_DONE)。未达成时: 阅读 {session_dir}/goal-checklist.md 取得"执行准则/边界契约/子目标"作为行动手册, 然后调用 /maestro-ralph continue 推进下一步; 严禁手动执行 skill 或越界。
|
|
152
153
|
```
|
|
154
|
+
`/goal` 仅用户可输入;判据以 status.json 为权威,哨兵为等价信号。
|
|
153
155
|
|
|
154
156
|
### A_CREATE_SESSION
|
|
155
157
|
|
|
@@ -207,7 +209,7 @@ Unlisted commands have no auto flags.
|
|
|
207
209
|
|
|
208
210
|
- [ ] Intent classified with task_type, complexity, clarity_score
|
|
209
211
|
- [ ] Broad lifecycle intents decomposed (S_DECOMPOSE, ≤3 boundary questions) sharing maestro-ralph contract; narrow/single-step skip
|
|
210
|
-
- [ ]
|
|
212
|
+
- [ ] status.json 为唯一真源;goal-checklist.md 为投影视图(Resume 区块内嵌 `/maestro-ralph continue`);post-goal-audit 节点追加;/goal 提示词内含"读 checklist + 调 /maestro-ralph continue"双重指引
|
|
211
213
|
- [ ] Chain selected and confirmed (or auto-confirmed)
|
|
212
214
|
- [ ] Session dir created with status.json before execution; decomposition fields additive-only
|
|
213
215
|
- [ ] Tracking via TodoWrite (Claude); status.json steps[] grown dynamically by ralph-execute post-goal-audit
|
|
@@ -251,18 +251,18 @@ Read `.workflow/state.json` and route by condition:
|
|
|
251
251
|
|
|
252
252
|
### A_DECOMPOSE_TASKS
|
|
253
253
|
|
|
254
|
-
|
|
254
|
+
与 maestro-ralph `A_DECOMPOSE_TASKS` 共享分解契约 —— 引用该规范,不重复。Condensed:
|
|
255
255
|
|
|
256
|
-
1.
|
|
257
|
-
2.
|
|
258
|
-
3.
|
|
259
|
-
4.
|
|
260
|
-
5.
|
|
256
|
+
1. 分类意图广度。narrow / 单步 / `{status,init,quick}` 链跳过
|
|
257
|
+
2. broad/medium → `AskUserQuestion` ≤3 轮:Scope(in/out)| Constraints(兼容/API/perf/test)| Definition of Done
|
|
258
|
+
3. 派生 `execution_criteria`(3-6 条命令式规则)+ `task_decomposition`(outcome 子目标,`done_when` 可校验,绑定到 ralph evidence 产物)
|
|
259
|
+
4. **status.json 为唯一真源**:写入 `boundary_contract` / `execution_criteria` / `task_decomposition` / `goal_checklist_path`;从 status.json 投影渲染 `{session_dir}/goal-checklist.md`(同 maestro-ralph Sync Rule,含 Resume 区块指向 `$maestro --continue`)
|
|
260
|
+
5. 链路末尾(evidence 产出步骤后、milestone-complete/close-out 前)追加 `{ type: "decision", decision: "post-goal-audit", retry_count: 0, max_retries: 2 }`。S_DECISION_EVAL 在该节点动态生长 `steps[]`
|
|
261
261
|
6. **Register goal via `create_goal`:**
|
|
262
262
|
```
|
|
263
263
|
create_goal({ objective: "Maestro {chain}: {intent} — converge {N} sub-goals within boundary",
|
|
264
264
|
success_criteria: task_decomposition.map(g => `${g.id}: ${g.done_when}`),
|
|
265
|
-
constraints: [...execution_criteria, "stay within boundary_contract"] })
|
|
265
|
+
constraints: [...execution_criteria, "stay within boundary_contract; resume via $maestro --continue"] })
|
|
266
266
|
```
|
|
267
267
|
|
|
268
268
|
### A_CREATE_SESSION
|
|
@@ -277,9 +277,13 @@ Shares the decomposition contract with maestro-ralph `A_DECOMPOSE_TASKS` — **r
|
|
|
277
277
|
"steps": [{ "index", "type": "skill|decision", "skill", "args", "status": "pending", "goal_ref": null }],
|
|
278
278
|
"waves": [], "current_step": 0, "status": "running",
|
|
279
279
|
"_comment": "↓ OPTIONAL additive block — present only if S_DECOMPOSE ran; absent → flat-chain behavior",
|
|
280
|
-
"boundary_contract": {}, "execution_criteria": [],
|
|
280
|
+
"boundary_contract": {}, "execution_criteria": [],
|
|
281
|
+
"task_decomposition": [{ "id": "G1", "goal": "", "done_when": "", "evidence": "", "status": "pending|done", "completed_at": null }],
|
|
282
|
+
"task_decomposition_all_done": false,
|
|
283
|
+
"goal_checklist_path": "", "goal_checklist_synced_at": null }
|
|
281
284
|
```
|
|
282
285
|
Decomposition fields written ONLY if A_DECOMPOSE_TASKS produced them (additive)
|
|
286
|
+
4. goal-checklist.md 是 status.json 的投影:从 task_decomposition 渲染(同 maestro-ralph Sync Rule);Resume 区块写入 `$maestro --continue`
|
|
283
287
|
4. Initialize tracking:
|
|
284
288
|
- If decomposed: goal already registered by A_DECOMPOSE_TASKS. Else: `create_goal({ objective: "Maestro {chain}: {N} steps [{skill list}]" })`
|
|
285
289
|
- `update_plan({ plan: steps.map(step => ({ step, status: "pending" })) })`
|
|
@@ -310,13 +314,13 @@ Direct in-context skill invocation — **replaces the old spawn/wave/CSV mechani
|
|
|
310
314
|
|
|
311
315
|
### A_GOAL_AUDIT_EVALUATE
|
|
312
316
|
|
|
313
|
-
|
|
317
|
+
S_DECISION_EVAL 入口;镜像 maestro-ralph `A_GOAL_AUDIT_EVALUATE`。Condensed:
|
|
314
318
|
|
|
315
|
-
1.
|
|
316
|
-
2.
|
|
317
|
-
3.
|
|
318
|
-
4.
|
|
319
|
-
5.
|
|
319
|
+
1. 读 `session.task_decomposition`(status.json,真源)
|
|
320
|
+
2. 对每个 `status != "done"` 的子目标:解析 `evidence` 产物
|
|
321
|
+
3. `maestro delegate --role analyze --mode analysis` 读取 evidence、对照 done_when 判定,返回 `STATUS=all_met|has_unmet / UNMET=[{id,gap,target_phase}] / CONFIDENCE_SCORE`
|
|
322
|
+
4. status.json 为写入目标:每个达成子目标 `status="done"` + `completed_at=now`;然后从 status.json 重渲染 checklist(Sync Rule)
|
|
323
|
+
5. Verdict(`all_met` / `has_unmet`)由 S_DECISION_EVAL 消费。GUARD: retry >= max_retries AND still unmet → escalate
|
|
320
324
|
|
|
321
325
|
### A_APPLY_GOAL_FIX
|
|
322
326
|
|
|
@@ -324,9 +328,10 @@ Entry action of S_DECISION_EVAL — mirrors maestro-ralph `A_GOAL_AUDIT_EVALUATE
|
|
|
324
328
|
|
|
325
329
|
### A_APPLY_GOAL_DONE
|
|
326
330
|
|
|
327
|
-
1.
|
|
328
|
-
2.
|
|
329
|
-
3.
|
|
331
|
+
1. status.json(真源):全部 `task_decomposition[*].status="done"` + `completed_at=now` + `task_decomposition_all_done=true`
|
|
332
|
+
2. 从 status.json 重渲染 `goal-checklist.md`(见 Sync Rule);文件末追加 `ALL_GOALS_DONE`
|
|
333
|
+
3. `update_goal({ status: "complete" })` —— 释放分解 goal
|
|
334
|
+
4. 继续到 chain 的终结步骤
|
|
330
335
|
|
|
331
336
|
### A_FINALIZE
|
|
332
337
|
|
|
@@ -464,6 +469,7 @@ Entry action of S_DECISION_EVAL — mirrors maestro-ralph `A_GOAL_AUDIT_EVALUATE
|
|
|
464
469
|
- [ ] Intent classified and chain resolved
|
|
465
470
|
- [ ] Broad lifecycle intents decomposed (S_DECOMPOSE, ≤3 boundary questions) sharing maestro-ralph contract; narrow/single-step skip
|
|
466
471
|
- [ ] Goal registered via built-in `create_goal`; status.json decomposition fields additive-only
|
|
472
|
+
- [ ] status.json 为唯一真源;goal-checklist.md 是从 JSON 重渲染的投影视图(Resume 区块指向 `$maestro --continue`)
|
|
467
473
|
- [ ] post-goal-audit node appended as final node (after evidence-producing steps); unmet sub-goals dynamically grow steps[] (goal_ref tagged)
|
|
468
474
|
- [ ] Session dir initialized with status.json before first step
|
|
469
475
|
- [ ] Every skill invoked DIRECTLY in-context — NO spawn_agents_on_csv, NO wave/CSV/worker
|