maestro-flow 0.3.48 → 0.3.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/.claude/agents/impeccable-agent.md +99 -0
  2. package/.claude/commands/maestro-analyze.md +2 -2
  3. package/.claude/commands/maestro-brainstorm.md +116 -112
  4. package/.claude/commands/maestro-composer.md +5 -0
  5. package/.claude/commands/maestro-impeccable.md +46 -9
  6. package/.claude/commands/maestro-merge.md +3 -0
  7. package/.claude/commands/maestro-roadmap.md +5 -1
  8. package/.claude/commands/maestro-ui-craft.md +56 -4
  9. package/.claude/commands/maestro.md +1 -1
  10. package/.claude/commands/manage-issue-discover.md +4 -0
  11. package/.claude/commands/quality-refactor.md +3 -0
  12. package/.claude/skills/maestro-help/index/catalog.json +1 -1
  13. package/.claude/skills/maestro-help/phases/01-parse-intent.md +1 -1
  14. package/.claude/skills/maestro-impeccable/SKILL.md +3 -1
  15. package/.codex/skills/maestro/SKILL.md +3 -3
  16. package/.codex/skills/maestro-brainstorm/SKILL.md +19 -2
  17. package/.codex/skills/maestro-composer/SKILL.md +5 -0
  18. package/.codex/skills/maestro-help/catalog.json +1 -1
  19. package/.codex/skills/maestro-impeccable/SKILL.md +24 -5
  20. package/.codex/skills/maestro-merge/SKILL.md +3 -0
  21. package/.codex/skills/maestro-milestone-audit/SKILL.md +64 -7
  22. package/.codex/skills/maestro-quick/SKILL.md +1 -1
  23. package/.codex/skills/maestro-roadmap/SKILL.md +1 -1
  24. package/.codex/skills/maestro-tools-execute/SKILL.md +1 -1
  25. package/.codex/skills/maestro-tools-register/SKILL.md +1 -1
  26. package/.codex/skills/maestro-ui-craft/SKILL.md +51 -6
  27. package/.codex/skills/quality-refactor/SKILL.md +114 -22
  28. package/chains/_intent-map.json +1 -1
  29. package/chains/singles/ui-design.json +4 -4
  30. package/chains/{ui-design-driven.json → ui-craft-build.json} +8 -8
  31. package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js +3 -3
  32. package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js.map +1 -1
  33. package/dist/src/commands/delegate.d.ts.map +1 -1
  34. package/dist/src/commands/delegate.js +12 -7
  35. package/dist/src/commands/delegate.js.map +1 -1
  36. package/dist/src/commands/impeccable.d.ts +2 -1
  37. package/dist/src/commands/impeccable.d.ts.map +1 -1
  38. package/dist/src/commands/impeccable.js +80 -1
  39. package/dist/src/commands/impeccable.js.map +1 -1
  40. package/package.json +1 -1
  41. package/templates/planning-roles/ui-designer.md +86 -99
  42. package/templates/workflows/specs/node-catalog.md +1 -1
  43. package/workflows/brainstorm.md +26 -0
  44. package/workflows/cli-tools-usage.md +9 -26
  45. package/workflows/delegate-usage.md +301 -343
  46. package/workflows/impeccable/design.md +462 -0
  47. package/workflows/impeccable/explore.md +157 -0
  48. package/workflows/impeccable/shape.md +4 -0
  49. package/workflows/impeccable/ui-search/__pycache__/core.cpython-313.pyc +0 -0
  50. package/workflows/impeccable/ui-search/__pycache__/design_system.cpython-313.pyc +0 -0
  51. package/workflows/impeccable/ui-search/core.py +262 -0
  52. package/workflows/impeccable/ui-search/data/app-interface.csv +31 -0
  53. package/workflows/impeccable/ui-search/data/charts.csv +26 -0
  54. package/workflows/impeccable/ui-search/data/colors.csv +162 -0
  55. package/workflows/impeccable/ui-search/data/design.csv +1776 -0
  56. package/workflows/impeccable/ui-search/data/draft.csv +1779 -0
  57. package/workflows/impeccable/ui-search/data/google-fonts.csv +1924 -0
  58. package/workflows/impeccable/ui-search/data/icons.csv +106 -0
  59. package/workflows/impeccable/ui-search/data/landing.csv +35 -0
  60. package/workflows/impeccable/ui-search/data/products.csv +162 -0
  61. package/workflows/impeccable/ui-search/data/react-performance.csv +45 -0
  62. package/workflows/impeccable/ui-search/data/stacks/angular.csv +51 -0
  63. package/workflows/impeccable/ui-search/data/stacks/astro.csv +54 -0
  64. package/workflows/impeccable/ui-search/data/stacks/flutter.csv +53 -0
  65. package/workflows/impeccable/ui-search/data/stacks/html-tailwind.csv +56 -0
  66. package/workflows/impeccable/ui-search/data/stacks/jetpack-compose.csv +53 -0
  67. package/workflows/impeccable/ui-search/data/stacks/laravel.csv +51 -0
  68. package/workflows/impeccable/ui-search/data/stacks/nextjs.csv +53 -0
  69. package/workflows/impeccable/ui-search/data/stacks/nuxt-ui.csv +51 -0
  70. package/workflows/impeccable/ui-search/data/stacks/nuxtjs.csv +59 -0
  71. package/workflows/impeccable/ui-search/data/stacks/react-native.csv +52 -0
  72. package/workflows/impeccable/ui-search/data/stacks/react.csv +54 -0
  73. package/workflows/impeccable/ui-search/data/stacks/shadcn.csv +61 -0
  74. package/workflows/impeccable/ui-search/data/stacks/svelte.csv +54 -0
  75. package/workflows/impeccable/ui-search/data/stacks/swiftui.csv +51 -0
  76. package/workflows/impeccable/ui-search/data/stacks/threejs.csv +54 -0
  77. package/workflows/impeccable/ui-search/data/stacks/vue.csv +50 -0
  78. package/workflows/impeccable/ui-search/data/styles.csv +85 -0
  79. package/workflows/impeccable/ui-search/data/typography.csv +74 -0
  80. package/workflows/impeccable/ui-search/data/ui-reasoning.csv +162 -0
  81. package/workflows/impeccable/ui-search/data/ux-guidelines.csv +100 -0
  82. package/workflows/impeccable/ui-search/design_system.py +1148 -0
  83. package/workflows/impeccable/ui-search/prototype-template.html +511 -0
  84. package/workflows/impeccable/ui-search/render-prototype.js +208 -0
  85. package/workflows/impeccable/ui-search/search.py +114 -0
  86. package/workflows/maestro-chain-execute.md +2 -2
  87. package/workflows/maestro.codex.md +3 -3
  88. package/workflows/maestro.md +5 -5
  89. package/workflows/plan.md +1 -1
  90. package/workflows/ui-design.md +1 -1
  91. package/workflows/ui-style.md +1 -1
  92. package/.claude/commands/maestro-ui-design.md +0 -104
  93. package/.codex/skills/maestro-ui-design/SKILL.md +0 -242
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro-ui-craft
3
3
  description: Chain maestro-impeccable commands with intelligent routing and quality gate loops for automated UI production
