maestro-flow 0.5.39 → 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.
Files changed (139) hide show
  1. package/.agents/skills/odyssey-debug/SKILL.md +109 -143
  2. package/.agents/skills/odyssey-improve/SKILL.md +127 -141
  3. package/.agents/skills/odyssey-planex/SKILL.md +140 -231
  4. package/.agents/skills/odyssey-review-test-fix/SKILL.md +136 -90
  5. package/.agents/skills/odyssey-ui/SKILL.md +123 -143
  6. package/.agy/skills/odyssey-debug/SKILL.md +109 -143
  7. package/.agy/skills/odyssey-improve/SKILL.md +127 -141
  8. package/.agy/skills/odyssey-planex/SKILL.md +140 -231
  9. package/.agy/skills/odyssey-review-test-fix/SKILL.md +136 -90
  10. package/.agy/skills/odyssey-ui/SKILL.md +123 -143
  11. package/.claude/commands/odyssey-debug.md +109 -143
  12. package/.claude/commands/odyssey-improve.md +127 -141
  13. package/.claude/commands/odyssey-planex.md +140 -231
  14. package/.claude/commands/odyssey-review-test-fix.md +136 -90
  15. package/.claude/commands/odyssey-ui.md +123 -143
  16. package/.codex/agents/cli-explore-agent.toml +181 -0
  17. package/.codex/agents/cross-role-reviewer.toml +165 -0
  18. package/.codex/agents/impeccable-agent.toml +89 -0
  19. package/.codex/agents/role-design-author.toml +213 -0
  20. package/.codex/agents/team-worker.toml +4 -7
  21. package/.codex/agents/ui-design-agent.toml +260 -0
  22. package/.codex/agents/workflow-analyzer.toml +106 -0
  23. package/.codex/agents/workflow-codebase-mapper.toml +69 -0
  24. package/.codex/agents/workflow-collab-planner.toml +140 -0
  25. package/.codex/agents/workflow-debugger.toml +95 -0
  26. package/.codex/agents/workflow-executor.toml +124 -0
  27. package/.codex/agents/workflow-external-researcher.toml +80 -0
  28. package/.codex/agents/workflow-integration-checker.toml +76 -0
  29. package/.codex/agents/workflow-nyquist-auditor.toml +77 -0
  30. package/.codex/agents/workflow-phase-researcher.toml +76 -0
  31. package/.codex/agents/workflow-plan-checker.toml +93 -0
  32. package/.codex/agents/workflow-planner.toml +192 -0
  33. package/.codex/agents/workflow-project-researcher.toml +65 -0
  34. package/.codex/agents/workflow-research-synthesizer.toml +65 -0
  35. package/.codex/agents/workflow-reviewer.toml +75 -0
  36. package/.codex/agents/workflow-roadmapper.toml +75 -0
  37. package/.codex/agents/workflow-verifier.toml +113 -0
  38. package/.codex/skills/maestro/SKILL.md +1 -0
  39. package/.codex/skills/maestro-analyze/SKILL.md +33 -15
  40. package/.codex/skills/maestro-brainstorm/SKILL.md +13 -10
  41. package/.codex/skills/maestro-collab/SKILL.md +30 -75
  42. package/.codex/skills/maestro-execute/SKILL.md +19 -12
  43. package/.codex/skills/maestro-grill/SKILL.md +12 -11
  44. package/.codex/skills/maestro-next/SKILL.md +3 -3
  45. package/.codex/skills/maestro-overlay/SKILL.md +1 -1
  46. package/.codex/skills/maestro-plan/SKILL.md +17 -8
  47. package/.codex/skills/maestro-ralph/SKILL.md +3 -0
  48. package/.codex/skills/maestro-ralph-execute/SKILL.md +1 -0
  49. package/.codex/skills/maestro-roadmap/SKILL.md +14 -8
  50. package/.codex/skills/manage-learn/SKILL.md +1 -1
  51. package/.codex/skills/odyssey-debug/SKILL.md +176 -150
  52. package/.codex/skills/odyssey-improve/SKILL.md +210 -177
  53. package/.codex/skills/odyssey-planex/SKILL.md +162 -242
  54. package/.codex/skills/odyssey-review-test-fix/SKILL.md +96 -90
  55. package/.codex/skills/odyssey-ui/SKILL.md +211 -179
  56. package/.codex/skills/quality-review/SKILL.md +17 -10
  57. package/.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md +6 -12
  58. package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +6 -14
  59. package/.codex/skills/team-lifecycle-v4/roles/executor/commands/implement.md +2 -6
  60. package/.codex/skills/team-lifecycle-v4/roles/planner/role.md +6 -14
  61. package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +3 -7
  62. package/.codex/skills/team-quality-assurance/roles/scout/role.md +2 -5
  63. package/.codex/skills/team-review/roles/reviewer/role.md +2 -5
  64. package/.codex/skills/team-review/roles/scanner/role.md +2 -5
  65. package/.codex/skills/team-tech-debt/roles/executor/role.md +3 -7
  66. package/.codex/skills/team-tech-debt/roles/scanner/role.md +2 -5
  67. package/.codex/skills/team-tech-debt/roles/validator/role.md +3 -7
  68. package/.codex/skills/team-testing/roles/executor/role.md +3 -7
  69. package/.codex/skills/team-testing/roles/generator/role.md +3 -7
  70. package/dashboard/dist-server/src/commands/install-backend.js +19 -0
  71. package/dashboard/dist-server/src/commands/install-backend.js.map +1 -1
  72. package/dashboard/dist-server/src/core/manifest.d.ts +5 -0
  73. package/dashboard/dist-server/src/core/manifest.js.map +1 -1
  74. package/dashboard/dist-server/src/core/plugin-bridge.d.ts +59 -0
  75. package/dashboard/dist-server/src/core/plugin-bridge.js +355 -0
  76. package/dashboard/dist-server/src/core/plugin-bridge.js.map +1 -0
  77. package/dashboard/dist-server/src/tools/spec-loader.js +27 -19
  78. package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
  79. package/dashboard/dist-server/src/tools/spec-seeds.d.ts +8 -0
  80. package/dashboard/dist-server/src/tools/spec-seeds.js +114 -0
  81. package/dashboard/dist-server/src/tools/spec-seeds.js.map +1 -1
  82. package/dist/src/cli.js +19 -1
  83. package/dist/src/cli.js.map +1 -1
  84. package/dist/src/commands/install-backend.d.ts.map +1 -1
  85. package/dist/src/commands/install-backend.js +19 -0
  86. package/dist/src/commands/install-backend.js.map +1 -1
  87. package/dist/src/commands/install.d.ts.map +1 -1
  88. package/dist/src/commands/install.js +17 -1
  89. package/dist/src/commands/install.js.map +1 -1
  90. package/dist/src/commands/plugin.d.ts +3 -0
  91. package/dist/src/commands/plugin.d.ts.map +1 -0
  92. package/dist/src/commands/plugin.js +137 -0
  93. package/dist/src/commands/plugin.js.map +1 -0
  94. package/dist/src/commands/spec.d.ts.map +1 -1
  95. package/dist/src/commands/spec.js +13 -3
  96. package/dist/src/commands/spec.js.map +1 -1
  97. package/dist/src/commands/update.d.ts.map +1 -1
  98. package/dist/src/commands/update.js +23 -0
  99. package/dist/src/commands/update.js.map +1 -1
  100. package/dist/src/core/install-executor.d.ts +1 -1
  101. package/dist/src/core/install-executor.d.ts.map +1 -1
  102. package/dist/src/core/install-executor.js +27 -0
  103. package/dist/src/core/install-executor.js.map +1 -1
  104. package/dist/src/core/install-profile.d.ts +5 -0
  105. package/dist/src/core/install-profile.d.ts.map +1 -1
  106. package/dist/src/core/install-profile.js +8 -0
  107. package/dist/src/core/install-profile.js.map +1 -1
  108. package/dist/src/core/manifest.d.ts +5 -0
  109. package/dist/src/core/manifest.d.ts.map +1 -1
  110. package/dist/src/core/manifest.js.map +1 -1
  111. package/dist/src/core/plugin-bridge.d.ts +60 -0
  112. package/dist/src/core/plugin-bridge.d.ts.map +1 -0
  113. package/dist/src/core/plugin-bridge.js +355 -0
  114. package/dist/src/core/plugin-bridge.js.map +1 -0
  115. package/dist/src/tools/spec-init.d.ts +4 -3
  116. package/dist/src/tools/spec-init.d.ts.map +1 -1
  117. package/dist/src/tools/spec-init.js +9 -5
  118. package/dist/src/tools/spec-init.js.map +1 -1
  119. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  120. package/dist/src/tools/spec-loader.js +27 -19
  121. package/dist/src/tools/spec-loader.js.map +1 -1
  122. package/dist/src/tools/spec-seeds.d.ts +8 -0
  123. package/dist/src/tools/spec-seeds.d.ts.map +1 -1
  124. package/dist/src/tools/spec-seeds.js +114 -0
  125. package/dist/src/tools/spec-seeds.js.map +1 -1
  126. package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
  127. package/dist/src/tui/install-ui/InstallFlow.js +43 -14
  128. package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
  129. package/dist/src/tui/install-ui/types.d.ts +2 -0
  130. package/dist/src/tui/install-ui/types.d.ts.map +1 -1
  131. package/dist/src/tui/install-ui/types.js.map +1 -1
  132. package/dist/src/tui/install-ui/useInstallFlowState.d.ts.map +1 -1
  133. package/dist/src/tui/install-ui/useInstallFlowState.js +13 -1
  134. package/dist/src/tui/install-ui/useInstallFlowState.js.map +1 -1
  135. package/dist/src/utils/update-notices.js +11 -0
  136. package/dist/src/utils/update-notices.js.map +1 -1
  137. package/package.json +1 -1
  138. package/workflows/odyssey-base-codex.md +306 -0
  139. package/workflows/shell-exec-protocol.md +30 -0
