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
@@ -15,21 +15,22 @@ allowed-tools:
15
15
  <base>@~/.maestro/workflows/odyssey-base.md</base>
16
16
 
17
17
  <purpose>
18
- Deep code review with exhaustive fix: archaeologyexploremulti-dimensional review
19
- fix ALL findings → confirm → generalize → discover → persist. Zero-residual philosophy.
18
+ archaeology explore → multi-dimensional review fix ALL findings confirmgeneralize → discover → persist. Zero-residual: every finding gets an action.
20
19
  </purpose>
21
20
 
22
21
  <boundary>
23
- **范围内:** 目标代码的多维度深度审查穷尽修复 ALL 发现(按 severity 递降)→ 泛化 pattern 到全项目
24
- **范围外:** 深度根因调查 → `/odyssey-debug` | 需求实现 → `/odyssey-planex` | UI 视觉优化 → `/odyssey-ui`
25
- **探索自由度:** 边界内自由探索 — 跨维度关联、追溯 git 历史、泛化扫描全项目。修复 ALL findings within fix_threshold(默认 all)。
26
- **Zero-residual principle:** Every finding MUST have a concrete action (fix / issue / decision). "Report and shelve" and "pre-existing skip" are forbidden.
22
+ **In scope:** Multi-dimensional deep review of target code exhaustive fix ALL findings by severity generalize patterns project-wide.
23
+ **Out of scope:** Root cause debug → `/odyssey-debug` | Feature implementation → `/odyssey-planex` | UI visual optimization → `/odyssey-ui`
24
+
25
+ **Exploration freedom:** Free within boundary cross-dimension correlation, git history tracing, project-wide generalization scan. Fix ALL findings within fix_threshold (default: all).
26
+ **Zero-residual:** Every finding MUST have a concrete action (fix / issue / decision). "Report and shelve" and "pre-existing skip" are forbidden.
27
27
  </boundary>
28
28
 
29
29
  <context>
30
- $ARGUMENTS — target and optional flags.
30
+ $ARGUMENTS
31
31
 
32
32
  **Target resolution:**
33
+
33
34
  | Input | Resolution |
34
35
  |-------|-----------|
35
36
  | File/dir path | Review those files |
@@ -37,157 +38,194 @@ $ARGUMENTS — target and optional flags.
37
38
  | Phase number | state.json → changed files |
38
39
  | PR number | `git diff main...HEAD` |
39
40
 
40
- **Flags:**
41
- | Flag | Effect | Default |
42
- |------|--------|---------|
43
- | `--dimensions` | Comma-separated subset | correctness,security,performance,architecture |
44
- | `--fix-threshold` | 修复到哪个 severity 为止 | `all` |
45
- | `--skip-fix` | Skip S_FIX + S_CONFIRM | false |
46
- | `--skip-generalize` | Skip S_GENERALIZE + S_DISCOVER | false |
47
- | `--auto` `-y` `-c` `--heartbeat` | CLI auto / auto-confirm / resume / heartbeat | false |
41
+ **Flags:** `--dimensions <list>` subset of review dimensions | `--fix-threshold <level>` severity cutoff (default: all) | `--skip-fix` skip S_FIX+S_CONFIRM | `--skip-generalize` skip S_GENERALIZE+S_DISCOVER | `--auto` no delegate confirmation | `-y` auto-confirm | `-c` resume | `--heartbeat` /loop heartbeat
48
42
 
49
43
  **Session**: `.workflow/scratch/{YYYYMMDD}-review-odyssey-{slug}/`
50
- **Output**: session.json, evidence.ndjson, explore.json, understanding.md (§1-§8)
51
- **session.json unique fields**: `target`, `dimensions`, `review_result` (with `remaining_actionable`), `patterns[]`, `confirmation`, `generalization_stats`
52
- **evidence.ndjson phases**: archaeology, explore, review, fix, discovery, decision, self-iteration
44
+ **Output**: `session.json` | `evidence.ndjson` | `explore.json` | `understanding.md`
45
+
46
+ **session.json review-specific fields:**
47
+ ```json
48
+ { "target": "", "dimensions": [], "review_result": {"remaining_actionable": 0},
49
+ "patterns": [], "confirmation": null, "generalization_stats": null }
50
+ ```
51
+
52
+ **evidence.ndjson phases:** `archaeology|explore|review|fix|discovery|decision|self-iteration`
53
53
 
54
54
  **phase_goals[]:**