4
- argument-hint: "<intent|target> [--chain build|improve|enhance|harden|live] [--enhance <cmd>] [--threshold <score>] [--max-loops <n>] [-y] [-c]"
4
+ argument-hint: "<intent|target> [--chain build|improve|enhance|harden|live] [--enhance <cmd>] [--threshold <score>] [--max-loops <n>] [--skip-design-explore] [--skip-design] [--styles <N>] [--stack <stack>] [-y] [-c]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -22,11 +22,20 @@ Core innovation: critique/audit scores drive automatic command selection and ite
22
22
  Impeccable has 23 commands across 6 categories — this command chains them into automated pipelines
23
23
  with quality gates that loop until design quality meets the threshold.
24
24
 
25
+ Includes integrated design-explore: multi-variant design system generation (via ui-search BM25 engine + CSV knowledge base),
26
+ HTML prototype rendering for visual comparison, interactive user review with mix support,
27
+ and automatic bridge to impeccable's DESIGN.md format. Replaces the former maestro-ui-design command.
28
+
25
29
  Prerequisite: maestro-impeccable skill available (auto-discovered by harness).
26
30
 
27
31
  Session: `.workflow/.maestro/ui-craft-{YYYYMMDD-HHmmss}/status.json`
28
32
  </purpose>
29
33
 
34
+ <deferred_reading>
35
+ - [impeccable harvest workflow](~/.maestro/workflows/impeccable.md) — read after command execution for harvest logic
36
+ - [design stage workflow](~/.maestro/workflows/impeccable/design.md) — read when S_DESIGN_EXPLORE or S_BRIDGE state entered
37
+ </deferred_reading>
38
+
30
39
  <invariants>
31
40
  1. **Session before execution** — status.json created before any chain step runs
32
41
  2. **All steps via Skill** — every impeccable command dispatched through `Skill({ skill: "maestro-impeccable" })`
@@ -46,6 +55,9 @@ $ARGUMENTS — intent description or target path, with optional flags.
46
55
  - `--max-loops <n>` — Maximum quality gate iterations (default: 3)
47
56
  - `-c` / `--continue` — Resume previous ui-craft session
48
57
  - `-y` — Auto mode: auto-select at ambiguous routing, skip confirmations where impeccable allows
58
+ - `--skip-design-explore` / `--skip-design` — Skip design-explore (prototype comparison) and bridge (use existing DESIGN.md or full shape interview)
59
+ - `--styles <N>` — Number of design system variants to generate and compare (2-5, default 3). Only used in build chain design-explore step
60
+ - `--stack <stack>` — Tech stack for supplementary guidelines (default: html-tailwind). Passed to ui-search
49
61
  </context>
50
62
 
51
63
  <chains>
@@ -54,13 +66,14 @@ $ARGUMENTS — intent description or target path, with optional flags.
54
66
 
55
67
  | Chain | Sequence | Gate Condition |
56
68
  |-------|----------|----------------|
57
- | **build** | teach? → shape → craft → **critique** → [refine loop] → audit → polish | critique ≥ threshold AND P0 == 0 |
69
+ | **build** | teach? → **design_explore?** → shape → craft → **critique** → [refine loop] → audit → polish | critique ≥ threshold AND P0 == 0 |
58
70
  | **improve** | **critique** → [refine loop] → polish → audit | critique ≥ threshold AND P0 == 0 |
59
71
  | **enhance** | {cmd} → **critique** → polish (if needed) | critique ≥ threshold |
60
72
  | **harden** | harden → **audit** → polish | audit ≥ threshold×0.5 |
61
73
  | **live** | live | — (interactive, no gate) |
62
74
 
63
75
  - `teach?` — conditional: only if PRODUCT.md missing/placeholder
76
+ - `design_explore?` — conditional: only if DESIGN.md missing AND `--skip-design-explore` not set. Delegates to `Skill("maestro-impeccable", "explore")` which handles variant generation, prototype rendering, visual comparison, user selection/mix, AND bridge to DESIGN.md internally
64
77
  - `[refine loop]` — quality gate loop: extract suggested commands from critique → execute → re-critique
65
78
 
66
79
  ### Intent → Chain Routing
@@ -68,6 +81,7 @@ $ARGUMENTS — intent description or target path, with optional flags.
68
81
  | Intent Pattern | Chain |
69
82
  |---------------|-------|
70
83
  | 新建, create, build, new, 从零, landing, feature, page | build |
84
+ | 设计, design, 风格, style, 设计系统, design system, 视觉, theme | build |
71
85
  | 改进, improve, fix, 优化, iterate, better, 迭代 | improve |
72
86
  | 动画, 颜色, 排版, animate, color, type, bold, delight, enhance | enhance |
73
87
  | 生产, production, harden, 上线, ship, edge case, i18n | harden |