@@ -4,34 +4,25 @@ description: "Deep review + fix cycle — archaeology, exploration, multi-dimens
4
4
  argument-hint: "<target> [--dimensions <list>] [--fix-threshold critical|high|medium|low|all] [--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
- Deep code review with exhaustive fix: archaeologyexploremulti-dimensional review
11
- fix ALL findings → confirm → generalize → discover → persist. Zero-residual philosophy.
12
-
13
- **三句哲学约束(穷尽迭代):**
14
- 1. **零遗留** — 每个 finding 必须是 action item(修复 / issue / 决策),不允许只报告不处理
15
- 2. **穷尽迭代** — 按 severity 从高到低逐轮修复,直到 0 remaining actionable findings 才退出 fix loop
16
- 3. **改进即标准** — 每次修复后重审同区域,发现新问题继续修,直到该区域无可改善
17
-
18
- Core behaviors:
19
- - **Find one, fix one, find all** — every finding triggers fix + codebase-wide scan
20
- - **Record everything** — ambiguous items → decision journal, never silent skip
21
- - **CLI-assisted** — delegate for multi-angle analysis
10
+ archaeology explore → multi-dimensional review fix ALL findings confirmgeneralize → discover → persist. Zero-residual: every finding must have an action (fix/issue/decision).
22
11
  </purpose>