55
- | ID | Goal | Done When | Phase | skip_when |
55
+
56
+ | ID | Goal | done_when | phase | skip_when |
56
57
  |----|------|-----------|-------|-----------|
57
58
  | G1 | Review completed | all dimensions reviewed | S_REVIEW | — |
58
59
  | G2 | Explore context | explore.json populated | S_EXPLORE | — |
59
60
  | G3 | Zero remaining | `remaining_actionable == 0` | S_CONFIRM | skip_fix |
60
- | G4 | Pattern generalized | patterns[] 1 | S_GENERALIZE | skip_generalize |
61
+ | G4 | Pattern generalized | patterns[] >=1 | S_GENERALIZE | skip_generalize |
61
62
  | G5 | Discoveries triaged | all hits classified | S_DISCOVER | skip_generalize |
62
63
  | G6 | Learnings persisted | spec entries or no actionable | S_RECORD | — |
63
64
 
64
- ### Pre-load
65
- Specs: `maestro load --type spec --category review`。其余按 base Pre-load。
65
+ **understanding.md — 8 sections:**
66
+ 1. Target & Scope S_INTAKE | 2. Archaeology ← S_ARCHAEOLOGY | 3. Exploration ← S_EXPLORE
67
+ 4. Review Results ← S_REVIEW | 5. Fix & Confirmation ← S_FIX+S_CONFIRM
68
+ 6. Generalization ← S_GENERALIZE | 7. Discoveries ← S_DISCOVER | 8. Learnings ← S_RECORD
69
+
70
+ Specs: `maestro load --type spec --category review`
71
+
72
+ **Knowledge Persistence categories (section 8):**
66
73
 
67
- ### Knowledge Persistence
68
- | 分类 | 后续建议命令 |
69
- |------|-------------|
70
- | 跨维度反复 pattern | `/spec-add review "..."` |
71
- | 安全发现 | `/spec-add debug "..."` |
72
- | 架构违反 pattern | `/spec-add arch "..."` |
73
- | 可复用泛化 pattern | `/spec-add coding "..."` |
74
+ | Category | Content | Follow-up |
75
+ |----------|---------|-----------|
76
+ | Cross-dimension recurring pattern | Pattern + affected dimensions + coding standard | `/spec-add review` |
77
+ | Security finding | Vulnerability type + triggers + fix approach | `/spec-add debug` |
78
+ | Architecture violation pattern | Violation + correct boundary + verification | `/spec-add arch` |
79
+ | Reusable generalization pattern | Signature + risk + fix template + scope | `/spec-add coding` |
74
80
  </context>
75
81
 
82
+ <invariants>
83
+ All invariants defined in base.
84
+ </invariants>
85
+
76
86
  <self_iteration>
77
- 适用阶段: S_ARCHAEOLOGY, S_EXPLORE, S_REVIEW, S_FIX, S_GENERALIZE
87
+ Applies to: **S_ARCHAEOLOGY, S_EXPLORE, S_REVIEW, S_FIX, S_GENERALIZE**. Logic in base.
78
88
  </self_iteration>
79
89
 
80
90
  <state_machine>
91
+
81
92
  <states>
82
93
  S_INTAKE → S_ARCHAEOLOGY → S_EXPLORE → S_REVIEW → S_FIX → S_CONFIRM → S_GENERALIZE → S_DISCOVER → S_RECORD → END
83
- Skip: --skip-fix skips S_FIX+S_CONFIRM | --skip-generalize skips S_GENERALIZE+S_DISCOVER
84
94
  </states>
85
95
 
86
96
  <transitions>
