maestro-flow 0.5.38 → 0.5.40

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 (163) hide show
  1. package/.agents/skills/odyssey-debug/SKILL.md +90 -269
  2. package/.agents/skills/odyssey-improve/SKILL.md +39 -240
  3. package/.agents/skills/odyssey-planex/SKILL.md +21 -105
  4. package/.agents/skills/odyssey-review-test-fix/SKILL.md +98 -318
  5. package/.agents/skills/odyssey-ui/SKILL.md +82 -265
  6. package/.agy/skills/odyssey-debug/SKILL.md +90 -269
  7. package/.agy/skills/odyssey-improve/SKILL.md +39 -240
  8. package/.agy/skills/odyssey-planex/SKILL.md +21 -105
  9. package/.agy/skills/odyssey-review-test-fix/SKILL.md +98 -318
  10. package/.agy/skills/odyssey-ui/SKILL.md +82 -265
  11. package/.claude/commands/odyssey-debug.md +90 -269
  12. package/.claude/commands/odyssey-improve.md +39 -240
  13. package/.claude/commands/odyssey-planex.md +21 -105
  14. package/.claude/commands/odyssey-review-test-fix.md +98 -318
  15. package/.claude/commands/odyssey-ui.md +82 -265
  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 +185 -275
  52. package/.codex/skills/odyssey-improve/SKILL.md +216 -308
  53. package/.codex/skills/odyssey-planex/SKILL.md +317 -159
  54. package/.codex/skills/odyssey-review-test-fix/SKILL.md +137 -255
  55. package/.codex/skills/odyssey-ui/SKILL.md +183 -247
  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/dashboard/src/server/wiki/embedding.d.ts +23 -2
  71. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js +242 -26
  72. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js.map +1 -1
  73. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.d.ts +2 -0
  74. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +92 -29
  75. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  76. package/dashboard/dist-server/src/commands/hooks.d.ts +2 -1
  77. package/dashboard/dist-server/src/commands/hooks.js +16 -9
  78. package/dashboard/dist-server/src/commands/hooks.js.map +1 -1
  79. package/dashboard/dist-server/src/commands/install-backend.js +19 -0
  80. package/dashboard/dist-server/src/commands/install-backend.js.map +1 -1
  81. package/dashboard/dist-server/src/core/manifest.d.ts +5 -0
  82. package/dashboard/dist-server/src/core/manifest.js.map +1 -1
  83. package/dashboard/dist-server/src/core/plugin-bridge.d.ts +59 -0
  84. package/dashboard/dist-server/src/core/plugin-bridge.js +355 -0
  85. package/dashboard/dist-server/src/core/plugin-bridge.js.map +1 -0
  86. package/dashboard/dist-server/src/hooks/kg-sync-hook.js +5 -0
  87. package/dashboard/dist-server/src/hooks/kg-sync-hook.js.map +1 -1
  88. package/dashboard/dist-server/src/hooks/session-context.js +276 -3
  89. package/dashboard/dist-server/src/hooks/session-context.js.map +1 -1
  90. package/dashboard/dist-server/src/search/daemon-client.d.ts +8 -3
  91. package/dashboard/dist-server/src/search/daemon-client.js +20 -0
  92. package/dashboard/dist-server/src/search/daemon-client.js.map +1 -1
  93. package/dist/src/cli.js +19 -1
  94. package/dist/src/cli.js.map +1 -1
  95. package/dist/src/commands/domain.d.ts.map +1 -1
  96. package/dist/src/commands/domain.js +12 -3
  97. package/dist/src/commands/domain.js.map +1 -1
  98. package/dist/src/commands/hooks.d.ts +2 -1
  99. package/dist/src/commands/hooks.d.ts.map +1 -1
  100. package/dist/src/commands/hooks.js +16 -9
  101. package/dist/src/commands/hooks.js.map +1 -1
  102. package/dist/src/commands/install-backend.d.ts.map +1 -1
  103. package/dist/src/commands/install-backend.js +19 -0
  104. package/dist/src/commands/install-backend.js.map +1 -1
  105. package/dist/src/commands/install.d.ts.map +1 -1
  106. package/dist/src/commands/install.js +50 -3
  107. package/dist/src/commands/install.js.map +1 -1
  108. package/dist/src/commands/plugin.d.ts +3 -0
  109. package/dist/src/commands/plugin.d.ts.map +1 -0
  110. package/dist/src/commands/plugin.js +137 -0
  111. package/dist/src/commands/plugin.js.map +1 -0
  112. package/dist/src/commands/search.d.ts.map +1 -1
  113. package/dist/src/commands/search.js +59 -6
  114. package/dist/src/commands/search.js.map +1 -1
  115. package/dist/src/commands/spec.d.ts.map +1 -1
  116. package/dist/src/commands/spec.js +15 -0
  117. package/dist/src/commands/spec.js.map +1 -1
  118. package/dist/src/commands/update.d.ts.map +1 -1
  119. package/dist/src/commands/update.js +23 -0
  120. package/dist/src/commands/update.js.map +1 -1
  121. package/dist/src/core/install-executor.d.ts +1 -1
  122. package/dist/src/core/install-executor.d.ts.map +1 -1
  123. package/dist/src/core/install-executor.js +27 -0
  124. package/dist/src/core/install-executor.js.map +1 -1
  125. package/dist/src/core/install-profile.d.ts +5 -0
  126. package/dist/src/core/install-profile.d.ts.map +1 -1
  127. package/dist/src/core/install-profile.js +8 -0
  128. package/dist/src/core/install-profile.js.map +1 -1
  129. package/dist/src/core/manifest.d.ts +5 -0
  130. package/dist/src/core/manifest.d.ts.map +1 -1
  131. package/dist/src/core/manifest.js.map +1 -1
  132. package/dist/src/core/plugin-bridge.d.ts +60 -0
  133. package/dist/src/core/plugin-bridge.d.ts.map +1 -0
  134. package/dist/src/core/plugin-bridge.js +355 -0
  135. package/dist/src/core/plugin-bridge.js.map +1 -0
  136. package/dist/src/hooks/kg-sync-hook.d.ts.map +1 -1
  137. package/dist/src/hooks/kg-sync-hook.js +5 -0
  138. package/dist/src/hooks/kg-sync-hook.js.map +1 -1
  139. package/dist/src/hooks/session-context.d.ts.map +1 -1
  140. package/dist/src/hooks/session-context.js +276 -3
  141. package/dist/src/hooks/session-context.js.map +1 -1
  142. package/dist/src/search/daemon-client.d.ts +8 -3
  143. package/dist/src/search/daemon-client.d.ts.map +1 -1
  144. package/dist/src/search/daemon-client.js +20 -0
  145. package/dist/src/search/daemon-client.js.map +1 -1
  146. package/dist/src/search/daemon.d.ts +3 -3
  147. package/dist/src/search/daemon.d.ts.map +1 -1
  148. package/dist/src/search/daemon.js +9 -3
  149. package/dist/src/search/daemon.js.map +1 -1
  150. package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
  151. package/dist/src/tui/install-ui/InstallFlow.js +43 -14
  152. package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
  153. package/dist/src/tui/install-ui/types.d.ts +2 -0
  154. package/dist/src/tui/install-ui/types.d.ts.map +1 -1
  155. package/dist/src/tui/install-ui/types.js.map +1 -1
  156. package/dist/src/tui/install-ui/useInstallFlowState.d.ts.map +1 -1
  157. package/dist/src/tui/install-ui/useInstallFlowState.js +13 -1
  158. package/dist/src/tui/install-ui/useInstallFlowState.js.map +1 -1
  159. package/dist/src/utils/update-notices.js +11 -0
  160. package/dist/src/utils/update-notices.js.map +1 -1
  161. package/package.json +1 -1
  162. package/workflows/odyssey-base.md +258 -0
  163. package/workflows/shell-exec-protocol.md +30 -0