23
12
 
24
13
  <boundary>
25
- **范围内:** 目标代码的多维度深度审查穷尽修复 ALL 发现(按 severity 递降)→ 泛化 pattern 到全项目
26
- **范围外:** 深度根因调查 → `$odyssey-debug` | 需求实现 → `$odyssey-planex` | UI 视觉优化 → `$odyssey-ui`
27
- **探索自由度:** 边界内自由探索 — 跨维度关联、追溯 git 历史、泛化扫描全项目。修复 ALL findings within fix_threshold(默认 all)。
28
- **Zero-residual principle:** Every finding MUST have a concrete action (fix / issue / decision). "Report and shelve" and "pre-existing skip" are forbidden.
14
+ **In scope:** Target code multi-dimensional review exhaustive fix ALL findings (by severity desc) generalize patterns project-wide.
15
+ **Out of scope:** Deep root cause → `$odyssey-debug` | Requirements → `$odyssey-planex` | UI visual → `$odyssey-ui`
16
+
17
+ **Review dimensions:** correctness, security, performance, architecture (filterable via `--dimensions`).
18
+ **Zero-residual:** Every finding MUST have a concrete action. "Report and shelve" and "pre-existing skip" are forbidden.
29
19
  </boundary>
30
20
 
31
21
  <context>