@@ -84,6 +98,7 @@ S_PARSE — 解析参数、意图分类、chain 选择 PERSI
84
98
  S_RESUME — 扫描已有 ui-craft session、恢复执行 PERSIST: —
85
99
  S_SETUP — 加载 context、检查 PRODUCT.md PERSIST: —
86
100
  S_CREATE — 创建 session + status.json PERSIST: session (全量)
101
+ S_DESIGN_EXPLORE — 委托 impeccable explore:多变体生成、原型对比、选型/混搭、自动 bridge 到 DESIGN.md PERSIST: explore_completed, design_md_path
87
102
  S_CHAIN — 按序执行 chain 步骤 PERSIST: step progress, executed commands
88
103
  S_GATE — 质量门控:解析评分、决策 PERSIST: scores, loop count
89
104
  S_REFINE — 执行自动选取的 refine 命令 PERSIST: refine commands, loop state
@@ -109,10 +124,16 @@ S_CREATE:
109
124
  → S_CHAIN DO: A_CREATE_SESSION
110
125
 
111
126
  S_CHAIN:
127
+ → S_DESIGN_EXPLORE WHEN: current step is 'design_explore' AND DESIGN.md missing AND --skip-design-explore not set AND --skip-design not set
112
128
  → S_GATE WHEN: current step is gate command (critique/audit)
129
+ → S_CHAIN WHEN: step is design_explore but skip conditions met → advance
113
130
  → S_CHAIN WHEN: step is normal command → execute → advance
114
131
  → S_REPORT WHEN: all steps complete
115
132
 
133
+ S_DESIGN_EXPLORE:
134
+ → S_CHAIN WHEN: explore completed (DESIGN.md produced) → advance to shape
135
+ → S_CHAIN WHEN: explore failed → W004 → advance to shape (full interview fallback)
136
+
116
137
  S_GATE:
117
138
  → S_CHAIN WHEN: PASS (score ≥ threshold AND P0 == 0) → advance to next step
118
139
  → S_REFINE WHEN: FAIL (score < threshold OR P0 > 0)
@@ -160,6 +181,15 @@ S_REPORT:
160
181
  ```
161
182
  3. Write status.json before executing any step
162
183
 
184
+ ### A_DESIGN_EXPLORE
185
+
186
+ Delegate to impeccable explore as a black-box command. The explore command internally handles:
187
+ variant generation, prototype rendering, visual comparison, user review, mix protocol, rejected variant harvest, bridge to DESIGN.md, and spec registration.
188
+
189
+ 1. Execute: `Skill({ skill: "maestro-impeccable", args: "explore --styles {styles_count}" })`
190
+ 2. On completion: verify `.workflow/impeccable/DESIGN.md` exists
191
+ 3. Update status.json: `explore_completed: true`, `design_md_path`
192
+
163
193
  ### A_FINAL_REPORT
164
194
 
165
195
  1. Read critique trend if available (impeccable's critique persists snapshots automatically)
@@ -205,11 +235,26 @@ Execute via: `Skill({ skill: "maestro-impeccable", args: "{command} {target}" })
205
235
 
206
236
  After each step: update status.json `current_step` and step `status`.
207
237
 
208
- **Rules:**
238
+ **Step-specific logic:**
239
+
240
+ ### 4a. Design-explore step (build chain only)
241
+
242
+ When current step is `design_explore`:
243
+
244
+ 1. Check if `.workflow/impeccable/DESIGN.md` already exists → skip, advance to shape
245
+ 2. Check if `--skip-design-explore` or `--skip-design` is set → skip, advance to shape
246
+ 3. Otherwise → execute A_DESIGN_EXPLORE:
247
+ - `Skill({ skill: "maestro-impeccable", args: "explore --styles {styles_count}" })`
248
+ - explore handles everything internally: variant generation, prototype rendering, visual comparison, user selection/mix, bridge to DESIGN.md, spec registration
249
+ 4. On completion → verify DESIGN.md exists, advance to shape
250
+ 5. On failure → W004, advance to shape (full interview fallback, no DESIGN.md)
251
+
252
+ ### 4c. Normal steps
253
+
209
254
  - `teach`, `shape`, `craft` are interactive — do NOT suppress their user gates
210
255
  - After `teach` completes → re-run context loader for fresh PRODUCT.md
211
256
  - After `craft` completes → the build exists, ready for evaluation
212
- - Gate steps (critique/audit) → transition to quality gate logic
257
+ - Gate steps (critique/audit) → transition to quality gate logic (Section 5)
213
258
 
214
259
  ## 5. Quality Gate
215
260
 
@@ -335,6 +380,8 @@ These are structural/interactive — never picked by the refine loop:
335
380
  | overdrive | Requires explicit user vision |
336
381
  | critique | Gate command, not a fix |
337
382
  | audit | Gate command, not a fix |
383
+ | design | Design system generation (setup) |
384
+ | bridge | Format bridging (setup) |
338
385
 
339
386
  </quality_gate_routing>
340
387
 
@@ -349,6 +396,11 @@ These are structural/interactive — never picked by the refine loop:
349
396
  | W001 | warning | PRODUCT.md missing, prepending teach to chain |
350
397
  | W002 | warning | Max quality gate loops exceeded, forcing continue |
351
398
  | W003 | warning | Could not parse score from critique/audit output |
399
+ | E006 | error | Python 3 not available for design system generation |
400
+ | E007 | error | ui-search scripts not found at expected path |
401
+ | W004 | warning | Design system generation failed, skipping design+bridge, falling back to shape full interview |
402
+ | W005 | warning | Bridge transformation failed, continuing without DESIGN.md |
403
+ | W008 | warning | Node.js not available for prototype rendering, falling back to text-only variant comparison |
352
404
  </error_codes>
353
405
 
354
406
  <success_criteria>
@@ -155,7 +155,7 @@ S_FALLBACK:
155
155
  | maestro-analyze | `-y` | Skip scoping, auto-deepen |
156
156
  | maestro-brainstorm | `-y` | Skip questions, use defaults |
