maestro-flow 0.5.40 → 0.5.42

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 (101) hide show
  1. package/.agents/skills/maestro-analyze/SKILL.md +0 -42
  2. package/.agents/skills/maestro-blueprint/SKILL.md +0 -22
  3. package/.agents/skills/maestro-brainstorm/SKILL.md +4 -24
  4. package/.agents/skills/maestro-execute/SKILL.md +1 -1
  5. package/.agents/skills/maestro-grill/SKILL.md +0 -16
  6. package/.agents/skills/maestro-milestone-audit/SKILL.md +0 -15
  7. package/.agents/skills/maestro-plan/SKILL.md +5 -62
  8. package/.agents/skills/maestro-roadmap/SKILL.md +0 -8
  9. package/.agents/skills/odyssey-debug/SKILL.md +109 -143
  10. package/.agents/skills/odyssey-improve/SKILL.md +127 -141
  11. package/.agents/skills/odyssey-planex/SKILL.md +140 -231
  12. package/.agents/skills/odyssey-review-test-fix/SKILL.md +136 -90
  13. package/.agents/skills/odyssey-ui/SKILL.md +123 -143
  14. package/.agents/skills/team-adversarial-swarm/workflows/wf-swarm-synthesize.js +248 -248
  15. package/.agents/skills/team-coordinate/specs/role-spec-template.md +197 -198
  16. package/.agents/skills/team-roadmap-dev/SKILL.md +164 -164
  17. package/.agents/skills/team-roadmap-dev/specs/team-config.json +1 -1
  18. package/.agents/skills/team-swarm/roles/analyst/role.md +172 -176
  19. package/.agy/skills/maestro-analyze/SKILL.md +0 -42
  20. package/.agy/skills/maestro-blueprint/SKILL.md +0 -22
  21. package/.agy/skills/maestro-brainstorm/SKILL.md +4 -24
  22. package/.agy/skills/maestro-execute/SKILL.md +1 -1
  23. package/.agy/skills/maestro-grill/SKILL.md +0 -16
  24. package/.agy/skills/maestro-milestone-audit/SKILL.md +0 -15
  25. package/.agy/skills/maestro-plan/SKILL.md +5 -62
  26. package/.agy/skills/maestro-roadmap/SKILL.md +0 -8
  27. package/.agy/skills/odyssey-debug/SKILL.md +109 -143
  28. package/.agy/skills/odyssey-improve/SKILL.md +127 -141
  29. package/.agy/skills/odyssey-planex/SKILL.md +140 -231
  30. package/.agy/skills/odyssey-review-test-fix/SKILL.md +136 -90
  31. package/.agy/skills/odyssey-ui/SKILL.md +123 -143
  32. package/.agy/skills/team-adversarial-swarm/workflows/wf-swarm-synthesize.js +248 -248
  33. package/.agy/skills/team-coordinate/specs/role-spec-template.md +197 -198
  34. package/.agy/skills/team-roadmap-dev/SKILL.md +141 -153
  35. package/.agy/skills/team-roadmap-dev/specs/team-config.json +1 -1
  36. package/.agy/skills/team-swarm/roles/analyst/role.md +172 -176
  37. package/.claude/commands/maestro-analyze.md +0 -42
  38. package/.claude/commands/maestro-blueprint.md +0 -22
  39. package/.claude/commands/maestro-brainstorm.md +4 -24
  40. package/.claude/commands/maestro-execute.md +1 -1
  41. package/.claude/commands/maestro-grill.md +0 -16
  42. package/.claude/commands/maestro-milestone-audit.md +0 -15
  43. package/.claude/commands/maestro-plan.md +5 -62
  44. package/.claude/commands/maestro-roadmap.md +0 -8
  45. package/.claude/commands/odyssey-debug.md +109 -143
  46. package/.claude/commands/odyssey-improve.md +127 -141
  47. package/.claude/commands/odyssey-planex.md +140 -231
  48. package/.claude/commands/odyssey-review-test-fix.md +136 -90
  49. package/.claude/commands/odyssey-ui.md +123 -143
  50. package/.claude/skills/team-adversarial-swarm/workflows/wf-swarm-synthesize.js +248 -248
  51. package/.claude/skills/team-coordinate/specs/role-spec-template.md +197 -198
  52. package/.claude/skills/team-roadmap-dev/SKILL.md +169 -169
  53. package/.claude/skills/team-roadmap-dev/specs/team-config.json +1 -1
  54. package/.claude/skills/team-swarm/roles/analyst/role.md +181 -185
  55. package/.codex/skills/odyssey-debug/SKILL.md +114 -169
  56. package/.codex/skills/odyssey-improve/SKILL.md +144 -188
  57. package/.codex/skills/odyssey-planex/SKILL.md +162 -242
  58. package/.codex/skills/odyssey-review-test-fix/SKILL.md +96 -90
  59. package/.codex/skills/odyssey-ui/SKILL.md +128 -173
  60. package/dashboard/dist-server/src/commands/install-backend.js +31 -16
  61. package/dashboard/dist-server/src/commands/install-backend.js.map +1 -1
  62. package/dashboard/dist-server/src/core/component-defs.js +25 -0
  63. package/dashboard/dist-server/src/core/component-defs.js.map +1 -1
  64. package/dashboard/dist-server/src/tools/spec-loader.js +32 -20
  65. package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
  66. package/dashboard/dist-server/src/tools/spec-seeds.d.ts +8 -0
  67. package/dashboard/dist-server/src/tools/spec-seeds.js +114 -0
  68. package/dashboard/dist-server/src/tools/spec-seeds.js.map +1 -1
  69. package/dist/src/commands/install-backend.d.ts.map +1 -1
  70. package/dist/src/commands/install-backend.js +31 -16
  71. package/dist/src/commands/install-backend.js.map +1 -1
  72. package/dist/src/commands/spec.d.ts.map +1 -1
  73. package/dist/src/commands/spec.js +13 -3
  74. package/dist/src/commands/spec.js.map +1 -1
  75. package/dist/src/core/component-defs.d.ts.map +1 -1
  76. package/dist/src/core/component-defs.js +25 -0
  77. package/dist/src/core/component-defs.js.map +1 -1
  78. package/dist/src/tools/spec-init.d.ts +4 -3
  79. package/dist/src/tools/spec-init.d.ts.map +1 -1
  80. package/dist/src/tools/spec-init.js +9 -5
  81. package/dist/src/tools/spec-init.js.map +1 -1
  82. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  83. package/dist/src/tools/spec-loader.js +32 -20
  84. package/dist/src/tools/spec-loader.js.map +1 -1
  85. package/dist/src/tools/spec-seeds.d.ts +8 -0
  86. package/dist/src/tools/spec-seeds.d.ts.map +1 -1
  87. package/dist/src/tools/spec-seeds.js +114 -0
  88. package/dist/src/tools/spec-seeds.js.map +1 -1
  89. package/dist/src/utils/update-notices.js +11 -0
  90. package/dist/src/utils/update-notices.js.map +1 -1
  91. package/package.json +1 -1
  92. package/workflows/agy-instructions.md +147 -161
  93. package/workflows/claude-instructions.md +100 -48
  94. package/workflows/codex-instructions.md +147 -161
  95. package/workflows/execute.md +4 -3
  96. package/workflows/explore-usage.md +41 -81
  97. package/workflows/grill.md +11 -0
  98. package/workflows/milestone-audit.md +8 -0
  99. package/workflows/odyssey-base-codex.md +305 -0
  100. package/workflows/odyssey-base.md +89 -91
  101. package/workflows/plan.md +6 -0