32
- $ARGUMENTS — target and optional flags.
22
+ $ARGUMENTS
33
23
 
34
24
  **Target resolution:**
25
+
35
26
  | Input | Resolution |
36
27
  |-------|-----------|
37
28
  | File/dir path | Review those files |
@@ -39,44 +30,48 @@ $ARGUMENTS — target and optional flags.
39
30
  | Phase number | state.json → changed files |
40
31
  | PR number | `git diff main...HEAD` |
41
32
 
42
- **Flags:**
43
- | Flag | Effect | Default |
44
- |------|--------|---------|
45
- | `--dimensions` | Comma-separated subset | correctness,security,performance,architecture |
46
- | `--fix-threshold` | 修复到哪个 severity 为止 | `all` |
47
- | `--skip-fix` | Skip S_FIX + S_CONFIRM | false |
48
- | `--skip-generalize` | Skip S_GENERALIZE + S_DISCOVER | false |
49
- | `--auto` `-y` `-c` `--heartbeat` | CLI auto / auto-confirm / resume / heartbeat | false |
33
+ **Flags:** `--dimensions <list>` subset of 4 dims | `--fix-threshold <sev>` default `all` | `--skip-fix` skip S_FIX+S_CONFIRM | `--skip-generalize` skip S_GENERALIZE+S_DISCOVER | `--auto` `-y` `-c` `--heartbeat`
50
34
 
51
35
  **Session**: `.workflow/scratch/{YYYYMMDD}-review-odyssey-{slug}/`
52
- **Output**: session.json, evidence.ndjson, explore.json, understanding.md (§18)
53
- **session.json unique fields**: `target`, `dimensions`, `review_result` (with `remaining_actionable`), `patterns[]`, `confirmation`, `generalization_stats`
54
- **evidence.ndjson phases**: archaeology, explore, review, fix, discovery, decision, self-iteration
36
+ **Output**: `session.json` | `evidence.ndjson` | `explore.json` | `understanding.md` (sections 1-8)
37
+
38
+ **session.json review-specific fields:**
39
+ ```json
40
+ { "target": "", "dimensions": [], "review_result": { "remaining_actionable": 0 },
41
+ "patterns": [], "confirmation": null, "generalization_stats": null }
42
+ ```
43
+
44
+ **evidence.ndjson phases:** `archaeology|explore|review|fix|discovery|decision|self-iteration`
55
45
 
56
46
  **phase_goals[]:**
57
- | ID | Goal | Done When | Phase | skip_when |
47
+
48
+ | ID | Goal | done_when | phase | skip_when |
58
49
  |----|------|-----------|-------|-----------|
59
50
  | G1 | Review completed | all dimensions reviewed | S_REVIEW | — |
60
51
  | G2 | Explore context | explore.json populated | S_EXPLORE | — |