157
157
  | maestro-roadmap | `-y` | Skip questions (create/revise/review) |
158
- | maestro-ui-design | `-y` | Skip selection, pick top variant |
158
+ | maestro-ui-craft | `-y` | Auto-select design variant + skip confirmations |
159
159
  | maestro-plan | `-y` | Skip confirmations and clarification |
160
160
  | maestro-execute | `-y` | Skip confirmations, blocked auto-continue |
161
161
  | quality-auto-test | `-y` | Skip plan confirmation |
@@ -48,6 +48,10 @@ $ARGUMENTS -- optional. Parse first token to determine mode.
48
48
  **State files:**
49
49
  - `.workflow/issues/issues.jsonl` -- issues appended here
50
50
  - `.workflow/issues/discoveries/{SESSION_ID}/` -- session artifacts
51
+
52
+ ### Pre-load specs
53
+ 1. **Debug specs**: Run `maestro spec load --category debug` to load known antipatterns, root causes, and gotchas. Informs discovery perspectives with prior findings.
54
+ 2. Optional — proceed without if unavailable.
51
55
  </context>
52
56
 
53
57
  <execution>
@@ -41,6 +41,9 @@ If not provided, prompt user for scope.
41
41
  <execution>
42
42
  Follow '~/.maestro/workflows/refactor.md' completely.
43
43
 
44
+ **Knowledge inquiry on completion:**
45
+ After successful refactoring, ask user once: "Record refactoring pattern as coding convention?" If yes, persist via `Skill("spec-add", "coding \"<title>\" \"<pattern>\" --keywords <kw1>,<kw2>")`.
46
+
44
47
  **Next-step routing on completion:**
45
48
  - All tests pass → `/quality-sync` (update codebase docs)
46
49
  - Test failures after refactor → `/quality-debug {scope}`
@@ -27,7 +27,7 @@
27
27
  {"name": "maestro-ralph", "command": "/maestro-ralph", "category": "ralph", "description": "Ralph 引擎 — 自适应生命周期决策节点管理", "source": "../../commands/maestro-ralph.md"},
28
28
  {"name": "maestro-ralph-execute", "command": "/maestro-ralph-execute", "category": "ralph", "description": "Ralph 执行 — 运行自适应决策链", "source": "../../commands/maestro-ralph-execute.md"},
29
29
  {"name": "maestro-learn", "command": "/maestro-learn", "category": "core", "description": "学习 — 从执行中提取知识和模式", "source": "../../commands/maestro-learn.md"},
30
- {"name": "maestro-ui-design", "command": "/maestro-ui-design", "category": "ui", "description": "UI 设计设计系统原型和 Token 管理", "source": "../../commands/maestro-ui-design.md"},
30
+ {"name": "maestro-ui-craft", "command": "/maestro-ui-craft", "category": "ui", "description": "UI 生产设计系统生成 + impeccable 链式编排 + 质量门控", "source": "../../commands/maestro-ui-craft.md"},
31
31
  {"name": "maestro-ui-codify", "command": "/maestro-ui-codify", "category": "ui", "description": "UI 固化 — 将设计产出转化为知识资产", "source": "../../commands/maestro-ui-codify.md"},
32
32
  {"name": "maestro-update", "command": "/maestro-update", "category": "core", "description": "版本更新 — 检查并安装最新版本", "source": "../../commands/maestro-update.md"},
33
33
  {"name": "maestro-tools-register", "command": "/maestro-tools-register", "category": "tools", "description": "MCP 工具注册 — 注册外部工具到 Maestro", "source": "../../commands/maestro-tools-register.md"},