@@ -1,86 +1,73 @@
1
1
  ---
2
2
  name: odyssey-ui
3
- description: "Long-running UI optimization cycle — visual survey, multi-dimensional audit, divergent exploration, fix, verify, generalize, and design knowledge persistence"
3
+ description: "Long-running UI optimization cycle — visual survey, multi-dimensional audit, divergent exploration, fix, verify, generalize, discover, and design knowledge persistence"
4
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>
8
+ <base>@~/.maestro/workflows/odyssey-base-codex.md</base>
9
9
 
10
10
  <purpose>
11
- Deep UI polish cycle: survey 6-dimension audit divergent creative exploration
12
- fix verify generalize discover persist. Every pixel is a learning opportunity.
13
-
14
- Core philosophy:
15
- - **Every pixel tells a story** — subtle details create the experience
16
- - **Diverge before converge** — explore creatively, then implement methodically
17
- - **Find one, polish all** — a single improvement reveals a class of opportunities
18
- - **Browser is truth** — verify in real rendering, not just code
19
-
20
- **三句哲学约束(穷尽迭代):**
21
- 1. **零遗留** — 每个 finding/idea 必须是 action item(修复 / issue / 决策),不允许只报告不处理
22
- 2. **穷尽迭代** — 按 impact×severity 递降逐轮修复,直到 0 remaining actionable 才退出 fix loop
23
- 3. **改进即标准** — 每次修复后重审同区域,发现新视觉问题继续修,直到该区域无可改善
11
+ survey -> 6-dimension audit -> divergent creative exploration ->
12
+ fix -> verify -> generalize -> discover -> persist.
13
+ Exhaustive iteration until all findings addressed or deferred.
24
14
  </purpose>