@@ -1,13 +1,15 @@
1
1
  ---
2
2
  name: odyssey-ui
3
3
  description: "Long-running UI optimization cycle — visual survey, multi-dimensional audit, divergent exploration, fix, verify, generalize, and design knowledge persistence"
4
- argument-hint: '"<target>" [--dimensions <list>] [--skip-fix] [--skip-generalize] [--auto] [-y] [-c]'
4
+ argument-hint: '"<target>" [--dimensions <list>] [--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
7
 
8
+ <base>@~/.maestro/workflows/odyssey-base.md</base>
9
+
8
10
  <purpose>
9
- Deep UI polish cycle: survey (design tokens + pattern inventory) -> audit (6 dimensions) ->
10
- diverge (creative exploration) -> fix -> verify -> generalize -> discover -> record.
11
+ Deep UI polish cycle: survey 6-dimension audit divergent creative exploration
12
+ fix verify generalize discover persist. Every pixel is a learning opportunity.
11
13
 
12
14
  Core philosophy:
13
15
  - **Every pixel tells a story** — subtle details create the experience
@@ -22,131 +24,65 @@ Core philosophy:
22
24
  </purpose>
23
25
 
24
26
  <boundary>
25
- **范围内:** 目标组件/页面的视觉体验优化 — 6 维度审查 → 发散探索 → 修复 → 泛化兄弟组件
26
- **范围外:** 后端逻辑 / 数据模型 / API → `$odyssey-planex` | 深度 bug → `$odyssey-debug` | 代码质量 → `$odyssey-review-test-fix`
27
- **探索自由度:** 边界内最大自由 — S_DIVERGE 鼓励发散思维,不设创意上限。在约束下尽可能完善每个像素。
28
-
27
+ **范围内:** 目标组件/页面的视觉体验优化 — 审查 6 维度 → 发散探索 → 修复 → 泛化到兄弟组件
28
+ **范围外:** 后端逻辑 / 数据模型 / API 设计 / 业务规则 → `$odyssey-planex` | 深度 bug 调查 → `$odyssey-debug` | 代码质量审查 → `$odyssey-review-test-fix`
29
+ **探索自由度:** 边界内最大自由 — S_DIVERGE 阶段鼓励发散思维,不设创意上限。审查 + 发散可发现任何视觉/交互/可访问性细节。在约束下尽可能完善每个像素。
29
30
  **Zero-residual principle:** Every finding/idea MUST have a concrete action (fix / issue / decision). "Report and shelve" is not allowed. "Pre-existing design debt" is not a valid skip reason — if discovered within scope, it must be addressed.
31
+ ⚠️ **Decision gate** — ONLY these qualify as decisions (not fixes):
32
+ - Brand/style direction requiring human creative judgment
33
+ - Layout restructuring that changes user flow significantly
34
+ - Requires new design tokens or breaking component API
35
+ ❌ "Unsure how to fix", "Large scope", "Pre-existing issue" are NOT valid decision reasons — either fix it, or explain specifically why it's unfixable
30
36
  </boundary>
31
37
 
32
- <execution_discipline>
33
- **三条铁律(所有阶段适用):**
34
- 1. **Phase auto-commit** — 阶段完成后**自动** `git commit`,无需用户确认(session.json/evidence.ndjson 不纳入)
35
- 2. **Confident edits only, but must attempt** — only modify what you're confident about; record decisions only when genuinely requiring human judgment
36
- - High visual certainty (missing hover state, insufficient contrast, etc.) → fix directly
37
- - Design direction uncertain (color choices, layout restructure, etc.) → record decision for user judgment
38
- - No speculative changes, especially brand/style-level modifications
39
- - ⚠️ **Decision gate** — ONLY these qualify as decisions (not fixes):
40
- - Brand/style direction requiring human creative judgment
41
- - Layout restructuring that changes user flow significantly
42
- - Requires new design tokens or breaking component API
43
- - ❌ "Unsure how to fix", "Large scope", "Pre-existing issue" are NOT valid decision reasons — either fix it, or explain specifically why it's unfixable
44
- 3. **多 CLI 辅助** — survey 用 `--role explore`,audit/diverge 用 `--role analyze`,fix 前后用 `--role review`
45
- </execution_discipline>
46
-
47
38
  <context>
48
39
  $ARGUMENTS — target and optional flags.
49
40
 
50
- **Target resolution:**
51
- | Input | Resolution |
52
- |-------|-----------|
53
- | Component path | Review those component files |
54
- | Page/route | Resolve route to component tree |
55
- | `HEAD` / `staged` | `git diff HEAD` / `git diff --staged` (UI files only) |
56
- | Feature area | Grep for feature keyword, collect UI files |
41
+ **Target resolution:** Component path → audit component | Page/route → audit page | `staged`/`HEAD` → diff UI changes | Feature area → resolve to components/pages
57
42
 
58
43
  **Flags:**
