maestro-flow 0.5.37 → 0.5.39

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.
Files changed (216) hide show
  1. package/.agents/skills/maestro/SKILL.md +11 -5
  2. package/.agents/skills/maestro-ralph/SKILL.md +80 -12
  3. package/.agents/skills/maestro-ralph-execute/SKILL.md +17 -6
  4. package/.agents/skills/manage-drift-realign/SKILL.md +153 -0
  5. package/.agents/skills/odyssey-debug/SKILL.md +90 -269
  6. package/.agents/skills/odyssey-improve/SKILL.md +39 -240
  7. package/.agents/skills/odyssey-planex/SKILL.md +21 -105
  8. package/.agents/skills/odyssey-review-test-fix/SKILL.md +98 -318
  9. package/.agents/skills/odyssey-ui/SKILL.md +82 -265
  10. package/.agy/skills/maestro/SKILL.md +11 -5
  11. package/.agy/skills/maestro-ralph/SKILL.md +80 -12
  12. package/.agy/skills/maestro-ralph-execute/SKILL.md +17 -6
  13. package/.agy/skills/manage-drift-realign/SKILL.md +153 -0
  14. package/.agy/skills/odyssey-debug/SKILL.md +90 -269
  15. package/.agy/skills/odyssey-improve/SKILL.md +39 -240
  16. package/.agy/skills/odyssey-planex/SKILL.md +21 -105
  17. package/.agy/skills/odyssey-review-test-fix/SKILL.md +98 -318
  18. package/.agy/skills/odyssey-ui/SKILL.md +82 -265
  19. package/.claude/commands/maestro-ralph-execute.md +17 -6
  20. package/.claude/commands/maestro-ralph.md +80 -12
  21. package/.claude/commands/maestro.md +11 -5
  22. package/.claude/commands/manage-drift-realign.md +151 -0
  23. package/.claude/commands/odyssey-debug.md +90 -269
  24. package/.claude/commands/odyssey-improve.md +39 -240
  25. package/.claude/commands/odyssey-planex.md +21 -105
  26. package/.claude/commands/odyssey-review-test-fix.md +98 -318
  27. package/.claude/commands/odyssey-ui.md +82 -265
  28. package/.codex/skills/maestro/SKILL.md +16 -8
  29. package/.codex/skills/maestro-ralph/SKILL.md +138 -11
  30. package/.codex/skills/maestro-ralph-execute/SKILL.md +17 -6
  31. package/.codex/skills/manage-drift-realign/SKILL.md +471 -0
  32. package/.codex/skills/odyssey-debug/SKILL.md +167 -338
  33. package/.codex/skills/odyssey-improve/SKILL.md +226 -395
  34. package/.codex/skills/odyssey-planex/SKILL.md +317 -159
  35. package/.codex/skills/odyssey-review-test-fix/SKILL.md +137 -255
  36. package/.codex/skills/odyssey-ui/SKILL.md +197 -338
  37. package/README.md +25 -8
  38. package/README.zh-CN.md +6 -6
  39. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.d.ts +23 -2
  40. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js +242 -26
  41. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js.map +1 -1
  42. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.d.ts +2 -0
  43. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +92 -29
  44. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  45. package/dashboard/dist-server/src/commands/hooks.d.ts +2 -1
  46. package/dashboard/dist-server/src/commands/hooks.js +16 -9
  47. package/dashboard/dist-server/src/commands/hooks.js.map +1 -1
  48. package/dashboard/dist-server/src/commands/install-backend.d.ts +10 -0
  49. package/dashboard/dist-server/src/commands/install-backend.js +69 -0
  50. package/dashboard/dist-server/src/commands/install-backend.js.map +1 -1
  51. package/dashboard/dist-server/src/core/component-defs.d.ts +11 -0
  52. package/dashboard/dist-server/src/core/component-defs.js +34 -2
  53. package/dashboard/dist-server/src/core/component-defs.js.map +1 -1
  54. package/dashboard/dist-server/src/hooks/kg-sync-hook.js +5 -0
  55. package/dashboard/dist-server/src/hooks/kg-sync-hook.js.map +1 -1
  56. package/dashboard/dist-server/src/hooks/session-context.js +276 -3
  57. package/dashboard/dist-server/src/hooks/session-context.js.map +1 -1
  58. package/dashboard/dist-server/src/search/daemon-client.d.ts +8 -3
  59. package/dashboard/dist-server/src/search/daemon-client.js +20 -0
  60. package/dashboard/dist-server/src/search/daemon-client.js.map +1 -1
  61. package/dist/src/cli.js +3 -2
  62. package/dist/src/cli.js.map +1 -1
  63. package/dist/src/commands/domain.d.ts.map +1 -1
  64. package/dist/src/commands/domain.js +12 -3
  65. package/dist/src/commands/domain.js.map +1 -1
  66. package/dist/src/commands/hooks.d.ts +2 -1
  67. package/dist/src/commands/hooks.d.ts.map +1 -1
  68. package/dist/src/commands/hooks.js +16 -9
  69. package/dist/src/commands/hooks.js.map +1 -1
  70. package/dist/src/commands/install-backend.d.ts +10 -0
  71. package/dist/src/commands/install-backend.d.ts.map +1 -1
  72. package/dist/src/commands/install-backend.js +69 -0
  73. package/dist/src/commands/install-backend.js.map +1 -1
  74. package/dist/src/commands/install.js +34 -2
  75. package/dist/src/commands/install.js.map +1 -1
  76. package/dist/src/commands/ralph.d.ts.map +1 -1
  77. package/dist/src/commands/ralph.js +8 -0
  78. package/dist/src/commands/ralph.js.map +1 -1
  79. package/dist/src/commands/search.d.ts.map +1 -1
  80. package/dist/src/commands/search.js +59 -6
  81. package/dist/src/commands/search.js.map +1 -1
  82. package/dist/src/commands/spec.d.ts.map +1 -1
  83. package/dist/src/commands/spec.js +15 -0
  84. package/dist/src/commands/spec.js.map +1 -1
  85. package/dist/src/commands/timeline.d.ts +14 -0
  86. package/dist/src/commands/timeline.d.ts.map +1 -0
  87. package/dist/src/commands/timeline.js +377 -0
  88. package/dist/src/commands/timeline.js.map +1 -0
  89. package/dist/src/core/component-defs.d.ts +11 -0
  90. package/dist/src/core/component-defs.d.ts.map +1 -1
  91. package/dist/src/core/component-defs.js +34 -2
  92. package/dist/src/core/component-defs.js.map +1 -1
  93. package/dist/src/core/install-executor.d.ts.map +1 -1
  94. package/dist/src/core/install-executor.js +11 -1
  95. package/dist/src/core/install-executor.js.map +1 -1
  96. package/dist/src/core/install-profile.d.ts.map +1 -1
  97. package/dist/src/core/install-profile.js +52 -17
  98. package/dist/src/core/install-profile.js.map +1 -1
  99. package/dist/src/hooks/kg-sync-hook.d.ts.map +1 -1
  100. package/dist/src/hooks/kg-sync-hook.js +5 -0
  101. package/dist/src/hooks/kg-sync-hook.js.map +1 -1
  102. package/dist/src/hooks/session-context.d.ts.map +1 -1
  103. package/dist/src/hooks/session-context.js +276 -3
  104. package/dist/src/hooks/session-context.js.map +1 -1
  105. package/dist/src/i18n/locales/en.d.ts.map +1 -1
  106. package/dist/src/i18n/locales/en.js +4 -1
  107. package/dist/src/i18n/locales/en.js.map +1 -1
  108. package/dist/src/i18n/locales/zh.d.ts.map +1 -1
  109. package/dist/src/i18n/locales/zh.js +4 -1
  110. package/dist/src/i18n/locales/zh.js.map +1 -1
  111. package/dist/src/i18n/types.d.ts +3 -0
  112. package/dist/src/i18n/types.d.ts.map +1 -1
  113. package/dist/src/ralph/cmd-complete.d.ts +4 -0
  114. package/dist/src/ralph/cmd-complete.d.ts.map +1 -1
  115. package/dist/src/ralph/cmd-complete.js +8 -0
  116. package/dist/src/ralph/cmd-complete.js.map +1 -1
  117. package/dist/src/ralph/cmd-next.js +58 -8
  118. package/dist/src/ralph/cmd-next.js.map +1 -1
  119. package/dist/src/ralph/status-schema.d.ts +29 -2
  120. package/dist/src/ralph/status-schema.d.ts.map +1 -1
  121. package/dist/src/ralph/status-schema.js +1 -1
  122. package/dist/src/search/daemon-client.d.ts +8 -3
  123. package/dist/src/search/daemon-client.d.ts.map +1 -1
  124. package/dist/src/search/daemon-client.js +20 -0
  125. package/dist/src/search/daemon-client.js.map +1 -1
  126. package/dist/src/search/daemon.d.ts +3 -3
  127. package/dist/src/search/daemon.d.ts.map +1 -1
  128. package/dist/src/search/daemon.js +9 -3
  129. package/dist/src/search/daemon.js.map +1 -1
  130. package/dist/src/tui/install-ui/ComponentGrid.d.ts.map +1 -1
  131. package/dist/src/tui/install-ui/ComponentGrid.js +71 -38
  132. package/dist/src/tui/install-ui/ComponentGrid.js.map +1 -1
  133. package/dist/src/tui/install-ui/ComponentGrid.logic.d.ts +12 -3
  134. package/dist/src/tui/install-ui/ComponentGrid.logic.d.ts.map +1 -1
  135. package/dist/src/tui/install-ui/ComponentGrid.logic.js +21 -4
  136. package/dist/src/tui/install-ui/ComponentGrid.logic.js.map +1 -1
  137. package/dist/src/tui/install-ui/CyberItem.d.ts +3 -1
  138. package/dist/src/tui/install-ui/CyberItem.d.ts.map +1 -1
  139. package/dist/src/tui/install-ui/CyberItem.js +6 -5
  140. package/dist/src/tui/install-ui/CyberItem.js.map +1 -1
  141. package/dist/src/tui/install-ui/GroupedHub.d.ts +9 -0
  142. package/dist/src/tui/install-ui/GroupedHub.d.ts.map +1 -1
  143. package/dist/src/tui/install-ui/GroupedHub.js +54 -47
  144. package/dist/src/tui/install-ui/GroupedHub.js.map +1 -1
  145. package/dist/src/tui/install-ui/InstallConfirm.js +1 -1
  146. package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
  147. package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
  148. package/dist/src/tui/install-ui/InstallFlow.js +54 -5
  149. package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
  150. package/dist/src/tui/install-ui/types.d.ts +1 -0
  151. package/dist/src/tui/install-ui/types.d.ts.map +1 -1
  152. package/dist/src/tui/install-ui/types.js.map +1 -1
  153. package/dist/src/tui/install-ui/useInstallFlowState.d.ts +8 -2
  154. package/dist/src/tui/install-ui/useInstallFlowState.d.ts.map +1 -1
  155. package/dist/src/tui/install-ui/useInstallFlowState.js +145 -15
  156. package/dist/src/tui/install-ui/useInstallFlowState.js.map +1 -1
  157. package/dist/src/utils/update-notices.js +12 -0
  158. package/dist/src/utils/update-notices.js.map +1 -1
  159. package/package.json +1 -1
  160. package/workflows/agy-instructions.md +127 -88
  161. package/workflows/analyze.md +2 -2
  162. package/workflows/auto-test.md +7 -1
  163. package/workflows/blueprint.md +22 -19
  164. package/workflows/brainstorm.md +11 -3
  165. package/workflows/business-test.md +4 -0
  166. package/workflows/codebase-rebuild.md +8 -1
  167. package/workflows/codebase-refresh.md +7 -1
  168. package/workflows/codex-instructions.md +1 -1
  169. package/workflows/debug.md +5 -2
  170. package/workflows/domain-add.md +6 -0
  171. package/workflows/drift-realign.md +396 -0
  172. package/workflows/execute.md +5 -4
  173. package/workflows/explore-usage.md +2 -2
  174. package/workflows/finish-work.md +6 -6
  175. package/workflows/fork.md +2 -2
  176. package/workflows/grill.md +6 -5
  177. package/workflows/harvest.md +2 -2
  178. package/workflows/impeccable.md +3 -2
  179. package/workflows/init.md +7 -7
  180. package/workflows/integration-test.md +1 -0
  181. package/workflows/issue-gaps-analyze.codex.md +2 -0
  182. package/workflows/issue-gaps-analyze.md +4 -4
  183. package/workflows/issue-plan.md +1 -1
  184. package/workflows/knowhow.md +7 -1
  185. package/workflows/knowledge-audit.md +1 -1
  186. package/workflows/maestro-super.md +2 -2
  187. package/workflows/maestro.md +3 -3
  188. package/workflows/map.md +2 -2
  189. package/workflows/milestone-audit.md +1 -1
  190. package/workflows/milestone-complete.md +1 -1
  191. package/workflows/odyssey-base.md +258 -0
  192. package/workflows/plan.md +7 -6
  193. package/workflows/quick.md +8 -6
  194. package/workflows/ralph-amend-goal.md +177 -0
  195. package/workflows/refactor.md +2 -0
  196. package/workflows/retrospective.md +7 -3
  197. package/workflows/review.md +6 -4
  198. package/workflows/roadmap-common.md +3 -3
  199. package/workflows/roadmap.md +8 -5
  200. package/workflows/spec-generate.md +23 -18
  201. package/workflows/specs-load.md +1 -1
  202. package/workflows/specs-setup.md +2 -0
  203. package/workflows/sync.md +4 -2
  204. package/workflows/test-gen.md +1 -1
  205. package/workflows/test.md +1 -1
  206. package/workflows/ui-codify-extract.md +1 -0
  207. package/workflows/ui-codify-knowhow.md +1 -1
  208. package/workflows/ui-codify-package.md +1 -1
  209. package/workflows/ui-codify.md +9 -7
  210. package/workflows/ui-design.md +9 -7
  211. package/workflows/ui-style.md +6 -4
  212. package/workflows/verify.md +4 -4
  213. package/workflows/wiki-connect.md +2 -0
  214. package/workflows/wiki-digest.md +5 -3
  215. package/workflows/wiki-manage.md +4 -0
  216. package/workflows/maestro.codex.md +0 -365
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: odyssey-debug
3
3
  description: Long-running debug cycle — archaeology, diagnosis, fix, confirmation, generalization, discovery, and knowledge persistence