25
15
 
26
16
  <boundary>
27
- **范围内:** 目标组件/页面的视觉体验优化 审查 6 维度 发散探索 修复 泛化到兄弟组件
28
- **范围外:** 后端逻辑 / 数据模型 / API 设计 / 业务规则 `$odyssey-planex` | 深度 bug 调查 `$odyssey-debug` | 代码质量审查 `$odyssey-review-test-fix`
29
- **探索自由度:** 边界内最大自由 — S_DIVERGE 阶段鼓励发散思维,不设创意上限。审查 + 发散可发现任何视觉/交互/可访问性细节。在约束下尽可能完善每个像素。
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
17
+ **In scope:** Target component/page visual experience optimization -- audit 6 dimensions -> divergent exploration -> fix -> generalize to sibling components.
18
+ **Out of scope:** Backend logic / data model / API design -> `$odyssey-planex` | Deep bug investigation -> `$odyssey-debug` | Code quality review -> `$odyssey-review-test-fix`
19
+
20
+ **Exploration freedom:** Maximum freedom within boundary -- S_DIVERGE encourages divergent thinking with no creative ceiling. Audit + diverge may discover any visual/interaction/accessibility detail.
21
+ **Zero-residual:** Every finding/idea MUST have a concrete action (fix / issue / decision). "Pre-existing design debt" is not a valid skip reason.
22
+
23
+ **Decision gate** -- ONLY these qualify as decisions (not fixes):
24
+ - Brand/style direction requiring human creative judgment
25
+ - Layout restructuring that changes user flow significantly
26
+ - Requires new design tokens or breaking component API
36
27
  </boundary>
37
28
 
38
29
  <context>
39
- $ARGUMENTS — target and optional flags.
30
+ $ARGUMENTS
40
31
 
41
- **Target resolution:** Component path audit component | Page/route audit page | `staged`/`HEAD` diff UI changes | Feature area resolve to components/pages
32
+ **Target resolution:** Component path -> audit component | Page/route -> audit page | `staged`/`HEAD` -> diff UI changes | Feature area -> resolve to components/pages
42
33
 
43
- **Flags:**
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 |
34
+ **Flags:** `--dimensions <list>` subset of 6 dims | `--fix-threshold <severity>` | `--skip-fix` audit+diverge only | `--skip-generalize` skip S_GENERALIZE+S_DISCOVER | `--auto` no delegate confirmation | `-y` auto-confirm | `-c` resume | `--heartbeat` /loop heartbeat
54
35
 
55
- **Session**: `SESSION_DIR = .workflow/scratch/{YYYYMMDD}-ui-odyssey-{slug}/`
36
+ **Session**: `.workflow/scratch/{YYYYMMDD}-ui-odyssey-{slug}/`
37
+ **Output**: `session.json` | `evidence.ndjson` | `understanding.md`
56
38
 
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)
39
+ **session.json -- ui-specific fields:**
40
+ ```json
41
+ { "target": "", "dimensions": [], "audit_result": null, "diverge_result": null,
42
+ "patterns": [], "confirmation": null, "generalization_stats": null }
43
+ ```
58
44
 
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}
45
+ **evidence.ndjson phases:** `survey|audit|diverge|fix|discovery|decision|self-iteration`
60
46
 