59
- | Flag | Effect |
60
- |------|--------|
61
- | `--dimensions <list>` | Comma-separated subset (default: all 6) |
62
- | `--skip-fix` | Audit-only skip S_FIX and S_VERIFY |
63
- | `--skip-generalize` | Skip S_GENERALIZE and S_DISCOVER |
64
- | `--auto` | CLI delegates without confirmation |
65
- | `-y` | Auto-confirm at all decision points (see appendix) |
66
- | `-c` | Resume most recent session |
67
-
68
- **Dimensions (6):** visual-hierarchy, interaction-states, accessibility, responsiveness, micro-interactions, edge-cases
44
+ | Flag | Effect | Default |
45
+ |------|--------|---------|
46
+ | `--dimensions <list>` | Comma-separated subset of 6 dimensions | all 6 |
47
+ | `--fix-threshold <severity>` | 修复到哪个 severity 为止 | all |
48
+ | `--skip-fix` | Audit + diverge only, no code changes | false |
49
+ | `--skip-generalize` | Skip S_GENERALIZE and S_DISCOVER | false |
50
+ | `--auto` | CLI delegates without confirmation | false |
51
+ | `-y` | Auto-confirm all decisions (see appendix) | false |
52
+ | `-c` | Resume most recent session | — |
53
+ | `--heartbeat` | Enable heartbeat progress reporting | false |
69
54
 
70
55
  **Session**: `SESSION_DIR = .workflow/scratch/{YYYYMMDD}-ui-odyssey-{slug}/`
71
56
 
72
- **Output — 3 files:**
73
- ```
74
- SESSION_DIR/
75
- ├── session.json # state + audit_result + diverge_result + patterns + phase_goals
76
- ├── evidence.ndjson # ALL evidence (phase: survey|audit|diverge|fix|discovery|decision|self-iteration)
77
- └── understanding.md # 8-section evolving narrative (§1-§8, one per major phase)
78
- ```
57
+ **Output — 3 files:** `session.json` (state + audit/diverge results + patterns + phase_goals) | `evidence.ndjson` (phases: survey, audit, diverge, fix, discovery, decision, self-iteration) | `understanding.md` (8-section narrative)
79
58
 
80
- **session.json schema:**
81
- ```json
82
- { "session_id": "ui-odyssey-{YYYYMMDD-HHmmss}", "target": "", "dimensions": [],
83
- "flags": { "skip_fix": false, "skip_generalize": false, "auto": false, "auto_confirm": false },
84
- "current_state": "S_INTAKE",
85
- "audit_result": { "dimensions_audited": [], "finding_count": 0, "severity_distribution": {} },
86
- "diverge_result": { "improvements_proposed": 0, "creative_ideas": 0 },
87
- "patterns": [], "generalization_stats": null,
88
- "phase_goals": [], "phase_goals_all_done": false, "self_iteration_log": [],
89
- "cross_phase_loops": 0, "max_loops": 5,
90
- "created_at": "", "updated_at": "" }
91
- ```
92
-
93
- **evidence.ndjson:** `{"ts":"","phase":"survey|audit|diverge|fix|discovery|decision|self-iteration","type":"","dimension":"","title":"","severity":"","file":"","line":0,"description":"","suggestion":""}`
94
-
95
- **phase_goals[] — auto-derived from flags:**
59
+ **session.json unique fields:** `target`, `dimensions`, `audit_result` {dimensions_audited, finding_count, severity_distribution}, `diverge_result` {improvements_proposed, creative_ideas}, `patterns[]` {id, source_finding, layer, signature, description, risk, fix_template, confidence}, `confirmation` {test_result, cli_review, overall}, `generalization_stats` {patterns_extracted, total_hits, cross_layer_confirmed, regression_risks, by_layer, deepening_triggered}
96
60
 
61
+ **phase_goals[]:**
97
62
  | ID | Goal | Phase | skip_when |
98
63
  |----|------|-------|-----------|
99
64
  | G1 | Survey completed | S_SURVEY | — |
100
65
  | G2 | Audit completed | S_AUDIT | — |
101
66
  | G3 | Divergent exploration done | S_DIVERGE | — |
102
- | G4 | Fix applied and verified | S_VERIFY | skip_fix |
67
+ | G4 | Zero remaining: all findings/ideas fixed and verified | S_VERIFY | skip_fix |
103
68
  | G5 | Pattern generalized | S_GENERALIZE | skip_generalize |
104
69
  | G6 | Discoveries triaged | S_DISCOVER | skip_generalize |
105
70
  | G7 | Learnings persisted | S_RECORD | — |
106
71
 
107
- Lifecycle: `pending -> done | skipped | failed` (all set `completion_confirmed`)
108
-
109
- **understanding.md — 8 sections:** SS1 Target & Context (S_INTAKE) | SS2 Visual Survey (S_SURVEY) | SS3 Audit Findings (S_AUDIT) | SS4 Divergent Exploration (S_DIVERGE) | SS5 Fix & Verification (S_FIX+S_VERIFY) | SS6 Generalization (S_GENERALIZE) | SS7 Discoveries (S_DISCOVER) | SS8 Design Learnings (S_RECORD)
72
+ **understanding.md:** §1 Target & Design Context | §2 Survey | §3 Audit | §4 Diverge | §5 Verify | §6 Generalize | §7 Discover | §8 Learnings
110
73
 
111
- ### Pre-load
74
+ ### Pre-load(可选,缺失不阻塞)
75
+ ARCHITECTURE.md | `maestro search "<target>" --json` (top 5) | `maestro load --type spec --category ui` | `maestro load --type spec --category coding` | `maestro search --category ui` → load knowhow | Glob prior sessions
112
76
 
113
- | Layer | Command | Purpose |
114
- |-------|---------|---------|
115
- | Codebase docs | Read `.workflow/codebase/ARCHITECTURE.md` | Module boundaries |
116
- | Wiki search | `maestro search "<target keywords>" --json` | Prior UI decisions (top 5) |
117
- | UI specs | `maestro load --type spec --category ui` | Design tokens, standards |
118
- | Coding specs | `maestro load --type spec --category coding` | Coding conventions |
119
- | Role knowledge | `maestro search --category ui` -> select -> `maestro load --type knowhow --id <id>` | Domain knowledge |
120
- | Prior sessions | `Glob(".workflow/scratch/*-ui-odyssey-*")` | Related sessions |
121
-
122
- ### Knowledge Persistence (two-step model)
123
-
124
- Write to understanding.md SS8 during execution (temporary). Completion summary suggests follow-up commands.
125
-
126
- | Category | Content | Follow-up |
127
- |----------|---------|-----------|
128
- | Design pattern | Component pattern + scenarios | `$spec-add ui "..."` |
129
- | Interaction spec | State defs + transition rules | `$spec-add ui "..."` |
130
- | Accessibility rule | WCAG req + implementation | `$spec-add ui "..."` |
131
- | Reusable generalization | Pattern signature + scope | `$spec-add coding "..."` |
77
+ ### Knowledge Persistence(S_RECORD 写入 understanding.md §8)
78
+ | 分类 | 写入内容 | 后续建议命令 |
79
+ |------|---------|-------------|
80
+ | 设计 pattern | 组件模式 + 适用场景 + token 引用 | `/spec-add ui "..."` |
81
+ | 交互规范 | 状态定义 + 转场规则 + 反馈模式 | `/spec-add ui "..."` |
82
+ | 可访问性规则 | WCAG 要求 + 实现方案 | `/spec-add ui "..."` |
83
+ | 可复用泛化 pattern | pattern 签名 + 应用范围 | `/spec-add coding "..."` |
132
84
  </context>