4
- argument-hint: "<issue> [--skip-fix] [--skip-generalize] [--auto] [-y] [-c]"
4
+ argument-hint: "<issue> [--skip-fix] [--skip-generalize] [--auto] [-y] [-c] [--heartbeat]"
5
5
  allowed-tools:
6
6
  - read_file
7
7
  - write_file
@@ -14,6 +14,8 @@ allowed-tools:
14
14
  ---
15
15
  <!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
16
16
 
17
+ <base>@~/.maestro/workflows/odyssey-base.md</base>
18
+
17
19
  <purpose>
18
20
  Closed-loop deep debugging: archaeology → explore → diagnose → fix & confirm → generalize → discover siblings → persist.
19
21
  Treats every bug as a learning signal with exhaustive iteration until root cause confirmed or INCONCLUSIVE.
@@ -23,8 +25,8 @@ Treats every bug as a learning signal with exhaustive iteration until root cause
23
25
  **范围内:** 单一 bug/issue 的完整闭环 — 考古 → 探索 → 诊断 → 修复 → 确认 → 泛化同类 → 沉淀
24
26
  **范围外:** 新功能开发 → `/odyssey-planex` | 代码质量审查 → `/odyssey-review-test-fix` | UI 视觉优化 → `/odyssey-ui` | 架构重设计 → `/maestro-plan`