61
47
  **phase_goals[]:**
48
+
62
49
  | ID | Goal | Phase | skip_when |
63
50
  |----|------|-------|-----------|
64
- | G1 | Survey completed | S_SURVEY | |
65
- | G2 | Audit completed | S_AUDIT | |
66
- | G3 | Divergent exploration done | S_DIVERGE | |
51
+ | G1 | Survey completed | S_SURVEY | -- |
52
+ | G2 | Audit completed | S_AUDIT | -- |
53
+ | G3 | Divergent exploration done | S_DIVERGE | -- |
67
54
  | G4 | Zero remaining: all findings/ideas fixed and verified | S_VERIFY | skip_fix |
68
55
  | G5 | Pattern generalized | S_GENERALIZE | skip_generalize |
69
56
  | G6 | Discoveries triaged | S_DISCOVER | skip_generalize |
70
- | G7 | Learnings persisted | S_RECORD | |
57
+ | G7 | Learnings persisted | S_RECORD | -- |
71
58
 
72
- **understanding.md:** §1 Target & Design Context | §2 Survey | §3 Audit | §4 Diverge | §5 Verify | §6 Generalize | §7 Discover | §8 Learnings
59
+ **understanding.md -- 8 sections:**
60
+ 1. Target & Design Context <- S_INTAKE | 2. Survey <- S_SURVEY | 3. Audit <- S_AUDIT | 4. Diverge <- S_DIVERGE
61
+ 5. Verify <- S_VERIFY | 6. Generalize <- S_GENERALIZE | 7. Discover <- S_DISCOVER | 8. Learnings <- S_RECORD
73
62
 
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
63
+ **Knowledge Persistence (S_RECORD writes understanding.md section 8):**
76
64
 
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 "..."` |
65
+ | Category | Content | Follow-up |
66
+ |----------|---------|-----------|
67
+ | Design pattern | Component pattern + applicable scenarios + token references | `/spec-add ui "..."` |
68
+ | Interaction spec | State definitions + transition rules + feedback patterns | `/spec-add ui "..."` |
69
+ | Accessibility rules | WCAG requirements + implementation approach | `/spec-add ui "..."` |
70
+ | Reusable generalization pattern | Pattern signature + application scope | `/spec-add coding "..."` |
84
71
  </context>
85
72
 
86
73
  <csv_schema>
@@ -116,68 +103,62 @@ id,title,description,task_type,dimension,deps,wave,status,findings,evidence,erro
116
103
  | 4 | Generalization (syntax-grep, semantic-scan, structural-match, historical-grep) | 4 agents |
117
104
  </csv_schema>
118
105
 
106
+ <invariants>
107
+ 1-5: See base (evidence append-only, session is state, phase goal tracking, auto-commit, zero silent drops).
108
+ 6. **Browser is truth** -- verify in real rendering, not just code review
109
+ 7. **Diverge before converge** -- explore creatively first, then implement methodically
110
+ </invariants>
111
+
119
112
  <self_iteration>
120
- 适用阶段: S_SURVEY, S_AUDIT, S_DIVERGE, S_GENERALIZE
113
+ Applies to: **S_SURVEY, S_AUDIT, S_DIVERGE, S_GENERALIZE**. Logic in base.
121
114
  </self_iteration>
122
115
 
123
116
  <state_machine>
124
117
 
125
118
  <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
119
+ S_INTAKE -> S_SURVEY -> S_AUDIT -> S_DIVERGE -> S_FIX -> S_VERIFY -> S_GENERALIZE -> S_DISCOVER -> S_RECORD -> END
135
120
  </states>
136
121
 
137
122
  <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
123
+ S_INTAKE -> S_INTAKE : -c + session found -> A_RESUME
124
+ S_INTAKE -> S_SURVEY : target resolved -> A_INTAKE
125
+ S_INTAKE -> S_INTAKE : no target -> request_user_input
126
+
127
+ S_SURVEY -> S_AUDIT : complete
128
+ S_AUDIT -> S_DIVERGE : complete
129
+
130
+ S_DIVERGE -> S_FIX : !skip_fix AND actionable findings/ideas
131
+ S_DIVERGE -> S_GENERALIZE : (skip_fix OR no actionable) AND !skip_gen
132
+ S_DIVERGE -> S_RECORD : (skip_fix OR no actionable) AND skip_gen
133
+
134
+ S_FIX -> S_VERIFY : fix implemented
135
+ S_VERIFY -> S_GENERALIZE : verified AND !skip_gen
136
+ S_VERIFY -> S_RECORD : verified AND skip_gen
137
+ S_VERIFY -> S_FIX : needs_rework
138
+
139
+ S_GENERALIZE -> S_DISCOVER : hits found
140
+ S_GENERALIZE -> S_RECORD : no hits
141
+
142
+ S_DISCOVER -> S_AUDIT : new component to audit -> cross_phase_loops++
143
+ S_DISCOVER -> S_FIX : fixable sibling, !skip_fix -> cross_phase_loops++
144
+ S_DISCOVER -> S_RECORD : remaining_actionable == 0 OR loops >= max_loops (log per-item reasons)
145
+
146
+ S_RECORD -> END : complete
166
147
  </transitions>
167
148
 
168
149
  <actions>
169
150
 
170
151
  ### A_INTAKE
171
152
  1. Parse arguments: target, flags, `--dimensions` subset
172
- 2. Generate slug, create `SESSION_DIR`
173
- 3. Pre-load: `maestro search` + Glob prior sessions + ARCHITECTURE.md + spec load ui/coding
153
+ 2. Generate slug, create SESSION_DIR
154
+ 3. `maestro search` + Glob prior sessions + ARCHITECTURE.md + spec load ui/coding
174
155
  4. Derive `phase_goals[]` from flags (apply `skip_when`)
175
- 5. Write `session.json` + `understanding.md` §1
176
- 6. Emit Goal Prompt (see Appendix)
177
- 📌 `git commit -m "odyssey-ui({slug}): INTAKE 目标解析"`
156
+ 5. Write `session.json` + `understanding.md` section 1, emit Goal Prompt
157
+
158
+ Commit: `"odyssey-ui({slug}): INTAKE -- target parsed"`
178
159
 
179
160
  ### A_RESUME
180
- Find latest session via Glob → read `session.json` display summary → jump to `current_state`.
161
+ Glob latest session -> read `session.json` -> jump to `current_state`.
181
162
 
182
163
  ### A_SURVEY
183
164
  **spawn_agents_on_csv (Wave 1):**
@@ -189,11 +170,11 @@ Write `tasks.csv` with Wave 1 rows:
189
170
  ```