133
85
 
134
- <self_iteration>
135
- **Quality Gate** — auto-evaluate after each analytical phase. Insufficient -> re-enter (max **3 rounds**).
136
-
137
- | Dimension | Sufficient | Insufficient |
138
- |-----------|-----------|-------------|
139
- | Coverage | All known related files/components analyzed | Missed targets discoverable via grep/glob |
140
- | Depth | >=80% findings have file:line evidence | Most findings lack specifics |
141
- | Actionability | Each conclusion has concrete next action | "Consider reviewing" without action |
142
-
143
- **Expansion:** Round 1 = widen scope (more directories, more components, deeper token scan). Round 2 = shift perspective (different audit angle, CLI delegate second opinion). Round 3 = combine both + targeted deep-dive on remaining gaps.
144
-
145
- **Applicable stages:** S_SURVEY, S_AUDIT, S_DIVERGE, S_GENERALIZE
146
-
147
- **Exit:** All sufficient -> advance | 3-round cap -> record gap, continue. Logged to `evidence.ndjson` + `session.json.self_iteration_log[]`.
148
- </self_iteration>
149
-
150
86
  <csv_schema>
151
87
 
152
88
  ### Shared Output Schema (all waves)
@@ -180,37 +116,70 @@ id,title,description,task_type,dimension,deps,wave,status,findings,evidence,erro
180
116
  | 4 | Generalization (syntax-grep, semantic-scan, structural-match, historical-grep) | 4 agents |
181
117
  </csv_schema>
182
118
 
183
- <invariants>
184
- 1. **Browser is truth** — code changes must be visually verifiable
185
- 2. **Diverge before converge** — S_DIVERGE runs before S_FIX, never skip
186
- 3. **Evidence append-only** — evidence.ndjson is never overwritten
187
- 4. **Session is source of truth** — session.json holds all state
188
- 5. **Phase goal tracking** — each stage MUST mark its goal on completion
189
- 6. **`-y` defers, never drops** — auto-confirm records `deferred`, never silently skips
190
- 7. **CLI delegate is background** all `maestro delegate` calls use run_in_background
191
- 8. **Goal is outcome-oriented** odyssey outputs prompt then continues
192
- 9. **Invariant violation = BLOCK** violating any invariant blocks the operation
193
- </invariants>
194
-
195
- <execution>
196
-
197
- **States:** S_INTAKE -> S_SURVEY -> S_AUDIT -> S_DIVERGE -> S_FIX -> S_VERIFY -> S_GENERALIZE -> S_DISCOVER -> S_RECORD
198
- - S_FIX/S_VERIFY skip when `--skip-fix`
199
- - S_GENERALIZE/S_DISCOVER skip when `--skip-generalize`
200
-
201
- ### S_INTAKE
202
- 1. Parse target + flags -> resolve file list (filter to UI-relevant: `.tsx`, `.vue`, `.svelte`, `.css`, `.scss`, style files)
119
+ <self_iteration>
120
+ 适用阶段: S_SURVEY, S_AUDIT, S_DIVERGE, S_GENERALIZE
121
+ </self_iteration>
122
+
123
+ <state_machine>
124
+
125
+ <states>
126
+ S_INTAKE — Parse target, load design context, resume session PERSIST: session.json + understanding.md §1
127
+ S_SURVEY — Visual landscape: design tokens, pattern inventory PERSIST: evidence.ndjson (survey) + understanding.md §2
128
+ S_AUDIT — 6-dimension parallel review PERSIST: evidence.ndjson (audit) + understanding.md §3
129
+ S_DIVERGE — Divergent creative exploration: polish + delight PERSIST: evidence.ndjson (diverge) + understanding.md §4
130
+ S_FIX — Implement improvements (skip if --skip-fix) PERSIST: code changes + evidence.ndjson (fix)
131
+ S_VERIFY — Visual verification + test (skip if --skip-fix) PERSIST: session.json.confirmation + understanding.md §5
132
+ S_GENERALIZE — Pattern extraction + 4-agent scan (skip if --skip-gen) PERSIST: session.json.patterns + understanding.md §6
133
+ S_DISCOVER — Classify hits, create issues (skip if --skip-gen) PERSIST: evidence.ndjson (discovery|decision) + understanding.md §7
134
+ S_RECORD — Design knowledge persistence + final report PERSIST: understanding.md §8 + spec entries
135
+ </states>
136
+
137
+ <transitions>
138
+ S_INTAKE:
139
+ → S_INTAKE WHEN -c + session found DO A_RESUME
140
+ → S_SURVEY WHEN target resolved DO A_INTAKE
141
+ → S_INTAKE WHEN no target DO request_user_input
142
+
143
+ S_SURVEY → S_AUDIT DO A_SURVEY
144
+ S_AUDIT → S_DIVERGE DO A_AUDIT
145
+
146
+ S_DIVERGE:
147
+ → S_FIX WHEN !skip_fix AND actionable findings/ideas DO A_DIVERGE
148
+ → S_GENERALIZE WHEN (skip_fix OR no actionable) AND !skip_gen DO A_DIVERGE
149
+ → S_RECORD WHEN (skip_fix OR no actionable) AND skip_gen DO A_DIVERGE
150
+
151
+ S_FIX → S_VERIFY DO A_FIX
152
+ S_VERIFY:
153
+ → S_GENERALIZE WHEN verified AND !skip_gen DO A_VERIFY
154
+ → S_RECORD WHEN verified AND skip_gen DO A_VERIFY
155
+ → S_FIX WHEN needs_rework DO A_VERIFY
156
+
157
+ S_GENERALIZE:
158
+ → S_DISCOVER WHEN hits found DO A_GENERALIZE
159
+ → S_RECORD WHEN no hits DO A_GENERALIZE
160
+
161
+ S_DISCOVER → S_AUDIT : new component to audit → cross_phase_loops++
162
+ S_DISCOVER → S_FIX : fixable sibling, !skip_fix → cross_phase_loops++
163
+ S_DISCOVER → S_RECORD : remaining_actionable == 0 OR loops >= max_loops (MUST log each unfixed item)
164
+
165
+ S_RECORD → END DO A_RECORD
166
+ </transitions>
167
+
168
+ <actions>
169
+
170
+ ### A_INTAKE
171
+ 1. Parse arguments: target, flags, `--dimensions` subset
203
172
  2. Generate slug, create `SESSION_DIR`