25
27
  **探索自由度:** 边界内自由探索 — 可追踪任意调用链、分析任意历史、测试任意假设。泛化阶段可扫描全项目寻找同类问题。
26
- **Zero-residual principle:** Every finding MUST have a concrete action (fix / issue / decision). "Report and shelve" is not allowed. "Pre-existing issue" is not a valid skip reason — if discovered within scope, it must be addressed.
27
- **模板支持:** `--template <name>` 从预定义调查策略启动,跳过假设生成直接进入针对性诊断:
28
+ **Zero-residual principle:** Every finding MUST have a concrete action (fix / issue / decision). "Pre-existing issue" is not a valid skip reason.
29
+ **模板支持:** `--template <name>` 从预定义调查策略启动:
28
30
 
29
31
  | Template | 调查策略 | 适用场景 |
30
32
  |----------|---------|---------|
@@ -35,156 +37,74 @@ Treats every bug as a learning signal with exhaustive iteration until root cause
35
37
  | `crash` | stack trace → null chain → error propagation | 崩溃/异常 |
36
38
  </boundary>
37
39
 
38
- <execution_discipline>
39
- **三条铁律(所有阶段适用):**
40
-
41
- 1. **Phase auto-commit** — 每个阶段完成后**自动** `git commit`,无需用户确认
42
- - 代码变更 + understanding.md → `git add` → `git commit -m "odyssey-debug({slug}): {phase} — {摘要}"`
43
- - session.json / evidence.ndjson 为运行时状态,不纳入 commit
44
- - 确保每个阶段的进展可回溯、可恢复
45
-
46
- 2. **Confident edits only, but must attempt** — only modify what you're confident about; record decisions only when genuinely requiring human judgment
47
- - Confident → edit code directly, commit
48
- - Needs decision → record `evidence.ndjson {"phase":"decision","status":"pending"}`, don't touch code
49
- - No speculative changes
50
- - ⚠️ **Decision gate** — ONLY these qualify as decisions (not fixes):
51
- - Cross-module architectural tradeoffs requiring human direction
52
- - Ambiguous business semantics where the fix could alter intended behavior
53
- - Requires new dependency or breaking API change
54
- - ❌ "Unsure how to fix", "Large scope", "Pre-existing issue" are NOT valid decision reasons — either fix it, or explain specifically why it's unfixable
55
-
56
- 3. **多 CLI 辅助** — 利用 `maestro delegate` 调用多个 CLI 工具交叉验证
57
- - 关键判断用不同 `--role`(analyze / review / explore)获取多视角
58
- - 修复前后各做一次 CLI review 确认
59
- - 不同阶段可调用不同工具,综合多方意见再行动
60
-
61
- 4. **禁止以上下文消耗为由中断** — harness 自动处理 context compression,以"上下文不足"或"已执行 N 个阶段"为由中断属于纪律违反;必须完整走完状态机直到 S_RECORD → END
62
- </execution_discipline>
63
-
64
40
  <context>
65
41
  $ARGUMENTS — issue description and optional flags.
66
42
 
67
- **Flags:** `--skip-fix` analysis-only | `--skip-generalize` quick fix | `--template <name>` 预定义策略 | `--auto` no delegate confirmation | `-y` auto-confirm all decisions | `-c` resume last session
43
+ **Flags:** `--skip-fix` analysis-only | `--skip-generalize` quick fix | `--template <name>` 预定义策略 | `--auto` no delegate confirmation | `-y` auto-confirm all decisions | `-c` resume last session | `--heartbeat` enable /loop heartbeat
68
44
 
69
45
  **Session**: `SESSION_DIR = .workflow/scratch/{YYYYMMDD}-debug-odyssey-{slug}/`
