maestro-flow 0.5.38 → 0.5.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/odyssey-debug/SKILL.md +90 -269
- package/.agents/skills/odyssey-improve/SKILL.md +39 -240
- package/.agents/skills/odyssey-planex/SKILL.md +21 -105
- package/.agents/skills/odyssey-review-test-fix/SKILL.md +98 -318
- package/.agents/skills/odyssey-ui/SKILL.md +82 -265
- package/.agy/skills/odyssey-debug/SKILL.md +90 -269
- package/.agy/skills/odyssey-improve/SKILL.md +39 -240
- package/.agy/skills/odyssey-planex/SKILL.md +21 -105
- package/.agy/skills/odyssey-review-test-fix/SKILL.md +98 -318
- package/.agy/skills/odyssey-ui/SKILL.md +82 -265
- package/.claude/commands/odyssey-debug.md +90 -269
- package/.claude/commands/odyssey-improve.md +39 -240
- package/.claude/commands/odyssey-planex.md +21 -105
- package/.claude/commands/odyssey-review-test-fix.md +98 -318
- package/.claude/commands/odyssey-ui.md +82 -265
- package/.codex/skills/odyssey-debug/SKILL.md +167 -338
- package/.codex/skills/odyssey-improve/SKILL.md +226 -395
- package/.codex/skills/odyssey-planex/SKILL.md +317 -159
- package/.codex/skills/odyssey-review-test-fix/SKILL.md +137 -255
- package/.codex/skills/odyssey-ui/SKILL.md +197 -338
- package/dashboard/dist-server/dashboard/src/server/wiki/embedding.d.ts +23 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js +242 -26
- package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +92 -29
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/src/commands/hooks.d.ts +2 -1
- package/dashboard/dist-server/src/commands/hooks.js +16 -9
- package/dashboard/dist-server/src/commands/hooks.js.map +1 -1
- package/dashboard/dist-server/src/hooks/kg-sync-hook.js +5 -0
- package/dashboard/dist-server/src/hooks/kg-sync-hook.js.map +1 -1
- package/dashboard/dist-server/src/hooks/session-context.js +276 -3
- package/dashboard/dist-server/src/hooks/session-context.js.map +1 -1
- package/dashboard/dist-server/src/search/daemon-client.d.ts +8 -3
- package/dashboard/dist-server/src/search/daemon-client.js +20 -0
- package/dashboard/dist-server/src/search/daemon-client.js.map +1 -1
- package/dist/src/commands/domain.d.ts.map +1 -1
- package/dist/src/commands/domain.js +12 -3
- package/dist/src/commands/domain.js.map +1 -1
- package/dist/src/commands/hooks.d.ts +2 -1
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +16 -9
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/install.js +33 -2
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/search.d.ts.map +1 -1
- package/dist/src/commands/search.js +59 -6
- package/dist/src/commands/search.js.map +1 -1
- package/dist/src/commands/spec.d.ts.map +1 -1
- package/dist/src/commands/spec.js +15 -0
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/hooks/kg-sync-hook.d.ts.map +1 -1
- package/dist/src/hooks/kg-sync-hook.js +5 -0
- package/dist/src/hooks/kg-sync-hook.js.map +1 -1
- package/dist/src/hooks/session-context.d.ts.map +1 -1
- package/dist/src/hooks/session-context.js +276 -3
- package/dist/src/hooks/session-context.js.map +1 -1
- package/dist/src/search/daemon-client.d.ts +8 -3
- package/dist/src/search/daemon-client.d.ts.map +1 -1
- package/dist/src/search/daemon-client.js +20 -0
- package/dist/src/search/daemon-client.js.map +1 -1
- package/dist/src/search/daemon.d.ts +3 -3
- package/dist/src/search/daemon.d.ts.map +1 -1
- package/dist/src/search/daemon.js +9 -3
- package/dist/src/search/daemon.js.map +1 -1
- package/package.json +1 -1
- package/workflows/odyssey-base.md +258 -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
|
|
10
|
-
|
|
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,407 +24,264 @@ Core philosophy:
|
|
|
22
24
|
</purpose>
|
|
23
25
|
|
|
24
26
|
<boundary>
|
|
25
|
-
**范围内:** 目标组件/页面的视觉体验优化 — 6
|
|
26
|
-
**范围外:** 后端逻辑 / 数据模型 / API → `$odyssey-planex` | 深度 bug → `$odyssey-debug` |
|
|
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
|
|
62
|
-
| `--
|
|
63
|
-
| `--skip-
|
|
64
|
-
| `--
|
|
65
|
-
|
|
|
66
|
-
| `-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
```
|
|
79
|
-
|
|
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
|
-
```
|
|
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)
|
|
92
58
|
|
|
93
|
-
**
|
|
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 |
|
|
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
|
-
|
|
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)
|
|
110
|
-
|
|
111
|
-
### Pre-load
|
|
112
|
-
|
|
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 |
|
|
72
|
+
**understanding.md:** §1 Target & Design Context | §2 Survey | §3 Audit | §4 Diverge | §5 Verify | §6 Generalize | §7 Discover | §8 Learnings
|
|
121
73
|
|
|
122
|
-
###
|
|
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
|
|
123
76
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
|
|
|
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
86
|
<self_iteration>
|
|
135
|
-
|
|
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[]`.
|
|
87
|
+
适用阶段: S_SURVEY, S_AUDIT, S_DIVERGE, S_GENERALIZE
|
|
148
88
|
</self_iteration>
|
|
149
89
|
|
|
150
|
-
<
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
</
|
|
194
|
-
|
|
195
|
-
<
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
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)
|
|
90
|
+
<state_machine>
|
|
91
|
+
|
|
92
|
+
<states>
|
|
93
|
+
S_INTAKE — Parse target, load design context, resume session PERSIST: session.json + understanding.md §1
|
|
94
|
+
S_SURVEY — Visual landscape: design tokens, pattern inventory PERSIST: evidence.ndjson (survey) + understanding.md §2
|
|
95
|
+
S_AUDIT — 6-dimension parallel review PERSIST: evidence.ndjson (audit) + understanding.md §3
|
|
96
|
+
S_DIVERGE — Divergent creative exploration: polish + delight PERSIST: evidence.ndjson (diverge) + understanding.md §4
|
|
97
|
+
S_FIX — Implement improvements (skip if --skip-fix) PERSIST: code changes + evidence.ndjson (fix)
|
|
98
|
+
S_VERIFY — Visual verification + test (skip if --skip-fix) PERSIST: session.json.confirmation + understanding.md §5
|
|
99
|
+
S_GENERALIZE — Pattern extraction + 4-agent scan (skip if --skip-gen) PERSIST: session.json.patterns + understanding.md §6
|
|
100
|
+
S_DISCOVER — Classify hits, create issues (skip if --skip-gen) PERSIST: evidence.ndjson (discovery|decision) + understanding.md §7
|
|
101
|
+
S_RECORD — Design knowledge persistence + final report PERSIST: understanding.md §8 + spec entries
|
|
102
|
+
</states>
|
|
103
|
+
|
|
104
|
+
<transitions>
|
|
105
|
+
S_INTAKE:
|
|
106
|
+
→ S_INTAKE WHEN -c + session found DO A_RESUME
|
|
107
|
+
→ S_SURVEY WHEN target resolved DO A_INTAKE
|
|
108
|
+
→ S_INTAKE WHEN no target DO request_user_input
|
|
109
|
+
|
|
110
|
+
S_SURVEY → S_AUDIT DO A_SURVEY
|
|
111
|
+
S_AUDIT → S_DIVERGE DO A_AUDIT
|
|
112
|
+
|
|
113
|
+
S_DIVERGE:
|
|
114
|
+
→ S_FIX WHEN !skip_fix AND actionable findings/ideas DO A_DIVERGE
|
|
115
|
+
→ S_GENERALIZE WHEN (skip_fix OR no actionable) AND !skip_gen DO A_DIVERGE
|
|
116
|
+
→ S_RECORD WHEN (skip_fix OR no actionable) AND skip_gen DO A_DIVERGE
|
|
117
|
+
|
|
118
|
+
S_FIX → S_VERIFY DO A_FIX
|
|
119
|
+
S_VERIFY:
|
|
120
|
+
→ S_GENERALIZE WHEN verified AND !skip_gen DO A_VERIFY
|
|
121
|
+
→ S_RECORD WHEN verified AND skip_gen DO A_VERIFY
|
|
122
|
+
→ S_FIX WHEN needs_rework DO A_VERIFY
|
|
123
|
+
|
|
124
|
+
S_GENERALIZE:
|
|
125
|
+
→ S_DISCOVER WHEN hits found DO A_GENERALIZE
|
|
126
|
+
→ S_RECORD WHEN no hits DO A_GENERALIZE
|
|
127
|
+
|
|
128
|
+
S_DISCOVER → S_AUDIT : new component to audit → cross_phase_loops++
|
|
129
|
+
S_DISCOVER → S_FIX : fixable sibling, !skip_fix → cross_phase_loops++
|
|
130
|
+
S_DISCOVER → S_RECORD : remaining_actionable == 0 OR loops >= max_loops (MUST log each unfixed item)
|
|
131
|
+
|
|
132
|
+
S_RECORD → END DO A_RECORD
|
|
133
|
+
</transitions>
|
|
134
|
+
|
|
135
|
+
<actions>
|
|
136
|
+
|
|
137
|
+
### A_INTAKE
|
|
138
|
+
1. Parse arguments: target, flags, `--dimensions` subset
|
|
203
139
|
2. Generate slug, create `SESSION_DIR`
|
|
204
|
-
3.
|
|
140
|
+
3. Pre-load: `maestro search` + Glob prior sessions + ARCHITECTURE.md + spec load ui/coding
|
|
205
141
|
4. Derive `phase_goals[]` from flags (apply `skip_when`)
|
|
206
|
-
5. Write `session.json` + `understanding.md`
|
|
207
|
-
6.
|
|
208
|
-
|
|
209
|
-
**Resume (`-c`):** Glob latest session -> read `session.json` -> restore `current_state` -> jump.
|
|
210
|
-
|
|
211
|
-
📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-ui({slug}): S_INTAKE — 目标解析"`
|
|
212
|
-
|
|
213
|
-
### S_SURVEY
|
|
214
|
-
**spawn_agents_on_csv (Wave 1):**
|
|
215
|
-
|
|
216
|
-
Write `tasks.csv` with Wave 1 rows:
|
|
217
|
-
```csv
|
|
218
|
-
"survey-tokens","Design Token Audit","Scan {target_files} for CSS variables, design tokens, theme values. Return [{token,usage_count,consistency,file,line}].","survey","","","1","pending","","",""
|
|
219
|
-
"survey-patterns","Pattern Inventory","Catalog component patterns, layout, spacing, typography in {target_files}. Return [{pattern,files,consistency}].","survey","","","1","pending","","",""
|
|
220
|
-
```
|
|
221
|
-
`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
|
-
|
|
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 — 调查"`
|
|
142
|
+
5. Write `session.json` + `understanding.md` §1
|
|
143
|
+
6. Emit Goal Prompt (see Appendix)
|
|
144
|
+
📌 `git commit -m "odyssey-ui({slug}): INTAKE — 目标解析"`
|
|
226
145
|
|
|
227
|
-
###
|
|
228
|
-
|
|
146
|
+
### A_RESUME
|
|
147
|
+
Find latest session via Glob → read `session.json` → display summary → jump to `current_state`.
|
|
229
148
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
"audit-motion","Micro-interactions","Transitions, animations, feedback, loading states, scroll behavior","audit","micro-interactions","","2","pending","","",""
|
|
237
|
-
"audit-edge","Edge Cases","Long text, empty data, error states, extreme values, i18n, RTL","audit","edge-cases","","2","pending","","",""
|
|
238
|
-
```
|
|
239
|
-
`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 })`
|
|
149
|
+
### A_SURVEY
|
|
150
|
+
1. **Design system inventory**: Scan for design tokens, CSS variables, theme imports
|
|
151
|
+
2. **Current state analysis**: Styling patterns, layout strategy, component hierarchy
|
|
152
|
+
3. **spawn_agents_on_csv (Wave 1)** — 2 agents: design-tokens-audit, pattern-inventory
|
|
153
|
+
4. Append evidence (phase: "survey"). Update §2. Mark G1 done.
|
|
154
|
+
📌 `git commit -m "odyssey-ui({slug}): SURVEY — 视觉调查"`
|
|
240
155
|
|
|
241
|
-
|
|
156
|
+
### A_AUDIT
|
|
157
|
+
**spawn_agents_on_csv (Wave 2)** — 6 parallel agents (one per dimension, or `--dimensions` subset):
|
|
242
158
|
|
|
243
|
-
|
|
159
|
+
| Dimension | Focus |
|
|
160
|
+
|-----------|-------|
|
|
161
|
+
| visual_hierarchy | Spacing, typography scale, color contrast, alignment, whitespace, visual weight |
|
|
162
|
+
| interaction_states | Hover, focus, active, disabled, loading, error, empty, selected states |
|
|
163
|
+
| accessibility | WCAG AA contrast, focus management, aria labels, keyboard nav, screen reader |
|
|
164
|
+
| responsiveness | Breakpoints, overflow, touch targets, fluid typography, container queries |
|
|
165
|
+
| micro_interactions | Transitions, animations, feedback indicators, loading states, progress |
|
|
166
|
+
| edge_cases | Long text truncation, empty data, error states, extreme values, i18n, RTL |
|
|
244
167
|
|
|
245
|
-
|
|
246
|
-
|
|
168
|
+
Each returns `[{title, severity, file, line, description, suggestion, dimension}]`.
|
|
169
|
+
Merge → evidence (phase: "audit"). Write `audit_result`. Update §3 (severity matrix). Mark G2 done.
|
|
170
|
+
📌 `git commit -m "odyssey-ui({slug}): AUDIT — 多维审查"`
|
|
247
171
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
"diverge-polish","Polish Agent","Missing subtle details: shadows, borders, transitions, hover feedback, empty states, skeleton loading, scroll behavior. Return [{idea,category:'polish',impact,effort,description}].","diverge","","","3","pending","","",""
|
|
251
|
-
"diverge-delight","Delight Agent","What makes this memorable: motion design, progressive disclosure, smart defaults, celebratory feedback, personality. Return [{idea,category:'delight',impact,effort,description}].","diverge","","","3","pending","","",""
|
|
252
|
-
```
|
|
253
|
-
`spawn_agents_on_csv({ csv_path:"tasks.csv", max_concurrency:2, max_runtime_seconds:300, output_csv_path:"wave-3-results.csv", output_schema:SHARED_OUTPUT_SCHEMA })`
|
|
254
|
-
|
|
255
|
-
**Optional CLI delegate** for creative review:
|
|
256
|
-
```bash
|
|
257
|
-
maestro delegate "PURPOSE: Creative UI review for: {target}
|
|
258
|
-
TASK: Identify polish opportunities | Suggest delight moments | Evaluate visual rhythm
|
|
259
|
-
MODE: analysis CONTEXT: @{target_files} | Survey: {token_summary} | Audit: {top_findings}
|
|
260
|
-
EXPECTED: JSON [{idea, category, impact, effort, description}]
|
|
261
|
-
CONSTRAINTS: User-perceptible improvements only
|
|
262
|
-
" --role analyze --mode analysis
|
|
263
|
-
```
|
|
264
|
-
Execute with `run_in_background: true`, then wait for callback (do NOT halt the Odyssey flow).
|
|
172
|
+
### A_DIVERGE
|
|
173
|
+
Goes beyond defect fixing — "what would make this delightful?"
|
|
265
174
|
|
|
266
|
-
|
|
175
|
+
**Step 1 — spawn_agents_on_csv (Wave 3)** — 2 parallel agents:
|
|
176
|
+
- **Polish Agent**: Shadows, borders, transitions, hover states, feedback, empty states, skeleton loading, scroll behavior
|
|
177
|
+
- **Delight Agent**: Motion design, progressive disclosure, smart defaults, contextual hints, celebratory feedback, personality in copy
|
|
267
178
|
|
|
268
|
-
|
|
179
|
+
Each returns `[{idea, category (polish|delight), impact, effort, description, inspiration}]`
|
|
269
180
|
|
|
270
|
-
|
|
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").
|
|
181
|
+
**Step 2 — CLI-assisted** (optional): `maestro delegate` with `--role analyze` — polish opportunities, micro-interactions, visual rhythm, delight moments
|
|
274
182
|
|
|
275
|
-
|
|
183
|
+
**Step 3 — Consolidate**: Merge audit findings + divergent ideas → prioritized list (severity x impact x effort).
|
|
184
|
+
Append evidence (phase: "diverge"). Update §4. Mark G3 done.
|
|
185
|
+
📌 `git commit -m "odyssey-ui({slug}): DIVERGE — 发散探索"`
|
|
276
186
|
|
|
277
|
-
###
|
|
187
|
+
### A_FIX
|
|
278
188
|
Skip if `--skip-fix`.
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
"gen-semantic","Semantic Scan","Find components with same interaction pattern but missing states","generalization","semantic","","4","pending","","",""
|
|
306
|
-
"gen-structural","Structural Match","Find structurally similar components, check for same issues","generalization","structural","","4","pending","","",""
|
|
307
|
-
"gen-historical","Historical Grep","git log -S '${signature}' for UI pattern history","generalization","historical","","4","pending","","",""
|
|
308
|
-
```
|
|
309
|
-
`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
|
-
|
|
311
|
-
**Step 3 — Cross-layer dedup**: Multi-layer hit -> boost confidence. Single -> `needs_review`. Historical fix -> `regression_risk`.
|
|
312
|
-
|
|
313
|
-
**Step 4 — Iterative deepening**: module >= 3 hits -> targeted deep scan. Max 1 round.
|
|
314
|
-
|
|
315
|
-
**Step 5 — Quality Gate** (self-iteration).
|
|
316
|
-
|
|
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 decision → create 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:
|
|
189
|
+
1. **穷尽修复**: ALL findings/ideas by priority tier (critical→high→medium→low + high-impact ideas). After each tier, re-review — new findings append.
|
|
190
|
+
2. Each fix → evidence (phase: "fix")
|
|
191
|
+
3. **Normal**: request_user_input per-fix. **`-y`**: auto-proceed, record `deferred`.
|
|
192
|
+
📌 `git commit -m "odyssey-ui({slug}): FIX — 优化实现"`
|
|
193
|
+
|
|
194
|
+
### A_VERIFY
|
|
195
|
+
1. Run tests (lint, unit, visual regression)
|
|
196
|
+
2. **CLI-assisted**: `maestro delegate` with `--role review` — visual correctness, interaction states, accessibility, responsive
|
|
197
|
+
3. `needs_rework` → S_FIX. `verified` → mark G4 done. Update §5, write `confirmation`.
|
|
198
|
+
📌 `git commit -m "odyssey-ui({slug}): VERIFY — 验证"`
|
|
199
|
+
|
|
200
|
+
### A_GENERALIZE
|
|
201
|
+
按 base A_GENERALIZE 执行。Pattern 来源: audit findings + diverge ideas (severity >= medium OR impact = high)。
|
|
202
|
+
**spawn_agents_on_csv (Wave 4)** — 4 agents: syntax-grep, semantic-scan, structural-match, historical-grep.
|
|
203
|
+
Mark G5 done.
|
|
204
|
+
📌 `git commit -m "odyssey-ui({slug}): GENERALIZE — 泛化扫描"`
|
|
205
|
+
|
|
206
|
+
### A_DISCOVER
|
|
207
|
+
按 base A_DISCOVER 执行。Mark G6 done.
|
|
208
|
+
📌 `git commit -m "odyssey-ui({slug}): DISCOVER — 发现分类"`
|
|
209
|
+
|
|
210
|
+
### A_RECORD
|
|
211
|
+
1. Finalize §8: 按 Knowledge Persistence 表分类记录,completion summary 列出建议的 `/spec-add` 命令
|
|
212
|
+
2. Pending decisions: **Normal** → request_user_input. **`-y`** → skip, show deferred count
|
|
213
|
+
3. Goal audit: all confirmed → `phase_goals_all_done = true`. **Normal** → request_user_input | **`-y`** → auto accept
|
|
214
|
+
4. Mark G7 done. Emit completion summary:
|
|
345
215
|
```
|
|
346
216
|
--- UI ODYSSEY COMPLETE ---
|
|
347
|
-
Target: {target}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
Goals: {done}/{total} ({skipped} skipped)
|
|
217
|
+
Target: {target} | Dimensions: {dimensions_audited}
|
|
218
|
+
Findings: {C}C {H}H {M}M {L}L | Diverge: {improvements} polish + {creative} delight
|
|
219
|
+
Fix: {fixed_count} applied, verified={yes|skipped}
|
|
220
|
+
Patterns: {extracted} ({by_layer}) | Scan hits: {total} ({cross_layer} cross-layer)
|
|
221
|
+
Issues: {N} | Decisions: {N} resolved, {M} pending, {K} deferred
|
|
222
|
+
Learnings: {N} entries | Self-iter: {N} rounds | Goals: {done}/{total} ({skipped} skipped)
|
|
354
223
|
---
|
|
355
224
|
```
|
|
356
|
-
|
|
225
|
+
📌 `git commit -m "odyssey-ui({slug}): RECORD — 会话总结"`
|
|
357
226
|
|
|
358
|
-
|
|
359
|
-
</execution>
|
|
227
|
+
</actions>
|
|
360
228
|
|
|
361
229
|
<appendix>
|
|
362
230
|
|
|
363
231
|
### Goal Prompt Template
|
|
364
|
-
|
|
365
|
-
**Time guard: display ONCE after S_INTAKE completes (session created, before survey). NEVER redisplay at S_RECORD completion.**
|
|
232
|
+
**⚠️ 仅在 A_INTAKE 完成后显示一次。A_RECORD 完成时禁止重新显示。**
|
|
366
233
|
|
|
367
234
|
```
|
|
368
|
-
UI Odyssey
|
|
235
|
+
📋 UI Odyssey 会话已创建。可随时复制以下 /goal 设定终止条件:
|
|
369
236
|
|
|
370
|
-
/goal
|
|
237
|
+
/goal 完成以下目标:
|
|
238
|
+
{for each G in phase_goals where status != "skipped":}
|
|
239
|
+
- {G.id}: {G.goal} — 完成条件: {G.done_when}
|
|
240
|
+
{end for}
|
|
241
|
+
穷尽迭代:直到 audit + diverge findings 均已处理(fix/issue/decision)
|
|
371
242
|
且 phase_goals_all_done=true 才停。修复按 impact×severity 逐轮迭代。
|
|
372
|
-
|
|
373
|
-
phase=decision pending 必须 request_user_input
|
|
243
|
+
每轮修复后重审修改区域,新发现追加继续修。
|
|
244
|
+
遇到 phase=decision 的 pending 必须 request_user_input。不允许"只报告不处理"。
|
|
374
245
|
```
|
|
375
246
|
|
|
376
|
-
|
|
247
|
+
### `-y` Auto-Confirm (5 decision points)
|
|
248
|
+
| Decision Point | Normal | `-y` |
|
|
249
|
+
|----------------|--------|------|
|
|
250
|
+
| A_FIX improvement confirmation | request_user_input | auto-proceed, `deferred` |
|
|
251
|
+
| A_DISCOVER hit routing | request_user_input | auto create issue, `deferred` |
|
|
252
|
+
| A_DISCOVER ambiguous items | request_user_input | all `deferred` |
|
|
253
|
+
| A_RECORD pending decisions | request_user_input | skip, show deferred count |
|
|
254
|
+
| A_RECORD goal audit | request_user_input | auto accept |
|
|
377
255
|
|
|
378
|
-
|
|
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 |
|
|
388
|
-
|
|
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`.
|
|
256
|
+
`deferred` → "待决策" in completion summary; recoverable via `-c`.
|
|
396
257
|
|
|
397
258
|
</appendix>
|
|
398
259
|
|
|
260
|
+
</state_machine>
|
|
261
|
+
|
|
399
262
|
<error_codes>
|
|
400
263
|
| Code | Severity | Condition | Recovery |
|
|
401
264
|
|------|----------|-----------|----------|
|
|
402
|
-
| E001 | error | No target
|
|
403
|
-
| E002 | error | Target not found
|
|
404
|
-
|
|
|
405
|
-
|
|
|
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 |
|
|
265
|
+
| E001 | error | No target specified | Provide target |
|
|
266
|
+
| E002 | error | Target path not found | Check path |
|
|
267
|
+
| W001 | warning | No design system detected | Proceed with defaults |
|
|
268
|
+
| W002 | warning | Some dimension agents failed | Partial coverage |
|
|
409
269
|
</error_codes>
|
|
410
270
|
|
|
411
271
|
<success_criteria>
|
|
412
|
-
- [ ]
|
|
413
|
-
- [ ]
|
|
414
|
-
- [ ]
|
|
415
|
-
- [ ]
|
|
416
|
-
- [ ]
|
|
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
|
|
272
|
+
- [ ] 6-dimension audit with severity matrix + divergent exploration (polish + delight)
|
|
273
|
+
- [ ] Improvements implemented and verified (unless --skip-fix)
|
|
274
|
+
- [ ] Multi-layer generalization + discoveries classified (unless --skip-generalize)
|
|
275
|
+
- [ ] Every unfixed finding has individual classification and reason
|
|
276
|
+
- [ ] understanding.md §8 finalized; phase_goals G1-G7 tracked; `-y` no blocking prompts
|
|
428
277
|
</success_criteria>
|
|
278
|
+
|
|
279
|
+
<next_step_routing>
|
|
280
|
+
| Condition | Next step |
|
|
281
|
+
|-----------|-----------|
|
|
282
|
+
| Finding needs deeper debug | `$odyssey-debug "<finding>"` |
|
|
283
|
+
| Issues created from discoveries | `/manage-issue list --source ui-odyssey` |
|
|
284
|
+
| Design pattern worth documenting | `/spec-add ui "..."` |
|
|
285
|
+
| Want full review of changes | `$odyssey-review-test-fix <changed-files>` |
|
|
286
|
+
| Sibling components to polish | `$odyssey-ui "<sibling>"` |
|
|
287
|
+
</next_step_routing>
|