204
- 3. Search prior knowledge: `maestro search "<keywords>"` + Glob prior sessions + ARCHITECTURE.md + spec load (ui, coding)
173
+ 3. Pre-load: `maestro search` + Glob prior sessions + ARCHITECTURE.md + spec load ui/coding
205
174
  4. Derive `phase_goals[]` from flags (apply `skip_when`)
206
- 5. Write `session.json` + `understanding.md` SS1
207
- 6. Display Goal Prompt (appendix), continue without blocking
175
+ 5. Write `session.json` + `understanding.md` §1
176
+ 6. Emit Goal Prompt (see Appendix)
177
+ 📌 `git commit -m "odyssey-ui({slug}): INTAKE — 目标解析"`
208
178
 
209
- **Resume (`-c`):** Glob latest session -> read `session.json` -> restore `current_state` -> jump.
179
+ ### A_RESUME
180
+ Find latest session via Glob → read `session.json` → display summary → jump to `current_state`.
210
181
 
211
- 📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-ui({slug}): S_INTAKE — 目标解析"`
212
-
213
- ### S_SURVEY
182
+ ### A_SURVEY
214
183
  **spawn_agents_on_csv (Wave 1):**
215
184
 
216
185
  Write `tasks.csv` with Wave 1 rows:
@@ -220,12 +189,11 @@ Write `tasks.csv` with Wave 1 rows:
220
189
  ```
221
190
  `spawn_agents_on_csv({ csv_path:"tasks.csv", max_concurrency:2, max_runtime_seconds:300, output_csv_path:"wave-1-results.csv", output_schema:SHARED_OUTPUT_SCHEMA })`
222
191
 
223
- Merge -> evidence.ndjson (phase: "survey"). Update SS2. Mark G1 done.
224
-
225
- 📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-ui({slug}): S_SURVEY — 调查"`
192
+ Merge evidence.ndjson (phase: "survey"). Update §2. Mark G1 done.
193
+ 📌 `git commit -m "odyssey-ui({slug}): SURVEY — 视觉调查"`
226
194
 
227
- ### S_AUDIT
228
- **spawn_agents_on_csv (Wave 2)** — 6 agents:
195
+ ### A_AUDIT
196
+ **spawn_agents_on_csv (Wave 2)** — 6 agents (one per dimension, or `--dimensions` subset):
229
197
 
230
198
  Append Wave 2 rows to `tasks.csv`:
231
199
  ```csv
@@ -238,11 +206,11 @@ Append Wave 2 rows to `tasks.csv`:
238
206
  ```
239
207
  `spawn_agents_on_csv({ csv_path:"tasks.csv", max_concurrency:6, max_runtime_seconds:600, output_csv_path:"wave-2-results.csv", output_schema:SHARED_OUTPUT_SCHEMA })`
240
208
 
241
- Merge -> evidence.ndjson (phase: "audit"). Write `audit_result` with dimensions, finding count, severity distribution. Update SS3. Mark G2 done.
209
+ Each returns `[{title, severity, file, line, description, suggestion, dimension}]`.
210
+ Merge → evidence (phase: "audit"). Write `audit_result` with dimensions, finding count, severity distribution. Update §3 (severity matrix). Mark G2 done.
211
+ 📌 `git commit -m "odyssey-ui({slug}): AUDIT — 多维审查"`
242
212
 
243
- 📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-ui({slug}): S_AUDIT — 审查"`
244
-
245
- ### S_DIVERGE
213
+ ### A_DIVERGE
246
214
  **spawn_agents_on_csv (Wave 3)** — 2 agents:
247
215
 
248
216
  Append Wave 3 rows to `tasks.csv`:
@@ -261,33 +229,28 @@ EXPECTED: JSON [{idea, category, impact, effort, description}]
261
229
  CONSTRAINTS: User-perceptible improvements only
262
230
  " --role analyze --mode analysis
263
231
  ```
264
- Execute with `run_in_background: true`, then wait for callback (do NOT halt the Odyssey flow).
265
-
266
- Consolidate: audit findings + divergent ideas -> prioritized improvement list (impact/effort matrix). Write `diverge_result`. Update SS4. Mark G3 done.
267
-
268
- 📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-ui({slug}): S_DIVERGE — 发散"`
232
+ Execute with `run_in_background: true`, then wait for callback.
269
233
 
270
- ### S_FIX
271
- Skip if `--skip-fix`. **穷尽修复** ALL audit findings + divergent ideas(按 impact×severity 递降),不限于 high severity。每轮修复后 re-review,新发现追加。
272
- **Normal**: `request_user_input` to confirm. **`-y`**: auto-fix, record `deferred`.
273
- Implement highest impact first. Record evidence (phase: "fix").
234
+ Consolidate: audit findings + divergent ideas → prioritized improvement list (impact/effort matrix). Write `diverge_result`. Append evidence (phase: "diverge"). Update §4. Mark G3 done.
235
+ 📌 `git commit -m "odyssey-ui({slug}): DIVERGE 发散探索"`
274
236
 
275
- 📌 **Auto-commit**: `git add -A && git commit -m "odyssey-ui({slug}): S_FIX — 修复"`
276
-
277
- ### S_VERIFY
237
+ ### A_FIX
278
238
  Skip if `--skip-fix`.
239
+ 1. **穷尽修复**: ALL findings/ideas by priority tier (critical→high→medium→low + high-impact ideas). After each tier, re-review — new findings append.
240
+ 2. Each fix → evidence (phase: "fix")
241
+ 3. **Normal**: request_user_input per-fix. **`-y`**: auto-proceed, record `deferred`.
242
+ 📌 `git commit -m "odyssey-ui({slug}): FIX — 优化实现"`
279
243
 