46
+ **Output**: `session.json` | `evidence.ndjson` | `explore.json` | `understanding.md`
70
47
 
71
- **Output 4 files:**
72
- ```
73
- SESSION_DIR/
74
- ├── session.json # state + confirmation + patterns + phase_goals
75
- ├── evidence.ndjson # append-only evidence trail (phase field distinguishes origin)
76
- ├── explore.json # structured CLI exploration snapshot
77
- └── understanding.md # evolving narrative — 9 sections
78
- ```
79
-
80
- **session.json schema:**
48
+ **session.json unique fields:**
81
49
  ```json
82
- {
83
- "session_id": "debug-odyssey-{YYYYMMDD-HHmmss}", "issue": "",
84
- "flags": { "skip_fix": false, "skip_generalize": false, "auto": false, "auto_confirm": false },
85
- "current_state": "S_INTAKE", "diagnosis_retries": 0,
86
- "root_cause": null, "patterns": [], "confirmation": null,
87
- "phase_goals": [], "phase_goals_all_done": false, "self_iteration_log": [],
88
- "generalization_stats": null,
89
- "cross_phase_loops": 0, "max_loops": 5,
90
- "created_at": "", "updated_at": ""
91
- }
50
+ { "issue": "", "diagnosis_retries": 0, "root_cause": null, "confirmation": null,
51
+ "patterns": [], "generalization_stats": null, "cross_phase_loops": 0, "max_loops": 5 }
92
52
  ```
53
+ 共有字段(`progress_metrics`, `directions_tried` 等)见 base。
93
54
 
94
- **evidence.ndjson unified trail:**
95
- ```json
96
- {"ts":"","phase":"archaeology|explore|diagnosis|discovery|decision|self-iteration","type":"","source":"","content":"","note":""}
97
- ```
98
- Phase-specific fields:
99
- - `archaeology`: `sha`, `author`, `date`, `message`, `relevance` (high|medium|low)
55
+ **evidence.ndjson phases:** `archaeology|explore|diagnosis|discovery|decision|self-iteration`
56
+ - `archaeology`: `sha`, `author`, `date`, `message`, `relevance`
100
57
  - `explore`: `category` (call_chain|recent_change|error_gap|similar_pattern), `detail`
101
58
  - `diagnosis`: `hypothesis`, `result` (confirmed|disproved|inconclusive)
102
59
  - `discovery`: `file`, `line`, `classification` (safe|risk|bug), `action` (fix|issue|decision|skip)
103
- - `decision`: `question`, `options`, `context`, `status` (pending|resolved|deferred), `resolution`
60
+ - `decision`: `question`, `options`, `context`, `status`, `resolution`
104
61
  - `self-iteration`: `stage`, `round`, `assessment`, `expansion`
105
62
 
106
- **explore.json schema:**
107
- ```json
108
- {
109
- "call_chains": [{"entry":"","chain":["file:line"]}],
110
- "recent_changes": [{"file":"","commits":[{"sha":"","message":"","date":""}]}],
111
- "error_gaps": [{"file":"","line":0,"description":""}],
112
- "similar_patterns": [{"file":"","line":0,"description":""}],
113
- "cli_tool": "", "timestamp": ""
114
- }
115
- ```
63
+ **explore.json**: `{call_chains, recent_changes, error_gaps, similar_patterns, cli_tool, timestamp}`
116
64
 
117
- **phase_goals[] — auto-derived from flags:**
65
+ **phase_goals[]:**
118
66
 
119
67
  | ID | Goal | done_when | phase | skip_when |
120
68
  |----|------|-----------|-------|-----------|
121
- | G1 | Root cause identified | evidence.ndjson has phase=diagnosis result=confirmed | S_DIAGNOSE | — |
122
- | G2 | Explore context gathered | explore.json ≥1 category populated | S_EXPLORE | — |
69
+ | G1 | Root cause identified | phase=diagnosis result=confirmed | S_DIAGNOSE | — |
70
+ | G2 | Explore context gathered | explore.json ≥1 category | S_EXPLORE | — |
123
71
  | G3 | Fix applied and confirmed | confirmation.overall == confirmed | S_CONFIRM | skip_fix |
124
72
  | G4 | Pattern generalized | patterns[] ≥1 entry | S_GENERALIZE | skip_generalize |
125
73
  | G5 | Discoveries triaged | all scan hits classified | S_DISCOVER | skip_generalize |
126
- | G6 | Learnings persisted | spec entries created OR no actionable learnings | S_RECORD | — |
127
-
128
- When `flags[skip_when] == true` → auto set `status: "skipped"`, `completion_confirmed: true`.
74
+ | G6 | Learnings persisted | spec entries created OR none actionable | S_RECORD | — |
129
75
 
130
- **understanding.md — 9 sections (written by owning phase):**
131
- 1. Issue & Scope ← S_INTAKE | 2. Archaeology Summary ← S_ARCHAEOLOGY | 3. Exploration ← S_EXPLORE
132
- 4. Hypotheses & Testing ← S_DIAGNOSE | 5. Root Cause ← S_DIAGNOSE | 6. Fix & Confirmation ← S_FIX+S_CONFIRM
133
- 7. Generalization ← S_GENERALIZE | 8. Discoveries & Decisions ← S_DISCOVER | 9. Learnings ← S_RECORD
76
+ **understanding.md — 9 sections:**
77
+ 1. Issue & Scope ← S_INTAKE | 2. Archaeology ← S_ARCHAEOLOGY | 3. Exploration ← S_EXPLORE
78
+ 4. Hypotheses ← S_DIAGNOSE | 5. Root Cause ← S_DIAGNOSE | 6. Fix & Confirmation ← S_FIX+S_CONFIRM
79
+ 7. Generalization ← S_GENERALIZE | 8. Discoveries ← S_DISCOVER | 9. Learnings ← S_RECORD
134
80
 
135
81
  ### Pre-load(可选,缺失不阻塞)
136
82
 