61
52
  | G3 | Zero remaining | `remaining_actionable == 0` | S_CONFIRM | skip_fix |
62
- | G4 | Pattern generalized | patterns[] 1 | S_GENERALIZE | skip_generalize |
53
+ | G4 | Pattern generalized | patterns[] >= 1 | S_GENERALIZE | skip_generalize |
63
54
  | G5 | Discoveries triaged | all hits classified | S_DISCOVER | skip_generalize |
64
55
  | G6 | Learnings persisted | spec entries or no actionable | S_RECORD | — |
65
56
 
66
- ### Pre-load
67
- Specs: `maestro load --type spec --category review`。其余按 base Pre-load。
57
+ Specs: `maestro load --type spec --category review`. Rest per base Pre-load.
68
58
 
69
- ### Knowledge Persistence
70
- | 分类 | 后续建议命令 |
71
- |------|-------------|
72
- | 跨维度反复 pattern | `$spec-add review "..."` |
73
- | 安全发现 | `$spec-add debug "..."` |
74
- | 架构违反 pattern | `$spec-add arch "..."` |
75
- | 可复用泛化 pattern | `$spec-add coding "..."` |
59
+ **Knowledge Persistence (S_RECORD → understanding.md section 8):**
60
+
61
+ | Category | Content | Follow-up |
62
+ |----------|---------|-----------|
63
+ | Cross-dimension recurring pattern | Pattern + affected dimensions + coding standard | `$spec-add review` |
64
+ | Security finding | Vulnerability type + trigger + fix approach | `$spec-add debug` |
65
+ | Architecture violation pattern | Violation + correct boundary + verification | `$spec-add arch` |
66
+ | Reusable generalization pattern | Signature + risk + fix template | `$spec-add coding` |
76
67
  </context>
77
68
 
69
+ <invariants>
70
+ Base invariants + auto-commit per phase + zero silent drops (every finding → action).
71
+ </invariants>
72
+
78
73
  <self_iteration>
79
- 适用阶段: S_ARCHAEOLOGY, S_EXPLORE, S_REVIEW, S_FIX, S_GENERALIZE
74
+ Applies to: **S_ARCHAEOLOGY, S_EXPLORE, S_REVIEW, S_FIX, S_GENERALIZE**. Logic in base.
80
75
  </self_iteration>
81
76
 
82
77
  <csv_schema>
