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,7 +1,7 @@
|
|
|
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:
|
|
6
6
|
- Read
|
|
7
7
|
- Write
|
|
@@ -12,6 +12,8 @@ allowed-tools:
|
|
|
12
12
|
- Agent
|
|
13
13
|
- AskUserQuestion
|
|
14
14
|
---
|
|
15
|
+
<base>@~/.maestro/workflows/odyssey-base.md</base>
|
|
16
|
+
|
|
15
17
|
<purpose>
|
|
16
18
|
Deep UI polish cycle: survey → 6-dimension audit → divergent creative exploration →
|
|
17
19
|
fix → verify → generalize → discover → persist. Every pixel is a learning opportunity.
|
|
@@ -22,85 +24,35 @@ fix → verify → generalize → discover → persist. Every pixel is a learnin
|
|
|
22
24
|
**范围外:** 后端逻辑 / 数据模型 / API 设计 / 业务规则 → `/odyssey-planex` | 深度 bug 调查 → `/odyssey-debug` | 代码质量审查 → `/odyssey-review-test-fix`
|
|
23
25
|
**探索自由度:** 边界内最大自由 — S_DIVERGE 阶段鼓励发散思维,不设创意上限。审查 + 发散可发现任何视觉/交互/可访问性细节。在约束下尽可能完善每个像素。
|
|
24
26
|
**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.
|
|
27
|
+
⚠️ **Decision gate** — ONLY these qualify as decisions (not fixes):
|
|
28
|
+
- Brand/style direction requiring human creative judgment
|
|
29
|
+
- Layout restructuring that changes user flow significantly
|
|
30
|
+
- Requires new design tokens or breaking component API
|
|
31
|
+
❌ "Unsure how to fix", "Large scope", "Pre-existing issue" are NOT valid decision reasons — either fix it, or explain specifically why it's unfixable
|
|
25
32
|
</boundary>
|
|
26
33
|
|
|
27
|
-
<execution_discipline>
|
|
28
|
-
**三条铁律(所有阶段适用):**
|
|
29
|
-
|
|
30
|
-
1. **Phase auto-commit** — 每个阶段完成后**自动** `git commit`,无需用户确认
|
|
31
|
-
- 代码变更 + understanding.md → `git add` → `git commit -m "odyssey-ui({slug}): {phase} — {摘要}"`
|
|
32
|
-
- session.json / evidence.ndjson 为运行时状态,不纳入 commit
|
|
33
|
-
|
|
34
|
-
2. **Confident edits only, but must attempt** — only modify what you're confident about; record decisions only when genuinely requiring human judgment
|
|
35
|
-
- High visual certainty (missing hover state, insufficient contrast, etc.) → fix directly
|
|
36
|
-
- Design direction uncertain (color choices, layout restructure, etc.) → record decision for user judgment
|
|
37
|
-
- No speculative changes, especially brand/style-level modifications
|
|
38
|
-
- ⚠️ **Decision gate** — ONLY these qualify as decisions (not fixes):
|
|
39
|
-
- Brand/style direction requiring human creative judgment
|
|
40
|
-
- Layout restructuring that changes user flow significantly
|
|
41
|
-
- Requires new design tokens or breaking component API
|
|
42
|
-
- ❌ "Unsure how to fix", "Large scope", "Pre-existing issue" are NOT valid decision reasons — either fix it, or explain specifically why it's unfixable
|
|
43
|
-
|
|
44
|
-
3. **多 CLI 辅助** — 利用 `maestro delegate` 调用多个 CLI 工具交叉验证
|
|
45
|
-
- survey 阶段: `--role explore` 发现设计系统用法
|
|
46
|
-
- audit/diverge: `--role analyze` 获取多视角创意
|
|
47
|
-
- fix 前后: `--role review` 确认视觉正确性
|
|
48
|
-
|
|
49
|
-
4. **禁止以上下文消耗为由中断** — harness 自动处理 context compression,以"上下文不足"或"已执行 N 个阶段"为由中断属于纪律违反;必须完整走完状态机直到 S_RECORD → END
|
|
50
|
-
</execution_discipline>
|
|
51
|
-
|
|
52
34
|
<context>
|
|
53
35
|
$ARGUMENTS — target and optional flags.
|
|
54
36
|
|
|
55
|
-
**Target resolution:**
|
|
56
|
-
| Input | Resolution |
|
|
57
|
-
|-------|-----------|
|
|
58
|
-
| Component path | Audit that component |
|
|
59
|
-
| Page/route path | Audit that page |
|
|
60
|
-
| `staged` / `HEAD` | Review UI changes in diff |
|
|
61
|
-
| Feature area name | Resolve to related components/pages |
|
|
37
|
+
**Target resolution:** Component path → audit component | Page/route → audit page | `staged`/`HEAD` → diff UI changes | Feature area → resolve to components/pages
|
|
62
38
|
|
|
63
39
|
**Flags:**
|
|
64
40
|
| Flag | Effect | Default |
|
|
65
41
|
|------|--------|---------|
|
|
66
42
|
| `--dimensions <list>` | Comma-separated subset of 6 dimensions | all 6 |
|
|
67
|
-
| `--fix-threshold <severity>` | 修复到哪个 severity
|
|
43
|
+
| `--fix-threshold <severity>` | 修复到哪个 severity 为止 | all |
|
|
68
44
|
| `--skip-fix` | Audit + diverge only, no code changes | false |
|
|
69
45
|
| `--skip-generalize` | Skip S_GENERALIZE and S_DISCOVER | false |
|
|
70
46
|
| `--auto` | CLI delegates without confirmation | false |
|
|
71
47
|
| `-y` | Auto-confirm all decisions (see appendix) | false |
|
|
72
48
|
| `-c` | Resume most recent session | — |
|
|
49
|
+
| `--heartbeat` | Enable heartbeat progress reporting | false |
|
|
73
50
|
|
|
74
51
|
**Session**: `SESSION_DIR = .workflow/scratch/{YYYYMMDD}-ui-odyssey-{slug}/`
|
|
75
52
|
|
|
76
|
-
**Output — 3 files:**
|
|
77
|
-
```
|
|
78
|
-
SESSION_DIR/
|
|
79
|
-
├── session.json # state + audit_result + diverge_result + patterns + phase_goals
|
|
80
|
-
├── evidence.ndjson # append-only (phase: survey|audit|diverge|fix|discovery|decision|self-iteration)
|
|
81
|
-
└── understanding.md # 8-section evolving narrative
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
**session.json schema:**
|
|
85
|
-
```json
|
|
86
|
-
{
|
|
87
|
-
"session_id": "ui-odyssey-{YYYYMMDD-HHmmss}",
|
|
88
|
-
"target": "", "dimensions": [],
|
|
89
|
-
"flags": { "skip_fix": false, "skip_generalize": false, "auto": false, "auto_confirm": false },
|
|
90
|
-
"current_state": "S_INTAKE",
|
|
91
|
-
"audit_result": { "dimensions_audited": [], "finding_count": 0, "severity_distribution": { "critical": 0, "high": 0, "medium": 0, "low": 0 } },
|
|
92
|
-
"diverge_result": { "improvements_proposed": 0, "creative_ideas": 0 },
|
|
93
|
-
"patterns": [{ "id": "P1", "source_finding": "F1", "layer": "syntax|semantic|structural", "signature": "", "description": "", "risk": "", "fix_template": "", "confidence": "high|medium|low" }],
|
|
94
|
-
"confirmation": { "test_result": {}, "cli_review": {}, "overall": "confirmed|needs_rework" },
|
|
95
|
-
"generalization_stats": { "patterns_extracted": 0, "total_hits": 0, "cross_layer_confirmed": 0, "regression_risks": 0, "by_layer": {}, "deepening_triggered": false },
|
|
96
|
-
"phase_goals": [], "phase_goals_all_done": false,
|
|
97
|
-
"self_iteration_log": [],
|
|
98
|
-
"cross_phase_loops": 0, "max_loops": 5,
|
|
99
|
-
"created_at": "", "updated_at": ""
|
|
100
|
-
}
|
|
101
|
-
```
|
|
53
|
+
**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)
|
|
102
54
|
|
|
103
|
-
**
|
|
55
|
+
**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}
|
|
104
56
|
|
|
105
57
|
**phase_goals[]:**
|
|
106
58
|
| ID | Goal | Phase | skip_when |
|
|
@@ -108,52 +60,27 @@ SESSION_DIR/
|
|
|
108
60
|
| G1 | Survey completed | S_SURVEY | — |
|
|
109
61
|
| G2 | Audit completed | S_AUDIT | — |
|
|
110
62
|
| G3 | Divergent exploration done | S_DIVERGE | — |
|
|
111
|
-
| G4 | Zero remaining: all findings/ideas fixed and verified |
|
|
63
|
+
| G4 | Zero remaining: all findings/ideas fixed and verified | S_VERIFY | skip_fix |
|
|
112
64
|
| G5 | Pattern generalized | S_GENERALIZE | skip_generalize |
|
|
113
65
|
| G6 | Discoveries triaged | S_DISCOVER | skip_generalize |
|
|
114
66
|
| G7 | Learnings persisted | S_RECORD | — |
|
|
115
67
|
|
|
116
|
-
|
|
68
|
+
**understanding.md:** §1 Target & Design Context | §2 Survey | §3 Audit | §4 Diverge | §5 Verify | §6 Generalize | §7 Discover | §8 Learnings
|
|
117
69
|
|
|
118
70
|
### Pre-load(可选,缺失不阻塞)
|
|
71
|
+
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
|
|
119
72
|
|
|
120
|
-
|
|
121
|
-
|------|------|------|
|
|
122
|
-
| Codebase docs | Read `.workflow/codebase/ARCHITECTURE.md` | 模块边界,组件结构 |
|
|
123
|
-
| Wiki search | `maestro search "<target keywords>" --json` | 先前 UI 决策(取 top 5) |
|
|
124
|
-
| UI specs | `maestro load --type spec --category ui` | 设计规范、token、组件约定 |
|
|
125
|
-
| Coding specs | `maestro load --type spec --category coding` | 编码规范 |
|
|
126
|
-
| Role knowledge | `maestro search --category ui` → 选相关 → `maestro load --type knowhow --id <id>` | 累积设计知识 |
|
|
127
|
-
| Prior sessions | `Glob(".workflow/scratch/*-ui-odyssey-*")` | 相关会话 |
|
|
128
|
-
|
|
129
|
-
### Knowledge Persistence(S_RECORD 中写入产出文件)
|
|
130
|
-
|
|
131
|
-
S_RECORD 阶段将可沉淀知识 **写入 understanding.md §8 Learnings**,按以下分类结构化:
|
|
132
|
-
|
|
73
|
+
### Knowledge Persistence(S_RECORD 写入 understanding.md §8)
|
|
133
74
|
| 分类 | 写入内容 | 后续建议命令 |
|
|
134
75
|
|------|---------|-------------|
|
|
135
76
|
| 设计 pattern | 组件模式 + 适用场景 + token 引用 | `/spec-add ui "..."` |
|
|
136
77
|
| 交互规范 | 状态定义 + 转场规则 + 反馈模式 | `/spec-add ui "..."` |
|
|
137
78
|
| 可访问性规则 | WCAG 要求 + 实现方案 | `/spec-add ui "..."` |
|
|
138
79
|
| 可复用泛化 pattern | pattern 签名 + 应用范围 | `/spec-add coding "..."` |
|
|
139
|
-
|
|
140
|
-
**两步模式:** 执行中写入产出文件(临时记录)→ 任务完成后用户通过 next_step_routing 沉淀为永久知识。执行过程中不调用外部 Skill。
|
|
141
80
|
</context>
|
|
142
81
|
|
|
143
82
|
<self_iteration>
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
| Dimension | Sufficient | Insufficient |
|
|
147
|
-
|-----------|-----------|-------------|
|
|
148
|
-
| Coverage | All target components/pages analyzed across dimensions | Missed files discoverable via grep/glob |
|
|
149
|
-
| Depth | ≥80% findings have file:line evidence | Most findings lack specifics |
|
|
150
|
-
| Actionability | Each conclusion has concrete improvement action | "Consider reviewing" without action |
|
|
151
|
-
|
|
152
|
-
**Expansion:** Round 1 = widen scope (more components, deeper import chain, extra delegate angles). Round 2 = shift perspective (different CLI tool, reverse dependency trace, manual code reading). Round 3 = combine both + targeted deep-dive on remaining gaps.
|
|
153
|
-
|
|
154
|
-
**Log:** `evidence.ndjson ← {"phase":"self-iteration","type":"quality-gate","stage":"S_XXX","round":N,"assessment":{},"expansion":""}`
|
|
155
|
-
|
|
156
|
-
**Applicable stages:** S_SURVEY, S_AUDIT, S_DIVERGE, S_GENERALIZE
|
|
83
|
+
适用阶段: S_SURVEY, S_AUDIT, S_DIVERGE, S_GENERALIZE
|
|
157
84
|
</self_iteration>
|
|
158
85
|
|
|
159
86
|
<state_machine>
|
|
@@ -177,7 +104,6 @@ S_INTAKE:
|
|
|
177
104
|
→ S_INTAKE WHEN no target DO AskUserQuestion
|
|
178
105
|
|
|
179
106
|
S_SURVEY → S_AUDIT DO A_SURVEY
|
|
180
|
-
|
|
181
107
|
S_AUDIT → S_DIVERGE DO A_AUDIT
|
|
182
108
|
|
|
183
109
|
S_DIVERGE:
|
|
@@ -186,7 +112,6 @@ S_DIVERGE:
|
|
|
186
112
|
→ S_RECORD WHEN (skip_fix OR no actionable) AND skip_gen DO A_DIVERGE
|
|
187
113
|
|
|
188
114
|
S_FIX → S_VERIFY DO A_FIX
|
|
189
|
-
|
|
190
115
|
S_VERIFY:
|
|
191
116
|
→ S_GENERALIZE WHEN verified AND !skip_gen DO A_VERIFY
|
|
192
117
|
→ S_RECORD WHEN verified AND skip_gen DO A_VERIFY
|
|
@@ -196,213 +121,123 @@ S_GENERALIZE:
|
|
|
196
121
|
→ S_DISCOVER WHEN hits found DO A_GENERALIZE
|
|
197
122
|
→ S_RECORD WHEN no hits DO A_GENERALIZE
|
|
198
123
|
|
|
199
|
-
S_DISCOVER → S_AUDIT
|
|
200
|
-
S_DISCOVER → S_FIX
|
|
201
|
-
S_DISCOVER → S_RECORD
|
|
202
|
-
S_DISCOVER → S_RECORD : loops >= max_loops → MUST log each unfixed item with specific reason (blanket "pre-existing" is forbidden)
|
|
124
|
+
S_DISCOVER → S_AUDIT : new component to audit → cross_phase_loops++
|
|
125
|
+
S_DISCOVER → S_FIX : fixable sibling, !skip_fix → cross_phase_loops++
|
|
126
|
+
S_DISCOVER → S_RECORD : remaining_actionable == 0 OR loops >= max_loops (MUST log each unfixed item)
|
|
203
127
|
|
|
204
|
-
S_RECORD → END
|
|
128
|
+
S_RECORD → END DO A_RECORD
|
|
205
129
|
</transitions>
|
|
206
130
|
|
|
207
131
|
<actions>
|
|
208
132
|
|
|
209
133
|
### A_INTAKE
|
|
210
|
-
1. Parse arguments: target
|
|
134
|
+
1. Parse arguments: target, flags, `--dimensions` subset
|
|
211
135
|
2. Generate slug, create `SESSION_DIR`
|
|
212
|
-
3.
|
|
136
|
+
3. Pre-load: `maestro search` + Glob prior sessions + ARCHITECTURE.md + spec load ui/coding
|
|
213
137
|
4. Derive `phase_goals[]` from flags (apply `skip_when`)
|
|
214
|
-
5. Write `session.json` + `understanding.md` §1
|
|
138
|
+
5. Write `session.json` + `understanding.md` §1
|
|
215
139
|
6. Emit Goal Prompt (see Appendix)
|
|
216
|
-
|
|
217
|
-
📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-ui({slug}): INTAKE — 目标解析"`
|
|
140
|
+
📌 `git commit -m "odyssey-ui({slug}): INTAKE — 目标解析"`
|
|
218
141
|
|
|
219
142
|
### A_RESUME
|
|
220
143
|
Find latest session via Glob → read `session.json` → display summary → jump to `current_state`.
|
|
221
144
|
|
|
222
145
|
### A_SURVEY
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
```bash
|
|
229
|
-
maestro delegate "PURPOSE: Survey UI design state of: {target}
|
|
230
|
-
TASK: Identify design tokens in use | Catalog spacing/typography patterns | Map component hierarchy | Check consistency with design system
|
|
231
|
-
MODE: analysis
|
|
232
|
-
CONTEXT: @{target_files}
|
|
233
|
-
EXPECTED: JSON {tokens_used, spacing_patterns, typography_scale, component_hierarchy, consistency_issues}
|
|
234
|
-
" --role analyze --mode analysis
|
|
235
|
-
```
|
|
236
|
-
Execute with `run_in_background: true`, then wait for callback (do NOT halt the Odyssey flow).
|
|
237
|
-
|
|
238
|
-
4. Append evidence.ndjson (phase: "survey"). Update `understanding.md` §2. Mark G1 done.
|
|
239
|
-
|
|
240
|
-
📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-ui({slug}): SURVEY — 视觉调查"`
|
|
146
|
+
1. **Design system inventory**: Scan for design tokens, CSS variables, theme imports
|
|
147
|
+
2. **Current state analysis**: Styling patterns, layout strategy, component hierarchy
|
|
148
|
+
3. **CLI-assisted** (optional): `maestro delegate` with `--role analyze` — survey tokens, spacing, typography, hierarchy, consistency
|
|
149
|
+
4. Append evidence (phase: "survey"). Update §2. Mark G1 done.
|
|
150
|
+
📌 `git commit -m "odyssey-ui({slug}): SURVEY — 视觉调查"`
|
|
241
151
|
|
|
242
152
|
### A_AUDIT
|
|
243
153
|
Spawn 6 parallel Agents (one per dimension, or `--dimensions` subset):
|
|
244
154
|
|
|
245
|
-
|
|
|
246
|
-
|
|
247
|
-
|
|
|
248
|
-
|
|
|
249
|
-
|
|
|
250
|
-
|
|
|
251
|
-
|
|
|
252
|
-
|
|
|
155
|
+
| Dimension | Focus |
|
|
156
|
+
|-----------|-------|
|
|
157
|
+
| visual_hierarchy | Spacing, typography scale, color contrast, alignment, whitespace, visual weight |
|
|
158
|
+
| interaction_states | Hover, focus, active, disabled, loading, error, empty, selected states |
|
|
159
|
+
| accessibility | WCAG AA contrast, focus management, aria labels, keyboard nav, screen reader |
|
|
160
|
+
| responsiveness | Breakpoints, overflow, touch targets, fluid typography, container queries |
|
|
161
|
+
| micro_interactions | Transitions, animations, feedback indicators, loading states, progress |
|
|
162
|
+
| edge_cases | Long text truncation, empty data, error states, extreme values, i18n, RTL |
|
|
253
163
|
|
|
254
164
|
Each returns `[{title, severity, file, line, description, suggestion, dimension}]`.
|
|
255
|
-
Merge → evidence
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-ui({slug}): AUDIT — 多维审查"`
|
|
165
|
+
Merge → evidence (phase: "audit"). Write `audit_result`. Update §3 (severity matrix). Mark G2 done.
|
|
166
|
+
📌 `git commit -m "odyssey-ui({slug}): AUDIT — 多维审查"`
|
|
259
167
|
|
|
260
168
|
### A_DIVERGE
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
**Step 1 — Creative exploration (2 parallel Agents):**
|
|
264
|
-
|
|
265
|
-
| Agent | Angle | Prompt Focus |
|
|
266
|
-
|-------|-------|-------------|
|
|
267
|
-
| Polish Agent | "What subtle details are missing?" | Shadows, borders, transitions, hover states, feedback, empty states, skeleton loading, scroll behavior |
|
|
268
|
-
| Delight Agent | "What would make this experience memorable?" | Motion design, progressive disclosure, smart defaults, contextual hints, celebratory feedback, personality in copy |
|
|
169
|
+
Goes beyond defect fixing — "what would make this delightful?"
|
|
269
170
|
|
|
270
|
-
|
|
171
|
+
**Step 1 — 2 parallel Agents:**
|
|
172
|
+
- **Polish Agent**: Shadows, borders, transitions, hover states, feedback, empty states, skeleton loading, scroll behavior
|
|
173
|
+
- **Delight Agent**: Motion design, progressive disclosure, smart defaults, contextual hints, celebratory feedback, personality in copy
|
|
271
174
|
|
|
272
|
-
|
|
273
|
-
```bash
|
|
274
|
-
maestro delegate "PURPOSE: Creative UI review of: {target}
|
|
275
|
-
TASK: Identify polish opportunities | Suggest micro-interaction improvements | Review visual rhythm and harmony | Propose delight moments
|
|
276
|
-
MODE: analysis
|
|
277
|
-
CONTEXT: @{target_files} | Audit summary: {audit_findings_summary}
|
|
278
|
-
EXPECTED: JSON [{category, idea, rationale, reference}]
|
|
279
|
-
" --role analyze --mode analysis
|
|
280
|
-
```
|
|
281
|
-
Execute with `run_in_background: true`, then wait for callback (do NOT halt the Odyssey flow).
|
|
175
|
+
Each returns `[{idea, category (polish|delight), impact, effort, description, inspiration}]`
|
|
282
176
|
|
|
283
|
-
**Step
|
|
284
|
-
Append evidence.ndjson (phase: "diverge"). Update `understanding.md` §4. Mark G3 done.
|
|
177
|
+
**Step 2 — CLI-assisted** (optional): `maestro delegate` with `--role analyze` — polish opportunities, micro-interactions, visual rhythm, delight moments
|
|
285
178
|
|
|
286
|
-
|
|
179
|
+
**Step 3 — Consolidate**: Merge audit findings + divergent ideas → prioritized list (severity x impact x effort).
|
|
180
|
+
Append evidence (phase: "diverge"). Update §4. Mark G3 done.
|
|
181
|
+
📌 `git commit -m "odyssey-ui({slug}): DIVERGE — 发散探索"`
|
|
287
182
|
|
|
288
183
|
### A_FIX
|
|
289
|
-
Skip if `--skip-fix`.
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
📌 **Auto-commit**: `git add -A && git commit -m "odyssey-ui({slug}): FIX — 优化实现"`
|
|
184
|
+
Skip if `--skip-fix`.
|
|
185
|
+
1. **穷尽修复**: ALL findings/ideas by priority tier (critical→high→medium→low + high-impact ideas). After each tier, re-review — new findings append.
|
|
186
|
+
2. Each fix → evidence (phase: "fix")
|
|
187
|
+
3. **Normal**: AskUserQuestion per-fix. **`-y`**: auto-proceed, record `deferred`.
|
|
188
|
+
📌 `git commit -m "odyssey-ui({slug}): FIX — 优化实现"`
|
|
296
189
|
|
|
297
190
|
### A_VERIFY
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
```bash
|
|
303
|
-
maestro delegate "PURPOSE: Verify UI improvements for: {target}
|
|
304
|
-
TASK: Check visual correctness | Verify interaction states | Confirm accessibility | Test responsive behavior
|
|
305
|
-
MODE: analysis
|
|
306
|
-
CONTEXT: @{modified_files} | Improvements: {fix_summary}
|
|
307
|
-
EXPECTED: JSON {verdict, verified_improvements, remaining_issues, regression_risk}
|
|
308
|
-
" --role review --mode analysis
|
|
309
|
-
```
|
|
310
|
-
Execute with `run_in_background: true`, then wait for callback (do NOT halt the Odyssey flow).
|
|
311
|
-
|
|
312
|
-
3. `needs_rework` → S_FIX. `verified` → mark G4 done, advance.
|
|
313
|
-
4. Update `understanding.md` §5. Write `session.json.confirmation`.
|
|
314
|
-
|
|
315
|
-
📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-ui({slug}): VERIFY — 验证"`
|
|
191
|
+
1. Run tests (lint, unit, visual regression)
|
|
192
|
+
2. **CLI-assisted**: `maestro delegate` with `--role review` — visual correctness, interaction states, accessibility, responsive
|
|
193
|
+
3. `needs_rework` → S_FIX. `verified` → mark G4 done. Update §5, write `confirmation`.
|
|
194
|
+
📌 `git commit -m "odyssey-ui({slug}): VERIFY — 验证"`
|
|
316
195
|
|
|
317
196
|
### A_GENERALIZE
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
**Pattern extraction** from audit findings + diverge ideas (severity >= medium OR impact = high):
|
|
321
|
-
|
|
322
|
-
| Layer | Method | Example |
|
|
323
|
-
|-------|--------|---------|
|
|
324
|
-
| Syntax | Regex → direct Grep | Missing `aria-label`, hardcoded px values, inline styles |
|
|
325
|
-
| Semantic | Agent understands anti-pattern → scans | Inconsistent hover states, missing loading feedback |
|
|
326
|
-
| Structural | File/module structure similarity | Same component type missing responsive treatment |
|
|
327
|
-
|
|
328
|
-
Write `session.json.patterns[]`.
|
|
329
|
-
|
|
330
|
-
**4-agent parallel scan** (single message):
|
|
331
|
-
|
|
332
|
-
| Agent | Strategy | Scope |
|
|
333
|
-
|-------|----------|-------|
|
|
334
|
-
| Syntax grep | Grep CSS/style patterns matching found issues | Full project |
|
|
335
|
-
| Semantic scan | Find components with same interaction pattern but missing states | Related modules |
|
|
336
|
-
| Structural match | Find structurally similar components (same imports, layout) | Full project |
|
|
337
|
-
| Historical grep | `git log -S "{pattern}"` for when similar UI patterns were introduced/fixed | Git history |
|
|
338
|
-
|
|
339
|
-
**Cross-layer dedup**: Multi-layer hit → boost confidence. Single-layer → `needs_review`. Historical match on fixed code → `regression_risk`.
|
|
340
|
-
|
|
341
|
-
**Iterative deepening**: Module with ≥3 hits → targeted deep scan (max 1 round).
|
|
342
|
-
|
|
343
|
-
Update `understanding.md` §6 (per-pattern summary, cross-layer matrix). Write `session.json.generalization_stats`. Mark G5 done.
|
|
344
|
-
|
|
345
|
-
📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-ui({slug}): GENERALIZE — 泛化扫描"`
|
|
197
|
+
按 base A_GENERALIZE 执行。Pattern 来源: audit findings + diverge ideas (severity >= medium OR impact = high)。Mark G5 done.
|
|
198
|
+
📌 `git commit -m "odyssey-ui({slug}): GENERALIZE — 泛化扫描"`
|
|
346
199
|
|
|
347
200
|
### A_DISCOVER
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
- `needs_treatment` + requires design direction decision → create issue (with fix suggestion)
|
|
351
|
-
- `low_risk` → evaluate if a quick guard/improvement is feasible; if yes, fix it
|
|
352
|
-
- `already_handled` → mark skip
|
|
353
|
-
|
|
354
|
-
**Normal**: AskUserQuestion for routing ambiguity. **`-y`**: auto-fix what's fixable, create issue for rest.
|
|
355
|
-
Append evidence (phase: "discovery" + "decision"). Update `understanding.md` §7. Mark G6 done.
|
|
356
|
-
|
|
357
|
-
📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-ui({slug}): DISCOVER — 发现分类"`
|
|
201
|
+
按 base A_DISCOVER 执行。Mark G6 done.
|
|
202
|
+
📌 `git commit -m "odyssey-ui({slug}): DISCOVER — 发现分类"`
|
|
358
203
|
|
|
359
204
|
### A_RECORD
|
|
360
|
-
1. Finalize
|
|
361
|
-
2.
|
|
362
|
-
3.
|
|
363
|
-
4.
|
|
364
|
-
5. Mark G7 done. `current_state = "COMPLETED"`. Emit completion summary:
|
|
205
|
+
1. Finalize §8: 按 Knowledge Persistence 表分类记录,completion summary 列出建议的 `/spec-add` 命令
|
|
206
|
+
2. Pending decisions: **Normal** → AskUserQuestion. **`-y`** → skip, show deferred count
|
|
207
|
+
3. Goal audit: all confirmed → `phase_goals_all_done = true`. **Normal** → AskUserQuestion | **`-y`** → auto accept
|
|
208
|
+
4. Mark G7 done. Emit completion summary:
|
|
365
209
|
```
|
|
366
210
|
--- UI ODYSSEY COMPLETE ---
|
|
367
|
-
Target:
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
Scan hits: {total} ({cross_layer} cross-layer confirmed)
|
|
374
|
-
Issues: {N} created
|
|
375
|
-
Decisions: {N} resolved, {M} pending, {K} deferred
|
|
376
|
-
Learnings: {N} entries in understanding.md §8
|
|
377
|
-
Self-iter: {N} quality gate rounds across {M} stages
|
|
378
|
-
Goals: {done}/{total} ({skipped} skipped)
|
|
211
|
+
Target: {target} | Dimensions: {dimensions_audited}
|
|
212
|
+
Findings: {C}C {H}H {M}M {L}L | Diverge: {improvements} polish + {creative} delight
|
|
213
|
+
Fix: {fixed_count} applied, verified={yes|skipped}
|
|
214
|
+
Patterns: {extracted} ({by_layer}) | Scan hits: {total} ({cross_layer} cross-layer)
|
|
215
|
+
Issues: {N} | Decisions: {N} resolved, {M} pending, {K} deferred
|
|
216
|
+
Learnings: {N} entries | Self-iter: {N} rounds | Goals: {done}/{total} ({skipped} skipped)
|
|
379
217
|
---
|
|
380
218
|
```
|
|
381
|
-
|
|
382
|
-
📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-ui({slug}): RECORD — 会话总结"`
|
|
219
|
+
📌 `git commit -m "odyssey-ui({slug}): RECORD — 会话总结"`
|
|
383
220
|
|
|
384
221
|
</actions>
|
|
385
222
|
|
|
386
223
|
<appendix>
|
|
387
224
|
|
|
388
225
|
### Goal Prompt Template
|
|
389
|
-
**⚠️
|
|
226
|
+
**⚠️ 仅在 A_INTAKE 完成后显示一次。A_RECORD 完成时禁止重新显示。**
|
|
390
227
|
|
|
391
228
|
```
|
|
392
|
-
📋 UI Odyssey 会话已创建。可随时复制以下 /goal
|
|
229
|
+
📋 UI Odyssey 会话已创建。可随时复制以下 /goal 设定终止条件:
|
|
393
230
|
|
|
394
231
|
/goal 完成以下目标:
|
|
395
232
|
{for each G in phase_goals where status != "skipped":}
|
|
396
233
|
- {G.id}: {G.goal} — 完成条件: {G.done_when}
|
|
397
234
|
{end for}
|
|
398
|
-
穷尽迭代:直到
|
|
235
|
+
穷尽迭代:直到 audit + diverge findings 均已处理(fix/issue/decision)
|
|
399
236
|
且 phase_goals_all_done=true 才停。修复按 impact×severity 逐轮迭代。
|
|
400
237
|
每轮修复后重审修改区域,新发现追加继续修。
|
|
401
238
|
遇到 phase=decision 的 pending 必须 AskUserQuestion。不允许"只报告不处理"。
|
|
402
239
|
```
|
|
403
240
|
|
|
404
|
-
完成时仅输出 completion summary,不重复此提示。
|
|
405
|
-
|
|
406
241
|
### `-y` Auto-Confirm (5 decision points)
|
|
407
242
|
| Decision Point | Normal | `-y` |
|
|
408
243
|
|----------------|--------|------|
|
|
@@ -412,12 +247,7 @@ Goals: {done}/{total} ({skipped} skipped)
|
|
|
412
247
|
| A_RECORD pending decisions | AskUserQuestion | skip, show deferred count |
|
|
413
248
|
| A_RECORD goal audit | AskUserQuestion | auto accept |
|
|
414
249
|
|
|
415
|
-
`deferred`
|
|
416
|
-
|
|
417
|
-
### Phase Goal Lifecycle
|
|
418
|
-
`pending → done (confirmed=true)` normal | `pending → skipped (confirmed=true)` flags/manual | `pending → failed (confirmed=false)` exception
|
|
419
|
-
|
|
420
|
-
`phase_goals_all_done = true` only when ALL goals have `completion_confirmed == true`.
|
|
250
|
+
`deferred` → "待决策" in completion summary; recoverable via `-c`.
|
|
421
251
|
|
|
422
252
|
</appendix>
|
|
423
253
|
|
|
@@ -428,29 +258,16 @@ Goals: {done}/{total} ({skipped} skipped)
|
|
|
428
258
|
|------|----------|-----------|----------|
|
|
429
259
|
| E001 | error | No target specified | Provide target |
|
|
430
260
|
| E002 | error | Target path not found | Check path |
|
|
431
|
-
| E003 | error | Resume but no session found | Start new session |
|
|
432
261
|
| W001 | warning | No design system detected | Proceed with defaults |
|
|
433
262
|
| W002 | warning | Some dimension agents failed | Partial coverage |
|
|
434
|
-
| W003 | warning | Generalization 0 hits | Skip discovery |
|
|
435
|
-
| W004 | warning | Delegate parse failed | Use raw output |
|
|
436
263
|
</error_codes>
|
|
437
264
|
|
|
438
265
|
<success_criteria>
|
|
439
|
-
- [ ]
|
|
440
|
-
- [ ] Design system inventory captured in survey
|
|
441
|
-
- [ ] All dimensions audited (6 parallel agents) with structured findings
|
|
442
|
-
- [ ] Severity matrix produced
|
|
443
|
-
- [ ] Divergent exploration: polish + delight ideas generated
|
|
266
|
+
- [ ] 6-dimension audit with severity matrix + divergent exploration (polish + delight)
|
|
444
267
|
- [ ] Improvements implemented and verified (unless --skip-fix)
|
|
445
|
-
- [ ] Multi-layer generalization
|
|
446
|
-
- [ ]
|
|
447
|
-
- [ ]
|
|
448
|
-
- [ ] **Every unfixed finding has individual classification and reason** — blanket "pre-existing" labels are forbidden
|
|
449
|
-
- [ ] understanding.md §8 finalized with design learnings
|
|
450
|
-
- [ ] phase_goals G1-G7 tracked and audited
|
|
451
|
-
- [ ] Goal Prompt displayed once
|
|
452
|
-
- [ ] `-y`: no blocking prompts, deferred counted
|
|
453
|
-
- [ ] Session resumable via -c
|
|
268
|
+
- [ ] Multi-layer generalization + discoveries classified (unless --skip-generalize)
|
|
269
|
+
- [ ] Every unfixed finding has individual classification and reason
|
|
270
|
+
- [ ] understanding.md §8 finalized; phase_goals G1-G7 tracked; `-y` no blocking prompts
|
|
454
271
|
</success_criteria>
|
|
455
272
|
|
|
456
273
|
<next_step_routing>
|