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
|
@@ -4,54 +4,41 @@ description: "Long-running debug cycle — archaeology, diagnosis, fix, confirma
|
|
|
4
4
|
argument-hint: "<issue> [--skip-fix] [--skip-generalize] [--auto] [-y] [-c] [--heartbeat]"
|
|
5
5
|
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
|
|
6
6
|
---
|
|
7
|
-
<base>@~/.maestro/workflows/odyssey-base.md</base>
|
|
7
|
+
<base>@~/.maestro/workflows/odyssey-base-codex.md</base>
|
|
8
8
|
|
|
9
9
|
<purpose>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Core philosophy:
|
|
14
|
-
- **Archaeology before hypothesis** — look at what changed before guessing why
|
|
15
|
-
- **Fix one, find many** — a single bug reveals a class of bugs
|
|
16
|
-
- **Decision journal** — human-judgment items recorded, not lost
|
|
17
|
-
- **CLI-assisted review** — delegate for second-opinion analysis
|
|
18
|
-
|
|
19
|
-
**三句哲学约束(穷尽迭代):**
|
|
20
|
-
1. **零遗留** — 根因必须确认到底,修复必须验证通过,泛化必须扫描穷尽
|
|
21
|
-
2. **穷尽迭代** — 假设失败不放弃:扩范围 → 换视角 → 升级工具,直到根因确认或明确 INCONCLUSIVE
|
|
22
|
-
3. **改进即标准** — 修复后重新确认同区域无新问题,泛化发现的同类 bug 全部处理
|
|
10
|
+
archaeology → explore → diagnose → fix & confirm → generalize → discover siblings → persist.
|
|
11
|
+
Exhaustive iteration until root cause confirmed or INCONCLUSIVE.
|
|
23
12
|
</purpose>
|
|
24
13
|
|
|
25
14
|
<boundary>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `crash` | stack trace → null chain → error propagation | 崩溃/异常 |
|
|
15
|
+
**In scope:** Single bug/issue full loop.
|
|
16
|
+
**Out of scope:** Features → `$odyssey-planex` | Quality review → `$odyssey-review-test-fix` | UI → `$odyssey-ui` | Architecture → `/maestro-plan`
|
|
17
|
+
|
|
18
|
+
**`--template <name>`:**
|
|
19
|
+
|
|
20
|
+
| Template | Strategy | Use case |
|
|
21
|
+
|----------|----------|----------|
|
|
22
|
+
| `performance` | profiling → hot path → allocation → cache | Performance degradation |
|
|
23
|
+
| `memory-leak` | heap snapshot → retention chain → lifecycle | Memory leaks |
|
|
24
|
+
| `race-condition` | timeline → concurrent access → lock analysis | Race conditions |
|
|
25
|
+
| `regression` | git bisect → diff analysis → boundary check | Regressions |
|
|
26
|
+
| `crash` | stack trace → null chain → error propagation | Crashes / exceptions |
|
|
39
27
|
</boundary>
|
|
40
28
|
|
|
41
29
|
<context>
|
|
42
|
-
$ARGUMENTS
|
|
30
|
+
$ARGUMENTS
|
|
43
31
|
|
|
44
|
-
**Flags:** `--skip-fix` analysis-only | `--skip-generalize` quick fix | `--template <name>`
|
|
32
|
+
**Flags:** `--skip-fix` analysis-only | `--skip-generalize` quick fix | `--template <name>` | `--auto` no delegate confirmation | `-y` auto-confirm | `-c` resume | `--heartbeat` /loop heartbeat
|
|
45
33
|
|
|
46
|
-
**Session**:
|
|
34
|
+
**Session**: `.workflow/scratch/{YYYYMMDD}-debug-odyssey-{slug}/`
|
|
47
35
|
**Output**: `session.json` | `evidence.ndjson` | `explore.json` | `understanding.md`
|
|
48
36
|
|
|
49
|
-
**session.json
|
|
37
|
+
**session.json — debug-specific fields:**
|
|
50
38
|
```json
|
|
51
39
|
{ "issue": "", "diagnosis_retries": 0, "root_cause": null, "confirmation": null,
|
|
52
|
-
"patterns": [], "generalization_stats": null
|
|
40
|
+
"patterns": [], "generalization_stats": null }
|
|
53
41
|
```
|
|
54
|
-
共有字段(`progress_metrics`, `directions_tried` 等)见 base。
|
|
55
42
|
|
|
56
43
|
**evidence.ndjson phases:** `archaeology|explore|diagnosis|discovery|decision|self-iteration`
|
|
57
44
|
- `archaeology`: `sha`, `author`, `date`, `message`, `relevance`
|
|
@@ -79,23 +66,14 @@ $ARGUMENTS — issue description and optional flags.
|
|
|
79
66
|
4. Hypotheses ← S_DIAGNOSE | 5. Root Cause ← S_DIAGNOSE | 6. Fix & Confirmation ← S_FIX+S_CONFIRM
|
|
80
67
|
7. Generalization ← S_GENERALIZE | 8. Discoveries ← S_DISCOVER | 9. Learnings ← S_RECORD
|
|
81
68
|
|
|
82
|
-
|
|
69
|
+
**Knowledge Persistence categories (§9):**
|
|
83
70
|
|
|
84
|
-
|
|
|
85
|
-
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
91
|
-
### Knowledge Persistence(S_RECORD → understanding.md §9)
|
|
92
|
-
|
|
93
|
-
| 分类 | 后续建议命令 |
|
|
94
|
-
|------|-------------|
|
|
95
|
-
| 反复根因模式 | `/spec-add debug "..."` |
|
|
96
|
-
| 非显而易见 workaround | `/spec-add learning "..."` |
|
|
97
|
-
| 架构边界违反 | `/spec-add arch "..."` |
|
|
98
|
-
| 可复用泛化 pattern | `/spec-add coding "..."` |
|
|
71
|
+
| Category | Content | Follow-up |
|
|
72
|
+
|----------|---------|-----------|
|
|
73
|
+
| Recurring root cause pattern | Type + triggers + fix + detection | `/spec-add debug` |
|
|
74
|
+
| Non-obvious workaround | Problem + steps + why obvious fix fails | `/spec-add learning` |
|
|
75
|
+
| Architecture boundary violation | Violation + correct boundary + verification | `/spec-add arch` |
|
|
76
|
+
| Reusable generalization pattern | Signature + risk + fix template + scope | `/spec-add coding` |
|
|
99
77
|
</context>
|
|
100
78
|
|
|
101
79
|
<csv_schema>
|
|
@@ -128,8 +106,14 @@ id,title,description,task_type,deps,wave,status,findings,evidence,error
|
|
|
128
106
|
- Single-agent stages (explore, diagnose, fix, confirm) remain inline
|
|
129
107
|
</csv_schema>
|
|
130
108
|
|
|
109
|
+
<invariants>
|
|
110
|
+
Base execution_discipline applies. Debug additions:
|
|
111
|
+
1. **Evidence append-only** — never delete or overwrite evidence.ndjson entries
|
|
112
|
+
2. **Phase goal tracking** — mark goal done/failed before transition; no silent skips
|
|
113
|
+
</invariants>
|
|
114
|
+
|
|
131
115
|
<self_iteration>
|
|
132
|
-
|
|
116
|
+
Applies to: **S_ARCHAEOLOGY, S_EXPLORE, S_DIAGNOSE, S_GENERALIZE**. Logic in base.
|
|
133
117
|
</self_iteration>
|
|
134
118
|
|
|
135
119
|
<state_machine>
|
|
@@ -143,14 +127,14 @@ S_INTAKE → S_INTAKE : -c + session found → A_RESUME_SESSION
|
|
|
143
127
|
S_INTAKE → S_ARCHAEOLOGY : issue parsed → A_INTAKE
|
|
144
128
|
S_INTAKE → S_INTAKE : no issue, no session → request_user_input
|
|
145
129
|
|
|
146
|
-
S_ARCHAEOLOGY → S_EXPLORE :
|
|
147
|
-
S_EXPLORE → S_DIAGNOSE :
|
|
130
|
+
S_ARCHAEOLOGY → S_EXPLORE : complete
|
|
131
|
+
S_EXPLORE → S_DIAGNOSE : complete
|
|
148
132
|
|
|
149
|
-
S_DIAGNOSE → S_FIX :
|
|
150
|
-
S_DIAGNOSE → S_GENERALIZE :
|
|
151
|
-
S_DIAGNOSE → S_RECORD :
|
|
133
|
+
S_DIAGNOSE → S_FIX : confirmed, !skip_fix
|
|
134
|
+
S_DIAGNOSE → S_GENERALIZE : confirmed, skip_fix, !skip_generalize
|
|
135
|
+
S_DIAGNOSE → S_RECORD : confirmed, skip_fix, skip_generalize
|
|
152
136
|
S_DIAGNOSE → S_DIAGNOSE : all hypotheses failed, retries < 3 → A_ESCALATE_DIAGNOSIS
|
|
153
|
-
S_DIAGNOSE → S_RECORD : retries >= 3 →
|
|
137
|
+
S_DIAGNOSE → S_RECORD : retries >= 3 → INCONCLUSIVE
|
|
154
138
|
|
|
155
139
|
S_FIX → S_CONFIRM : fix implemented
|
|
156
140
|
S_CONFIRM → S_GENERALIZE : confirmed, !skip_generalize
|
|
@@ -160,26 +144,26 @@ S_CONFIRM → S_FIX : needs_rework
|
|
|
160
144
|
S_GENERALIZE → S_DISCOVER : similar code found
|
|
161
145
|
S_GENERALIZE → S_RECORD : no similar code
|
|
162
146
|
|
|
163
|
-
S_DISCOVER → S_DIAGNOSE : new bug
|
|
164
|
-
S_DISCOVER → S_FIX : same-pattern bug
|
|
165
|
-
S_DISCOVER → S_RECORD :
|
|
166
|
-
S_DISCOVER → S_RECORD : loops >= max_loops → log
|
|
147
|
+
S_DISCOVER → S_DIAGNOSE : new bug → cross_phase_loops++
|
|
148
|
+
S_DISCOVER → S_FIX : same-pattern bug + fix_template, !skip_fix → cross_phase_loops++
|
|
149
|
+
S_DISCOVER → S_RECORD : remaining_actionable == 0
|
|
150
|
+
S_DISCOVER → S_RECORD : loops >= max_loops → log per-item reasons
|
|
167
151
|
|
|
168
|
-
S_RECORD → END :
|
|
152
|
+
S_RECORD → END : complete
|
|
169
153
|
</transitions>
|
|
170
154
|
|
|
171
155
|
<actions>
|
|
172
156
|
|
|
173
157
|
### A_INTAKE
|
|
174
|
-
1. Parse arguments, generate slug, create
|
|
175
|
-
2.
|
|
176
|
-
3. Derive `phase_goals[]` from flags
|
|
158
|
+
1. Parse arguments, generate slug, create SESSION_DIR
|
|
159
|
+
2. `maestro search "<keywords>"` + Glob prior sessions + ARCHITECTURE.md + Grep keywords
|
|
160
|
+
3. Derive `phase_goals[]` from flags
|
|
177
161
|
4. Write `session.json` + `understanding.md` §1, emit Goal Prompt
|
|
178
162
|
|
|
179
|
-
|
|
163
|
+
Commit: `"odyssey-debug({slug}): INTAKE — parse target and load context"`
|
|
180
164
|
|
|
181
165
|
### A_RESUME_SESSION
|
|
182
|
-
|
|
166
|
+
Glob latest session → read `session.json` → jump to `current_state`.
|
|
183
167
|
|
|
184
168
|
### A_ARCHAEOLOGY
|
|
185
169
|
**Step 1 — Git archaeology (spawn_agents_on_csv, Wave 1):**
|
|
@@ -204,61 +188,48 @@ Merge results → evidence.ndjson (phase: "archaeology").
|
|
|
204
188
|
- PURPOSE: Review recent modifications related to {issue}
|
|
205
189
|
- EXPECTED: JSON [{commit_sha, risk_level, analysis, could_cause_issue, explanation}]
|
|
206
190
|
|
|
207
|
-
Update §2.
|
|
208
|
-
|
|
209
|
-
📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-debug({slug}): ARCHAEOLOGY — git 考古分析"`
|
|
191
|
+
Update §2. Commit: `"odyssey-debug({slug}): ARCHAEOLOGY — git history analysis"`
|
|
210
192
|
|
|
211
193
|
### A_EXPLORE
|
|
212
|
-
Skip if no
|
|
194
|
+
Skip if no CLI tools (W006).
|
|
213
195
|
|
|
214
196
|
`maestro delegate --role explore --mode analysis` (`run_in_background: true`):
|
|
215
|
-
- PURPOSE:
|
|
197
|
+
- PURPOSE: Call chains, recent changes, error gaps, similar patterns
|
|
216
198
|
- EXPECTED: JSON {call_chains, recent_changes, error_gaps, similar_patterns}
|
|
217
199
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-debug({slug}): EXPLORE — 代码探索完成"`
|
|
200
|
+
Write `explore.json` + evidence phase=explore. Update §3. Mark G2. Commit: `"odyssey-debug({slug}): EXPLORE — codebase exploration"`
|
|
221
201
|
|
|
222
202
|
### A_DIAGNOSE
|
|
223
|
-
1.
|
|
224
|
-
2. Test each
|
|
225
|
-
3.
|
|
226
|
-
4.
|
|
203
|
+
1. Hypotheses from evidence, ranked [HIGH]/[MEDIUM]/[LOW] → §4
|
|
204
|
+
2. Test each → evidence phase=diagnosis
|
|
205
|
+
3. Ambiguity → evidence phase=decision; Normal: request_user_input | `-y`: defer
|
|
206
|
+
4. Confirmed → `session.json.root_cause` + §5. Mark G1.
|
|
227
207
|
|
|
228
|
-
|
|
208
|
+
Commit: `"odyssey-debug({slug}): DIAGNOSE — root cause confirmed"`
|
|
229
209
|
|
|
230
210
|
### A_ESCALATE_DIAGNOSIS
|
|
231
|
-
|
|
211
|
+
`diagnosis_retries++`. < 3: `maestro delegate --role analyze`, new hypotheses, → S_DIAGNOSE. >= 3: Normal → request_user_input | `-y` → INCONCLUSIVE → S_RECORD.
|
|
232
212
|
|
|
233
213
|
### A_FIX
|
|
234
214
|
1. Present root cause + proposed fix. Normal: request_user_input | `-y`: auto proceed
|
|
235
|
-
2. Implement fix,
|
|
215
|
+
2. Implement fix, evidence phase=decision
|
|
236
216
|
|
|
237
|
-
|
|
217
|
+
Commit: `"odyssey-debug({slug}): FIX — {summary}"`
|
|
238
218
|
|
|
239
219
|
### A_CONFIRM
|
|
240
|
-
1. Run covering tests
|
|
241
|
-
2.
|
|
220
|
+
1. Run covering tests
|
|
221
|
+
2. `maestro delegate --role review --mode analysis` (`run_in_background: true`):
|
|
242
222
|
- EXPECTED: JSON {verdict, findings [{severity, description, suggestion}], regression_risk}
|
|
243
|
-
3.
|
|
244
|
-
4. Update §6. `needs_rework` → S_FIX. `confirmed` → mark G3
|
|
223
|
+
3. `session.json.confirmation`: `{test_result, cli_review, overall: "confirmed|needs_rework"}`
|
|
224
|
+
4. Update §6. `needs_rework` → S_FIX. `confirmed` → mark G3.
|
|
245
225
|
|
|
246
|
-
|
|
226
|
+
Commit: `"odyssey-debug({slug}): CONFIRM — fix verified"`
|
|
247
227
|
|
|
248
228
|
### A_GENERALIZE
|
|
249
|
-
Skip if `--skip-generalize`. Pattern
|
|
229
|
+
Skip if `--skip-generalize`. Pattern source: root cause + fix.
|
|
230
|
+
Base shared_actions for 3-layer extraction + cross-layer dedup + iterative deepening.
|
|
250
231
|
|
|
251
|
-
**
|
|
252
|
-
|
|
253
|
-
| Layer | Method | Example |
|
|
254
|
-
|-------|--------|---------|
|
|
255
|
-
| Syntax | Regex patterns (direct Grep) | `eval(`, missing `await`, unclosed resource |
|
|
256
|
-
| Semantic | Anti-pattern description (Agent scan) | Unhandled async errors, unvalidated input |
|
|
257
|
-
| Structural | Architecture-level similarity | Same import structure, missing override |
|
|
258
|
-
|
|
259
|
-
Write `session.json.patterns[]`: `[{id, source, layer, signature, description, risk, fix_template}]`
|
|
260
|
-
|
|
261
|
-
**Step 2 — 4-agent scan (spawn_agents_on_csv, Wave 2):**
|
|
232
|
+
**Wave 2 — 4-agent scan (spawn_agents_on_csv):**
|
|
262
233
|
|
|
263
234
|
Append Wave 2 rows to `tasks.csv`:
|
|
264
235
|
```csv
|
|
@@ -275,76 +246,49 @@ spawn_agents_on_csv({ csv_path:"tasks.csv", id_column:"id",
|
|
|
275
246
|
output_csv_path:"wave-2-results.csv", output_schema: SHARED_OUTPUT_SCHEMA })
|
|
276
247
|
```
|
|
277
248
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
**Step 4 — Iterative deepening**: module ≥3 hits → targeted deep scan (max 1 round).
|
|
249
|
+
Update §7. Mark G4. Commit: `"odyssey-debug({slug}): GENERALIZE — pattern scan complete"`
|
|
281
250
|
|
|
282
|
-
|
|
251
|
+
### A_DISCOVER, A_RECORD
|
|
252
|
+
Base shared_actions. Debug overrides:
|
|
253
|
+
- **A_DISCOVER** routes scan hits per csv_schema wave results. Commit: `"odyssey-debug({slug}): DISCOVER — triage complete"`
|
|
254
|
+
- **A_RECORD** learnings per Knowledge Persistence table
|
|
283
255
|
|
|
284
|
-
**
|
|
285
|
-
|
|
286
|
-
📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-debug({slug}): GENERALIZE — 泛化扫描完成"`
|
|
287
|
-
|
|
288
|
-
### A_DISCOVER
|
|
289
|
-
按 base A_DISCOVER 执行。Mark G5 done.
|
|
290
|
-
|
|
291
|
-
📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-debug({slug}): DISCOVER — 发现分类完成"`
|
|
292
|
-
|
|
293
|
-
### A_RECORD
|
|
294
|
-
1. Finalize `understanding.md` §9,按 Knowledge Persistence 表分类记录
|
|
295
|
-
2. Mark G6 done. Pending decisions: Normal → request_user_input | `-y` → skip (show deferred count)
|
|
296
|
-
3. 其余按 base A_RECORD 执行
|
|
297
|
-
4. **Completion summary**:
|
|
256
|
+
**Completion summary:**
|
|
298
257
|
```
|
|
299
258
|
--- DEBUG ODYSSEY COMPLETE ---
|
|
300
259
|
Issue: {issue}
|
|
301
260
|
Root cause: {root_cause.hypothesis}
|
|
302
261
|
Fix: {applied|skipped|inconclusive}
|
|
303
|
-
Patterns: {patterns_extracted} ({by_layer}
|
|
304
|
-
Scan hits: {total_hits} ({cross_layer_confirmed}
|
|
262
|
+
Patterns: {patterns_extracted} ({by_layer})
|
|
263
|
+
Scan hits: {total_hits} ({cross_layer_confirmed} confirmed)
|
|
305
264
|
Issues: {N} created
|
|
306
265
|
Decisions: {N} resolved, {M} pending, {K} deferred
|
|
307
|
-
Learnings: {N}
|
|
308
|
-
Self-iter: {N}
|
|
309
|
-
Goals: {done}/{total}
|
|
266
|
+
Learnings: {N} persisted
|
|
267
|
+
Self-iter: {N} rounds across {M} stages
|
|
268
|
+
Goals: {done}/{total} ({skipped} skipped)
|
|
310
269
|
---
|
|
311
270
|
```
|
|
312
271
|
|
|
313
|
-
📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-debug({slug}): RECORD — 会话总结与知识沉淀"`
|
|
314
|
-
|
|
315
272
|
</actions>
|
|
316
273
|
|
|
317
274
|
<appendix>
|
|
318
275
|
|
|
319
|
-
###
|
|
276
|
+
### `-y` debug-specific points
|
|
277
|
+
|
|
278
|
+
| Decision Point | Normal | `-y` |
|
|
279
|
+
|---------------|--------|------|
|
|
280
|
+
| A_DIAGNOSE ambiguity | request_user_input | deferred |
|
|
281
|
+
| A_ESCALATE 3-strike | request_user_input | INCONCLUSIVE |
|
|
282
|
+
| A_FIX direction | request_user_input | auto proceed |
|
|
320
283
|
|
|
321
|
-
|
|
284
|
+
### Goal Prompt convergence rules
|
|
322
285
|
|
|
323
286
|
```
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
{for each G in phase_goals where status != "skipped":}
|
|
328
|
-
- {G.id}: {G.goal} — 完成条件: {G.done_when}
|
|
329
|
-
{end for}
|
|
330
|
-
穷尽迭代:直到根因确认(或明确 INCONCLUSIVE)且修复验证通过
|
|
331
|
-
且泛化扫描穷尽且 phase_goals_all_done=true 才停。
|
|
332
|
-
泛化发现的同类 bug 全部修复或创建 issue,不允许遗留。
|
|
333
|
-
遇到 phase=decision 的 pending 必须 request_user_input,不得自行 resolve。
|
|
287
|
+
Stop when root cause confirmed (or INCONCLUSIVE), fix verified,
|
|
288
|
+
generalization exhausted, phase_goals_all_done=true.
|
|
289
|
+
All sibling bugs fixed or issued — no leftovers.
|
|
334
290
|
```
|
|
335
291
|
|
|
336
|
-
### `-y` Auto-Confirm Behavior
|
|
337
|
-
|
|
338
|
-
| Decision Point | Normal | `-y` mode |
|
|
339
|
-
|---------------|--------|-----------|
|
|
340
|
-
| A_DIAGNOSE ambiguity | request_user_input | `deferred`, best-effort continue |
|
|
341
|
-
| A_ESCALATE 3-strike | request_user_input 3-way | auto INCONCLUSIVE |
|
|
342
|
-
| A_FIX direction | request_user_input | auto proceed with suggested fix |
|
|
343
|
-
| A_DISCOVER bug triage | request_user_input | auto create issue |
|
|
344
|
-
| A_DISCOVER ambiguous | request_user_input batch | all `deferred` |
|
|
345
|
-
| A_RECORD decisions | request_user_input per-item | skip, show deferred count |
|
|
346
|
-
| A_RECORD goal audit | request_user_input 3-way | auto accept current state |
|
|
347
|
-
|
|
348
292
|
</appendix>
|
|
349
293
|
|
|
350
294
|
</state_machine>
|
|
@@ -352,33 +296,34 @@ Goals: {done}/{total} confirmed ({skipped} skipped)
|
|
|
352
296
|
<error_codes>
|
|
353
297
|
| Code | Severity | Condition | Recovery |
|
|
354
298
|
|------|----------|-----------|----------|
|
|
355
|
-
| E001 | error | No issue
|
|
356
|
-
|
|
|
357
|
-
|
|
|
358
|
-
|
|
|
359
|
-
|
|
|
299
|
+
| E001 | error | No issue, no session | Provide issue or -c |
|
|
300
|
+
| E002 | error | Target path not found | Check path |
|
|
301
|
+
| W001 | warning | No relevant git history | Proceed |
|
|
302
|
+
| W002 | warning | 3 retries exhausted | INCONCLUSIVE |
|
|
303
|
+
| W005 | warning | Pending decisions | Filter evidence phase=decision |
|
|
304
|
+
| W006 | warning | No CLI tools | Skip explore |
|
|
360
305
|
</error_codes>
|
|
361
306
|
|
|
362
307
|
<success_criteria>
|
|
363
|
-
- [ ] Session
|
|
364
|
-
- [ ]
|
|
308
|
+
- [ ] Session + 4 output files + prior knowledge searched
|
|
309
|
+
- [ ] Archaeology + CLI review → evidence phase=archaeology
|
|
365
310
|
- [ ] CLI exploration → explore.json + evidence phase=explore
|
|
366
|
-
- [ ] Hypotheses tested, root cause
|
|
367
|
-
- [ ] understanding.md
|
|
368
|
-
- [ ] Fix
|
|
369
|
-
- [ ]
|
|
370
|
-
- [ ] Discoveries classified
|
|
371
|
-
- [ ] phase_goals
|
|
372
|
-
- [ ] Completion summary
|
|
311
|
+
- [ ] Hypotheses tested, root cause with evidence refs
|
|
312
|
+
- [ ] understanding.md 9 sections progressive
|
|
313
|
+
- [ ] Fix + confirmed (unless --skip-fix)
|
|
314
|
+
- [ ] Generalization + scan (unless --skip-generalize)
|
|
315
|
+
- [ ] Discoveries classified; unfixed findings individually justified
|
|
316
|
+
- [ ] phase_goals + goal audit + resumable via -c
|
|
317
|
+
- [ ] Completion summary
|
|
373
318
|
</success_criteria>
|
|
374
319
|
|
|
375
320
|
<next_step_routing>
|
|
376
|
-
| Condition | Next
|
|
377
|
-
|
|
378
|
-
|
|
|
379
|
-
|
|
|
380
|
-
|
|
|
381
|
-
| Second opinion
|
|
321
|
+
| Condition | Next |
|
|
322
|
+
|-----------|------|
|
|
323
|
+
| Discovery issues | `/manage-issue list --source debug-odyssey` |
|
|
324
|
+
| Document pattern | `/learn-decompose <module>` |
|
|
325
|
+
| Formal review | `/quality-review <phase>` |
|
|
326
|
+
| Second opinion | `/learn-second-opinion <understanding.md>` |
|
|
382
327
|
| Related question | `/learn-investigate "<question>"` |
|
|
383
|
-
|
|
|
328
|
+
| Pending decisions | Filter evidence phase=decision status=pending |
|
|
384
329
|
</next_step_routing>
|