@@ -104,6 +99,7 @@ id,title,description,task_type,dimension,deps,wave,status,findings,evidence,erro
104
99
  ```
105
100
 
106
101
  **Waves:**
102
+
107
103
  | Wave | Tasks | Parallelism |
108
104
  |------|-------|-------------|
109
105
  | 1 | Archaeology (git-timeline, git-blame) | 2 agents |
@@ -112,24 +108,41 @@ id,title,description,task_type,dimension,deps,wave,status,findings,evidence,erro
112
108
  </csv_schema>
113
109
 
114
110
  <state_machine>
111
+
115
112
  <states>
116
113
  S_INTAKE → S_ARCHAEOLOGY → S_EXPLORE → S_REVIEW → S_FIX → S_CONFIRM → S_GENERALIZE → S_DISCOVER → S_RECORD → END
117
114
  Skip: --skip-fix skips S_FIX+S_CONFIRM | --skip-generalize skips S_GENERALIZE+S_DISCOVER
118
115
  </states>
119
116
 
120
117
  <transitions>
121
- S_INTAKE → S_INTAKE (resume/-c) | S_ARCHAEOLOGY (target resolved) | request_user_input (no target)
122
- S_REVIEW S_FIX (!skip_fix AND findings) | S_GENERALIZE (skip_fix/no findings, !skip_gen) | S_RECORD (both skip)
123
- S_CONFIRMS_GENERALIZE (confirmed, !skip_gen) | S_RECORD (confirmed, skip_gen) | S_FIX (needs_rework)
124
- S_GENERALIZE → S_DISCOVER (hits) | S_RECORD (no hits)
125
- S_DISCOVERS_FIX (fixable sibling) | S_REVIEW (new target, loops < max) | S_RECORD (done or max_loops)
118
+ S_INTAKE → S_INTAKE : -c + session found resume
119
+ S_INTAKE S_ARCHAEOLOGY : target resolved
120
+ S_INTAKES_INTAKE : no target request_user_input
121
+
122
+ S_ARCHAEOLOGYS_EXPLORE : complete
123
+ S_EXPLORE → S_REVIEW : complete
124
+
125
+ S_REVIEW → S_FIX : !skip_fix AND findings
126
+ S_REVIEW → S_GENERALIZE : skip_fix OR no findings, !skip_gen
127
+ S_REVIEW → S_RECORD : both skip
128
+
129
+ S_FIX → S_CONFIRM : fix implemented
130
+ S_CONFIRM → S_GENERALIZE : confirmed, !skip_gen
131
+ S_CONFIRM → S_RECORD : confirmed, skip_gen
132
+ S_CONFIRM → S_FIX : needs_rework
133
+
134
+ S_GENERALIZE → S_DISCOVER : hits
135
+ S_GENERALIZE → S_RECORD : no hits
136
+
137
+ S_DISCOVER → S_FIX : fixable sibling
138
+ S_DISCOVER → S_REVIEW : new target, loops < max
139
+ S_DISCOVER → S_RECORD : done or max_loops
126
140
  </transitions>
127
141
 
128
142
  <actions>
129
143
 
130
144
  ### A_INTAKE
131
- Parse target + flags → file list. Create SESSION_DIR, derive phase_goals[]. Search prior knowledge. Write session.json + §1. Display Goal Prompt.
132
- 📌 `"odyssey-review({slug}): INTAKE — 目标解析与上下文加载"`
145
+ Parse target + flags → file list. Create SESSION_DIR, derive phase_goals[]. Search prior knowledge. Write session.json + section 1. Display Goal Prompt.
133
146
 
134
147
  ### A_ARCHAEOLOGY
135
148
  **spawn_agents_on_csv (Wave 1):**
@@ -143,12 +156,10 @@ spawn_agents_on_csv({ csv_path: "tasks.csv", id_column: "id",
143
156
  max_concurrency: 2, max_runtime_seconds: 300,
144
157
  output_csv_path: "wave-1-results.csv", output_schema: SHARED_OUTPUT_SCHEMA })
145
158
  ```
146
- Merge → evidence.ndjson (phase: "archaeology"). CLI delegate `--role analyze`. Update §2.
147
- 📌 `"odyssey-review({slug}): ARCHAEOLOGY — git 考古分析"`
159
+ Merge → evidence (phase: archaeology). CLI delegate `--role analyze`. Update section 2.
148
160
 
149
161
  ### A_EXPLORE
150
- CLI delegate `--role explore` — call chains, error gaps, similar patterns. Write explore.json. Update §3. Mark G2.
151
- 📌 `"odyssey-review({slug}): EXPLORE — 代码探索完成"`
162
+ CLI delegate `--role explore` — call chains, error gaps, similar patterns. Write explore.json. Update section 3. Mark G2.
152
163
 
153
164
  ### A_REVIEW
154
165
  **spawn_agents_on_csv (Wave 2):**
@@ -164,32 +175,32 @@ spawn_agents_on_csv({ csv_path: "tasks.csv", id_column: "id",
164
175
  max_concurrency: 4, max_runtime_seconds: 600,
165
176
  output_csv_path: "wave-2-results.csv", output_schema: SHARED_OUTPUT_SCHEMA })