137
- | 层级 | 命令 | 作用 |
138
- |------|------|------|
139
- | Codebase docs | Read `.workflow/codebase/ARCHITECTURE.md` | 模块边界,作为所有分析的上下文 |
140
- | Wiki search | `maestro search "<issue keywords>" --json` | 先前调查、相关决策(取 top 5) |
141
- | Specs + tools | `maestro load --type spec --category debug --keyword "<symptom>"` | 已知 issue/workaround + 可发现的 knowhow 工具 |
142
- | Role knowledge | `maestro search --category debug` 选相关 `maestro load --type knowhow --id <id>` | 累积领域知识 |
143
- | Prior sessions | `find_files(".workflow/scratch/*-debug-odyssey-*")` | 相关 odyssey 会话 |
144
-
145
- ### Knowledge Persistence(S_RECORD 中写入产出文件)
146
-
147
- S_RECORD 阶段将可沉淀知识 **写入 understanding.md §9 Learnings**,按以下分类结构化:
148
-
149
- | 分类 | 写入内容 | 后续建议命令 |
150
- |------|---------|-------------|
151
- | 反复根因模式 | 模式描述 + 触发条件 + 修复模板 | `/spec-add debug "..."` |
152
- | 非显而易见 workaround | 问题场景 + 解决方案 + 适用范围 | `/spec-add learning "..."` |
153
- | 架构边界违反 | 违反描述 + 正确边界 + 检查方法 | `/spec-add arch "..."` |
154
- | 可复用泛化 pattern | pattern 签名 + 风险说明 + fix 模板 | `/spec-add coding "..."` |
155
-
156
- **两步模式:** 执行中写入产出文件(临时记录)→ 任务完成后用户通过 next_step_routing 沉淀为永久知识。执行过程中不调用外部 Skill。
83
+ | 命令 | 作用 |
84
+ |------|------|
85
+ | Read `.workflow/codebase/ARCHITECTURE.md` | 模块边界 |
86
+ | `maestro search "<issue keywords>" --json` | 先前调查(top 5) |
87
+ | `maestro load --type spec --category debug --keyword "<symptom>"` | 已知 issue/workaround |
88
+ | `find_files(".workflow/scratch/*-debug-odyssey-*")` | 相关 odyssey 会话 |
89
+
90
+ ### Knowledge Persistence(S_RECORD → understanding.md §9)
91
+
92
+ | 分类 | 后续建议命令 |
93
+ |------|-------------|
94
+ | 反复根因模式 | `/spec-add debug "..."` |
95
+ | 非显而易见 workaround | `/spec-add learning "..."` |
96
+ | 架构边界违反 | `/spec-add arch "..."` |
97
+ | 可复用泛化 pattern | `/spec-add coding "..."` |
157
98
  </context>
158
99
 
159
100
  <self_iteration>
160
- **Quality Gate (适用: S_ARCHAEOLOGY, S_EXPLORE, S_DIAGNOSE, S_GENERALIZE)**
161
-
162
- | 维度 | sufficient | insufficient |
163
- |------|-----------|-------------|
164
- | Coverage | 已知相关文件/模块均已分析 | 遗漏 grep/git log 可发现的目标 |
165
- | Depth | ≥80% 发现有 file:line 级证据 | 多数仅泛泛描述 |
166
- | Actionability | 每条结论有具体后续动作 | 仅"建议关注"类无操作性结论 |
167
-
168
- **Rules:** phase complete → evaluate 3 dimensions → any insufficient → re-enter (max **3 rounds** per stage).
169
- - Round 1: widen scope — more dirs, git log depth ×2, extra delegate angles
170
- - Round 2: shift perspective — different CLI tool, reverse trace, manual code reading
171
- - Round 3: combine both + targeted deep-dive on remaining gaps
172
-
173
- **Exit:** all sufficient → advance | 3-round cap → log remaining gaps and continue. Record to `evidence.ndjson` + `session.json.self_iteration_log[]`.
101
+ 适用阶段: S_ARCHAEOLOGY, S_EXPLORE, S_DIAGNOSE, S_GENERALIZE
174
102
  </self_iteration>
175
103
 
176
104
  <state_machine>
177
105
 
178
106
  <states>
179
- S_INTAKE 解析问题、加载上下文、检查/恢复 session PERSIST: session.json + understanding.md §1
180
- S_ARCHAEOLOGY — 考古:git history + CLI 分析 PERSIST: evidence.ndjson (archaeology) + understanding.md §2
181
- S_EXPLORE — CLI 探索:调用链、错误间隙、相似模式 PERSIST: explore.json + evidence.ndjson (explore) + understanding.md §3
182
- S_DIAGNOSE — 假设驱动根因分析 PERSIST: evidence.ndjson (diagnosis|decision) + understanding.md §4-5
183
- S_FIX — 实现修复 (skip_fix 时跳过) PERSIST: code changes + evidence.ndjson (decision)
184
- S_CONFIRM — 测试 + CLI review 双重确认 (skip_fix 时跳过) PERSIST: session.json.confirmation + understanding.md §6
185
- S_GENERALIZE — 举一反三:提取 pattern,扫描相似代码 PERSIST: session.json.patterns + understanding.md §7
186
- S_DISCOVER — 评估发现,创建 issue / 记录决策 PERSIST: evidence.ndjson (discovery|decision) + understanding.md §8
187
- S_RECORD — 知识沉淀 + 目标审计 PERSIST: understanding.md §9 + spec entries
107
+ S_INTAKE S_ARCHAEOLOGY S_EXPLORE S_DIAGNOSE → S_FIX → S_CONFIRM → S_GENERALIZE → S_DISCOVER → S_RECORD → END
188
108
  </states>
189
109
 
190
110
  <transitions>
@@ -199,7 +119,7 @@ S_DIAGNOSE → S_FIX : root cause confirmed, !skip_fix
199
119
  S_DIAGNOSE → S_GENERALIZE : root cause confirmed, skip_fix, !skip_generalize
200
120
  S_DIAGNOSE → S_RECORD : root cause confirmed, skip_fix, skip_generalize
201
121
  S_DIAGNOSE → S_DIAGNOSE : all hypotheses failed, retries < 3 → A_ESCALATE_DIAGNOSIS
202
- S_DIAGNOSE → S_RECORD : all hypotheses failed, retries >= 3 → mark INCONCLUSIVE
122
+ S_DIAGNOSE → S_RECORD : retries >= 3 → mark INCONCLUSIVE
203
123
 
204
124
  S_FIX → S_CONFIRM : fix implemented
205
125
  S_CONFIRM → S_GENERALIZE : confirmed, !skip_generalize
@@ -209,10 +129,10 @@ S_CONFIRM → S_FIX : needs_rework
209
129
  S_GENERALIZE → S_DISCOVER : similar code found
210
130
  S_GENERALIZE → S_RECORD : no similar code
211
131
 