190
171
  `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 })`
191
172
 
192
- Merge evidence.ndjson (phase: "survey"). Update §2. Mark G1 done.
193
- 📌 `git commit -m "odyssey-ui({slug}): SURVEY 视觉调查"`
173
+ Merge -> evidence (phase: "survey"). Update section 2. Mark G1 done.
174
+ Commit: `"odyssey-ui({slug}): SURVEY -- visual landscape"`
194
175
 
195
176
  ### A_AUDIT
196
- **spawn_agents_on_csv (Wave 2)** 6 agents (one per dimension, or `--dimensions` subset):
177
+ **spawn_agents_on_csv (Wave 2)** -- 6 agents (one per dimension, or `--dimensions` subset):
197
178
 
198
179
  Append Wave 2 rows to `tasks.csv`:
199
180
  ```csv
@@ -207,11 +188,11 @@ Append Wave 2 rows to `tasks.csv`:
207
188
  `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 })`
208
189
 
209
190
  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 多维审查"`
191
+ Merge -> evidence (phase: "audit"). Write `audit_result` with dimensions, finding count, severity distribution. Update section 3 (severity matrix). Mark G2 done.
192
+ Commit: `"odyssey-ui({slug}): AUDIT -- 6-dimension review"`
212
193
 
213
194
  ### A_DIVERGE
214
- **spawn_agents_on_csv (Wave 3)** 2 agents:
195
+ **spawn_agents_on_csv (Wave 3)** -- 2 agents:
215
196
 