280
- 1. **Tests**: run covering tests on modified files
281
- 2. **CLI visual review**: delegate `--role review --mode analysis` for visual correctness + regression check (execute with `run_in_background: true`, then wait for callback — do NOT halt the Odyssey flow)
282
- 3. `needs_rework` -> S_FIX (loop). `confirmed` -> mark G4 done, advance
283
- 4. Update SS5
284
-
285
- 📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-ui({slug}): S_VERIFY — 验证"`
244
+ ### A_VERIFY
245
+ 1. Run tests (lint, unit, visual regression)
246
+ 2. **CLI-assisted**: `maestro delegate` with `--role review` visual correctness, interaction states, accessibility, responsive
247
+ 3. `needs_rework` → S_FIX. `verified` → mark G4 done. Update §5, write `confirmation`.
248
+ 📌 `git commit -m "odyssey-ui({slug}): VERIFY — 验证"`
286
249
 
287
- ### S_GENERALIZE
288
- Skip if `--skip-generalize`.
250
+ ### A_GENERALIZE
251
+ Skip if `--skip-generalize`. Pattern 来源: audit findings + diverge ideas (severity >= medium OR impact = high)。
289
252
 
290
- **Step 1 — Multi-layer pattern extraction** from audit + diverge findings:
253
+ **Step 1 — Multi-layer pattern extraction:**
291
254
 
292
255
  | Layer | Method | Example |
293
256
  |-------|--------|---------|
@@ -308,121 +271,94 @@ Append Wave 4 rows to `tasks.csv`:
308
271
  ```
309
272
  `spawn_agents_on_csv({ csv_path:"tasks.csv", max_concurrency:4, max_runtime_seconds:600, output_csv_path:"wave-4-results.csv", output_schema:SHARED_OUTPUT_SCHEMA })`
310
273
 
311
- **Step 3 — Cross-layer dedup**: Multi-layer hit -> boost confidence. Single -> `needs_review`. Historical fix -> `regression_risk`.
274
+ **Step 3 — Cross-layer dedup**: Multi-layer hit boost confidence. Single `needs_review`. Historical fix `regression_risk`.
312
275
 
313
- **Step 4 — Iterative deepening**: module >= 3 hits -> targeted deep scan. Max 1 round.
276
+ **Step 4 — Iterative deepening**: module 3 hits targeted deep scan. Max 1 round.
314
277
 
315
278
  **Step 5 — Quality Gate** (self-iteration).
316
279
 
317
- **Step 6:** Write `generalization_stats`. Update SS6. Mark G5 done.
318
-
319
- 📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-ui({slug}): S_GENERALIZE — 泛化"`
320
-
321
- ### S_DISCOVER
322
- Skip if no generalization hits.
323
-
324
- 1. **Triage** each hit: read +-10 lines -> classify `needs_treatment` / `low_risk` / `already_handled`
325
- 2. **Route**:
326
- - `needs_treatment` + directly fixable **fix immediately**back to S_FIX
327
- - `needs_treatment` + requires design direction decisioncreate issue (with fix suggestion)
328
- - `low_risk` evaluate if a quick guard/improvement is feasible; if yes, fix it
329
- - `already_handled` → mark skip
330
- See appendix `-y` behavior. Append evidence (phase: "discovery" + "decision")
331
- 3. **Cross-phase loop**:
332
- - `S_DISCOVER → S_RECORD` : triage complete AND remaining_actionable == 0
333
- - `S_DISCOVER → S_RECORD` : loops >= max_loops → MUST log each unfixed item with specific reason (blanket "pre-existing" is forbidden)
334
- - new component to audit → S_AUDIT (cross_phase_loops++)
335
- - fixable sibling → S_FIX (!skip_fix, cross_phase_loops++)
336
- 4. Update SS7. Mark G6 done.
337
-
338
- 📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-ui({slug}): S_DISCOVER — 发现"`
339
-
340
- ### S_RECORD
341
- 1. Finalize SS8: structured by Knowledge Persistence table (temporary)
342
- 2. Mark G7 done. Pending decisions: **Normal** -> `request_user_input`. **`-y`** -> skip, show deferred count
343
- 3. **Goal audit**: all confirmed -> `phase_goals_all_done = true`. Any false: **Normal** -> `request_user_input`. **`-y`** -> auto accept
344
- 4. **Completion**: `current_state = "COMPLETED"`, emit summary:
280
+ **Step 6:** Write `generalization_stats`. Update §6. Mark G5 done.
281
+ 📌 `git commit -m "odyssey-ui({slug}): GENERALIZE — 泛化扫描"`
282
+
283
+ ### A_DISCOVER
284
+ base A_DISCOVER 执行。Mark G6 done.
285
+ 📌 `git commit -m "odyssey-ui({slug}): DISCOVER — 发现分类"`
286
+
287
+ ### A_RECORD
288
+ 1. Finalize §8: 按 Knowledge Persistence 表分类记录,completion summary 列出建议的 `/spec-add` 命令
289
+ 2. Pending decisions: **Normal**request_user_input. **`-y`**skip, show deferred count
290
+ 3. Goal audit: all confirmed `phase_goals_all_done = true`. **Normal** request_user_input | **`-y`** auto accept
291
+ 4. Mark G7 done. Emit completion summary:
345
292
  ```
346
293
  --- UI ODYSSEY COMPLETE ---
347
- Target: {target} Dimensions: {audited}
348
- Survey: {token_count} tokens, {pattern_count} patterns
349
- Audit: {C}C {H}H {M}M {L}L Diverge: {improvements} + {ideas} creative
350
- Fix: {F} applied, {S} skipped Patterns: {N} ({by_layer})
351
- Scan: {total} hits ({cross_layer} cross-layer) Issues: {N}
352
- Decisions: {resolved}/{pending}/{deferred} Self-iter: {R} rounds / {P} phases
353
- Goals: {done}/{total} ({skipped} skipped)
294
+ Target: {target} | Dimensions: {dimensions_audited}
295
+ Findings: {C}C {H}H {M}M {L}L | Diverge: {improvements} polish + {creative} delight
296
+ Fix: {fixed_count} applied, verified={yes|skipped}
297
+ Patterns: {extracted} ({by_layer}) | Scan hits: {total} ({cross_layer} cross-layer)
298
+ Issues: {N} | Decisions: {N} resolved, {M} pending, {K} deferred
299
+ Learnings: {N} entries | Self-iter: {N} rounds | Goals: {done}/{total} ({skipped} skipped)
354
300
  ---
355
301
  ```