@@ -62,7 +62,7 @@ const knownCommands = [
62
62
  "brainstorm", "quick", "overlay", "amend", "fork", "merge", "collab",
63
63
  "milestone-audit", "milestone-complete", "milestone-release",
64
64
  "composer", "player", "ralph", "ralph-execute", "learn",
65
- "ui-design", "ui-codify", "update",
65
+ "ui-craft", "ui-codify", "update",
66
66
  "tools-register", "tools-execute",
67
67
  "issue", "issue-discover", "knowhow", "knowhow-capture",
68
68
  "status", "wiki", "harvest", "codebase-refresh", "codebase-rebuild",
@@ -3,7 +3,7 @@ name: maestro-impeccable
3
3
  description: Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
4
4
  version: 1.0.0
5
5
  user-invocable: true
6
- argument-hint: "[craft|shape · audit|critique · animate|bolder|colorize|delight|layout|overdrive|quieter|typeset · adapt|clarify|distill · harden|onboard|optimize|polish · teach|document|extract|live] [target] [--skip-harvest] [-y]"
6
+ argument-hint: "[craft|shape|explore · audit|critique · animate|bolder|colorize|delight|layout|overdrive|quieter|typeset · adapt|clarify|distill · harden|onboard|optimize|polish · teach|document|extract|live] [target] [--skip-harvest] [-y] [--styles N]"
7
7
  allowed-tools:
8
8
  - Bash(maestro impeccable *)
9
9
  - Write
@@ -108,6 +108,7 @@ See [~/.maestro/workflows/impeccable/brand.md](~/.maestro/workflows/impeccable/b
108
108
  | `teach` | Build | Set up PRODUCT.md and DESIGN.md | [~/.maestro/workflows/impeccable/teach.md](~/.maestro/workflows/impeccable/teach.md) |
109
109
  | `document` | Build | Generate DESIGN.md from code | [~/.maestro/workflows/impeccable/document.md](~/.maestro/workflows/impeccable/document.md) |
110
110
  | `extract [target]` | Build | Pull tokens/components into design system | [~/.maestro/workflows/impeccable/extract.md](~/.maestro/workflows/impeccable/extract.md) |
111
+ | `explore [--styles N]` | Build | Multi-style comparison: generate variants, render prototypes, visual compare, select/mix | [~/.maestro/workflows/impeccable/explore.md](~/.maestro/workflows/impeccable/explore.md) |
111
112
  | `critique [target]` | Evaluate | UX review with heuristic scoring | [~/.maestro/workflows/impeccable/critique.md](~/.maestro/workflows/impeccable/critique.md) |
112
113
  | `audit [target]` | Evaluate | Technical quality checks | [~/.maestro/workflows/impeccable/audit.md](~/.maestro/workflows/impeccable/audit.md) |
113
114
  | `polish [target]` | Refine | Final quality pass | [~/.maestro/workflows/impeccable/polish.md](~/.maestro/workflows/impeccable/polish.md) |
@@ -146,6 +147,7 @@ After every command execution (except `live`), harvest design decisions into `.w
146
147
  | teach | reference | REF- | Brand/user/principles from PRODUCT.md |
147
148
  | document | asset | AST- | Token system from DESIGN.md YAML |
148
149
  | extract | asset | AST- | Design system patterns |
150
+ | explore | decision + asset | DCS- + AST- | Style selection rationale + design tokens |
149
151
  | critique | tip | TIP- | Scores + P0/P1 findings |
150
152
  | audit | tip | TIP- | 5-dimension scores |
151
153
  | polish | tip | TIP- | Polish points |
@@ -261,7 +261,7 @@ Read `.workflow/state.json` and route by condition:
261
261
  | `status` | `manage-status` |
262
262
  | `init` | `maestro-init` |
263
263
  | `analyze` | `maestro-analyze {phase}` |
264
- | `ui_design` | `maestro-ui-design {phase}` |
264
+ | `ui_design` | `maestro-ui-craft "{phase}" --chain build` |
265
265
  | `plan` | `maestro-plan {phase}` |
266
266
  | `execute` | `maestro-execute {phase}` |
267
267
  | `verify` | `maestro-verify {phase}` |
@@ -314,7 +314,7 @@ Read `.workflow/state.json` and route by condition:
314
314
  | `deploy` | maestro-verify → maestro-milestone-release |
315
315
  | `spec-driven` | maestro-init → [B] maestro-roadmap --mode full → [B] maestro-plan → [B] maestro-execute → maestro-verify |
316
316
  | `brainstorm-driven` | [B] maestro-brainstorm → [B] maestro-plan → [B] maestro-execute → maestro-verify |
317
- | `ui-design-driven` | maestro-ui-design → [B] maestro-plan → [B] maestro-execute → maestro-verify |
317
+ | `ui-craft-build` | maestro-ui-craft --chain build → [B] maestro-plan → [B] maestro-execute → maestro-verify |
318
318
  | `roadmap-driven` | maestro-init → [B] maestro-roadmap → [B] maestro-plan → [B] maestro-execute → maestro-verify |
319
319
  | `next-milestone` | [B] maestro-roadmap → [B] maestro-plan → [B] maestro-execute → maestro-verify |
320
320
  | `full-lifecycle` | [B] maestro-plan → [B] maestro-execute → maestro-verify → quality-review → quality-test → maestro-milestone-audit → maestro-milestone-complete |
@@ -341,7 +341,7 @@ Read `.workflow/state.json` and route by condition:
341
341
 
342
342
  | Skill | Flag |
343
343
  |-------|------|
344
- | maestro-init, maestro-analyze, maestro-brainstorm, maestro-ui-design, maestro-roadmap | `-y` |
344
+ | maestro-init, maestro-analyze, maestro-brainstorm, maestro-ui-craft, maestro-roadmap | `-y` |
345
345
  | maestro-plan, maestro-execute, maestro-milestone-complete | `-y` |
346
346
  | quality-auto-test, quality-retrospective | `-y` |
347
347
  | quality-test | `-y --auto-fix` |
@@ -49,6 +49,7 @@ S_ROLES — 选择 roles(-y auto / interactive) PERSIST: —
49
49
  S_CSV_GEN — 生成 tasks.csv PERSIST: tasks.csv
50
50
  S_WAVE_1 — Guidance Spec (single agent) PERSIST: guidance-specification.md
51
51
  S_CHECK_1 — Checkpoint: 用户审阅 guidance(-y 跳过) PERSIST: —
52
+ S_DESIGN — 视觉风格确定 (impeccable teach + explore) PERSIST: DESIGN.md
52
53
  S_WAVE_2 — Role Analysis (parallel spawn) PERSIST: role analyses
53
54
  S_CHECK_2 — Checkpoint: 用户审阅 roles(-y 跳过) PERSIST: —
54
55
  S_WAVE_3 — Synthesis + Feature Index (single agent) PERSIST: synthesis artifacts
@@ -63,10 +64,15 @@ S_CSV_GEN → S_WAVE_1 DO: generate tasks.csv (1 guidance + N roles + 1 synthe
63
64
  S_WAVE_1 → S_CHECK_1 WHEN: completed DO: spawn wave-1, merge results, read guidance-spec
64
65
  S_WAVE_1 → END WHEN: failed DO: abort pipeline
65
66
 
66
- S_CHECK_1 → S_WAVE_2 WHEN: -y OR user "Proceed"
67
+ S_CHECK_1 → S_DESIGN WHEN: (-y OR user "Proceed") AND ui-designer in selected_roles
68
+ S_CHECK_1 → S_WAVE_2 WHEN: (-y OR user "Proceed") AND ui-designer NOT in selected_roles
67
69
  S_CHECK_1 → S_CHECK_1 WHEN: user "Revise" DO: edit guidance-spec, re-display
68
70
  S_CHECK_1 → END WHEN: user "Abort"
69
71
 
72
+ S_DESIGN → S_WAVE_2 WHEN: DESIGN.md exists OR explore completed DO: A_DESIGN_EXPLORE
73
+ S_DESIGN → S_WAVE_2 WHEN: DESIGN.md already exists (skip explore)
74
+ S_DESIGN → S_WAVE_2 WHEN: explore failed → W004 → continue without
75
+
70
76
  S_WAVE_2 → S_CHECK_2 DO: spawn wave-2 (parallel), merge results
71
77
  S_WAVE_2 → S_WAVE_3 WHEN: all failed DO: skip synthesis
72
78
 
@@ -88,13 +94,24 @@ S_AGGREGATE → END DO: A_AGGREGATE
88
94
 
89
95
  **Synthesis (W3)**: Cross-role consensus/conflicts/unique → conflict tags [RESOLVED]/[SUGGESTED]/[UNRESOLVED] → feature-specs or synthesis-specification.md → feature-index.json + synthesis-changelog.md. Four-layer: Direct Reference → Structured Extraction → Conflict Distillation → Cross-Feature Annotation.
90
96
 
97
+ ### A_DESIGN_EXPLORE
98
+
99
+ When ui-designer is among selected roles, establish visual direction before Wave 2:
100
+
101
+ 1. If `.workflow/impeccable/PRODUCT.md` missing → run `$maestro-impeccable teach`
102
+ 2. If `.workflow/impeccable/DESIGN.md` missing → run `$maestro-impeccable explore`
103
+ 3. If both already exist → skip (visual direction already locked)
104
+
105
+ explore generates multi-style HTML prototypes, visual comparison, user selection/mix, and produces DESIGN.md.
106
+ ui-designer agents in Wave 2 then focus on UX analysis only (interaction flows, state design), not visual styling.
107
+
91
108
  ### A_AGGREGATE
92
109
 
93
110
  1. Export results.csv
94
111
  2. Generate context.md (summary, guidance, per-role findings, synthesis, feature index, next steps)
95
112
  3. Confidence scoring: 5 dimensions (role_coverage, cross_role_consistency, feature_completeness, spec_quality, design_feasibility). Quality gate: >3 UNRESOLVED → warn.
96
113
  4. Copy artifacts to target .brainstorming/
97
- 5. Next-step routing: UI features detected → maestro-ui-design; else → maestro-analyze / maestro-plan / maestro-roadmap
114
+ 5. Next-step routing: DESIGN.md established → `maestro-ui-craft <feature> --chain build`; else UI features detected → `maestro-ui-craft <feature> --chain build`; else → maestro-analyze / maestro-plan / maestro-roadmap
98
115
 
99
116
  </actions>
100
117
  </state_machine>
@@ -50,6 +50,11 @@ $ARGUMENTS — natural language workflow description, or flags.
50
50
 
51
51
  **Node catalog**: Read `~/.maestro/templates/workflows/specs/node-catalog.md` at Phase 2 (deferred).
52
52
  **Template schema**: Read `~/.maestro/templates/workflows/specs/template-schema.md` at Phase 5 (deferred).
53
+
54
+ ### Pre-load specs
55
+ 1. **Architecture specs**: Run `maestro spec load --category arch` to load architecture constraints. Use as context for node resolution — ensures workflow design respects documented patterns.
56
+ 2. **Coding specs**: Run `maestro spec load --category coding` to load coding conventions. Informs executor argument defaults and context injection.
57
+ 3. Optional — proceed without if unavailable.
53
58
  </context>
54
59
 
55
60
  <execution>
@@ -27,7 +27,7 @@
27
27
  {"name": "maestro-ralph", "command": "/maestro-ralph", "category": "ralph", "description": "Ralph 引擎 — 自适应生命周期决策节点管理", "source": "../../commands/maestro-ralph.md"},
28
28
  {"name": "maestro-ralph-execute", "command": "/maestro-ralph-execute", "category": "ralph", "description": "Ralph 执行 — 运行自适应决策链", "source": "../../commands/maestro-ralph-execute.md"},
29
29
  {"name": "maestro-learn", "command": "/maestro-learn", "category": "core", "description": "学习 — 从执行中提取知识和模式", "source": "../../commands/maestro-learn.md"},
30
- {"name": "maestro-ui-design", "command": "/maestro-ui-design", "category": "ui", "description": "UI 设计设计系统原型和 Token 管理", "source": "../../commands/maestro-ui-design.md"},
30
+ {"name": "maestro-ui-craft", "command": "/maestro-ui-craft", "category": "ui", "description": "UI 生产管线设计系统原型、自动化生产和质量门控", "source": "../../commands/maestro-ui-craft.md"},
31
31
  {"name": "maestro-ui-codify", "command": "/maestro-ui-codify", "category": "ui", "description": "UI 固化 — 将设计产出转化为知识资产", "source": "../../commands/maestro-ui-codify.md"},
32
32
  {"name": "maestro-update", "command": "/maestro-update", "category": "core", "description": "版本更新 — 检查并安装最新版本", "source": "../../commands/maestro-update.md"},
33
33
  {"name": "maestro-tools-register", "command": "/maestro-tools-register", "category": "tools", "description": "MCP 工具注册 — 注册外部工具到 Maestro", "source": "../../commands/maestro-tools-register.md"},
@@ -1,24 +1,33 @@
1
1
  ---
2
2
  name: maestro-impeccable
3
- description: Production-grade UI design with knowhow accumulation -- 23 commands for build, evaluate, refine, enhance, fix
4
- argument-hint: "[craft|shape · audit|critique · animate|bolder|colorize|delight|layout|overdrive|quieter|typeset · adapt|clarify|distill · harden|onboard|optimize|polish · teach|document|extract|live] [target] [--skip-harvest] [-y]"
3
+ description: Production-grade UI design with knowhow accumulation -- 24 commands for build, evaluate, refine, enhance, fix
4
+ argument-hint: "[craft|shape|explore · audit|critique · animate|bolder|colorize|delight|layout|overdrive|quieter|typeset · adapt|clarify|distill · harden|onboard|optimize|polish · teach|document|extract|live] [target] [--skip-harvest] [-y] [--styles N]"
5
5
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep, request_user_input
6
6
  ---
7
7
  <purpose>
8
8
  Designs and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft.
9
9
  After each command, automatically harvests design knowledge to `.workflow/knowhow/` (category: ui) for cross-session accumulation.
10
10
 
11
- Replaces the standalone impeccable skill. 23 commands covering the full design lifecycle.
11
+ Replaces the standalone impeccable skill. 24 commands covering the full design lifecycle.
12
+
13
+ Includes integrated `search` subcommand for querying UI/UX design knowledge base (BM25 + CSV):
14
+ ```bash
15
+ maestro impeccable search "<query>" -d <domain> # domain search
16
+ maestro impeccable search "<query>" --design-system # generate design system
17
+ maestro impeccable search "<query>" --design-system --persist -p "Project" # save MASTER.md
18
+ ```
19
+ Domains: style, color, chart, landing, product, ux, typography, icons, react, web, google-fonts.
20
+ Stacks: react, nextjs, vue, svelte, astro, swiftui, react-native, flutter, html-tailwind, shadcn.
12
21
  </purpose>
13
22
 
14
23
  <context>
15
24
  $ARGUMENTS -- sub-command + target + optional flags.
16
25
 
17
- **Sub-commands** (23):
26
+ **Sub-commands** (24):
18
27
 
19
28
  | Category | Commands |
20
29
  |----------|----------|
21
- | Build | craft, shape, teach, document, extract |
30
+ | Build | craft, shape, teach, document, extract, explore |
22
31
  | Evaluate | critique, audit |
23
32
  | Refine | polish, bolder, quieter, distill, harden, onboard |
24
33
  | Enhance | animate, colorize, typeset, layout, delight, overdrive |
@@ -28,6 +37,7 @@ $ARGUMENTS -- sub-command + target + optional flags.
28
37
  **Flags:**
29
38
  - `--skip-harvest` -- Execute command without knowhow capture
30
39
  - `-y` -- Auto-confirm where the skill allows
40
+
31
41
  </context>
32
42
 
33
43
  <execution>
@@ -71,6 +81,7 @@ After command completes (except `live`), unless `--skip-harvest`:
71
81
  | shape | decision | DCS- |
72
82
  | teach | reference | REF- |
73
83
  | document, extract | asset | AST- |
84
+ | explore | decision + asset | DCS- + AST- |
74
85
  | critique, audit, polish, harden, onboard, clarify, adapt, optimize | tip | TIP- |
75
86
  | colorize, typeset, layout, animate, bolder, quieter, distill, delight, overdrive | decision | DCS- |
76
87
 
@@ -79,6 +90,14 @@ Write knowhow with `category: ui`. For DCS-/AST- types, also create spec index:
79
90
  maestro spec add ui "<title>" "<summary>" --keywords impeccable,<cmd>,... --ref knowhow/<file>
80
91
  ```
81
92
 
93
+ ## Post-Execution Routing
94
+
95
+ After harvest, determine whether this command was invoked as part of a larger pipeline by checking conversation context (e.g., brainstorm Step 3.5, ui-craft chain step).
96
+
97
+ **Pipeline context detected** (called via Skill from brainstorm, ui-craft, etc.): Report result and stop. Do NOT suggest next-step commands — the calling flow owns what happens next.
98
+
99
+ **Standalone invocation** (user directly ran the command): Show next-step suggestions based on command executed (teach→explore/shape, explore→shape→craft, craft→critique, etc.).
100
+
82
101
  </execution>
83
102
 
84
103
  <shared_design_laws>
@@ -40,6 +40,9 @@ $ARGUMENTS — milestone number and optional flags.
40
40
  <execution>
41
41
  Follow '~/.maestro/workflows/merge.md' completely.
42
42
 
43
+ **Knowledge inquiry on completion:**
44
+ After successful merge, ask user once: "Record milestone learnings?" If yes, persist via `maestro spec add learning "<title>" "<insight>" --keywords <kw1>,<kw2>`.
45
+
43
46
  **Next steps:**
44
47
  - View dashboard → `$manage-status`
45
48
  - Audit milestone → `$maestro-milestone-audit`
@@ -2,11 +2,13 @@
2
2
  name: maestro-milestone-audit
3
3
  description: Audit current milestone for cross-phase integration gaps
4
4
  argument-hint: "[milestone, e.g., 'M1']"
5
- allowed-tools: Read, Write, Bash, Glob, Grep, Agent
5
+ allowed-tools: spawn_agents_on_csv, Read, Write, Bash, Glob, Grep
6
6
  ---
7
7
 
8
8
  <purpose>
9
- Sequential audit based on artifact registry in state.json. Checks phase coverage (ANL->PLN->EXC chains), ad-hoc completeness, execution completeness, and cross-artifact integration. Produces PASS/FAIL verdict report.
9
+ Sequential audit based on artifact registry in state.json. Checks phase coverage (ANL->PLN->EXC chains), ad-hoc completeness, execution completeness, and cross-artifact integration via `spawn_agents_on_csv`. Produces PASS/FAIL verdict report.
10
+
11
+ **Core workflow**: Load Artifacts -> Coverage Check -> Completeness Check -> CSV Wave (Integration Check) -> Verdict
10
12
  </purpose>
11
13
 
12
14
  <context>
@@ -16,14 +18,52 @@ $maestro-milestone-audit ""
16
18
  $maestro-milestone-audit "M1"
17
19
  ```
18
20
 
19
- **Output**: Audit report with artifact chain verification, integration analysis, and PASS/FAIL verdict
21
+ **Output**: `.workflow/milestones/{milestone}/audit-report.md` with artifact chain verification, integration analysis, and PASS/FAIL verdict
20
22
 
23
+ **Session**: `.workflow/.csv-wave/{YYYYMMDD}-audit-{milestone}/`
21
24
  </context>
22
25
 
26
+ <csv_schema>
27
+
28
+ ### tasks.csv (Master State)
29
+
30
+ ```csv
31
+ id,title,description,scope,check_targets,deps,wave,status,findings,gaps_found,severity,error
32
+ "integ-1","Interface & dependency chains","Verify shared interfaces are consistent across phases: re-exports match, dependency chains unbroken, no circular imports between phase outputs","cross-phase imports, shared types, re-exports","grep for shared type names across phase output dirs; verify export/import consistency","","1","","","","",""
33
+ "integ-2","Data contracts & API consistency","Verify request/response schemas match across phases: API signatures consistent, error codes aligned, no contract drift","request/response schemas, API signatures, error codes","diff API type definitions across phases; check error code enum consistency","","1","","","","",""
34
+ ```
35
+
36
+ **Columns**:
37
+
38
+ | Column | Phase | Description |
39
+ |--------|-------|-------------|
40
+ | `id` | Input | Worker identifier: `integ-{N}` |
41
+ | `title` | Input | Integration dimension name |
42
+ | `description` | Input | Detailed check instructions |
43
+ | `scope` | Input | What to examine |
44
+ | `check_targets` | Input | Specific verification commands/grep patterns |
45
+ | `deps` | Input | Dependencies (empty — all wave 1) |
46
+ | `wave` | Computed | Wave number (always 1 — single parallel wave) |
47
+ | `status` | Output | `pending` -> `pass` / `fail` / `warning` |
48
+ | `findings` | Output | Detailed findings per dimension (max 500 chars) |
49
+ | `gaps_found` | Output | Semicolon-separated list of integration gaps |
50
+ | `severity` | Output | `critical` / `warning` / `info` per gap |
51
+ | `error` | Output | Error message if check failed |
52
+
53
+ ### Session Structure
54
+
55
+ ```
56
+ .workflow/.csv-wave/{YYYYMMDD}-audit-{milestone}/
57
+ +-- tasks.csv
58
+ +-- wave-1.csv (temporary)
59
+ +-- wave-1-results.csv
60
+ ```
61
+ </csv_schema>
62
+
23
63
  <invariants>
24
64
  1. **Artifact registry is source of truth** — don't scan directories, read state.json
25
65
  2. **Non-blocking warnings** — missing analyze is warning, missing execute is error
26
- 3. **Integration check is required** — always spawn checker agent
66
+ 3. **Integration check is required** — always spawn checker via CSV wave
27
67
  4. **Clear verdict** — PASS or FAIL with specific reasons
28
68
  </invariants>
29
69
 
@@ -45,9 +85,26 @@ For each phase: check for completed analyze (optional), plan (required), execute
45
85
 
46
86
  Verify all adhoc-scoped artifacts completed. For each execute artifact, verify all tasks in plan dir completed.
47
87
 
48
- ### Step 5: Integration Check
88
+ ### Step 5: Integration Check via CSV Wave
89
+
90
+ 1. Create session folder: `.workflow/.csv-wave/{dateStr}-audit-{milestone}/`
91
+ 2. Build `tasks.csv` from csv_schema — populate `scope` and `check_targets` columns using phase artifacts discovered in Step 2
92
+ 3. Write `wave-1.csv` from pending rows, then execute:
93
+
94
+ ```javascript
95
+ spawn_agents_on_csv({
96
+ csv_path: `${sessionFolder}/wave-1.csv`,
97
+ id_column: "id",
98
+ instruction: `You are an integration checker for milestone ${milestone}. For each row, examine the scope and check_targets. Search the codebase for inconsistencies, contract drift, and broken dependencies across phase outputs. Report findings with file:line references. Set status to pass/fail/warning. List specific gaps in gaps_found (semicolon-separated).`,
99
+ max_concurrency: 2, max_runtime_seconds: 600,
100
+ output_csv_path: `${sessionFolder}/wave-1-results.csv`,
101
+ output_schema: { id, status: [pass|fail|warning], findings, gaps_found, severity, error }
102
+ })
103
+ ```
49
104
 
50
- Spawn Agent for cross-phase validation: shared interfaces, dependency chains, data contracts, API consistency. Write report to `.workflow/milestones/{milestone}/audit-report.md`.
105
+ 4. Merge results into master `tasks.csv`
106
+ 5. Parse `gaps_found` from all workers — aggregate into `.workflow/milestones/{milestone}/audit-report.md`
107
+ 6. Any worker with `status == fail` and `severity == critical` → milestone verdict = FAIL
51
108
 
52
109
  ### Step 6: Verdict
53
110
 
@@ -81,7 +138,7 @@ Display structured audit report.
81
138
  - [ ] Artifact registry loaded and filtered by milestone
82
139
  - [ ] Phase coverage matrix generated
83
140
  - [ ] Ad-hoc and execution completeness verified
84
- - [ ] Integration check performed via agent
141
+ - [ ] Integration check performed via spawn_agents_on_csv (2 parallel workers)
85
142
  - [ ] Audit report written to milestones/ directory
86
143
  - [ ] Clear PASS/FAIL verdict with specific reasons
87
144
  </success_criteria>
@@ -2,7 +2,7 @@
2
2
  name: maestro-quick
3
3
  description: Quick task execution, skip optional agents
4
4
  argument-hint: "\"task description\" [--discuss] [--full]"
5
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
6
  ---
7
7
 
8
8
  <purpose>
@@ -158,7 +158,7 @@ Build prev_context from wave 1. Inject strategy + --phases constraint (light mod
158
158
  +-- readiness-report.md
159
159
  ```
160
160
  7. Update state.json milestones + current_milestone
161
- 8. Next-step routing: need analysis -> maestro-analyze; ready to plan -> maestro-plan; UI first -> maestro-ui-design; full mode setup -> maestro-init
161
+ 8. Next-step routing: need analysis -> maestro-analyze; ready to plan -> maestro-plan; UI first -> maestro-ui-craft --chain build; full mode setup -> maestro-init
162
162
 
163
163
  </actions>
164
164
 
@@ -2,7 +2,7 @@
2
2
  name: maestro-tools-execute
3
3
  description: Load and execute tool specs by role or name
4
4
  argument-hint: "[tool-name | --category <category>]"
5
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Agent
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
6
  ---
7
7
 
8
8
  <purpose>
@@ -2,7 +2,7 @@
2
2
  name: maestro-tools-register
3
3
  description: Register tool specs - extract, generate, or optimize reusable process definitions
4
4
  argument-hint: "[description or intent]"
5
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Agent
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
6
  ---
7
7
 
8
8
  <purpose>