216
197
  Append Wave 3 rows to `tasks.csv`:
217
198
  ```csv
@@ -231,36 +212,28 @@ CONSTRAINTS: User-perceptible improvements only
231
212
  ```
232
213
  Execute with `run_in_background: true`, then wait for callback.
233
214
 
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 发散探索"`
215
+ Consolidate: audit findings + divergent ideas -> prioritized improvement list (impact/effort matrix). Write `diverge_result`. Append evidence (phase: "diverge"). Update section 4. Mark G3 done.
216
+ Commit: `"odyssey-ui({slug}): DIVERGE -- creative exploration"`
236
217
 
237
218
  ### A_FIX
238
219
  Skip if `--skip-fix`.
239
- 1. **穷尽修复**: ALL findings/ideas by priority tier (criticalhighmediumlow + 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 — 优化实现"`
220
+ 1. **Exhaustive fix**: ALL findings/ideas by priority tier (critical->high->medium->low + high-impact ideas). After each tier, re-review -- new findings append.
221
+ 2. Each fix -> evidence (phase: "fix")
222
+ 3. Normal: request_user_input per-fix. `-y`: auto-proceed, record `deferred`.
223
+
224
+ Commit: `"odyssey-ui({slug}): FIX -- improvements applied"`
243
225
 
244
226
  ### A_VERIFY
245
227
  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 — 验证"`
228
+ 2. CLI-assisted: `maestro delegate --role review` -- visual correctness, interaction states, accessibility, responsive
229
+ 3. `needs_rework` -> S_FIX. `verified` -> mark G4 done. Update section 5, write `confirmation`.
249
230
 
250
- ### A_GENERALIZE
251
- Skip if `--skip-generalize`. Pattern 来源: audit findings + diverge ideas (severity >= medium OR impact = high)。
252
-
253
- **Step 1 — Multi-layer pattern extraction:**
231
+ Commit: `"odyssey-ui({slug}): VERIFY -- visual verification"`
254
232
 
255
- | Layer | Method | Example |
256
- |-------|--------|---------|
257
- | Syntax | Regex patterns (direct Grep) | Missing `focus-visible`, hardcoded colors, `!important` |
258
- | Semantic | Agent anti-pattern scan | Missing hover state on interactive element, no empty state |
259
- | Structural | File/module similarity | Same component structure missing accessibility attrs |
260
-
261
- Write `session.json.patterns[]`: `[{id, source_finding, layer, signature, description, risk, fix_template}]`
233
+ ### A_GENERALIZE
234
+ Skip if `--skip-generalize`. Pattern source: audit findings + diverge ideas (severity >= medium OR impact = high).
262
235
 
263
- **Step 2 4-agent scan (spawn_agents_on_csv, Wave 4):**
236
+ **Wave 4 -- 4-agent scan (spawn_agents_on_csv):**
264
237
 
265
238
  Append Wave 4 rows to `tasks.csv`:
266
239
  ```csv
@@ -271,66 +244,48 @@ Append Wave 4 rows to `tasks.csv`:
271
244
  ```
272
245
  `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 })`
273
246
 
274
- **Step 3 — Cross-layer dedup**: Multi-layer hit boost confidence. Single `needs_review`. Historical fix → `regression_risk`.
275
-
276
- **Step 4 — Iterative deepening**: module ≥3 hits → targeted deep scan. Max 1 round.
277
-
278
- **Step 5 — Quality Gate** (self-iteration).
279
-
280
- **Step 6:** Write `generalization_stats`. Update §6. Mark G5 done.
281
- 📌 `git commit -m "odyssey-ui({slug}): GENERALIZE — 泛化扫描"`
247
+ Cross-layer dedup + iterative deepening per base. Update section 6. Mark G5 done.
248
+ Commit: `"odyssey-ui({slug}): GENERALIZE -- pattern scan"`
282
249
 
283
- ### A_DISCOVER
284
- base A_DISCOVER 执行。Mark G6 done.
285
- 📌 `git commit -m "odyssey-ui({slug}): DISCOVER — 发现分类"`
250
+ ### A_DISCOVER, A_RECORD
251
+ Base shared_actions. UI overrides:
252
+ - **A_DISCOVER** routing per base triage logic
253
+ - **A_RECORD** learnings per Knowledge Persistence table
286
254
 
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:
255
+ **Completion summary:**
292
256
  ```
293
257
  --- UI ODYSSEY COMPLETE ---
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)
258
+ Target: {target} | Dimensions: {dimensions_audited}
259
+ Findings: {C}C {H}H {M}M {L}L | Diverge: {improvements} polish + {creative} delight
260
+ Fix: {fixed_count} applied, verified={yes|skipped}
261
+ Patterns: {extracted} ({by_layer})
262
+ Scan hits: {total} ({cross_layer} cross-layer)
263
+ Issues: {N} created
264
+ Decisions: {N} resolved, {M} pending, {K} deferred
265
+ Learnings: {N} entries
266
+ Self-iter: {N} rounds
267
+ Goals: {done}/{total} ({skipped} skipped)
300
268
  ---
301
269
  ```
302
- 📌 `git commit -m "odyssey-ui({slug}): RECORD — 会话总结"`
303
270
 
304
271
  </actions>
305
272
 
306
273
  <appendix>
307
274
 
308
- ### Goal Prompt Template
309
- **⚠️ 仅在 A_INTAKE 完成后显示一次。A_RECORD 完成时禁止重新显示。**
275
+ ### `-y` ui-specific points
310
276
 
311
- ```
312
- 📋 UI Odyssey 会话已创建。可随时复制以下 /goal 设定终止条件:
313
-
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)
319
- 且 phase_goals_all_done=true 才停。修复按 impact×severity 逐轮迭代。
320
- 每轮修复后重审修改区域,新发现追加继续修。
321
- 遇到 phase=decision 的 pending 必须 request_user_input。不允许"只报告不处理"。
322
- ```
323
-
324
- ### `-y` Auto-Confirm (5 decision points)
325
277
  | Decision Point | Normal | `-y` |
326
278
  |----------------|--------|------|
327
279
  | 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 |
332
280
 
333
- `deferred` "待决策" in completion summary; recoverable via `-c`.
281
+ ### Goal Prompt convergence rules
282
+
283
+ ```
284
+ Exhaustive iteration: process all audit + diverge findings (fix/issue/decision)
285
+ until phase_goals_all_done=true. Fix by impact x severity per tier.
286
+ Re-review modified areas after each fix round -- new findings appended.
287
+ phase=decision pending items MUST request_user_input. No report-only items.
288
+ ```
334
289
 
335
290
  </appendix>
336
291
 
@@ -350,15 +305,15 @@ Learnings: {N} entries | Self-iter: {N} rounds | Goals: {done}/{total} ({skipped
350
305
  - [ ] Improvements implemented and verified (unless --skip-fix)
351
306
  - [ ] Multi-layer generalization + discoveries classified (unless --skip-generalize)
352
307
  - [ ] Every unfixed finding has individual classification and reason
353
- - [ ] understanding.md §8 finalized; phase_goals G1-G7 tracked; `-y` no blocking prompts
308
+ - [ ] understanding.md section 8 finalized; phase_goals G1-G7 tracked; `-y` no blocking prompts
354
309
  </success_criteria>
355
310
 
356
311
  <next_step_routing>
357
- | Condition | Next step |
358
- |-----------|-----------|
312
+ | Condition | Next |
313
+ |-----------|------|
359
314
  | Finding needs deeper debug | `$odyssey-debug "<finding>"` |
360
315
  | Issues created from discoveries | `/manage-issue list --source ui-odyssey` |
361
316
  | Design pattern worth documenting | `/spec-add ui "..."` |
362
- | Want full review of changes | `$odyssey-review-test-fix <changed-files>` |
317
+ | Full review of changes | `$odyssey-review-test-fix <changed-files>` |
363
318
  | Sibling components to polish | `$odyssey-ui "<sibling>"` |
364
319
  </next_step_routing>
@@ -732,6 +732,33 @@ function legacyCleanup(manifest, result) {
732
732
  // ---------------------------------------------------------------------------
733
733
  // Codex skill deduplication — disable .agents/ skills in codex config
734
734
  // ---------------------------------------------------------------------------
735
+ const DEDUPE_START = '# maestro:dedupe-agents-start';
736
+ const DEDUPE_END = '# maestro:dedupe-agents-end';
737
+ /**
738
+ * Strip ALL maestro-managed dedupe blocks, orphaned markers, and orphaned
739
+ * .agents/skills entries from codex config content. Handles corruption left
740
+ * by older versions where indexOf(END) found an orphan before START.
741
+ */
742
+ function stripDedupeBlocks(content) {
743
+ let cleaned = content;
744
+ // 1. Remove properly-formed START...END blocks (search END only AFTER START)
745
+ for (;;) {
746
+ const si = cleaned.indexOf(DEDUPE_START);
747
+ if (si === -1)
748
+ break;
749
+ const ei = cleaned.indexOf(DEDUPE_END, si);
750
+ if (ei === -1) {
751
+ cleaned = cleaned.slice(0, si) + cleaned.slice(si + DEDUPE_START.length);
752
+ break;
753
+ }
754
+ cleaned = cleaned.slice(0, si) + cleaned.slice(ei + DEDUPE_END.length);
755
+ }
756
+ // 2. Remove orphaned markers (from prior corruption)
757
+ cleaned = cleaned.split(DEDUPE_START).join('').split(DEDUPE_END).join('');
758
+ // 3. Remove orphaned [[skills.config]] entries for .agents/skills paths
759
+ cleaned = cleaned.replace(/\[\[skills\.config\]\]\r?\npath = "[^"]*\.agents[/\\]skills[/\\][^"]*"\r?\nenabled = false\r?\n?/g, '');
760
+ return cleaned.replace(/\n{3,}/g, '\n\n').trim();
761
+ }
735
762
  /**
736
763
  * Write `[[skills.config]]` entries to `~/.codex/config.toml` to disable
737
764
  * .agents/ skills that duplicate the native codex skills.
@@ -753,15 +780,7 @@ export function writeCodexSkillDedupeConfig(scope, projectPath) {
753
780
  if (existsSync(fp)) {
754
781
  content = readFileSync(fp, 'utf-8');
755
782
  }
756
- // Remove existing maestro-managed dedupe block
757
- const DEDUPE_START = '# maestro:dedupe-agents-start';
758
- const DEDUPE_END = '# maestro:dedupe-agents-end';
759
- const startIdx = content.indexOf(DEDUPE_START);
760
- const endIdx = content.indexOf(DEDUPE_END);
761
- if (startIdx !== -1 && endIdx !== -1) {
762
- content = (content.slice(0, startIdx) + content.slice(endIdx + DEDUPE_END.length))
763
- .replace(/\n{3,}/g, '\n\n').trim();
764
- }
783
+ content = stripDedupeBlocks(content);
765
784
  const entries = skillDirs.map(name => {
766
785
  const skillPath = join(agentsSkillsDir, name, 'SKILL.md').replace(/\\/g, '/');
767
786
  return `[[skills.config]]\npath = "${skillPath}"\nenabled = false`;
@@ -787,14 +806,10 @@ export function removeCodexSkillDedupeConfig(scope, projectPath) {
787
806
  if (!existsSync(fp))
788
807
  return false;
789
808
  const content = readFileSync(fp, 'utf-8');
790
- const DEDUPE_START = '# maestro:dedupe-agents-start';
791
- const DEDUPE_END = '# maestro:dedupe-agents-end';
792
- const startIdx = content.indexOf(DEDUPE_START);
793
- const endIdx = content.indexOf(DEDUPE_END);
794
- if (startIdx === -1 || endIdx === -1)
809
+ if (!content.includes(DEDUPE_START) && !content.includes(DEDUPE_END)
810
+ && !/\.agents[/\\]skills[/\\]/.test(content))
795
811
  return false;
796
- const cleaned = (content.slice(0, startIdx) + content.slice(endIdx + DEDUPE_END.length))
797
- .replace(/\n{3,}/g, '\n\n').trim();
812
+ const cleaned = stripDedupeBlocks(content);
798
813
  writeFileSync(fp, cleaned + '\n', 'utf-8');
799
814
  return true;
800
815
  }