maestro-flow 0.5.40 → 0.5.41
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/odyssey-debug/SKILL.md +109 -143
- package/.agents/skills/odyssey-improve/SKILL.md +127 -141
- package/.agents/skills/odyssey-planex/SKILL.md +140 -231
- package/.agents/skills/odyssey-review-test-fix/SKILL.md +136 -90
- package/.agents/skills/odyssey-ui/SKILL.md +123 -143
- package/.agy/skills/odyssey-debug/SKILL.md +109 -143
- package/.agy/skills/odyssey-improve/SKILL.md +127 -141
- package/.agy/skills/odyssey-planex/SKILL.md +140 -231
- package/.agy/skills/odyssey-review-test-fix/SKILL.md +136 -90
- package/.agy/skills/odyssey-ui/SKILL.md +123 -143
- package/.claude/commands/odyssey-debug.md +109 -143
- package/.claude/commands/odyssey-improve.md +127 -141
- package/.claude/commands/odyssey-planex.md +140 -231
- package/.claude/commands/odyssey-review-test-fix.md +136 -90
- package/.claude/commands/odyssey-ui.md +123 -143
- package/.codex/skills/odyssey-debug/SKILL.md +114 -169
- package/.codex/skills/odyssey-improve/SKILL.md +144 -188
- package/.codex/skills/odyssey-planex/SKILL.md +162 -242
- package/.codex/skills/odyssey-review-test-fix/SKILL.md +96 -90
- package/.codex/skills/odyssey-ui/SKILL.md +128 -173
- package/dashboard/dist-server/src/tools/spec-loader.js +27 -19
- package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
- package/dashboard/dist-server/src/tools/spec-seeds.d.ts +8 -0
- package/dashboard/dist-server/src/tools/spec-seeds.js +114 -0
- package/dashboard/dist-server/src/tools/spec-seeds.js.map +1 -1
- package/dist/src/commands/spec.d.ts.map +1 -1
- package/dist/src/commands/spec.js +13 -3
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/tools/spec-init.d.ts +4 -3
- package/dist/src/tools/spec-init.d.ts.map +1 -1
- package/dist/src/tools/spec-init.js +9 -5
- package/dist/src/tools/spec-init.js.map +1 -1
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +27 -19
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tools/spec-seeds.d.ts +8 -0
- package/dist/src/tools/spec-seeds.d.ts.map +1 -1
- package/dist/src/tools/spec-seeds.js +114 -0
- package/dist/src/tools/spec-seeds.js.map +1 -1
- package/package.json +1 -1
- package/workflows/odyssey-base-codex.md +306 -0
|
@@ -20,161 +20,119 @@ plan → execute → verify → fix gaps → iterate until ALL criteria pass.
|
|
|
20
20
|
</purpose>
|
|
21
21
|
|
|
22
22
|
<boundary>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
| Template |
|
|
29
|
-
|
|
30
|
-
| `feature` |
|
|
31
|
-
| `bugfix` |
|
|
32
|
-
| `refactor` |
|
|
33
|
-
| `migration` |
|
|
34
|
-
| `api-endpoint` |
|
|
23
|
+
**In scope:** Single requirement delivery loop — from requirement parsing to all acceptance criteria passing + generalization.
|
|
24
|
+
**Out of scope:** Multi-requirement orchestration → `/maestro-roadmap` | Deep debugging → `/odyssey-debug` | Code review → `/odyssey-review-test-fix` | UI optimization → `/odyssey-ui`
|
|
25
|
+
|
|
26
|
+
**`--template <name>`:**
|
|
27
|
+
|
|
28
|
+
| Template | Criteria pattern | Use case |
|
|
29
|
+
|----------|-----------------|----------|
|
|
30
|
+
| `feature` | User story acceptance + boundary tests + UI verification | New feature |
|
|
31
|
+
| `bugfix` | Regression tests + root cause confirmation + boundary coverage | Bug fix |
|
|
32
|
+
| `refactor` | Behavior preservation + performance baseline + API compatibility | Refactoring |
|
|
33
|
+
| `migration` | Data consistency + rollback verification + performance comparison | Data/API migration |
|
|
34
|
+
| `api-endpoint` | Request/response contract + error handling + permission checks | API development |
|
|
35
35
|
</boundary>
|
|
36
36
|
|
|
37
37
|
<context>
|
|
38
|
-
$ARGUMENTS
|
|
38
|
+
$ARGUMENTS
|
|
39
39
|
|
|
40
40
|
**Flags:**
|
|
41
|
+
|
|
41
42
|
| Flag | Description | Default |
|
|
42
43
|
|------|-------------|---------|
|
|
43
|
-
| `--template <name>` |
|
|
44
|
-
| `--max-iterations N` | Max verify
|
|
44
|
+
| `--template <name>` | Predefined requirement template | — |
|
|
45
|
+
| `--max-iterations N` | Max verify-fix cycles before escalation | 3 |
|
|
45
46
|
| `--skip-generalize` | Skip S_GENERALIZE + S_DISCOVER | false |
|
|
46
47
|
| `--auto` | CLI delegate calls without confirmation | false |
|
|
47
|
-
| `--method agent\|cli\|auto` | Execution method
|
|
48
|
-
| `--executor <tool>` | Explicit executor tool for CLI delegate
|
|
49
|
-
| `--skip-verify` | Skip execution
|
|
48
|
+
| `--method agent\|cli\|auto` | Execution method | `auto` |
|
|
49
|
+
| `--executor <tool>` | Explicit executor tool for CLI delegate | First enabled |
|
|
50
|
+
| `--skip-verify` | Skip post-execution validation gate | false |
|
|
50
51
|
| `--heartbeat` | Enable periodic progress heartbeat | false |
|
|
51
52
|
| `-y` | Auto-confirm — decisions recorded as `deferred` | false |
|
|
52
53
|
| `-c` | Resume most recent session | — |
|
|
53
54
|
|
|
54
|
-
**Session**:
|
|
55
|
-
|
|
56
|
-
**Output — 3 files:**
|
|
57
|
-
```
|
|
58
|
-
SESSION_DIR/
|
|
59
|
-
├── session.json # state + criteria + iterations + plan
|
|
60
|
-
├── evidence.ndjson # append-only log (phase distinguishes origin)
|
|
61
|
-
└── understanding.md # evolving narrative (8 sections, one per phase)
|
|
62
|
-
```
|
|
55
|
+
**Session**: `.workflow/scratch/{YYYYMMDD}-planex-odyssey-{slug}/`
|
|
56
|
+
**Output**: `session.json` | `evidence.ndjson` | `understanding.md`
|
|
63
57
|
|
|
64
|
-
**session.json
|
|
58
|
+
**session.json — planex-specific fields:**
|
|
65
59
|
```json
|
|
66
|
-
{
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"acceptance_criteria": [
|
|
72
|
-
{"id":"AC1","criterion":"","verify_method":"test|grep|cli-review|manual","status":"pending","evidence":"","passed_at":null}
|
|
73
|
-
],
|
|
74
|
-
"plan": { "tasks": [{"id":"T1","title":"","description":"","criteria_refs":["AC1"],"status":"pending","files_modified":[],"domain":"general","executor":"agent"}], "created_at":"" },
|
|
75
|
-
"execution_config": {
|
|
76
|
-
"method": "auto",
|
|
77
|
-
"default_executor": "",
|
|
78
|
-
"domain_routing": { "frontend": "", "backend": "", "default": "agent" },
|
|
79
|
-
"code_review_tool": "Skip",
|
|
80
|
-
"verification_tool": "Auto",
|
|
81
|
-
"confirmed": false
|
|
82
|
-
},
|
|
83
|
-
"iterations": [
|
|
84
|
-
{"iteration":1,"started_at":"","completed_at":"","criteria_before":{"passed":0,"total":0},"criteria_after":{"passed":0,"total":0},"gaps_fixed":[],"files_modified":[]}
|
|
85
|
-
],
|
|
60
|
+
{ "requirement": "",
|
|
61
|
+
"acceptance_criteria": [{"id":"AC1","criterion":"","verify_method":"test|grep|cli-review|manual","status":"pending","evidence":"","passed_at":null}],
|
|
62
|
+
"plan": {"tasks":[{"id":"T1","title":"","description":"","criteria_refs":["AC1"],"status":"pending","files_modified":[],"domain":"general","executor":"agent"}],"created_at":""},
|
|
63
|
+
"execution_config": {"method":"auto","default_executor":"","domain_routing":{"frontend":"","backend":"","default":"agent"},"code_review_tool":"Skip","verification_tool":"Auto","confirmed":false},
|
|
64
|
+
"iterations": [{"iteration":1,"started_at":"","completed_at":"","criteria_before":{"passed":0,"total":0},"criteria_after":{"passed":0,"total":0},"gaps_fixed":[],"files_modified":[]}],
|
|
86
65
|
"current_iteration": 0,
|
|
87
|
-
"patterns": [
|
|
88
|
-
|
|
89
|
-
],
|
|
90
|
-
"generalization_stats": {"patterns_extracted":0,"total_hits":0,"cross_layer_confirmed":0,"by_layer":{"syntax":0,"semantic":0,"structural":0},"deepening_triggered":false},
|
|
91
|
-
"phase_goals": [],
|
|
92
|
-
"phase_goals_all_done": false,
|
|
93
|
-
"self_iteration_log": [],
|
|
94
|
-
"progress_metrics": "→ base",
|
|
95
|
-
"directions_tried": "→ base",
|
|
96
|
-
"cross_phase_loops": 0, "max_loops": 5,
|
|
97
|
-
"created_at": "", "updated_at": ""
|
|
98
|
-
}
|
|
66
|
+
"patterns": [{"id":"P1","source":"AC1 fix","layer":"syntax|semantic|structural","signature":"","description":"","risk":"","fix_template":""}],
|
|
67
|
+
"generalization_stats": "-> base shared_schemas" }
|
|
99
68
|
```
|
|
100
69
|
|
|
101
|
-
**evidence.ndjson
|
|
70
|
+
**evidence.ndjson phases:** `planning|execution|verification|fix|decision|generalization|discovery|self-iteration`
|
|
102
71
|
|
|
103
|
-
**understanding.md
|
|
72
|
+
**understanding.md — 8 sections:**
|
|
73
|
+
1. Requirement & Criteria <- S_INTAKE | 2. Plan <- S_PLAN | 3. Execution <- S_EXECUTE
|
|
74
|
+
4. Verification <- S_VERIFY | 5. Fix Log <- S_FIX | 6. Generalization <- S_GENERALIZE
|
|
75
|
+
7. Discoveries <- S_DISCOVER | 8. Learnings <- S_RECORD
|
|
104
76
|
|
|
105
77
|
**phase_goals[]:**
|
|
106
|
-
|
|
78
|
+
|
|
79
|
+
| ID | Goal | done_when | phase | skip_when |
|
|
107
80
|
|----|------|-----------|-------|-----------|
|
|
108
|
-
| G1 | Acceptance criteria defined |
|
|
81
|
+
| G1 | Acceptance criteria defined | >=1 criterion in acceptance_criteria[] | S_INTAKE | — |
|
|
109
82
|
| G2 | Plan created | session.json.plan populated | S_PLAN | — |
|
|
110
83
|
| G3 | Implementation complete | all plan tasks executed | S_EXECUTE | — |
|
|
111
84
|
| G4 | All criteria pass | all acceptance_criteria[].status == passed | S_VERIFY | — |
|
|
112
|
-
| G5 | Pattern generalized | patterns[]
|
|
85
|
+
| G5 | Pattern generalized | patterns[] >=1 entry | S_GENERALIZE | skip_generalize |
|
|
113
86
|
| G6 | Discoveries triaged | all scan hits classified | S_DISCOVER | skip_generalize |
|
|
114
87
|
| G7 | Learnings persisted | spec entries created OR no actionable | S_RECORD | — |
|
|
115
88
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
| 层级 | 命令 | 作用 |
|
|
119
|
-
|------|------|------|
|
|
120
|
-
| Codebase docs | Read `.workflow/codebase/ARCHITECTURE.md` | 模块边界,架构约束 |
|
|
121
|
-
| Wiki search | `maestro search "<requirement keywords>" --json` | 先前实现、相关决策(取 top 5) |
|
|
122
|
-
| Coding specs | `maestro load --type spec --category coding` | 编码规范 + 可发现的 knowhow 工具 |
|
|
123
|
-
| UI specs(条件) | 若涉及前端 → `maestro load --type spec --category ui` | UI 规范 |
|
|
124
|
-
| Role knowledge | `maestro search --category coding` → 选相关 → `maestro load --type knowhow --id <id>` | 累积实现领域知识 |
|
|
125
|
-
| Prior sessions | `Glob(".workflow/scratch/*-planex-odyssey-*")` | 相关 odyssey 会话 |
|
|
126
|
-
|
|
127
|
-
### Knowledge Persistence(S_RECORD 中写入产出文件)
|
|
128
|
-
|
|
129
|
-
S_RECORD 阶段将可沉淀知识 **写入 understanding.md §8 Learnings**,按以下分类结构化:
|
|
89
|
+
**Knowledge Persistence (written to understanding.md section 8):**
|
|
130
90
|
|
|
131
|
-
|
|
|
132
|
-
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
|
|
|
136
|
-
|
|
|
91
|
+
| Category | Content | Follow-up |
|
|
92
|
+
|----------|---------|-----------|
|
|
93
|
+
| Multi-round fix cycle pattern | Problem scenario + fix iteration + final approach | `/spec-add debug` |
|
|
94
|
+
| Reusable implementation pattern | Pattern + applicable scope + code template | `/spec-add coding` |
|
|
95
|
+
| Acceptance criteria template | Standard template + verify_method suggestion | `/spec-add review` |
|
|
96
|
+
| Generalization pattern | Signature + risk + fix template | `/spec-add coding` |
|
|
137
97
|
</context>
|
|
138
98
|
|
|
99
|
+
<invariants>
|
|
100
|
+
Base execution_discipline #1-5.
|
|
101
|
+
6. **Acceptance criteria are sacred** — no "close enough", no manual override without explicit escalation
|
|
102
|
+
</invariants>
|
|
103
|
+
|
|
139
104
|
<self_iteration>
|
|
140
|
-
|
|
105
|
+
Applies to: **S_PLAN, S_VERIFY, S_GENERALIZE**. Logic in base.
|
|
141
106
|
</self_iteration>
|
|
142
107
|
|
|
143
108
|
<state_machine>
|
|
144
109
|
|
|
145
110
|
<states>
|
|
146
|
-
S_INTAKE
|
|
147
|
-
S_PLAN — decompose tasks, generate execution plan PERSIST: session.json.plan + evidence (planning) + understanding.md §2
|
|
148
|
-
S_EXECUTE — implement tasks PERSIST: code + evidence (execution) + understanding.md §3
|
|
149
|
-
S_VERIFY — iron gate: check every acceptance criterion PERSIST: evidence (verification) + understanding.md §4
|
|
150
|
-
S_FIX — targeted fix for failing criteria (loops to VERIFY) PERSIST: code + evidence (fix) + understanding.md §5
|
|
151
|
-
S_GENERALIZE — extract patterns, 4-agent scan PERSIST: session.json.patterns + understanding.md §6
|
|
152
|
-
S_DISCOVER — triage scan hits, route decisions PERSIST: evidence (discovery|decision) + understanding.md §7
|
|
153
|
-
S_RECORD — persist learnings, final summary PERSIST: understanding.md §8 + spec entries
|
|
111
|
+
S_INTAKE → S_PLAN → S_EXECUTE → S_VERIFY → S_GENERALIZE → S_DISCOVER → S_RECORD → END
|
|
154
112
|
</states>
|
|
155
113
|
|
|
156
114
|
<transitions>
|
|
157
|
-
S_INTAKE → S_INTAKE
|
|
158
|
-
S_INTAKE → S_PLAN
|
|
159
|
-
S_INTAKE → S_INTAKE
|
|
115
|
+
S_INTAKE → S_INTAKE : -c + session found (resume)
|
|
116
|
+
S_INTAKE → S_PLAN : requirement + criteria defined
|
|
117
|
+
S_INTAKE → S_INTAKE : no requirement → AskUserQuestion
|
|
160
118
|
|
|
161
|
-
S_PLAN
|
|
119
|
+
S_PLAN → S_EXECUTE
|
|
162
120
|
S_EXECUTE → S_VERIFY
|
|
163
121
|
|
|
164
|
-
S_VERIFY → S_GENERALIZE
|
|
165
|
-
S_VERIFY → S_RECORD
|
|
166
|
-
S_VERIFY → S_FIX
|
|
167
|
-
S_VERIFY → S_PLAN
|
|
168
|
-
S_VERIFY → S_RECORD
|
|
122
|
+
S_VERIFY → S_GENERALIZE : all passed AND NOT skip_generalize
|
|
123
|
+
S_VERIFY → S_RECORD : all passed AND skip_generalize
|
|
124
|
+
S_VERIFY → S_FIX : some failed AND iteration < max
|
|
125
|
+
S_VERIFY → S_PLAN : fundamental plan flaw → cross_phase_loops++ (replan)
|
|
126
|
+
S_VERIFY → S_RECORD : some failed AND iteration >= max (escalate)
|
|
169
127
|
|
|
170
128
|
S_FIX → S_VERIFY (loop)
|
|
171
129
|
|
|
172
|
-
S_GENERALIZE → S_DISCOVER
|
|
173
|
-
S_GENERALIZE → S_RECORD
|
|
130
|
+
S_GENERALIZE → S_DISCOVER : hits found
|
|
131
|
+
S_GENERALIZE → S_RECORD : no hits
|
|
174
132
|
|
|
175
|
-
S_DISCOVER → S_EXECUTE
|
|
176
|
-
S_DISCOVER → S_RECORD
|
|
177
|
-
S_DISCOVER → S_RECORD
|
|
133
|
+
S_DISCOVER → S_EXECUTE : discovery finds area needing same implementation → cross_phase_loops++
|
|
134
|
+
S_DISCOVER → S_RECORD : triage complete AND remaining_actionable == 0
|
|
135
|
+
S_DISCOVER → S_RECORD : loops >= max_loops → log per-item reasons
|
|
178
136
|
|
|
179
137
|
S_RECORD → END
|
|
180
138
|
</transitions>
|
|
@@ -185,12 +143,12 @@ S_RECORD → END
|
|
|
185
143
|
|
|
186
144
|
1. Parse requirement and flags, generate slug, create SESSION_DIR
|
|
187
145
|
2. **Define acceptance criteria** — analyze requirement → derive testable criteria. Each gets `verify_method`: test | grep | cli-review | manual
|
|
188
|
-
-
|
|
189
|
-
-
|
|
146
|
+
- Normal: AskUserQuestion to confirm/edit
|
|
147
|
+
- `-y`: auto-derive, record `{"phase":"decision","type":"criteria-confirmation","status":"deferred"}`
|
|
190
148
|
3. Search prior knowledge: `maestro search`, related sessions
|
|
191
|
-
4. Write session.json + understanding.md
|
|
149
|
+
4. Write session.json + understanding.md section 1. Mark G1 done. Emit Goal Prompt.
|
|
192
150
|
|
|
193
|
-
|
|
151
|
+
Commit: `"odyssey-planex({slug}): INTAKE — parse requirement and define criteria"`
|
|
194
152
|
|
|
195
153
|
### A_PLAN
|
|
196
154
|
|
|
@@ -204,10 +162,10 @@ S_RECORD → END
|
|
|
204
162
|
EXPECTED: JSON [{task_id, title, description, criteria_refs, deps}]
|
|
205
163
|
" --role analyze --mode analysis
|
|
206
164
|
```
|
|
207
|
-
|
|
208
|
-
3. Write session.json.plan, append evidence (planning), update understanding.md
|
|
165
|
+
Run with `run_in_background: true`, wait for callback.
|
|
166
|
+
3. Write session.json.plan, append evidence (planning), update understanding.md section 2. Mark G2 done.
|
|
209
167
|
|
|
210
|
-
|
|
168
|
+
Commit: `"odyssey-planex({slug}): PLAN — create execution plan"`
|
|
211
169
|
|
|
212
170
|
### A_EXECUTE
|
|
213
171
|
|
|
@@ -215,51 +173,21 @@ S_RECORD → END
|
|
|
215
173
|
|
|
216
174
|
**Skip if** `-y` flag OR `--method` explicitly set OR `execution_config.confirmed == true` (resume).
|
|
217
175
|
|
|
218
|
-
Load available tools: `maestro delegate-config show --json
|
|
219
|
-
|
|
220
|
-
```
|
|
221
|
-
AskUserQuestion({
|
|
222
|
-
questions: [
|
|
223
|
-
{
|
|
224
|
-
question: "任务如何执行?选择一种方式,或 Other 指定域路由规则(如 '前端agy 后端codex 其余agent')",
|
|
225
|
-
header: "Executor",
|
|
226
|
-
options: [
|
|
227
|
-
{ label: "Auto (Recommended)", description: "域路由: frontend→{frontendTool}, backend→{backendTool}, general→agent" },
|
|
228
|
-
{ label: "Agent", description: "Claude Code Agent 执行所有任务(最快)" },
|
|
229
|
-
...availableTools.map(t => ({ label: t, description: `${t} CLI 执行所有任务` }))
|
|
230
|
-
]
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
question: "执行后运行代码审查?",
|
|
234
|
-
header: "Review",
|
|
235
|
-
options: [
|
|
236
|
-
{ label: "Skip", description: "不审查" },
|
|
237
|
-
...availableTools.map(t => ({ label: `${t} Review`, description: `${t} CLI: git diff 质量审查` }))
|
|
238
|
-
]
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
question: "验证门控?(外部模型检查收敛 + 结构 + 反模式)",
|
|
242
|
-
header: "Verify",
|
|
243
|
-
options: [
|
|
244
|
-
{ label: "Auto (Recommended)", description: `Delegate 到 ${availableTools[0]} 做收敛+结构+反模式检查` },
|
|
245
|
-
...availableTools.map(t => ({ label: t, description: `${t}: 验证门控` })),
|
|
246
|
-
{ label: "Skip", description: "不验证" }
|
|
247
|
-
]
|
|
248
|
-
}
|
|
249
|
-
]
|
|
250
|
-
})
|
|
251
|
-
```
|
|
176
|
+
Load available tools: `maestro delegate-config show --json`.
|
|
252
177
|
|
|
253
|
-
|
|
178
|
+
Present AskUserQuestion with 3 questions:
|
|
179
|
+
1. **Executor** — Auto (domain routing) | Agent (all tasks) | specific CLI tool | Other (custom domain routing)
|
|
180
|
+
2. **Review** — Skip | {tool} review (git diff quality check)
|
|
181
|
+
3. **Verify** — Auto (delegate convergence + structure + anti-pattern check) | specific tool | Skip
|
|
254
182
|
|
|
255
|
-
`--skip-verify`
|
|
183
|
+
Parse response → write `execution_config` to session.json, set `confirmed: true`. `--skip-verify` overrides verification to `"Skip"`.
|
|
256
184
|
|
|
257
185
|
#### Step 2: Executor Resolution
|
|
258
186
|
|
|
259
187
|
Per-task domain routing (when method == "auto"):
|
|
260
188
|
|
|
261
|
-
| Domain | Keywords / Patterns |
|
|
262
|
-
|
|
189
|
+
| Domain | Keywords / Patterns | Extensions |
|
|
190
|
+
|--------|-------------------|------------|
|
|
263
191
|
| frontend | UI, component, page, style, layout, CSS, view | .tsx/.jsx/.vue/.css/.html/.svelte |
|
|
264
192
|
| backend | API, server, database, service, algorithm, worker | .go/.rs/.java/.py/.sql/.proto |
|
|
265
193
|
| general | mixed, config, tests, unclear | .ts/.js/other |
|
|
@@ -268,16 +196,15 @@ Resolution: `execution_config.domain_routing[domain]` → fallback `domain_routi
|
|
|
268
196
|
|
|
269
197
|
#### Step 3: Task Execution
|
|
270
198
|
|
|
271
|
-
Execute tasks per plan order. Independent tasks
|
|
199
|
+
Execute tasks per plan order. Independent tasks may run in parallel.
|
|
272
200
|
|
|
273
201
|
**Agent path:**
|
|
274
202
|
```
|
|
275
|
-
Spawn Agent with:
|
|
276
|
-
|
|
277
|
-
Agent implements → verifies convergence criteria → auto-fix (max 3) → returns result
|
|
203
|
+
Spawn Agent with: task definition, acceptance criteria refs, prior task summaries, specs_content
|
|
204
|
+
Agent implements → verifies convergence → auto-fix (max 3) → returns result
|
|
278
205
|
```
|
|
279
206
|
|
|
280
|
-
**CLI path
|
|
207
|
+
**CLI path:**
|
|
281
208
|
```bash
|
|
282
209
|
maestro delegate "PURPOSE: Implement task ${task_id}: ${title}; success = criteria ${criteria_refs} satisfied
|
|
283
210
|
TASK: ${description} | Read existing code first | Verify convergence criteria after changes
|
|
@@ -300,7 +227,7 @@ ${prior_summaries}
|
|
|
300
227
|
" --to ${resolved_executor} --mode write --id planex-${slug}-${task_id}
|
|
301
228
|
```
|
|
302
229
|
|
|
303
|
-
Run
|
|
230
|
+
Run with `run_in_background: true`, wait for callback.
|
|
304
231
|
|
|
305
232
|
**Deviation Rule** — max 3 auto-fix attempts per task:
|
|
306
233
|
1. First attempt: normal dispatch
|
|
@@ -341,11 +268,11 @@ ${modified_files.join('\n')}
|
|
|
341
268
|
" --to ${execution_config.verification_tool} --mode analysis
|
|
342
269
|
```
|
|
343
270
|
|
|
344
|
-
|
|
271
|
+
Run with `run_in_background: true`, wait for callback.
|
|
345
272
|
|
|
346
273
|
On result:
|
|
347
|
-
- `overall == "passed"` → proceed to S_VERIFY
|
|
348
|
-
- `overall == "gaps_found"` → log findings, proceed to S_VERIFY
|
|
274
|
+
- `overall == "passed"` → proceed to S_VERIFY with boosted confidence
|
|
275
|
+
- `overall == "gaps_found"` → log findings, proceed to S_VERIFY
|
|
349
276
|
|
|
350
277
|
**Check 3: Code Review** (if `execution_config.code_review_tool != "Skip"`):
|
|
351
278
|
```bash
|
|
@@ -354,29 +281,30 @@ maestro delegate "Review git diff for correctness, style, bugs" --to ${code_revi
|
|
|
354
281
|
|
|
355
282
|
#### Step 6: Completion
|
|
356
283
|
|
|
357
|
-
Update understanding.md
|
|
284
|
+
Update understanding.md section 3. Mark G3 done.
|
|
358
285
|
|
|
359
|
-
|
|
286
|
+
Commit: `"odyssey-planex({slug}): EXECUTE — implementation complete"`
|
|
360
287
|
|
|
361
288
|
### A_VERIFY
|
|
362
289
|
|
|
363
290
|
Iron gate — every acceptance criterion checked objectively.
|
|
364
291
|
|
|
365
292
|
**Verify each criterion by method:**
|
|
293
|
+
|
|
366
294
|
| Method | Action |
|
|
367
295
|
|--------|--------|
|
|
368
296
|
| `test` | Run relevant tests, check pass/fail |
|
|
369
297
|
| `grep` | Grep for expected pattern |
|
|
370
298
|
| `cli-review` | `maestro delegate --role review --mode analysis` with criterion as focus |
|
|
371
|
-
| `manual` |
|
|
299
|
+
| `manual` | Normal: AskUserQuestion / `-y`: record `deferred` |
|
|
372
300
|
|
|
373
301
|
Record per criterion: `{"phase":"verification","type":"criterion-check","criterion_id":"AC1","method":"","result":"passed|failed","evidence":"","iteration":N}`. Update acceptance_criteria[].status. Append to iterations[].
|
|
374
302
|
|
|
375
|
-
Update understanding.md
|
|
303
|
+
Update understanding.md section 4 with pass/fail table.
|
|
376
304
|
|
|
377
|
-
**Route:** all passed → mark G4 done → next state. Some failed + iteration < max → S_FIX. Some failed + iteration >= max →
|
|
305
|
+
**Route:** all passed → mark G4 done → next state. Some failed + iteration < max → S_FIX. Some failed + iteration >= max → Normal: AskUserQuestion (continue/lower bar/accept) / `-y`: `deferred`, proceed S_RECORD.
|
|
378
306
|
|
|
379
|
-
|
|
307
|
+
Commit: `"odyssey-planex({slug}): VERIFY — acceptance check"`
|
|
380
308
|
|
|
381
309
|
### A_FIX
|
|
382
310
|
|
|
@@ -391,88 +319,68 @@ Update understanding.md §4 with pass/fail table.
|
|
|
391
319
|
EXPECTED: JSON {verdict, regression_risk, concerns}
|
|
392
320
|
" --role review --mode analysis
|
|
393
321
|
```
|
|
394
|
-
4. Append evidence (fix), update understanding.md
|
|
322
|
+
4. Append evidence (fix), update understanding.md section 5 → S_VERIFY
|
|
395
323
|
|
|
396
|
-
|
|
324
|
+
Commit: `"odyssey-planex({slug}): FIX — targeted fix for failing criteria"`
|
|
397
325
|
|
|
398
326
|
### A_GENERALIZE
|
|
399
327
|
|
|
400
|
-
|
|
328
|
+
Base shared_actions. Pattern source: implementation patterns.
|
|
401
329
|
|
|
402
|
-
|
|
330
|
+
Commit: `"odyssey-planex({slug}): GENERALIZE — pattern scan complete"`
|
|
403
331
|
|
|
404
332
|
### A_DISCOVER
|
|
405
333
|
|
|
406
|
-
|
|
334
|
+
Base shared_actions. Planex override: discovery finding needing same implementation → route back to S_EXECUTE (not S_FIX).
|
|
407
335
|
|
|
408
|
-
|
|
336
|
+
Commit: `"odyssey-planex({slug}): DISCOVER — findings classified"`
|
|
409
337
|
|
|
410
338
|
### A_RECORD
|
|
411
339
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
4. Goal audit: check all phase_goals[*].completion_confirmed. Mark G7 done.
|
|
416
|
-
5. Output completion summary:
|
|
417
|
-
```
|
|
418
|
-
--- PLANEX ODYSSEY COMPLETE ---
|
|
419
|
-
Requirement: {requirement}
|
|
420
|
-
Criteria: {passed}/{total} passed
|
|
421
|
-
Iterations: {N} cycles
|
|
422
|
-
Patterns: {patterns_extracted} ({by_layer} distribution)
|
|
423
|
-
Scan hits: {total_hits} ({cross_layer_confirmed} cross-layer confirmed)
|
|
424
|
-
Issues: {N} created | Decisions: {N} resolved, {M} pending, {K} deferred
|
|
425
|
-
Learnings: {N} spec entries
|
|
426
|
-
Self-iter: {N} rounds across {M} stages
|
|
427
|
-
Goals: {done}/{total} confirmed ({skipped} skipped)
|
|
428
|
-
Status: {ALL_PASSED|PARTIAL|ESCALATED}
|
|
429
|
-
---
|
|
430
|
-
```
|
|
431
|
-
6. 其余按 base A_RECORD 执行。
|
|
340
|
+
Base shared_actions. Planex additions:
|
|
341
|
+
1. Iteration summary: what worked, what needed rework, fix cycle patterns
|
|
342
|
+
2. Learnings structured per Knowledge Persistence table: problem scenario + fix iteration process + final approach + applicable scope
|
|
432
343
|
|
|
433
|
-
|
|
344
|
+
**Completion summary:**
|
|
345
|
+
```
|
|
346
|
+
--- PLANEX ODYSSEY COMPLETE ---
|
|
347
|
+
Requirement: {requirement}
|
|
348
|
+
Criteria: {passed}/{total} passed
|
|
349
|
+
Iterations: {N} cycles
|
|
350
|
+
Patterns: {patterns_extracted} ({by_layer} distribution)
|
|
351
|
+
Scan hits: {total_hits} ({cross_layer_confirmed} cross-layer confirmed)
|
|
352
|
+
Issues: {N} created | Decisions: {N} resolved, {M} pending, {K} deferred
|
|
353
|
+
Learnings: {N} spec entries
|
|
354
|
+
Self-iter: {N} rounds across {M} stages
|
|
355
|
+
Goals: {done}/{total} confirmed ({skipped} skipped)
|
|
356
|
+
Status: {ALL_PASSED|PARTIAL|ESCALATED}
|
|
357
|
+
---
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
Commit: `"odyssey-planex({slug}): RECORD — session summary"`
|
|
434
361
|
|
|
435
362
|
</actions>
|
|
436
363
|
|
|
437
364
|
<appendix>
|
|
438
365
|
|
|
439
|
-
###
|
|
440
|
-
|
|
441
|
-
**⚠️ 时机守卫:仅在 A_INTAKE 完成后显示一次(session 创建后、开始 Plan 前)。A_RECORD 完成时禁止重新显示。**
|
|
442
|
-
|
|
443
|
-
```
|
|
444
|
-
📋 Planex Odyssey 会话已创建。可随时复制以下 /goal 设定终止条件(执行过程中输入即可):
|
|
445
|
-
|
|
446
|
-
/goal 完成以下目标:
|
|
447
|
-
{for each G in phase_goals where status != "skipped":}
|
|
448
|
-
- {G.id}: {G.goal} — 完成条件: {G.done_when}
|
|
449
|
-
{end for}
|
|
450
|
-
验收标准:
|
|
451
|
-
{for each AC in acceptance_criteria:}
|
|
452
|
-
- {AC.id}: {AC.criterion} (验证方式: {AC.verify_method})
|
|
453
|
-
{end for}
|
|
454
|
-
穷尽迭代:直到 acceptance_criteria[*] 全部 status==passed
|
|
455
|
-
且 phase_goals_all_done=true 才停。verify 失败自动 fix→re-verify 循环。
|
|
456
|
-
每轮修复后重新验证,新发现的标准违反继续修,不超过 max_iterations。
|
|
457
|
-
遇到 phase=decision 的 pending 必须 AskUserQuestion,不得自行 resolve。
|
|
458
|
-
不允许"接近通过",验收标准必须 ALL pass。
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
完成时仅输出 completion summary,不重复此提示。
|
|
462
|
-
|
|
463
|
-
### `-y` Auto-Confirm Behavior
|
|
366
|
+
### `-y` planex-specific points
|
|
464
367
|
|
|
465
368
|
| Decision Point | Normal | `-y` |
|
|
466
|
-
|
|
369
|
+
|---------------|--------|------|
|
|
467
370
|
| S_INTAKE criteria confirmation | AskUserQuestion | auto-derive, `deferred` |
|
|
468
|
-
| S_EXECUTE execution options | AskUserQuestion
|
|
371
|
+
| S_EXECUTE execution options | AskUserQuestion | use defaults (auto/Skip/Auto), `confirmed: true` |
|
|
469
372
|
| S_EXECUTE task blocked (3 retries) | AskUserQuestion: continue or stop | auto continue, log blocked |
|
|
470
373
|
| S_VERIFY manual criterion | AskUserQuestion | `deferred` |
|
|
471
374
|
| S_VERIFY max iteration reached | AskUserQuestion | auto accept, `deferred` |
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
375
|
+
|
|
376
|
+
### Goal Prompt convergence rules
|
|
377
|
+
|
|
378
|
+
```
|
|
379
|
+
Exhaustive iteration: until all acceptance_criteria[*].status==passed
|
|
380
|
+
AND phase_goals_all_done=true. Verify failure auto-triggers fix->re-verify loop.
|
|
381
|
+
Each fix round re-verifies; new criterion violations continue fixing within max_iterations.
|
|
382
|
+
No "close enough" — all criteria must ALL pass.
|
|
383
|
+
```
|
|
476
384
|
|
|
477
385
|
### Iteration Model
|
|
478
386
|
|
|
@@ -500,13 +408,13 @@ Max iterations (default 3) prevents infinite loops. Each iteration records crite
|
|
|
500
408
|
</error_codes>
|
|
501
409
|
|
|
502
410
|
<success_criteria>
|
|
503
|
-
- [ ] Requirement parsed with
|
|
411
|
+
- [ ] Requirement parsed with >=1 acceptance criterion (verify_method assigned)
|
|
504
412
|
- [ ] Plan tasks mapped to criteria; execution options confirmed
|
|
505
413
|
- [ ] Tasks dispatched via resolved executor with deviation rule (max 3 retries)
|
|
506
414
|
- [ ] Post-execution validation gate run (unless --skip-verify)
|
|
507
415
|
- [ ] Every criterion verified per method; failing → targeted fix (not re-implementation)
|
|
508
416
|
- [ ] Iteration count tracked and max respected; unfixed criteria individually classified
|
|
509
|
-
- [ ] understanding.md
|
|
417
|
+
- [ ] understanding.md sections 1-8 updated per phase; phase_goals G1-G7 audited
|
|
510
418
|
- [ ] Generalization + discovery completed (unless --skip-generalize)
|
|
511
419
|
- [ ] Quality Gate self-iteration triggered when insufficient
|
|
512
420
|
- [ ] Goal Prompt displayed once after intake; `-y` mode: no blocking prompts
|
|
@@ -514,11 +422,12 @@ Max iterations (default 3) prevents infinite loops. Each iteration records crite
|
|
|
514
422
|
</success_criteria>
|
|
515
423
|
|
|
516
424
|
<next_step_routing>
|
|
517
|
-
| Condition | Next
|
|
518
|
-
|
|
425
|
+
| Condition | Next |
|
|
426
|
+
|-----------|------|
|
|
519
427
|
| All criteria passed | `/odyssey-review-test-fix <changed-files>` |
|
|
520
428
|
| Max iterations, still failing | `/odyssey-debug "<failing criterion>"` |
|
|
521
|
-
|
|
|
429
|
+
| Formal review | `/quality-review <phase>` |
|
|
522
430
|
| Issues from discoveries | `/manage-issue list --source planex-odyssey` |
|
|
523
431
|
| Pattern worth documenting | `/learn-decompose <module>` |
|
|
524
432
|
</next_step_routing>
|
|
433
|
+
</output>
|