212
- S_DISCOVER → S_DIAGNOSE : discovery finds new bug worth investigating → cross_phase_loops++
213
- S_DISCOVER → S_FIX : discovery finds same-pattern bug, fix template applies, !skip_fix → cross_phase_loops++
214
- S_DISCOVER → S_RECORD : triage complete AND remaining_actionable == 0
215
- S_DISCOVER → S_RECORD : loops >= max_loops → MUST log each unfixed item with specific reason (blanket "pre-existing" is forbidden)
132
+ S_DISCOVER → S_DIAGNOSE : new bug worth investigating → cross_phase_loops++
133
+ S_DISCOVER → S_FIX : same-pattern bug, fix template applies, !skip_fix → cross_phase_loops++
134
+ S_DISCOVER → S_RECORD : triage complete, remaining_actionable == 0
135
+ S_DISCOVER → S_RECORD : loops >= max_loops → log each unfixed item with specific reason
216
136
 
217
137
  S_RECORD → END : A_RECORD complete
218
138
  </transitions>
@@ -220,12 +140,10 @@ S_RECORD → END : A_RECORD complete
220
140
  <actions>
221
141
 
222
142
  ### A_INTAKE
223
- 1. Parse arguments: issue description, flags
224
- 2. Generate slug, create `SESSION_DIR`
225
- 3. Search: `maestro search "<keywords>"` + Glob prior sessions + ARCHITECTURE.md + Grep keywords
226
- 4. Derive `phase_goals[]` from flags (apply `skip_when`)
227
- 5. Write `session.json` + `understanding.md` §1
228
- 6. Emit Goal Prompt (see Appendix)
143
+ 1. Parse arguments, generate slug, create `SESSION_DIR`
144
+ 2. Search: `maestro search "<keywords>"` + Glob prior sessions + ARCHITECTURE.md + Grep keywords
145
+ 3. Derive `phase_goals[]` from flags (apply `skip_when`)
146
+ 4. Write `session.json` + `understanding.md` §1, emit Goal Prompt
229
147
 
230
148
  📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-debug({slug}): INTAKE — 目标解析与上下文加载"`
231
149
 
@@ -233,139 +151,68 @@ S_RECORD → END : A_RECORD complete
233
151
  Find latest session via Glob → read `session.json` → display summary → jump to `current_state`.
234
152
 
235
153
  ### A_ARCHAEOLOGY
236
- **Git archaeology (2 parallel Agents):**
237
-
238
- | Agent | Task |
239
- |-------|------|
240
- | Timeline | `git log --oneline -20 -- {files}` → change timeline |
241
- | Blame | Top 3 suspicious files: `git blame -L {region}` → critical paths |
242
-
243
- Append findings to `evidence.ndjson` (phase: "archaeology").
244
-
245
- **CLI-assisted change review:**
246
- ```bash
247
- maestro delegate "PURPOSE: Review recent modifications related to: {issue}
248
- TASK: Analyze intent behind changes | Identify risky modifications | Flag potential bug sources
249
- MODE: analysis
250
- CONTEXT: @{relevant_files} | Git log: {top_10_commits}
251
- EXPECTED: JSON [{commit_sha, risk_level, analysis, could_cause_issue, explanation}]
252
- CONSTRAINTS: Focus on behavioral changes, not formatting
253
- " --role analyze --mode analysis
254
- ```
255
- Execute with `run_in_background: true`, then wait for callback (do NOT halt the Odyssey flow). Append results to evidence.
154
+ **2 parallel Agents:** Timeline (`git log --oneline -20 -- {files}`) + Blame (top 3 suspicious files `git blame -L {region}`). Append evidence (phase: "archaeology").
155
+
156
+ **CLI change review** via `maestro delegate --role analyze --mode analysis` (`run_in_background: true`):
157
+ - PURPOSE: Review recent modifications related to {issue}
158
+ - EXPECTED: JSON [{commit_sha, risk_level, analysis, could_cause_issue, explanation}]
256
159
 
257
- Update `understanding.md` §2.
160
+ Update §2.
258
161
 
259
162
  📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-debug({slug}): ARCHAEOLOGY — git 考古分析"`
260
163
 
261
164
  ### A_EXPLORE
262
165
  Skip if no enabled CLI tools (W006).
263
166
 
264
- ```bash
265
- maestro delegate "PURPOSE: Gather codebase evidence for: {issue}
266
- TASK: Trace call chains | Find recent changes | Identify error gaps | Check similar patterns
267
- MODE: analysis
268
- CONTEXT: @**/*
269
- EXPECTED: JSON {call_chains, recent_changes, error_gaps, similar_patterns}
270
- CONSTRAINTS: Max 20 entries/category | Symptom-related code paths
271
- Symptoms: {issue} Archaeology hints: {suspicious_commits}
272
- " --role explore --mode analysis
273
- ```
274
- Execute with `run_in_background: true`, then wait for callback (do NOT halt the Odyssey flow).
167
+ `maestro delegate --role explore --mode analysis` (`run_in_background: true`):
168
+ - PURPOSE: Gather codebase evidence call chains, recent changes, error gaps, similar patterns
169
+ - EXPECTED: JSON {call_chains, recent_changes, error_gaps, similar_patterns}
275
170
 
276
- Parse → write `explore.json` + append `evidence.ndjson` (phase: "explore"). Update §3. Mark G2 done.
171
+ Parse → write `explore.json` + evidence (phase: "explore"). Update §3. Mark G2 done.
277
172
 
278
173
  📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-debug({slug}): EXPLORE — 代码探索完成"`
279
174
 
280
175
  ### A_DIAGNOSE
281
- 1. **Form hypotheses** from evidence (archaeology + explore), ranked [HIGH]/[MEDIUM]/[LOW] → §4
282
- 2. **Test each** (rank order): design test → execute → append evidence (phase: "diagnosis")
283
- 3. **Decision journal**: ambiguity → evidence (phase: "decision"); Normal: ask_user | `-y`: defer
284
- 4. **Root cause**: confirmed → `session.json.root_cause` + §5. Mark G1 done.
176
+ 1. Form hypotheses from evidence, ranked [HIGH]/[MEDIUM]/[LOW] → §4
177
+ 2. Test each: design test → execute → evidence (phase: "diagnosis")
178
+ 3. Decision journal: ambiguity → evidence (phase: "decision"); Normal: ask_user | `-y`: defer
179
+ 4. Root cause confirmed → `session.json.root_cause` + §5. Mark G1 done.
285
180
 
286
181
  📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-debug({slug}): DIAGNOSE — 根因确认"`
287
182
 
288
183
  ### A_ESCALATE_DIAGNOSIS