87
- S_INTAKE → S_INTAKE (resume/-c) | S_ARCHAEOLOGY (target resolved) | AskUserQuestion (no target)
88
- S_REVIEW S_FIX (!skip_fix AND findings) | S_GENERALIZE (skip_fix/no findings, !skip_gen) | S_RECORD (both skip)
89
- S_CONFIRMS_GENERALIZE (confirmed, !skip_gen) | S_RECORD (confirmed, skip_gen) | S_FIX (needs_rework)
90
- S_GENERALIZE → S_DISCOVER (hits) | S_RECORD (no hits)
91
- S_DISCOVERS_FIX (fixable sibling) | S_REVIEW (new target, loops < max) | S_RECORD (done or max_loops)
97
+ S_INTAKE → S_INTAKE : -c + session found A_RESUME_SESSION
98
+ S_INTAKE S_ARCHAEOLOGY : target resolved A_INTAKE
99
+ S_INTAKES_INTAKE : no target AskUserQuestion
100
+
101
+ S_ARCHAEOLOGYS_EXPLORE : complete
102
+ S_EXPLORE → S_REVIEW : complete
103
+
104
+ S_REVIEW → S_FIX : !skip_fix AND findings
105
+ S_REVIEW → S_GENERALIZE : skip_fix OR no findings, !skip_generalize
106
+ S_REVIEW → S_RECORD : both skip
107
+
108
+ S_FIX → S_CONFIRM : tier complete
109
+ S_CONFIRM → S_GENERALIZE : confirmed, !skip_generalize
110
+ S_CONFIRM → S_RECORD : confirmed, skip_generalize
111
+ S_CONFIRM → S_FIX : needs_rework
112
+
113
+ S_GENERALIZE → S_DISCOVER : similar code found
114
+ S_GENERALIZE → S_RECORD : no similar code
115
+
116
+ S_DISCOVER → S_FIX : fixable sibling → cross_phase_loops++
117
+ S_DISCOVER → S_REVIEW : new target, loops < max_loops → cross_phase_loops++
118
+ S_DISCOVER → S_RECORD : remaining_actionable == 0 OR loops >= max_loops
92
119
  </transitions>
93
120
 
94
121
  <actions>
95
122
 
96
123
  ### A_INTAKE
97
- Parse target + flags → file list. Create SESSION_DIR, derive phase_goals[]. Search prior knowledge. Write session.json + §1. Display Goal Prompt.
98
- 📌 `"odyssey-review({slug}): INTAKE 目标解析与上下文加载"`
124
+ 1. Parse target + flags → file list. Create SESSION_DIR, derive phase_goals[]
125
+ 2. `maestro search "<keywords>"` + Glob prior sessions + ARCHITECTURE.md + Grep keywords
126
+ 3. Write `session.json` + `understanding.md` section 1, emit Goal Prompt
127
+
128
+ Commit: `"odyssey-review({slug}): INTAKE — parse target and load context"`
129
+
130
+ ### A_RESUME_SESSION
131
+ Glob latest session → read `session.json` → jump to `current_state`.
99
132
 
100
133
  ### A_ARCHAEOLOGY
101
- `git log --oneline -20` + `git blame` on key regions. CLI delegate `--role analyze`. Append evidence (archaeology). Update §2.
102
- 📌 `"odyssey-review({slug}): ARCHAEOLOGY — git 考古分析"`
134
+ 2 parallel Agents: Timeline (`git log --oneline -20 -- {files}`) + Blame (top 3 files `git blame -L {region}`). Evidence phase=archaeology.
135
+
136
+ `maestro delegate --role analyze --mode analysis` (`run_in_background: true`):
137
+ - PURPOSE: Review recent modifications related to {target}
138
+ - EXPECTED: JSON [{commit_sha, risk_level, analysis, could_cause_issue, explanation}]
139
+
140
+ Update section 2. Commit: `"odyssey-review({slug}): ARCHAEOLOGY — git history analysis"`
103
141
 
104
142
  ### A_EXPLORE
105
- CLI delegate `--role explore` call chains, error gaps, similar patterns. Write explore.json. Update §3. Mark G2.
106
- 📌 `"odyssey-review({slug}): EXPLORE — 代码探索完成"`
143
+ Skip if no CLI tools (W006).
144
+
145
+ `maestro delegate --role explore --mode analysis` (`run_in_background: true`):
146
+ - PURPOSE: Call chains, recent changes, error gaps, similar patterns
147
+ - EXPECTED: JSON {call_chains, recent_changes, error_gaps, similar_patterns}
148
+
149
+ Write `explore.json` + evidence phase=explore. Update section 3. Mark G2. Commit: `"odyssey-review({slug}): EXPLORE — codebase exploration"`
107
150
 
108
151
  ### A_REVIEW
109
- Spawn N parallel Agents (one per dimension):
152
+ Spawn N parallel Agents, one per dimension:
110
153
  - **Correctness**: logic errors, boundary conditions, null/undefined, race conditions
111
154
  - **Security**: injection, XSS, CSRF, data exposure, auth bypass
112
155
  - **Performance**: hot paths, N+1, memory leaks, unnecessary recomputation
113
156
  - **Architecture**: layer violations, circular deps, interface contracts, SoC
