maestro-flow-one 0.2.6 → 0.2.8

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.
@@ -1,7 +1,7 @@
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: "<command> [target] [--skip-harvest] [-y]"
3
+ description: Production-grade UI design with knowhow accumulation — 24 commands + chain orchestration with quality gates + integrated design search
4
+ argument-hint: "<command|intent> [target] [--chain build|improve|enhance|harden|live] [--enhance <cmd>] [--threshold <score>] [--max-loops <n>] [--skip-harvest] [--skip-design-explore] [--skip-design] [--styles <N>] [--stack <stack>] [-y] [-c]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -9,49 +9,252 @@ allowed-tools:
9
9
  - Bash
10
10
  - Glob
11
11
  - Grep
12
+ - Agent
12
13
  - Skill
13
14
  - AskUserQuestion
15
+ - TodoWrite
14
16
  ---
15
17
  <purpose>
16
- Replaces impeccable as the primary UI design entry point. 23 commands covering the full design lifecycle:
17
- Build (craft, shape, teach, document, extract), Evaluate (critique, audit), Refine (polish, bolder, quieter, distill, harden, onboard),
18
+ Production-grade UI design system with two execution modes:
19
+
20
+ **Direct Mode** — Execute any of 24 sub-commands for the full design lifecycle:
21
+ Build (craft, shape, teach, document, extract, explore), Evaluate (critique, audit), Refine (polish, bolder, quieter, distill, harden, onboard),
18
22
  Enhance (animate, colorize, typeset, layout, delight, overdrive), Fix (clarify, adapt, optimize), Iterate (live).
19
23
 
20
- Core innovation over impeccable: after each command execution, automatically harvests design decisions
21
- into `.workflow/knowhow/` (DCS-, AST-, TIP-, REF-) for cross-session accumulation. Other maestro commands
22
- consume this via `category: coding` auto-injection and keyword matching.
24
+ **Chain Mode** Orchestrate sub-commands via intelligent intent routing + quality gate auto-iteration.
25
+ 5 chains: build, improve, enhance, harden, live. Critique/audit scores drive automatic command selection and iteration loops.
26
+
27
+ Includes integrated design-explore (multi-variant design system generation via BM25 engine, HTML prototype rendering, interactive user review)
28
+ and `search` CLI subcommand for querying UI/UX design knowledge base (BM25 + 30+ CSV data files).
29
+
30
+ After each command, automatically harvests design decisions into `.workflow/knowhow/` (DCS-, AST-, TIP-, REF-) for cross-session accumulation.
31
+
32
+ Session (chain mode): `.workflow/.maestro/ui-craft-{YYYYMMDD-HHmmss}/status.json`
23
33
  </purpose>
24
34
 
25
35
  <deferred_reading>
26
36
  - [impeccable harvest workflow](~/.maestro/workflows/impeccable.md) — read after command execution for harvest logic
37
+ - [design stage workflow](~/.maestro/workflows/impeccable/design.md) — read when S_DESIGN_EXPLORE state entered
38
+ - [sub-command workflow](~/.maestro/workflows/impeccable/{command}.md) — read when dispatching a sub-command
27
39
  </deferred_reading>
28
40
 
29
- <context>
30
- $ARGUMENTS sub-command + target + optional flags.
41
+ <sub_commands>
42
+ All sub-command workflows reside under `~/.maestro/workflows/impeccable/`:
43
+
44
+ | Category | Command | Workflow File |
45
+ |----------|---------|---------------|
46
+ | Build | craft | `workflows/impeccable/craft.md` |
47
+ | Build | shape | `workflows/impeccable/shape.md` |
48
+ | Build | teach | `workflows/impeccable/teach.md` |
49
+ | Build | document | `workflows/impeccable/document.md` |
50
+ | Build | extract | `workflows/impeccable/extract.md` |
51
+ | Build | explore | `workflows/impeccable/explore.md` |
52
+ | Evaluate | critique | `workflows/impeccable/critique.md` |
53
+ | Evaluate | audit | `workflows/impeccable/audit.md` |
54
+ | Refine | polish | `workflows/impeccable/polish.md` |
55
+ | Refine | bolder | `workflows/impeccable/bolder.md` |
56
+ | Refine | quieter | `workflows/impeccable/quieter.md` |
57
+ | Refine | distill | `workflows/impeccable/distill.md` |
58
+ | Refine | harden | `workflows/impeccable/harden.md` |
59
+ | Refine | onboard | `workflows/impeccable/onboard.md` |
60
+ | Enhance | animate | `workflows/impeccable/animate.md` |
61
+ | Enhance | colorize | `workflows/impeccable/colorize.md` |
62
+ | Enhance | typeset | `workflows/impeccable/typeset.md` |
63
+ | Enhance | layout | `workflows/impeccable/layout.md` |
64
+ | Enhance | delight | `workflows/impeccable/delight.md` |
65
+ | Enhance | overdrive | `workflows/impeccable/overdrive.md` |
66
+ | Fix | clarify | `workflows/impeccable/clarify.md` |
67
+ | Fix | adapt | `workflows/impeccable/adapt.md` |
68
+ | Fix | optimize | `workflows/impeccable/optimize.md` |
69
+ | Iterate | live | `workflows/impeccable/live.md` |
31
70
 