356
- **Next steps:** `$odyssey-review-test-fix`, `$manage-issue list --source ui-odyssey`, `$maestro-impeccable`, `$maestro-plan --gaps`
302
+ 📌 `git commit -m "odyssey-ui({slug}): RECORD — 会话总结"`
357
303
 
358
- 📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-ui({slug}): S_RECORD — 总结"`
359
- </execution>
304
+ </actions>
360
305
 
361
306
  <appendix>
362
307
 
363
308
  ### Goal Prompt Template
364
-
365
- **Time guard: display ONCE after S_INTAKE completes (session created, before survey). NEVER redisplay at S_RECORD completion.**
309
+ **⚠️ 仅在 A_INTAKE 完成后显示一次。A_RECORD 完成时禁止重新显示。**
366
310
 
367
311
  ```
368
- UI Odyssey session created. Copy the following /goal to set termination conditions at any time:
312
+ 📋 UI Odyssey 会话已创建。可随时复制以下 /goal 设定终止条件:
369
313
 
370
- /goal 穷尽迭代:直到所有 audit + diverge findings 均已处理(fix/issue/decision)
314
+ /goal 完成以下目标:
315
+ {for each G in phase_goals where status != "skipped":}
316
+ - {G.id}: {G.goal} — 完成条件: {G.done_when}
317
+ {end for}
318
+ 穷尽迭代:直到 audit + diverge findings 均已处理(fix/issue/decision)
371
319
  且 phase_goals_all_done=true 才停。修复按 impact×severity 逐轮迭代。
372
- 每轮修复后重审修改区域,新发现追加继续。
373
- phase=decision pending 必须 request_user_input。不允许遗留。
320
+ 每轮修复后重审修改区域,新发现追加继续修。
321
+ 遇到 phase=decision pending 必须 request_user_input。不允许"只报告不处理"。
374
322
  ```
375
323
 
376
- Odyssey outputs prompt then continues without blocking. `/goal` entered by user at any time.
377
-
378
- ### `-y` Auto-Confirm Behavior
379
-
380
- | Decision Point | Normal | `-y` mode |
381
- |----------------|--------|-----------|
382
- | S_DIVERGE consolidation | request_user_input for priority | auto-rank by impact/effort |
383
- | S_FIX fix candidates | request_user_input to confirm | auto-fix high-impact, `deferred` |
384
- | S_DISCOVER bug routing | request_user_input per hit | auto create issue, `deferred` |
385
- | S_DISCOVER ambiguous | request_user_input batch | all `deferred` |
386
- | S_RECORD pending decisions | request_user_input per-item | skip, show deferred count |
387
- | S_RECORD goal audit | request_user_input 3-way | auto accept current state |
324
+ ### `-y` Auto-Confirm (5 decision points)
325
+ | Decision Point | Normal | `-y` |
326
+ |----------------|--------|------|
327
+ | A_FIX improvement confirmation | request_user_input | auto-proceed, `deferred` |
328
+ | A_DISCOVER hit routing | request_user_input | auto create issue, `deferred` |
329
+ | A_DISCOVER ambiguous items | request_user_input | all `deferred` |
330
+ | A_RECORD pending decisions | request_user_input | skip, show deferred count |
331
+ | A_RECORD goal audit | request_user_input | auto accept |
388
332
 
389
- `deferred` items shown in summary; recoverable via `-c`.
390
-
391
- ### Phase Goal Lifecycle
392
-
393
- `pending -> done (confirmed=true)` normal | `pending -> skipped (confirmed=true)` flags/manual | `pending -> failed (confirmed=false)` incomplete
394
-
395
- `phase_goals_all_done = true` only when ALL goals have `completion_confirmed == true`.
333
+ `deferred` "待决策" in completion summary; recoverable via `-c`.
396
334
 
397
335
  </appendix>
398
336
 
337
+ </state_machine>
338
+
399
339
  <error_codes>
400
340
  | Code | Severity | Condition | Recovery |
401
341
  |------|----------|-----------|----------|
402
- | E001 | error | No target and no session to resume | Provide target or use -c |
403
- | E002 | error | Target not found or no UI files | Check path, ensure UI files exist |
404
- | E003 | error | Resume but no session found | Start new session |
405
- | W001 | warning | No relevant git history | Proceed with limited context |
406
- | W002 | warning | Audit dimension agent failed | Partial coverage, note gap |
407
- | W003 | warning | Generalization scan 0 hits | Skip discovery |
408
- | W004 | warning | Delegate parse failed | Use raw output |
342
+ | E001 | error | No target specified | Provide target |
343
+ | E002 | error | Target path not found | Check path |
344
+ | W001 | warning | No design system detected | Proceed with defaults |
345
+ | W002 | warning | Some dimension agents failed | Partial coverage |
409
346
  </error_codes>
410
347
 
411
348
  <success_criteria>
412
- - [ ] Target resolved to UI files, session created with 3 output files
413
- - [ ] Prior knowledge searched (maestro search + sessions + architecture + ui specs)
414
- - [ ] Survey via spawn Wave 1, evidence phase=survey
415
- - [ ] All 6 dimensions audited via spawn Wave 2, severity matrix produced
416
- - [ ] Divergent exploration via spawn Wave 3, prioritized improvement list
417
- - [ ] Fixes applied highest-impact-first and verified (unless --skip-fix)
418
- - [ ] `--skip-fix`: no source code modifications
419
- - [ ] Generalization via spawn Wave 4 + cross-layer dedup (unless --skip-generalize)
420
- - [ ] Discoveries classified and routed
421
- - [ ] understanding.md tracks all 8 sections progressively
422
- - [ ] phase_goals G1-G7 derived from flags, each phase marks its goal
423
- - [ ] Goal Prompt displayed once; `-y` auto-resolves/defers
424
- - [ ] State saved at each transition (resumable via -c)
425
- - [ ] Quality Gate self-iteration logged in self_iteration_log
426
- - [ ] Completion summary with all stats
427
- - [ ] **Every unfixed finding has individual classification and reason** — blanket "pre-existing" labels are forbidden
349
+ - [ ] 6-dimension audit with severity matrix + divergent exploration (polish + delight)
350
+ - [ ] Improvements implemented and verified (unless --skip-fix)
351
+ - [ ] Multi-layer generalization + discoveries classified (unless --skip-generalize)
352
+ - [ ] Every unfixed finding has individual classification and reason
353
+ - [ ] understanding.md §8 finalized; phase_goals G1-G7 tracked; `-y` no blocking prompts
428
354
  </success_criteria>
