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