32
- **Sub-commands** (23):
71
+ **Reference workflows** (loaded by context, not as sub-commands):
72
+ `brand.md`, `product.md`, `design.md`, `codex.md`, `heuristics-scoring.md`, `cognitive-load.md`,
73
+ `color-and-contrast.md`, `interaction-design.md`, `motion-design.md`, `personas.md`,
74
+ `responsive-design.md`, `spatial-design.md`, `typography.md`, `ux-writing.md`
33
75
 
34
- | Category | Commands |
35
- |----------|----------|
36
- | Build | craft, shape, teach, document, extract |
37
- | Evaluate | critique, audit |
38
- | Refine | polish, bolder, quieter, distill, harden, onboard |
39
- | Enhance | animate, colorize, typeset, layout, delight, overdrive |
40
- | Fix | clarify, adapt, optimize |
41
- | Iterate | live |
76
+ **Search engine**: `workflows/impeccable/ui-search/` BM25 search engine + CSV knowledge files
77
+ </sub_commands>
42
78
 
43
- **Flags:**
79
+ <context>
80
+ $ARGUMENTS — sub-command, intent text, or special keywords, with optional flags.
81
+
82
+ **Keywords:** `continue`/`next` → resume previous chain session
83
+
84
+ **Flags (direct mode):**
44
85
  - `--skip-harvest` — Execute command without knowhow capture
45
86
  - `-y` — Auto-confirm where the skill allows
46
87
 
47
- **Harvest behavior**: After command completion, the harvest workflow extracts design decisions
48
- and writes knowhow entries. DCS-/AST- types also get spec index entries for discoverability.
49
- `live` command is exempt (too ephemeral). Use `--skip-harvest` to suppress.
88
+ **Flags (chain mode):**
89
+ - `--chain <type>` Force chain type: build, improve, enhance, harden, live
90
+ - `--enhance <cmd>` Specific enhance command (animate|colorize|typeset|layout|delight|overdrive|bolder)
91
+ - `--threshold <score>` — Critique pass threshold (default: 26/40). Audit threshold auto-computed as threshold×0.5
92
+ - `--max-loops <n>` — Maximum quality gate iterations (default: 3)
93
+ - `-c` / `--continue` — Resume previous chain session
94
+ - `--skip-design-explore` / `--skip-design` — Skip design-explore and bridge
95
+ - `--styles <N>` — Number of design system variants (2-5, default 3). Build chain only
96
+ - `--stack <stack>` — Tech stack for supplementary guidelines (default: html-tailwind)
50
97
  </context>
51
98
 