289
- Increment `diagnosis_retries`. If < 3: broaden scope via `maestro delegate --role analyze` (same delegate format), form new hypotheses, return to S_DIAGNOSE. If >= 3: Normal → ask_user (broaden/new/INCONCLUSIVE) | `-y` → auto INCONCLUSIVE, proceed to S_RECORD. See Appendix: `-y` behavior.
184
+ Increment `diagnosis_retries`. < 3: broaden via `maestro delegate --role analyze`, new hypotheses, return S_DIAGNOSE. >= 3: Normal → ask_user | `-y` → auto INCONCLUSIVE S_RECORD.
290
185
 
291
186
  ### A_FIX
292
- 1. Present root cause + proposed fix. Normal: ask_user | `-y`: auto proceed (see Appendix)
293
- 2. Implement fix
294
- 3. Record in evidence (phase: "decision")
187
+ 1. Present root cause + proposed fix. Normal: ask_user | `-y`: auto proceed
188
+ 2. Implement fix, record evidence (phase: "decision")
295
189
 
296
190
  📌 **Auto-commit**: `git add -A && git commit -m "odyssey-debug({slug}): FIX — {修复摘要}"`
297
191
 
298
192
  ### A_CONFIRM
299
- 1. **Tests**: auto-detect framework, run covering tests
300
- 2. **CLI fix review**:
301
- ```bash
302
- maestro delegate "PURPOSE: Review fix for: {issue}
303
- TASK: Verify correctness | Check regressions | Assess completeness | Review edge cases
304
- MODE: analysis
305
- CONTEXT: @{modified_files} | Root cause: {summary} | Diff: {git_diff}
306
- EXPECTED: JSON {verdict, findings [{severity, description, suggestion}], regression_risk}
307
- CONSTRAINTS: Focus on correctness, not style
308
- " --role review --mode analysis
309
- ```
310
- Execute with `run_in_background: true`, then wait for callback (do NOT halt the Odyssey flow).
311
-
312
- 3. Write `session.json.confirmation`: `{test_result, cli_review, overall: "confirmed|needs_rework", timestamp}`
313
- 4. Update §6. `needs_rework` → S_FIX. `confirmed` → mark G3 done, advance.
193
+ 1. Run covering tests (auto-detect framework)
194
+ 2. CLI fix review via `maestro delegate --role review --mode analysis` (`run_in_background: true`):
195
+ - EXPECTED: JSON {verdict, findings [{severity, description, suggestion}], regression_risk}
196
+ 3. Write `session.json.confirmation`: `{test_result, cli_review, overall: "confirmed|needs_rework"}`
197
+ 4. Update §6. `needs_rework` S_FIX. `confirmed` mark G3 done.
314
198
 
315
199
  📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-debug({slug}): CONFIRM — 修复验证"`
316
200
 
317
201
  ### A_GENERALIZE
318
- 举一反三: multi-layer pattern extraction 4-agent scan cross-layer dedup iterative deepening.
319
-
320
- **Pattern extraction** from root cause + fix:
321
-
322
- | Layer | Method | Example |
323
- |-------|--------|---------|
324
- | Syntax | Regex patterns (direct Grep) | `eval(`, missing `await`, unclosed resource |
325
- | Semantic | Anti-pattern description (Agent-driven) | Unhandled async errors, unvalidated input |
326
- | Structural | Architecture-level (file/module similarity) | Same import structure, missing override |
327
-
328
- Write `session.json.patterns[]`: `[{id, source, layer, signature, description, risk, fix_template}]`
329
-
330
- **4-agent parallel codebase scan:**
331
-
332
- | Agent | Strategy | Input | Scope |
333
- |-------|----------|-------|-------|
334
- | Syntax grep | Grep syntax-layer regex | P*.signature | Full project |
335
- | Semantic scan | Understand + check anti-pattern | P*.description | Related modules |
336
- | Structural match | Find structurally similar files | Buggy file structure | Full project |
337
- | Historical grep | `git log -S "{pattern}"` | P*.signature | Full git history |
338
-
339
- Returns: `[{pattern_id, file, line, context, risk_level, layer, confidence}]`
340
-
341
- **Cross-layer dedup**: same file:line multi-layer hit → boost confidence | single-layer → `needs_review` | historical hit on fixed record → `regression_risk`
342
-
343
- **Iterative deepening**: module with ≥3 hits → targeted deep scan (max 1 round).
344
-
345
- **Quality Gate** (self-iteration) → if insufficient, expand and re-scan.
346
-
347
- Write §7 + `session.json.generalization_stats`: `{patterns_extracted, total_hits, cross_layer_confirmed, regression_risks, by_layer, deepening_triggered}`. Mark G4 done.
202
+ base A_GENERALIZE 执行。Pattern 来源: root cause + fix。统计写入 `session.json.generalization_stats`。Mark G4 done.
348
203
 
349
204
  📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-debug({slug}): GENERALIZE — 泛化扫描完成"`
350
205
 
351
206
  ### A_DISCOVER
352
- 1. **Triage** each hit: read ±10 lines context → classify `safe`/`risk`/`bug`
353
- 2. **Route**:
354
- - `bug` + directly fixable → **fix immediately** (not just log an issue) → back to S_FIX
355
- - `bug` + requires cross-module/architectural decision → create issue (with fix suggestion + impact analysis)
356
- - `risk` → evaluate if guard/validation can mitigate directly; if yes, fix it
357
- - `safe` → mark skip
358
- See Appendix `-y` behavior table. Append evidence (phase: "discovery" + "decision")
359
- 3. Update §8. Mark G5 done.
207
+ base A_DISCOVER 执行。Mark G5 done.
360
208
 
361
209
  📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-debug({slug}): DISCOVER — 发现分类完成"`
362
210
 
363
211
  ### A_RECORD
364
- 1. Finalize `understanding.md` §9
365
- 2. **Write learnings** to understanding.md §9: Knowledge Persistence 表分类记录(临时),completion summary 列出建议的 `/spec-add` 命令
366
- 3. Mark G6 done. Process pending decisions: Normal → ask_user | `-y` → skip (show deferred count)
367
- 4. **Goal audit**: all `completion_confirmed` true → `phase_goals_all_done = true`. Any false: Normal → ask_user (回退/跳过/接受) | `-y` → auto accept
368
- 5. **Completion**: `current_state = "COMPLETED"`, emit summary:
212
+ 1. Finalize `understanding.md` §9,按 Knowledge Persistence 表分类记录
213
+ 2. Mark G6 done. Pending decisions: Normal ask_user | `-y` skip (show deferred count)
214
+ 3. 其余按 base A_RECORD 执行
215
+ 4. **Completion summary**:
369
216
  ```
370
217
  --- DEBUG ODYSSEY COMPLETE ---
371
218
  Issue: {issue}
@@ -389,7 +236,7 @@ Goals: {done}/{total} confirmed ({skipped} skipped)
389
236
 
390
237
  ### Goal Prompt Template
391
238
 
392
- **时机守卫:仅在 A_INTAKE 完成后显示一次。A_RECORD 完成时禁止重新显示。**
239
+ **时机守卫:仅在 A_INTAKE 完成后显示一次。** 机制见 base。
393
240
 
394
241
  ```
