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