114
157
 
115
- Each returns `[{title, severity, file, line, description, suggestion, cwe}]`. Merge → evidence (review). Write review_result + §4 (severity matrix). Mark G1.
116
- 📌 `"odyssey-review({slug}): REVIEW — 多维度审查完成"`
158
+ Each returns `[{title, severity, file, line, description, suggestion, cwe}]`. Merge → evidence phase=review. Write `review_result` + section 4 severity matrix. Mark G1.
159
+
160
+ Commit: `"odyssey-review({slug}): REVIEW — multi-dimension review complete"`
117
161
 
118
162
  ### A_FIX
119
- **穷尽迭代修复** severity 递降,直到 `remaining_actionable == 0`。
163
+ Exhaustive iterative fix descend by severity until `remaining_actionable == 0`.
120
164
 
121
165
  ```
122
166
  for tier in [critical, high, medium, low].filter(>= threshold):
123
- for each unfixed candidate: read ±20 → fix → evidence (fix)
124
- re-review modified area ("改进即标准"): new → append, continue (max 2/tier)
167
+ for each unfixed candidate: read +/-20 lines → fix → evidence phase=fix
168
+ re-review modified area (new findings → append, continue; max 2 per tier)
125
169
  tier done → auto-commit
126
170
  ```
127
171
 
128
172
  Normal: AskUserQuestion per tier. `-y`: auto-fix all.
129
173
  Remaining > 0 → retry (no max_loops limit). Unchanged 2 rounds → classify each individually.
130
- Blanket "pre-existing" forbidden.
131
- 📌 per tier: `"odyssey-review({slug}): FIX-{tier} — {N}项修复"`
174
+ Blanket "pre-existing" forbidden.
175
+
176
+ Commit per tier: `"odyssey-review({slug}): FIX-{tier} — {N} items fixed"`
132
177
 
133
178
  ### A_CONFIRM
134
- Run tests + CLI delegate zero-residual review (`--role review`).
179
+ Run tests + `maestro delegate --role review --mode analysis` (`run_in_background: true`) for zero-residual review.
135
180
  - `remaining == 0 AND new == 0` → confirmed, mark G3
136
181
  - Otherwise → needs_rework → S_FIX
137
- Update confirmation + remaining_actionable + §5.
138
- 📌 `"odyssey-review({slug}): CONFIRM — 零遗留验证"`
139
182
 
140
- ### A_GENERALIZE
141
- 按 base A_GENERALIZE 执行。Pattern 来源: findings (severity >= medium)。Mark G4.
142
- 📌 `"odyssey-review({slug}): GENERALIZE — 泛化扫描完成"`
183
+ Update `confirmation` + `remaining_actionable` + section 5.
143
184
 
144
- ### A_DISCOVER
145
- 按 base A_DISCOVER 执行。Mark G5.
146
- 📌 `"odyssey-review({slug}): DISCOVER — 发现分类完成"`
185
+ Commit: `"odyssey-review({slug}): CONFIRM — zero-residual verified"`
147
186
 
148
- ### A_RECORD
149
- Write learnings to §8 按 Knowledge Persistence 表分类。其余按 base A_RECORD。Mark G6.
187
+ ### A_GENERALIZE, A_DISCOVER, A_RECORD
188
+ Base shared_actions. Review overrides:
189
+ - **A_GENERALIZE** pattern source: findings with severity >= medium
190
+ - **A_RECORD** learnings per Knowledge Persistence table
150
191
 
192
+ **Completion summary:**
151
193
  ```
152
194
  --- REVIEW-TEST-FIX ODYSSEY COMPLETE ---
153
195
  Target: {target} Dimensions: {dims}
154
196
  Findings: {C}C {H}H {M}M {L}L Fix: {fixed}, confirmed={yes|skip}
155
197
  Patterns: {N} ({by_layer}) Scan hits: {total} ({cross} cross-layer)
156
- Issues: {N} Decisions: {N}r/{M}p/{K}d Learnings: {N} Self-iter: {N}×{M}
157
- Goals: {done}/{total} ({skipped} skipped)
198
+ Issues: {N} created
199
+ Decisions: {N} resolved, {M} pending, {K} deferred
200
+ Learnings: {N} persisted
201
+ Self-iter: {N} rounds across {M} stages
202
+ Goals: {done}/{total} ({skipped} skipped)
158
203
  ---
159
204
  ```