99
+ <invariants>
100
+ 1. **Session before chain execution** — status.json created before any chain step runs
101
+ 2. **All chain steps via Skill** — every sub-command dispatched through `Skill({ skill: "maestro-impeccable" })`
102
+ 3. **Gate scores drive loops** — refine loop auto-selects commands from P0/P1 findings, never from hardcoded lists
103
+ 4. **Interactive gates respected** — teach, shape, craft retain their user gates; never suppress
104
+ 5. **Harvest after direct mode** — knowhow capture runs after every direct-mode command (unless --skip-harvest or live)
105
+ </invariants>
106
+
107
+ <chains>
108
+
109
+ ### Chain Definitions
110
+
111
+ | Chain | Sequence | Gate Condition |
112
+ |-------|----------|----------------|
113
+ | **build** | teach? → **design_explore?** → shape → craft → **critique** → [refine loop] → audit → polish | critique ≥ threshold AND P0 == 0 |
114
+ | **improve** | **critique** → [refine loop] → polish → audit | critique ≥ threshold AND P0 == 0 |
115
+ | **enhance** | {cmd} → **critique** → polish (if needed) | critique ≥ threshold |
116
+ | **harden** | harden → **audit** → polish | audit ≥ threshold×0.5 |
117
+ | **live** | live | — (interactive, no gate) |
118
+
119
+ - `teach?` — conditional: only if PRODUCT.md missing/placeholder
120
+ - `design_explore?` — conditional: only if DESIGN.md missing AND `--skip-design-explore` not set. Delegates to explore which handles variant generation, prototype rendering, visual comparison, user selection/mix, AND bridge to DESIGN.md internally
121
+ - `[refine loop]` — quality gate loop: extract suggested commands from critique → execute → re-critique
122
+
123
+ ### Intent → Chain Routing
124
+
125
+ | Intent Pattern | Chain |
126
+ |---------------|-------|
127
+ | 新建, create, build, new, 从零, landing, feature, page | build |
128
+ | 设计, design, 风格, style, 设计系统, design system, 视觉, theme | build |
129
+ | 改进, improve, fix, 优化, iterate, better, 迭代 | improve |
130
+ | 动画, 颜色, 排版, animate, color, type, bold, delight, enhance | enhance |
131
+ | 生产, production, harden, 上线, ship, edge case, i18n | harden |
132
+ | 实时, live, browser, 浏览器, variant | live |
133
+
134
+ Explicit `--chain` overrides routing. Ambiguous + no `-y` → AskUserQuestion.
135
+
136
+ </chains>
137
+
138
+ <state_machine>
139
+
140
+ <states>
141
+ S_PARSE — 解析参数、模式检测、意图分类 PERSIST: —
142
+ S_RESUME — 扫描已有 chain session、恢复执行 PERSIST: —
143
+ S_SETUP — 加载 context、检查 PRODUCT.md PERSIST: —
144
+ S_CREATE — 创建 session + status.json PERSIST: session (全量)
145
+ S_DESIGN_EXPLORE — 委托 explore:多变体生成、原型对比、选型/混搭、自动 bridge 到 DESIGN.md PERSIST: explore_completed, design_md_path
146
+ S_CHAIN — 按序执行 chain 步骤 PERSIST: step progress, executed commands
147
+ S_GATE — 质量门控:解析评分、决策 PERSIST: scores, loop count
148
+ S_REFINE — 执行自动选取的 refine 命令 PERSIST: refine commands, loop state
149
+ S_REPORT — 最终报告 + 趋势 PERSIST: final scores, status
150
+ </states>
151
+
152
+ <transitions>
153
+
154
+ S_PARSE:
155
+ → S_RESUME WHEN: -c / --continue flag OR keyword "continue"/"next"
156
+ → S_SETUP WHEN: chain mode detected (--chain flag or intent classified)
157
+ → S_PARSE WHEN: chain mode, ambiguous AND not -y DO: AskUserQuestion
158
+ → END WHEN: direct mode → execute sub-command directly (see Direct Mode execution)
159
+ → END WHEN: search mode → CLI dispatch
160
+ → END WHEN: direct mode, no arguments → show command menu with categories
161
+ → END WHEN: chain mode, no intent AND no target → E002
162
+
163
+ S_RESUME:
164
+ → S_CHAIN WHEN: session found DO: A_LOCATE_SESSION
165
+ → END WHEN: no session found → E005
166
+
167
+ S_SETUP:
168
+ → S_CREATE DO: A_LOAD_CONTEXT
169
+
170
+ S_CREATE:
171
+ → S_CHAIN DO: A_CREATE_SESSION
172
+
173
+ S_CHAIN:
174
+ → S_DESIGN_EXPLORE WHEN: current step is 'design_explore' AND DESIGN.md missing AND --skip-design-explore not set AND --skip-design not set
175
+ → S_GATE WHEN: current step is gate command (critique/audit)
176
+ → S_CHAIN WHEN: step is design_explore but skip conditions met → advance
177
+ → S_CHAIN WHEN: step is normal command → execute → advance
178
+ → S_REPORT WHEN: all steps complete
179
+
180
+ S_DESIGN_EXPLORE:
181
+ → S_CHAIN WHEN: explore completed (DESIGN.md produced) → advance to shape
182
+ → S_CHAIN WHEN: explore failed → W004 → advance to shape (full interview fallback)
183
+
184
+ S_GATE:
185
+ → S_CHAIN WHEN: PASS (score ≥ threshold AND P0 == 0) → advance to next step
186
+ → S_REFINE WHEN: FAIL (score < threshold OR P0 > 0)
187
+ → S_CHAIN WHEN: max loops exceeded → W002 → force advance
188
+
189
+ S_REFINE:
190
+ → S_GATE DO: execute auto-selected commands → re-run gate command
191
+ GUARD: loop_count < max_loops
192
+
193
+ S_REPORT:
194
+ → END DO: A_FINAL_REPORT
195
+
196
+ </transitions>
197
+
198
+ <actions>
199
+
200
+ ### A_LOCATE_SESSION
201
+
202
+ 1. Scan `.workflow/.maestro/ui-craft-*/status.json`, filter `status == "running"`, sort DESC
203
+ 2. Take most recent; load into context as current session
204
+ 3. Resume from `current_step` position
205
+
206
+ ### A_LOAD_CONTEXT
207
+
208
+ 1. If chain starts with `teach` → execute it first, impeccable handles context loading internally
209
+ 2. Otherwise → trigger context loading (spec load --category ui, with load-context fallback)
210
+ 3. If PRODUCT.md missing/placeholder → prepend teach, execute, then resume
211
+
212
+ ### A_CREATE_SESSION
213
+
214
+ 1. Read `.workflow/state.json` for project context (phase, milestone)
215
+ 2. Create `.workflow/.maestro/ui-craft-{YYYYMMDD-HHmmss}/status.json`:
216
+ ```json
217
+ { "session_id": "ui-craft-{ts}", "source": "maestro-impeccable", "intent": "...",
218
+ "chain_type": "build|improve|enhance|harden|live", "target": "...",
219
+ "auto_mode": false, "threshold": 26, "max_loops": 3,
220
+ "steps": [{ "index": 0, "command": "shape", "status": "pending" }],
221
+ "gate_history": [], "loop_count": 0,
222
+ "current_step": 0, "status": "running",
223
+ "created_at": "ISO-8601", "updated_at": "ISO-8601" }
224
+ ```
225
+ 3. Write status.json before executing any step
226
+
227
+ ### A_DESIGN_EXPLORE
228
+
229
+ 1. Execute: `Skill({ skill: "maestro-impeccable", args: "explore --styles {styles_count}" })`
230
+ 2. explore handles internally: variant generation, prototype rendering, visual comparison, user selection/mix, bridge to DESIGN.md, spec registration
231
+ 3. On completion: verify `.workflow/impeccable/DESIGN.md` exists
232
+ 4. Update status.json: `explore_completed: true`, `design_md_path`
233
+
234
+ ### A_FINAL_REPORT
235
+
236
+ 1. Read critique trend if available
237
+ 2. Update status.json with `status: "completed"` and final scores
238
+ 3. Present summary table with scores, iterations, commands executed
239
+
240
+ </actions>
241
+
242
+ </state_machine>
243
+
52
244
  <execution>