166
177
  ```
167
- Each returns `[{title, severity, file, line, description, suggestion, cwe}]`. Merge → evidence (review). Write review_result + §4 (severity matrix). Mark G1.
168
- 📌 `"odyssey-review({slug}): REVIEW — 多维度审查完成"`
178
+ Each returns `[{title, severity, file, line, description, suggestion, cwe}]`. Merge → evidence (review). Write review_result + section 4 (severity matrix). Mark G1.
169
179
 
170
180
  ### A_FIX
171
- **穷尽迭代修复** severity 递降,直到 `remaining_actionable == 0`。
181
+ Exhaustive tier loop descend severity until `remaining_actionable == 0`:
172
182
 
173
183
  ```
174
184
  for tier in [critical, high, medium, low].filter(>= threshold):
175
- for each unfixed candidate: read ±20 → fix → evidence (fix)
176
- re-review modified area ("改进即标准"): new → append, continue (max 2/tier)
185
+ for each unfixed candidate: read +/-20 → fix → evidence (fix)
186
+ re-review modified area: new findings → append, continue (max 2/tier)
177
187
  tier done → auto-commit
178
188
  ```
179
189
 
180
190
  Normal: request_user_input per tier. `-y`: auto-fix all.
181
191
  Remaining > 0 → retry (no max_loops limit). Unchanged 2 rounds → classify each individually.
182
- Blanket "pre-existing" forbidden.
183
- 📌 per tier: `"odyssey-review({slug}): FIX-{tier} — {N}项修复"`
192
+ Blanket "pre-existing" forbidden.
184
193
 
185
194
  ### A_CONFIRM
186
195
  Run tests + CLI delegate zero-residual review (`--role review`).
187
196
  - `remaining == 0 AND new == 0` → confirmed, mark G3
188
197
  - Otherwise → needs_rework → S_FIX
189
- Update confirmation + remaining_actionable + §5.
190
- 📌 `"odyssey-review({slug}): CONFIRM 零遗留验证"`
198
+
199
+ Update confirmation + remaining_actionable + section 5.
191
200
 
192
201
  ### A_GENERALIZE
202
+ Base shared_actions. Pattern source: findings (severity >= medium).
203
+
193
204
  **spawn_agents_on_csv (Wave 3):**
194
205
  ```csv
195
206
  "gen-syntax","Syntax Grep","Grep syntax-layer patterns across project","generalization","syntax","","3","pending","","",""
@@ -203,56 +214,51 @@ spawn_agents_on_csv({ csv_path: "tasks.csv", id_column: "id",
203
214
  max_concurrency: 4, max_runtime_seconds: 600,
204
215
  output_csv_path: "wave-3-results.csv", output_schema: SHARED_OUTPUT_SCHEMA })
205
216
  ```
206
- Pattern 来源: findings (severity >= medium). Mark G4.
207
- 📌 `"odyssey-review({slug}): GENERALIZE 泛化扫描完成"`
217
+
218
+ Cross-layer dedup: multi-layer hits → boost confidence | single-layer → `needs_review` | historically fixed → `regression_risk`.
219
+ Iterative deepening: module with >= 3 hits → targeted deep scan (max 1 round).
220
+ Mark G4.
208
221
 
209
222
  ### A_DISCOVER
210
- base A_DISCOVER 执行。Mark G5.
211
- 📌 `"odyssey-review({slug}): DISCOVER — 发现分类完成"`
223
+ Base shared_actions. Review overrides: cross-phase loop tracking per base.
212
224
 
213
225
  ### A_RECORD
214
- Write learnings to §8 Knowledge Persistence 表分类。其余按 base A_RECORD。Mark G6.
226
+ Base shared_actions. Learnings per Knowledge Persistence table.
215
227
 
228
+ **Completion summary:**
216
229
  ```
217
230
  --- REVIEW-TEST-FIX ODYSSEY COMPLETE ---
218
231
  Target: {target} Dimensions: {dims}
219
232
  Findings: {C}C {H}H {M}M {L}L Fix: {fixed}, confirmed={yes|skip}