160
- 📌 `"odyssey-review({slug}): RECORD — 会话总结与知识沉淀"`
161
205
 
162
206
  </actions>
163
207
 
164
208
  <appendix>
165
209
 
166
- ### Goal Prompt
167
- ```
168
- 📋 Review-Test-Fix Odyssey 会话已创建。可随时复制以下 /goal:
169
-
170
- /goal 完成以下目标:
171
- {for each G in phase_goals where status != "skipped":}
172
- - {G.id}: {G.goal} — {G.done_when}
173
- {end for}
174
- 穷尽迭代:review_result.remaining_actionable == 0 且 confirmation == confirmed 且 phase_goals_all_done。
175
- 修复按 severity 逐轮迭代,每轮 re-review 修改区域,新问题追加继续。
176
- 每个 finding 必须有 action(fix/issue/decision),decision pending 必须 AskUserQuestion。
177
- ```
210
+ ### `-y` review-specific points
178
211
 
179
- ### `-y` (7 decision points)
180
212
  | Decision Point | Normal | `-y` |
181
- |----------------|--------|------|
182
- | S_FIX tier candidates | AskUserQuestion | auto-fix, `deferred` |
183
- | S_FIX re-review new | AskUserQuestion | auto-append |
213
+ |---------------|--------|------|
214
+ | S_FIX tier candidates | AskUserQuestion | auto-fix, deferred |
215
+ | S_FIX re-review new findings | AskUserQuestion | auto-append |
184
216
  | S_CONFIRM needs_rework | Display → S_FIX | auto proceed |
185
- | S_DISCOVER bug routing | AskUserQuestion | auto issue, `deferred` |
186
- | S_DISCOVER ambiguous | AskUserQuestion | all `deferred` |
187
- | S_RECORD decisions | AskUserQuestion | skip |
188
- | S_RECORD goal audit | AskUserQuestion | auto accept |
217
+
218
+ ### Goal Prompt convergence rules
219
+
220
+ ```
221
+ Stop when remaining_actionable == 0, confirmation == confirmed,
222
+ generalization exhausted, phase_goals_all_done=true.
223
+ Fix iterates by severity tier; each tier re-reviews modified area, new findings appended.
224
+ Every finding must have action (fix/issue/decision). Decision pending must AskUserQuestion.
225
+ ```
189
226
 
190
227
  </appendix>
228
+
191
229
  </state_machine>
192
230
 
193
231
  <error_codes>
@@ -200,17 +238,25 @@ Goals: {done}/{total} ({skipped} skipped)
200
238
  </error_codes>
201
239
 
202
240
  <success_criteria>
203
- - [ ] All dimensions reviewed, ALL findings fixed (remaining_actionable == 0), zero-residual confirmed
241
+ - [ ] Session + 4 output files + prior knowledge searched
242
+ - [ ] Archaeology + CLI review → evidence phase=archaeology
243
+ - [ ] CLI exploration → explore.json + evidence phase=explore
244
+ - [ ] All dimensions reviewed, ALL findings fixed (remaining_actionable == 0)
204
245
  - [ ] Per-tier re-review gate; every unfixed finding individually classified
205
- - [ ] Generalized with multi-layer scan (unless --skip-generalize); self-iteration on insufficient
206
- - [ ] understanding.md §1-§8, phase_goals G1-G6 audited, Goal Prompt once, `-y` no blocking, -c resumable
246
+ - [ ] understanding.md sections 1-8 progressive
247
+ - [ ] Fix + confirmed (unless --skip-fix)
248
+ - [ ] Generalization + scan (unless --skip-generalize)
249
+ - [ ] Discoveries classified; unfixed findings individually justified
250
+ - [ ] phase_goals G1-G6 audited, Goal Prompt once, `-y` no blocking, -c resumable
251
+ - [ ] Completion summary
207
252
  </success_criteria>
208
253
 
209
254
  <next_step_routing>
210
- | Condition | Next step |
211
- |-----------|-----------|
255
+ | Condition | Next |
256
+ |-----------|------|
212
257
  | Deeper debug needed | `/odyssey-debug "<finding>"` |
213
258
  | Issues created | `/manage-issue list --source review-odyssey` |
214
- | Pattern to document | `/learn-decompose <module>` |
259
+ | Document pattern | `/learn-decompose <module>` |
215
260
  | Plan fixes | `/maestro-plan --gaps` |
216
261
  </next_step_routing>
262
+ </output>