395
242
  📋 Debug Odyssey 会话已创建。可随时复制以下 /goal 设定终止条件:
@@ -399,34 +246,23 @@ Goals: {done}/{total} confirmed ({skipped} skipped)
399
246
  - {G.id}: {G.goal} — 完成条件: {G.done_when}
400
247
  {end for}
401
248
  穷尽迭代:直到根因确认(或明确 INCONCLUSIVE)且修复验证通过
402
- 且泛化扫描穷尽(所有 hits 已分类处理)且 phase_goals_all_done=true 才停。
403
- 假设失败时扩范围→换视角→升级工具,不轻易放弃。
249
+ 且泛化扫描穷尽且 phase_goals_all_done=true 才停。
404
250
  泛化发现的同类 bug 全部修复或创建 issue,不允许遗留。
405
251
  遇到 phase=decision 的 pending 必须 ask_user,不得自行 resolve。
406
252
  ```
407
253
 
408
- Odyssey 输出提示词后继续执行不阻塞。`/goal` 由用户任意时刻输入。
409
-
410
254
  ### `-y` Auto-Confirm Behavior
411
255
 
412
256
  | Decision Point | Normal | `-y` mode |
413
257
  |---------------|--------|-----------|
414
- | A_DIAGNOSE ambiguity | ask_user blocks | record `deferred`, best-effort continue |
258
+ | A_DIAGNOSE ambiguity | ask_user | `deferred`, best-effort continue |
415
259
  | A_ESCALATE 3-strike | ask_user 3-way | auto INCONCLUSIVE |
416
- | A_FIX direction | ask_user confirm | auto proceed with suggested fix |
417
- | A_DISCOVER bug triage | ask_user route | auto create issue |
260
+ | A_FIX direction | ask_user | auto proceed with suggested fix |
261
+ | A_DISCOVER bug triage | ask_user | auto create issue |
418
262
  | A_DISCOVER ambiguous | ask_user batch | all `deferred` |
419
263
  | A_RECORD decisions | ask_user per-item | skip, show deferred count |
420
264
  | A_RECORD goal audit | ask_user 3-way | auto accept current state |
421
265
 
422
- `deferred` items shown as "待决策" in completion summary; recoverable via `-c`.
423
-
424
- ### Phase Goal Lifecycle
425
-
426
- `pending → done (confirmed=true)` normal | `pending → skipped (confirmed=true)` flags/manual | `pending → failed (confirmed=false)` INCONCLUSIVE
427
-
428
- `phase_goals_all_done = true` only when ALL goals have `completion_confirmed == true`.
429
-
430
266
  </appendix>
431
267
 
432
268
  </state_machine>
@@ -435,37 +271,22 @@ Odyssey 输出提示词后继续执行不阻塞。`/goal` 由用户任意时刻
435
271
  | Code | Severity | Condition | Recovery |
436
272
  |------|----------|-----------|----------|
437
273
  | E001 | error | No issue and no session to resume | Provide issue or use -c |
438
- | E003 | error | Resume but no session found | Start new session |
439
- | E004 | error | Delegate execution failed | Retry or proceed without CLI |
440
274
  | W001 | warning | No relevant git history | Proceed with limited context |
441
275
  | W002 | warning | All hypotheses inconclusive after 3 retries | INCONCLUSIVE |
442
- | W003 | warning | Generalization scan 0 hits | Skip discovery |
443
- | W004 | warning | Delegate parse failed | Use raw output |
444
276
  | W005 | warning | Pending decisions unresolved | Filter evidence.ndjson phase=decision |
445
277
  | W006 | warning | CLI exploration skipped (no tools) | Proceed without explore.json |
446
278
  </error_codes>
447
279
 
448
280
  <success_criteria>
449
- - [ ] Session directory created with 4 output files
450
- - [ ] Prior knowledge searched (maestro search + sessions + architecture)
451
- - [ ] Git archaeology (log + blame) + CLI change review, evidence.ndjson phase=archaeology
452
- - [ ] CLI exploration, explore.json written, evidence phase=explore
453
- - [ ] Hypotheses formed from archaeology + explore, tested and logged phase=diagnosis
454
- - [ ] Root cause declared with evidence refs
281
+ - [ ] Session created with 4 output files, prior knowledge searched
282
+ - [ ] Git archaeology + CLI change review evidence phase=archaeology
283
+ - [ ] CLI exploration explore.json + evidence phase=explore
284
+ - [ ] Hypotheses tested, root cause declared with evidence refs
455
285
  - [ ] understanding.md tracks all 9 sections progressively
456
- - [ ] Fix implemented + confirmed with test + CLI review (unless --skip-fix)
457
- - [ ] Multi-layer patterns (syntax/semantic/structural) extracted (unless --skip-generalize)
458
- - [ ] 4-agent scan + cross-layer dedup + iterative deepening for ≥3 hits/module
459
- - [ ] Discoveries classified and routed (fix/issue/decision/skip)
460
- - [ ] **Every unfixed finding has individual classification and reason** — blanket "pre-existing" labels are forbidden
461
- - [ ] Decision journal: all human-judgment items in evidence.ndjson phase=decision
462
- - [ ] phase_goals derived from flags, skip_when applied, each phase marks its goal
463
- - [ ] Goal audit in A_RECORD — unmet goals surfaced, phase_goals_all_done set correctly
464
- - [ ] Goal Prompt displayed once after session creation
465
- - [ ] `-y`: all decisions auto-resolve/defer, deferred count in summary
466
- - [ ] State saved at each transition (resumable via -c)
467
- - [ ] Quality Gate self-iteration when insufficient, logged in self_iteration_log
468
- - [ ] Spec entries persisted for reusable learnings
286
+ - [ ] Fix implemented + confirmed (unless --skip-fix)
287
+ - [ ] Multi-layer generalization + scan (unless --skip-generalize)
288
+ - [ ] Discoveries classified and routed; every unfixed finding individually justified
289
+ - [ ] phase_goals derived, goal audit in A_RECORD, state resumable via -c
469
290
  - [ ] Completion summary with all stats
470
291
  </success_criteria>
471
292