355
+
356
+ <next_step_routing>
357
+ | Condition | Next step |
358
+ |-----------|-----------|
359
+ | Finding needs deeper debug | `$odyssey-debug "<finding>"` |
360
+ | Issues created from discoveries | `/manage-issue list --source ui-odyssey` |
361
+ | Design pattern worth documenting | `/spec-add ui "..."` |
362
+ | Want full review of changes | `$odyssey-review-test-fix <changed-files>` |
363
+ | Sibling components to polish | `$odyssey-ui "<sibling>"` |
364
+ </next_step_routing>
@@ -149,9 +149,9 @@ Each wave generates `wave-{N}.csv` with extra `prev_context` column.
149
149
  3. **CSV is Source of Truth**: Master tasks.csv holds all state
150
150
  4. **Context Propagation**: prev_context built from master CSV, not from memory
151
151
  5. **Discovery Board is Append-Only**: Never clear, modify, or recreate discoveries.ndjson
152
- 6. **Skip on Failure**: If all dimension agents failed, skip aggregation
152
+ 6. **Skip on Failure**: If all dimension agents failed, skip aggregation and flag all downstream outputs as LOW CONFIDENCE. Record `degradation_event` in discoveries.ndjson. **Note**: timed-out workers that report `completed` with empty findings are treated as effectively failed for degradation purposes if `severity_counts` is all-zero AND `findings` is empty. This is a defined degradation path, not a violation of invariant 2.
153
153
  7. **Cleanup Temp Files**: Remove wave-{N}.csv and wave-{N}-results.csv after results are merged
154
- 8. **DO NOT STOP**: Continuous execution until all waves complete
154
+ 8. **Pipeline continuity**: Continuous execution until all waves complete. When invariant 6 (skip on failure) activates, the pipeline continues in degraded mode.
155
155
  </invariants>
156
156
 
157
157
  <execution>
@@ -275,9 +275,9 @@ CONSTRAINTS:
275
275
 
276
276
  #### Wave 2: Aggregation + Deep-Dive
277
277
 
278
- Filter master `tasks.csv` for `wave == 2 AND status == pending`. If all wave 1 tasks failed, skip aggregation.
278
+ Filter master `tasks.csv` for `wave == 2 AND status == pending`. If all wave 1 tasks failed, skip aggregation (invariant 6).
279
279
 
280
- Build `prev_context` from wave 1 findings (format: `[Task N: Title] summary...` per task).
280
+ Build `prev_context` from wave 1 findings (format: `[Task N: Title] summary...` per task). **Failed-dependency handling**: exclude failed task IDs from prev_context. If SOME wave 1 tasks failed, append gap_note listing missing dimensions so the aggregation agent knows its coverage is incomplete.
281
281
  Write `wave-2.csv` with `prev_context` column → execute `spawn_agents_on_csv` with `REVIEW_AGGREGATION_INSTRUCTION` (same termination contract; output_schema returns `result_status` enum [completed|failed], findings, plus `verdict` enum [PASS|WARN|BLOCK]) → merge results into master `tasks.csv` (map `result_status` → master `status` column) → delete both `wave-2.csv` and `wave-2-results.csv`.
282
282
 
283
283
  ### Phase 3: Results Aggregation
@@ -344,7 +344,14 @@ Generate `context.md`:
344
344
  | Medium findings > 5 | WARN |
345
345
  | Otherwise | PASS |
346
346
 
347
- **Issue creation** by level threshold:
347
+ **Side-effect confirmation gate** (skip when `-y/--yes`):
348
+ Before writing to external stores, present a summary to the user via `request_user_input`:
349
+ - Issues to create (count + severity + titles)
350
+ - Phase index update (artifact dir)
351
+ - Artifact registration in state.json
352
+ The user can approve all, selectively exclude, or skip entirely.
353
+
354
+ **Issue creation** (approved items only) by level threshold:
348
355
 
349
356
  | Level | Create Issues For |
350
357
  |-------|------------------|
@@ -354,11 +361,11 @@ Generate `context.md`:
354
361
 
355
362
  **Spec conflict check**: If any finding directly contradicts a loaded spec entry (code behavior ≠ spec rule), suggest `maestro spec conflict mark <file> <line> --note "<evidence>"` on the spec entry. Code is the single source of truth. Log spec conflicts in review.json as `spec_conflicts[]`.
356
363
 
357
- **Phase index update**: Update `{artifact_dir}/index.json` with review status.
364
+ **Phase index update** (after confirmation): Update `{artifact_dir}/index.json` with review status.
358
365
 
359
- **Register artifact**: Append to `state.json.artifacts[]` with `type: "review"`, `id: REV-NNN`, `path: "scratch/{YYYYMMDD}-review-P{N}-{slug}"`, `depends_on: exec_art.id`. Output directory is independent scratch, not shared with plan.
366
+ **Register artifact** (after confirmation): Append to `state.json.artifacts[]` with `type: "review"`, `id: REV-NNN`, `path: "scratch/{YYYYMMDD}-review-P{N}-{slug}"`, `depends_on: exec_art.id`. Output directory is independent scratch, not shared with plan.
360
367
 
361
- Display summary. If spec conflicts detected, suggest: `maestro spec conflict list` → `$manage-knowledge-audit --scope spec`.
368
+ Display summary. **Next-step suggestion** (suggest only, NEVER auto-execute): if spec conflicts detected, suggest `maestro spec conflict list` → `$manage-knowledge-audit --scope spec`. The user decides whether to proceed.
362
369
 
363
370
  ### Shared Discovery Board Protocol
364
371
 
@@ -410,8 +417,8 @@ echo '{"ts":"<ISO>","worker":"{id}","type":"vulnerability","data":{"location":"s
410
417
  - [ ] Aggregation + deep-dive executed (wave 2)
411
418
  - [ ] review.json produced with verdict and severity distribution
412
419
  - [ ] context.md produced with full review report
413
- - [ ] Issues auto-created for qualifying severity findings
414
- - [ ] Phase index.json updated with review status
420
+ - [ ] Issues created for qualifying severity findings (after user confirmation in interactive mode; auto in -y mode)
421
+ - [ ] Phase index.json updated with review status (after user confirmation in interactive mode; auto in -y mode)
415
422
  - [ ] discoveries.ndjson append-only throughout
416
423
  - [ ] Ralph-invoked: `maestro ralph complete <idx> --status {STATUS}` called with correct verdict
417
424
  </success_criteria>