220
233
  Patterns: {N} ({by_layer}) Scan hits: {total} ({cross} cross-layer)
221
- Issues: {N} Decisions: {N}r/{M}p/{K}d Learnings: {N} Self-iter: {N}×{M}
234
+ Issues: {N} Decisions: {N}r/{M}p/{K}d Learnings: {N} Self-iter: {N}x{M}
222
235
  Goals: {done}/{total} ({skipped} skipped)
223
236
  ---
224
237
  ```
225
- 📌 `"odyssey-review({slug}): RECORD — 会话总结与知识沉淀"`
226
238
 
227
239
  </actions>
228
240
 
229
241
  <appendix>
230
242
 
231
- ### Goal Prompt
232
- ```
233
- 📋 Review-Test-Fix Odyssey 会话已创建。可随时复制以下 /goal:
234
-
235
- /goal 完成以下目标:
236
- {for each G in phase_goals where status != "skipped":}
237
- - {G.id}: {G.goal} — {G.done_when}
238
- {end for}
239
- 穷尽迭代:review_result.remaining_actionable == 0 且 confirmation == confirmed 且 phase_goals_all_done。
240
- 修复按 severity 逐轮迭代,每轮 re-review 修改区域,新问题追加继续。
241
- 每个 finding 必须有 action(fix/issue/decision),decision pending 必须 request_user_input。
242
- ```
243
+ ### `-y` review-specific points
243
244
 
244
- ### `-y` (7 decision points)
245
245
  | Decision Point | Normal | `-y` |
246
- |----------------|--------|------|
246
+ |---------------|--------|------|
247
247
  | S_FIX tier candidates | request_user_input | auto-fix, `deferred` |
248
- | S_FIX re-review new | request_user_input | auto-append |
248
+ | S_FIX re-review new findings | request_user_input | auto-append |
249
249
  | S_CONFIRM needs_rework | Display → S_FIX | auto proceed |
250
- | S_DISCOVER bug routing | request_user_input | auto issue, `deferred` |
251
- | S_DISCOVER ambiguous | request_user_input | all `deferred` |
252
- | S_RECORD decisions | request_user_input | skip |
253
- | S_RECORD goal audit | request_user_input | auto accept |
250
+
251
+ ### Goal Prompt convergence rules
252
+
253
+ ```
254
+ Stop when review_result.remaining_actionable == 0, confirmation == confirmed,
255
+ phase_goals_all_done=true. Fix by severity desc, re-review modified areas,
256
+ new findings appended. Every finding must have action (fix/issue/decision).
257
+ Decision pending must request_user_input.
258
+ ```
254
259
 
255
260
  </appendix>
261
+
256
262
  </state_machine>
257
263
 
258
264
  <error_codes>
@@ -268,12 +274,12 @@ Goals: {done}/{total} ({skipped} skipped)
268
274
  - [ ] All dimensions reviewed, ALL findings fixed (remaining_actionable == 0), zero-residual confirmed
269
275
  - [ ] Per-tier re-review gate; every unfixed finding individually classified
270
276
  - [ ] Generalized with multi-layer scan (unless --skip-generalize); self-iteration on insufficient
271
- - [ ] understanding.md §18, phase_goals G1-G6 audited, Goal Prompt once, `-y` no blocking, -c resumable
277
+ - [ ] understanding.md sections 1-8, phase_goals G1-G6 audited, Goal Prompt once, `-y` no blocking, -c resumable
272
278
  </success_criteria>
273
279
 
274
280
  <next_step_routing>
275
- | Condition | Next step |
276
- |-----------|-----------|
281
+ | Condition | Next |
282
+ |-----------|------|
277
283
  | Deeper debug needed | `$odyssey-debug "<finding>"` |
278
284
  | Issues created | `$manage-issue list --source review-odyssey` |
279
285
  | Pattern to document | `$learn-decompose <module>` |