53
245
 
54
- ## 1. Invoke Skill
246
+ ## 1. Mode Detection
247
+
248
+ 1. If first argument is `search` → **Search Mode** (Section 6)
249
+ 2. If first argument matches one of the 24 sub-commands → **Direct Mode** (Section 2)
250
+ 3. If `--chain` flag present → **Chain Mode** (Section 3)
251
+ 4. If `-c` / `--continue` or keyword "continue"/"next" → **Resume** (S_RESUME)
252
+ 5. If intent text (doesn't match a sub-command) → classify intent → **Chain Mode** (Section 3)
253
+ 6. No arguments → show command menu with categories
254
+
255
+ ## 2. Direct Mode
256
+
257
+ ### 2a. Invoke Skill
55
258
 
56
259
  ```
57
260
  Skill({ skill: "maestro-impeccable", args: "$ARGUMENTS" })
@@ -60,7 +263,7 @@ Skill({ skill: "maestro-impeccable", args: "$ARGUMENTS" })
60
263
  The skill handles: context loading (spec load --category ui, with load-context fallback), register detection (brand/product),
61
264
  reference file loading, and command execution.
62
265
 
63
- ## 2. Harvest
266
+ ### 2b. Harvest
64
267
 
65
268
  After the skill completes, read `~/.maestro/workflows/impeccable.md` and follow the harvest workflow.
66
269
 
@@ -69,21 +272,200 @@ Skip harvest if:
69
272
  - Sub-command is `live` (interactive, no harvestable output)
70
273
  - Sub-command is unrecognized
71
274
 
275
+ ### 2c. Post-Execution Routing
276
+
277
+ **Pipeline context detected** (called via Skill from brainstorm, maestro, etc.):
278
+ - Report command result and **stop** — the calling flow owns what happens next
279
+
280
+ **Standalone invocation** (user directly ran `/maestro-impeccable`):
281
+ - Show next-step suggestions based on what was executed:
282
+ - `teach` → suggest `explore` or `shape`
283
+ - `explore` → suggest `shape` → `craft`
284
+ - `shape` → suggest `craft`
285
+ - `craft` → suggest `critique`
286
+ - `critique`/`audit` → suggest commands from findings
287
+ - Enhancement/fix commands → suggest `critique` to re-evaluate
288
+
289
+ ## 3. Chain Mode
290
+
291
+ Follow the state machine (S_PARSE → S_SETUP → S_CREATE → S_CHAIN → S_GATE → S_REFINE → S_REPORT).
292
+
293
+ ### 3a. Parse & Route
294
+
295
+ 1. If `--chain` present → use directly
296
+ 2. Otherwise → match $ARGUMENTS against intent patterns
297
+ 3. If `--enhance` present → chain = enhance, cmd = --enhance value
298
+ 4. For enhance chain without `--enhance` → infer from intent ("动画" → animate, "颜色" → colorize, etc.)
299
+ 5. Ambiguous + no `-y` → ask user to pick chain
300
+
301
+ Create TodoWrite with chain steps.
302
+
303
+ ### 3b. Execute Chain
304
+
305
+ For each step in chain, sequentially:
306
+
307
+ ```
308
+ ▸ Step {n}/{total}: /maestro-impeccable {command} {target}
309
+ ```
310
+
311
+ Execute via: `Skill({ skill: "maestro-impeccable", args: "{command} {target}" })`
312
+
313
+ After each step: update status.json `current_step` and step `status`.
314
+
315
+ **Step-specific logic:**
316
+
317
+ - **design_explore** (build chain only): check DESIGN.md exists → skip if yes; check --skip-design-explore → skip if set; otherwise execute `Skill({ skill: "maestro-impeccable", args: "explore --styles {styles_count}" })`; verify DESIGN.md on completion
318
+ - **teach, shape, craft** are interactive — do NOT suppress their user gates
319
+ - Gate steps (critique/audit) → transition to quality gate logic (Section 4)
320
+
321
+ ## 4. Quality Gate
322
+
323
+ ### 4a. Execute Gate Command
324
+
325
+ ```
326
+ Skill({ skill: "maestro-impeccable", args: "critique {target}" })
327
+ ```
328
+ or
329
+ ```
330
+ Skill({ skill: "maestro-impeccable", args: "audit {target}" })
331
+ ```
332
+
333
+ ### 4b. Parse Score
334
+
335
+ From critique output, extract:
336
+ - **score**: Nielsen's total — from `"**Total** | | **N/40**"` row
337
+ - **P0_count**: count of `[P0]` tagged findings
338
+ - **P1_count**: count of `[P1]` tagged findings
339
+ - **suggested_commands**: list of `/maestro-impeccable <cmd>` from "Suggested command" fields
340
+
341
+ From audit output, extract:
342
+ - **score**: dimension total — from `"**Total** | | **N/20**"` row
343
+ - **P0_count**: count of `[P0]` findings
344
+
345
+ ### 4c. Evaluate
346
+
347
+ ```
348
+ critique_pass = (score >= threshold) AND (P0_count == 0)
349
+ audit_pass = (score >= threshold * 0.5) AND (P0_count == 0)
350
+ ```
351
+
352
+ ### 4d. On PASS → advance to next chain step
353
+
354
+ ### 4e. On FAIL
355
+
356
+ 1. Collect suggested commands from P0/P1 findings
357
+ 2. If no suggestions → use fallback mapping (see quality_gate_routing)
358
+ 3. De-duplicate, cap at 3 commands per iteration
359
+ 4. Sort: P0-suggested first
360
+ 5. Execute each: `Skill({ skill: "maestro-impeccable", args: "{cmd} {target}" })`
361
+ 6. Re-run gate command
362
+ 7. Increment loop_count, append to status.json `gate_history`
363
+
364
+ ### 4f. On Max Loops Exceeded → W002, force advance
365
+
366
+ ## 5. Final Report (chain mode)
367
+
368
+ ```
369
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
370
+ Chain complete: {chain_type}
371
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
372
+
373
+ Critique : {score}/40 (trend: {trend_line})
374
+ Audit : {score}/20
375
+ Loops : {total_iterations}
376
+ Commands : {executed_command_list}
377
+
378
+ Status : {PASS | PARTIAL — N issues remain}
379
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
380
+ ```
381
+
382
+ If issues remain → suggest: "Run `/maestro-impeccable --chain improve {target}` to continue iteration."
383
+
384
+ ## 6. Search CLI
385
+
386
+ Direct CLI dispatch (no Skill, no harvest):
387
+
388
+ ```bash
389
+ maestro impeccable search "<query>" [options]
390
+ ```
391
+
392
+ Options: `-d <domain>`, `-s <stack>`, `-n <max>`, `--design-system`, `-p <name>`, `-f <fmt>`, `--persist`, `--page <page>`, `-o <dir>`
393
+
394
+ Domains: style, color, chart, landing, product, ux, typography, icons, react, web, google-fonts.
395
+ Stacks: react, nextjs, vue, svelte, astro, swiftui, react-native, flutter, html-tailwind, shadcn, + more.
396
+
397
+ Search uses `workflows/impeccable/ui-search/search.py` (BM25 engine + 30+ CSV knowledge files).
398
+
72
399
  </execution>
73
400
 
401
+ <quality_gate_routing>
402
+
403
+ ### Finding → Command Fallback Mapping
404
+
405
+ When critique/audit findings lack explicit "Suggested command", map by category:
406
+
407
+ | Finding Category | Command |
408
+ |-----------------|---------|
409
+ | Visual hierarchy, layout, spacing, alignment | layout |
410
+ | Color, contrast, palette, monochromatic | colorize |
411
+ | Typography, font, readability, hierarchy | typeset |
412
+ | Animation, motion, transitions, micro-interaction | animate |
413
+ | Copy, labels, error messages, UX writing | clarify |
414
+ | Responsive, mobile, breakpoints, touch targets | adapt |
415
+ | Performance, loading, speed, bundle, jank | optimize |
416
+ | Complexity, overload, clutter, cognitive load | distill |
417
+ | Bland, safe, generic, lacks personality | bolder |
418
+ | Aggressive, overwhelming, loud, overstimulating | quieter |
419
+ | Onboarding, empty state, first-run, activation | onboard |
420
+ | Edge cases, i18n, error handling, overflow | harden |
421
+ | Personality, memorability, joy, delight | delight |
422
+
423
+ ### Commands Never Auto-Selected
424
+
425
+ | Command | Reason |
426
+ |---------|--------|
427
+ | teach | Project setup (run in S_SETUP only) |
428
+ | shape | Requires user interview |
429
+ | craft | Full build with multiple gates |
430
+ | live | Interactive browser mode |
431
+ | document | Generates DESIGN.md (setup) |
432
+ | extract | Design system extraction (setup) |
433
+ | overdrive | Requires explicit user vision |
434
+ | critique | Gate command, not a fix |
435
+ | audit | Gate command, not a fix |
436
+
437
+ </quality_gate_routing>
438
+
74
439
  <error_codes>
75
440
  | Code | Severity | Description |
76
441
  |------|----------|-------------|
77
- | E001 | error | Invalid sub-command (not in 23 valid commands) |
442
+ | E001 | error | Invalid sub-command (not in 24 valid commands) or impeccable skill not available |
78
443
  | E002 | error | No intent or target specified |
79
- | W001 | warning | Harvest failed design knowledge not captured (command still succeeded) |
80
- | W002 | warning | PRODUCT.md missing skill will auto-trigger teach |
444
+ | E003 | error | Invalid --chain type |
445
+ | E004 | error | Invalid --enhance command |
446
+ | E005 | error | Resume session not found |
447
+ | E006 | error | Python 3 not available for design system generation |
448
+ | E007 | error | ui-search scripts not found at expected path |
449
+ | W001 | warning | PRODUCT.md missing, prepending teach to chain |
450
+ | W002 | warning | Max quality gate loops exceeded, forcing continue |
451
+ | W003 | warning | Could not parse score from critique/audit output |
452
+ | W004 | warning | Design system generation failed, falling back to shape full interview |
453
+ | W005 | warning | Bridge transformation failed, continuing without DESIGN.md |
454
+ | W006 | warning | Harvest failed — design knowledge not captured (command still succeeded) |
455
+ | W007 | warning | PRODUCT.md missing — skill will auto-trigger teach |
456
+ | W008 | warning | Node.js not available for prototype rendering, falling back to text-only |
81
457
  </error_codes>
82
458
 
83
459
  <success_criteria>
84
- - [ ] Sub-command recognized and routed to maestro-impeccable skill
85
- - [ ] Skill executed with context (spec load --category ui or load-context fallback, register identified)
86
- - [ ] Design changes applied to target files
460
+ - [ ] Mode detected correctly (direct / chain / search / resume)
461
+ - [ ] Sub-command recognized and routed (direct mode)
462
+ - [ ] Intent classified and chain type selected (chain mode)
463
+ - [ ] Context loaded (PRODUCT.md present or taught)
464
+ - [ ] Session dir created with status.json before chain execution
465
+ - [ ] All chain steps executed via Skill("maestro-impeccable", ...)
466
+ - [ ] Quality gate evaluated with parsed scores
467
+ - [ ] Refine loop executed when gate failed (if applicable)
468
+ - [ ] Gate history and scores persisted to status.json
87
469
  - [ ] Knowhow entry created in .workflow/knowhow/ (unless --skip-harvest or live)
88
- - [ ] Spec index entry created for DCS-/AST- types
470
+ - [ ] Progress tracked via TodoWrite throughout (chain mode)
89
471
  </success_criteria>
@@ -31,6 +31,9 @@ Flags (`-m`, `--force`, `--dry-run`, `--no-cleanup`, `--continue`), merge sequen
31
31
  <execution>
32
32
  Follow '~/.maestro/workflows/merge.md' completely.
33
33
 
34
+ **Knowledge inquiry on completion:**
35
+ After successful merge, ask user once: "Record milestone learnings?" If yes, persist via `Skill("spec-add", "learning \"<title>\" \"<insight>\" --keywords <kw1>,<kw2>")`.
36
+
34
37
  **Next-step routing on completion:**
35
38
  - View dashboard → Skill({ skill: "manage-status" })
36
39
  - Audit milestone → Skill({ skill: "maestro-milestone-audit" })
@@ -69,6 +69,10 @@ maestro-plan → maestro-execute → maestro-verify
69
69
  ```
70
70
 
71
71
  **Note (full mode):** `maestro-init` MUST run before `--mode full`. It creates the `.workflow/` directory and project context.
72
+
73
+ ### Pre-load specs
74
+ 1. **Architecture specs**: Run `maestro spec load --category arch` to load architecture constraints. Use as context for phase decomposition — ensures roadmap respects documented decisions and boundaries.
75
+ 2. Optional — proceed without if unavailable.
72
76
  </context>
73
77
 
74
78
  <execution>
@@ -100,7 +104,7 @@ Follow `~/.maestro/workflows/spec-generate.md` completely.
100
104
  |-----------|-----------|
101
105
  | Roadmap approved, need analysis | /maestro-analyze 1 |
102
106
  | Simple project, ready to plan | /maestro-plan 1 |
103
- | Need UI design first | /maestro-ui-design 1 |
107
+ | Need UI design first | /maestro-impeccable --chain build |
104
108
  | View project dashboard | /manage-status |
105
109
  | Need project setup (full mode) | /maestro-init |
106
110
  </execution>
@@ -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}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maestro-flow-one",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "All Maestro workflow commands as a single Claude Code skill — intent routing, decision gates, minimal closed-loop chains",
5
5
  "bin": {
6
6
  "maestro-flow": "bin/maestro-flow.js"