maestro-flow 0.3.46 → 0.3.48
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/.claude/agents/ui-design-agent.md +1 -0
- package/.claude/agents/workflow-executor.md +3 -0
- package/.claude/commands/learn-decompose.md +91 -146
- package/.claude/commands/learn-follow.md +102 -137
- package/.claude/commands/learn-investigate.md +102 -167
- package/.claude/commands/learn-retro.md +100 -243
- package/.claude/commands/learn-second-opinion.md +95 -135
- package/.claude/commands/maestro-amend.md +95 -232
- package/.claude/commands/maestro-analyze.md +1 -6
- package/.claude/commands/maestro-collab.md +104 -265
- package/.claude/commands/maestro-composer.md +113 -293
- package/.claude/commands/maestro-execute.md +10 -17
- package/.claude/commands/maestro-impeccable.md +89 -0
- package/.claude/commands/maestro-plan.md +1 -6
- package/.claude/commands/maestro-player.md +111 -340
- package/.claude/commands/maestro-quick.md +9 -0
- package/.claude/commands/maestro-ralph-execute.md +167 -210
- package/.claude/commands/maestro-ralph.md +245 -426
- package/.claude/commands/maestro-ui-codify.md +13 -0
- package/.claude/commands/maestro-ui-craft.md +364 -0
- package/.claude/commands/maestro-ui-design.md +12 -1
- package/.claude/commands/maestro-verify.md +12 -13
- package/.claude/commands/maestro.md +142 -72
- package/.claude/commands/manage-knowhow-capture.md +45 -170
- package/.claude/commands/quality-auto-test.md +9 -0
- package/.claude/commands/quality-debug.md +11 -25
- package/.claude/commands/quality-refactor.md +9 -0
- package/.claude/commands/quality-review.md +5 -14
- package/.claude/commands/spec-add.md +1 -1
- package/.claude/commands/spec-load.md +3 -2
- package/.claude/skills/maestro-impeccable/SKILL.md +169 -0
- package/.codex/skills/learn-decompose/SKILL.md +1 -1
- package/.codex/skills/learn-investigate/SKILL.md +2 -1
- package/.codex/skills/maestro/SKILL.md +420 -313
- package/.codex/skills/maestro-analyze/SKILL.md +126 -417
- package/.codex/skills/maestro-brainstorm/SKILL.md +129 -451
- package/.codex/skills/maestro-collab/SKILL.md +134 -547
- package/.codex/skills/maestro-execute/SKILL.md +3 -1
- package/.codex/skills/maestro-impeccable/SKILL.md +112 -0
- package/.codex/skills/maestro-plan/SKILL.md +88 -437
- package/.codex/skills/maestro-player/SKILL.md +191 -333
- package/.codex/skills/maestro-quick/SKILL.md +2 -0
- package/.codex/skills/maestro-ralph/SKILL.md +327 -710
- package/.codex/skills/maestro-roadmap/SKILL.md +201 -518
- package/.codex/skills/maestro-ui-codify/SKILL.md +1 -0
- package/.codex/skills/maestro-ui-craft/SKILL.md +341 -0
- package/.codex/skills/maestro-ui-design/SKILL.md +10 -0
- package/.codex/skills/maestro-verify/SKILL.md +116 -409
- package/.codex/skills/quality-auto-test/SKILL.md +145 -443
- package/.codex/skills/quality-refactor/SKILL.md +1 -1
- package/.codex/skills/quality-test/SKILL.md +229 -517
- package/.codex/skills/spec-add/SKILL.md +1 -1
- package/README.md +4 -1
- package/README.zh-CN.md +3 -1
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +3 -0
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/install.js +110 -1
- package/dashboard/dist-server/dashboard/src/server/routes/install.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/settings.js +56 -0
- package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +2 -0
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +2 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +2 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +3 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js +2 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
- package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +1 -3
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/agents/cli-history-store.d.ts +5 -0
- package/dist/src/agents/cli-history-store.d.ts.map +1 -1
- package/dist/src/agents/cli-history-store.js +65 -13
- package/dist/src/agents/cli-history-store.js.map +1 -1
- package/dist/src/cli.js +13 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/command-help.d.ts +3 -0
- package/dist/src/commands/command-help.d.ts.map +1 -0
- package/dist/src/commands/command-help.js +60 -0
- package/dist/src/commands/command-help.js.map +1 -0
- package/dist/src/commands/config.d.ts.map +1 -1
- package/dist/src/commands/config.js +17 -0
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +12 -2
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/impeccable.d.ts +10 -0
- package/dist/src/commands/impeccable.d.ts.map +1 -0
- package/dist/src/commands/impeccable.js +181 -0
- package/dist/src/commands/impeccable.js.map +1 -0
- package/dist/src/commands/spec.js +1 -1
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/commands/wiki.d.ts.map +1 -1
- package/dist/src/commands/wiki.js +5 -1
- package/dist/src/commands/wiki.js.map +1 -1
- package/dist/src/config/cli-tools-config.d.ts.map +1 -1
- package/dist/src/config/cli-tools-config.js +10 -7
- package/dist/src/config/cli-tools-config.js.map +1 -1
- package/dist/src/core/addon-registry.d.ts +31 -0
- package/dist/src/core/addon-registry.d.ts.map +1 -0
- package/dist/src/core/addon-registry.js +28 -0
- package/dist/src/core/addon-registry.js.map +1 -0
- package/dist/src/hooks/plugins/spec-injection-plugin.js +2 -0
- package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
- package/dist/src/hooks/spec-injector.js +2 -2
- package/dist/src/hooks/spec-injector.js.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/tools/impeccable/critique-storage.d.ts +28 -0
- package/dist/src/tools/impeccable/critique-storage.d.ts.map +1 -0
- package/dist/src/tools/impeccable/critique-storage.js +120 -0
- package/dist/src/tools/impeccable/critique-storage.js.map +1 -0
- package/dist/src/tools/impeccable/design-parser.d.ts +90 -0
- package/dist/src/tools/impeccable/design-parser.d.ts.map +1 -0
- package/dist/src/tools/impeccable/design-parser.js +696 -0
- package/dist/src/tools/impeccable/design-parser.js.map +1 -0
- package/dist/src/tools/impeccable/detect-csp.d.ts +6 -0
- package/dist/src/tools/impeccable/detect-csp.d.ts.map +1 -0
- package/dist/src/tools/impeccable/detect-csp.js +130 -0
- package/dist/src/tools/impeccable/detect-csp.js.map +1 -0
- package/dist/src/tools/impeccable/is-generated.d.ts +4 -0
- package/dist/src/tools/impeccable/is-generated.d.ts.map +1 -0
- package/dist/src/tools/impeccable/is-generated.js +56 -0
- package/dist/src/tools/impeccable/is-generated.js.map +1 -0
- package/dist/src/tools/impeccable/live/accept.d.ts +50 -0
- package/dist/src/tools/impeccable/live/accept.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/accept.js +556 -0
- package/dist/src/tools/impeccable/live/accept.js.map +1 -0
- package/dist/src/tools/impeccable/live/bootstrap.d.ts +2 -0
- package/dist/src/tools/impeccable/live/bootstrap.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/bootstrap.js +244 -0
- package/dist/src/tools/impeccable/live/bootstrap.js.map +1 -0
- package/dist/src/tools/impeccable/live/complete.d.ts +7 -0
- package/dist/src/tools/impeccable/live/complete.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/complete.js +67 -0
- package/dist/src/tools/impeccable/live/complete.js.map +1 -0
- package/dist/src/tools/impeccable/live/completion.d.ts +24 -0
- package/dist/src/tools/impeccable/live/completion.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/completion.js +26 -0
- package/dist/src/tools/impeccable/live/completion.js.map +1 -0
- package/dist/src/tools/impeccable/live/inject.d.ts +41 -0
- package/dist/src/tools/impeccable/live/inject.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/inject.js +394 -0
- package/dist/src/tools/impeccable/live/inject.js.map +1 -0
- package/dist/src/tools/impeccable/live/poll.d.ts +24 -0
- package/dist/src/tools/impeccable/live/poll.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/poll.js +180 -0
- package/dist/src/tools/impeccable/live/poll.js.map +1 -0
- package/dist/src/tools/impeccable/live/resume.d.ts +5 -0
- package/dist/src/tools/impeccable/live/resume.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/resume.js +30 -0
- package/dist/src/tools/impeccable/live/resume.js.map +1 -0
- package/dist/src/tools/impeccable/live/server.d.ts +6 -0
- package/dist/src/tools/impeccable/live/server.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/server.js +867 -0
- package/dist/src/tools/impeccable/live/server.js.map +1 -0
- package/dist/src/tools/impeccable/live/session-store.d.ts +72 -0
- package/dist/src/tools/impeccable/live/session-store.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/session-store.js +281 -0
- package/dist/src/tools/impeccable/live/session-store.js.map +1 -0
- package/dist/src/tools/impeccable/live/static/live-browser-session.js +123 -0
- package/dist/src/tools/impeccable/live/static/live-browser.js +4860 -0
- package/dist/src/tools/impeccable/live/static/modern-screenshot.umd.js +14 -0
- package/dist/src/tools/impeccable/live/status.d.ts +2 -0
- package/dist/src/tools/impeccable/live/status.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/status.js +52 -0
- package/dist/src/tools/impeccable/live/status.js.map +1 -0
- package/dist/src/tools/impeccable/live/wrap.d.ts +33 -0
- package/dist/src/tools/impeccable/live/wrap.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/wrap.js +572 -0
- package/dist/src/tools/impeccable/live/wrap.js.map +1 -0
- package/dist/src/tools/impeccable/load-context.d.ts +13 -0
- package/dist/src/tools/impeccable/load-context.d.ts.map +1 -0
- package/dist/src/tools/impeccable/load-context.js +79 -0
- package/dist/src/tools/impeccable/load-context.js.map +1 -0
- package/dist/src/tools/impeccable/paths.d.ts +34 -0
- package/dist/src/tools/impeccable/paths.d.ts.map +1 -0
- package/dist/src/tools/impeccable/paths.js +102 -0
- package/dist/src/tools/impeccable/paths.js.map +1 -0
- package/dist/src/tools/spec-entry-parser.d.ts +1 -1
- package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
- package/dist/src/tools/spec-entry-parser.js +1 -1
- package/dist/src/tools/spec-entry-parser.js.map +1 -1
- package/dist/src/tools/spec-init.d.ts.map +1 -1
- package/dist/src/tools/spec-init.js +26 -1
- package/dist/src/tools/spec-init.js.map +1 -1
- package/dist/src/tools/spec-loader.d.ts +1 -1
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +2 -0
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/package.json +2 -2
- package/workflows/claude-instructions.md +17 -5
- package/workflows/cli-tools-usage.md +10 -3
- package/workflows/delegate-usage.md +3 -2
- package/workflows/impeccable/adapt.md +190 -0
- package/workflows/impeccable/animate.md +175 -0
- package/workflows/impeccable/audit.md +133 -0
- package/workflows/impeccable/bolder.md +113 -0
- package/workflows/impeccable/brand.md +118 -0
- package/workflows/impeccable/clarify.md +174 -0
- package/workflows/impeccable/codex.md +105 -0
- package/workflows/impeccable/cognitive-load.md +106 -0
- package/workflows/impeccable/color-and-contrast.md +105 -0
- package/workflows/impeccable/colorize.md +154 -0
- package/workflows/impeccable/craft.md +123 -0
- package/workflows/impeccable/critique.md +261 -0
- package/workflows/impeccable/delight.md +302 -0
- package/workflows/impeccable/distill.md +111 -0
- package/workflows/impeccable/document.md +439 -0
- package/workflows/impeccable/extract.md +69 -0
- package/workflows/impeccable/harden.md +347 -0
- package/workflows/impeccable/heuristics-scoring.md +234 -0
- package/workflows/impeccable/interaction-design.md +195 -0
- package/workflows/impeccable/layout.md +141 -0
- package/workflows/impeccable/live.md +622 -0
- package/workflows/impeccable/motion-design.md +109 -0
- package/workflows/impeccable/onboard.md +234 -0
- package/workflows/impeccable/optimize.md +258 -0
- package/workflows/impeccable/overdrive.md +130 -0
- package/workflows/impeccable/personas.md +179 -0
- package/workflows/impeccable/polish.md +242 -0
- package/workflows/impeccable/product.md +62 -0
- package/workflows/impeccable/quieter.md +99 -0
- package/workflows/impeccable/responsive-design.md +114 -0
- package/workflows/impeccable/shape.md +165 -0
- package/workflows/impeccable/spatial-design.md +100 -0
- package/workflows/impeccable/teach.md +168 -0
- package/workflows/impeccable/typeset.md +124 -0
- package/workflows/impeccable/typography.md +159 -0
- package/workflows/impeccable/ux-writing.md +107 -0
- package/workflows/impeccable.md +164 -0
- package/workflows/maestro.md +7 -3
- package/workflows/skill-authoring.md +265 -0
- package/workflows/specs-add.md +3 -2
- package/workflows/specs-load.md +2 -1
- package/workflows/specs-setup.md +21 -1
|
@@ -104,6 +104,7 @@ id,wave,title,description,agent_type,deps,status,findings,output_path,error
|
|
|
104
104
|
</csv_schema>
|
|
105
105
|
|
|
106
106
|
<invariants>
|
|
107
|
+
0. **Load UI Specs**: Before extraction, load project UI conventions via `maestro spec load --category ui` (if available). Ensures extracted tokens align with existing conventions.
|
|
107
108
|
1. **Start Immediately**: First action is argument parsing, then validation
|
|
108
109
|
2. **Wave Order is Sacred**: Never execute wave N+1 before wave N completes and results are merged
|
|
109
110
|
3. **CSV is Source of Truth**: Master tasks.csv holds all state
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-ui-craft
|
|
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]"
|
|
5
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent, request_user_input
|
|
6
|
+
---
|
|
7
|
+
<purpose>
|
|
8
|
+
Orchestrate maestro-impeccable skill commands via intelligent intent routing + quality gate auto-iteration.
|
|
9
|
+
Chain: Build → Evaluate → Auto-Refine → Re-evaluate → Verify.
|
|
10
|
+
|
|
11
|
+
Core innovation: critique/audit scores drive automatic command selection and iteration loops.
|
|
12
|
+
maestro-impeccable has 23 commands across 6 categories -- this command chains them into automated pipelines
|
|
13
|
+
with quality gates that loop until design quality meets the threshold.
|
|
14
|
+
|
|
15
|
+
Prerequisite: maestro-impeccable skill available (auto-discovered by harness).
|
|
16
|
+
|
|
17
|
+
Session: `.workflow/.maestro/ui-craft-{YYYYMMDD-HHmmss}/status.json`
|
|
18
|
+
</purpose>
|
|
19
|
+
|
|
20
|
+
<invariants>
|
|
21
|
+
1. **Session before execution** -- status.json created before any chain step runs
|
|
22
|
+
2. **All steps via Skill** -- every impeccable command dispatched through `$maestro-impeccable`
|
|
23
|
+
3. **Gate scores drive loops** -- refine loop auto-selects commands from P0/P1 findings, never from hardcoded lists
|
|
24
|
+
4. **Interactive gates respected** -- teach, shape, craft retain their user gates; never suppress
|
|
25
|
+
</invariants>
|
|
26
|
+
|
|
27
|
+
<context>
|
|
28
|
+
$ARGUMENTS -- intent description or target path, with optional flags.
|
|
29
|
+
|
|
30
|
+
**Keywords:** `continue`/`next` → resume previous session
|
|
31
|
+
|
|
32
|
+
**Usage:**
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
$maestro-ui-craft "create a landing page"
|
|
36
|
+
$maestro-ui-craft "improve the dashboard" --chain improve
|
|
37
|
+
$maestro-ui-craft "add animations" --chain enhance --enhance animate
|
|
38
|
+
$maestro-ui-craft "production ready" --chain harden
|
|
39
|
+
$maestro-ui-craft -c # resume previous session
|
|
40
|
+
$maestro-ui-craft -y "create pricing page --chain build"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Flags:**
|
|
44
|
+
- `--chain <type>` -- Force chain type: build, improve, enhance, harden, live
|
|
45
|
+
- `--enhance <cmd>` -- Specific enhance command (animate|colorize|typeset|layout|delight|overdrive|bolder)
|
|
46
|
+
- `--threshold <score>` -- Critique pass threshold (default: 26/40). Audit threshold auto-computed as threshold*0.5
|
|
47
|
+
- `--max-loops <n>` -- Maximum quality gate iterations (default: 3)
|
|
48
|
+
- `-c` / `--continue` -- Resume previous ui-craft session
|
|
49
|
+
- `-y` -- Auto mode: auto-select at ambiguous routing, skip confirmations where maestro-impeccable allows
|
|
50
|
+
</context>
|
|
51
|
+
|
|
52
|
+
<chains>
|
|
53
|
+
|
|
54
|
+
### Chain Definitions
|
|
55
|
+
|
|
56
|
+
| Chain | Sequence | Gate Condition |
|
|
57
|
+
|-------|----------|----------------|
|
|
58
|
+
| **build** | teach? → shape → craft → **critique** → [refine loop] → audit → polish | critique >= threshold AND P0 == 0 |
|
|
59
|
+
| **improve** | **critique** → [refine loop] → polish → audit | critique >= threshold AND P0 == 0 |
|
|
60
|
+
| **enhance** | {cmd} → **critique** → polish (if needed) | critique >= threshold |
|
|
61
|
+
| **harden** | harden → **audit** → polish | audit >= threshold*0.5 |
|
|
62
|
+
| **live** | live | -- (interactive, no gate) |
|
|
63
|
+
|
|
64
|
+
- `teach?` -- conditional: only if PRODUCT.md missing/placeholder
|
|
65
|
+
- `[refine loop]` -- quality gate loop: extract suggested commands from critique → execute → re-critique
|
|
66
|
+
|
|
67
|
+
### Intent → Chain Routing
|
|
68
|
+
|
|
69
|
+
| Intent Pattern | Chain |
|
|
70
|
+
|---------------|-------|
|
|
71
|
+
| create, build, new, landing, feature, page | build |
|
|
72
|
+
| improve, fix, iterate, better, optimize | improve |
|
|
73
|
+
| animate, color, type, bold, delight, enhance | enhance |
|
|
74
|
+
| production, harden, ship, edge case, i18n | harden |
|
|
75
|
+
| live, browser, variant | live |
|
|
76
|
+
|
|
77
|
+
Explicit `--chain` overrides routing. Ambiguous + no `-y` → `request_user_input`.
|
|
78
|
+
|
|
79
|
+
</chains>
|
|
80
|
+
|
|
81
|
+
<state_machine>
|
|
82
|
+
|
|
83
|
+
<states>
|
|
84
|
+
S_PARSE -- parse args, intent classification, chain selection PERSIST: --
|
|
85
|
+
S_RESUME -- scan existing ui-craft sessions, resume execution PERSIST: --
|
|
86
|
+
S_SETUP -- load context, check PRODUCT.md PERSIST: --
|
|
87
|
+
S_CREATE -- create session + status.json PERSIST: session (full)
|
|
88
|
+
S_CHAIN -- execute chain steps in sequence PERSIST: step progress, executed commands
|
|
89
|
+
S_GATE -- quality gate: parse scores, decide PERSIST: scores, loop count
|
|
90
|
+
S_REFINE -- execute auto-selected refine commands PERSIST: refine commands, loop state
|
|
91
|
+
S_REPORT -- final report + trend PERSIST: final scores, status
|
|
92
|
+
</states>
|
|
93
|
+
|
|
94
|
+
<transitions>
|
|
95
|
+
|
|
96
|
+
S_PARSE:
|
|
97
|
+
→ S_RESUME WHEN: -c / --continue flag OR keyword "continue"/"next"
|
|
98
|
+
→ S_SETUP WHEN: chain selected (explicit or routed)
|
|
99
|
+
→ S_PARSE WHEN: ambiguous AND not -y DO: request_user_input
|
|
100
|
+
→ END WHEN: no intent AND no target → E002
|
|
101
|
+
|
|
102
|
+
S_RESUME:
|
|
103
|
+
→ S_CHAIN WHEN: session found DO: A_LOCATE_SESSION
|
|
104
|
+
→ END WHEN: no session found → E005
|
|
105
|
+
|
|
106
|
+
S_SETUP:
|
|
107
|
+
→ S_CREATE DO: A_LOAD_CONTEXT
|
|
108
|
+
|
|
109
|
+
S_CREATE:
|
|
110
|
+
→ S_CHAIN DO: A_CREATE_SESSION
|
|
111
|
+
|
|
112
|
+
S_CHAIN:
|
|
113
|
+
→ S_GATE WHEN: current step is gate command (critique/audit)
|
|
114
|
+
→ S_CHAIN WHEN: step is normal command → execute → advance
|
|
115
|
+
→ S_REPORT WHEN: all steps complete
|
|
116
|
+
|
|
117
|
+
S_GATE:
|
|
118
|
+
→ S_CHAIN WHEN: PASS (score >= threshold AND P0 == 0) → advance
|
|
119
|
+
→ S_REFINE WHEN: FAIL (score < threshold OR P0 > 0)
|
|
120
|
+
→ S_CHAIN WHEN: max loops exceeded → W002 → force advance
|
|
121
|
+
|
|
122
|
+
S_REFINE:
|
|
123
|
+
→ S_GATE DO: execute auto-selected commands → re-run gate command
|
|
124
|
+
GUARD: loop_count < max_loops
|
|
125
|
+
|
|
126
|
+
S_REPORT:
|
|
127
|
+
→ END DO: A_FINAL_REPORT
|
|
128
|
+
|
|
129
|
+
</transitions>
|
|
130
|
+
|
|
131
|
+
<actions>
|
|
132
|
+
|
|
133
|
+
### A_LOCATE_SESSION
|
|
134
|
+
|
|
135
|
+
1. Scan `.workflow/.maestro/ui-craft-*/status.json`, filter `status == "running"`, sort DESC
|
|
136
|
+
2. Take most recent; load into context as current session
|
|
137
|
+
3. Resume from `current_step` position
|
|
138
|
+
|
|
139
|
+
### A_LOAD_CONTEXT
|
|
140
|
+
|
|
141
|
+
1. Trigger impeccable context loading: `$maestro-impeccable teach`
|
|
142
|
+
- Impeccable's own setup auto-discovers and loads PRODUCT.md / DESIGN.md from `.workflow/impeccable/`
|
|
143
|
+
- If PRODUCT.md missing/placeholder, impeccable teach handles the interview
|
|
144
|
+
2. If teach was not in the chain but PRODUCT.md is missing:
|
|
145
|
+
- Prepend `teach` to chain start
|
|
146
|
+
- Announce: W001
|
|
147
|
+
3. Context is now loaded for subsequent commands
|
|
148
|
+
|
|
149
|
+
### A_CREATE_SESSION
|
|
150
|
+
|
|
151
|
+
1. Read `.workflow/state.json` for project context (phase, milestone)
|
|
152
|
+
2. Create `.workflow/.maestro/ui-craft-{YYYYMMDD-HHmmss}/status.json`:
|
|
153
|
+
```json
|
|
154
|
+
{ "session_id": "ui-craft-{ts}", "source": "ui-craft", "intent": "...",
|
|
155
|
+
"chain_type": "build|improve|enhance|harden|live", "target": "...",
|
|
156
|
+
"auto_mode": false, "threshold": 26, "max_loops": 3,
|
|
157
|
+
"steps": [{ "index": 0, "command": "shape", "status": "pending" }],
|
|
158
|
+
"gate_history": [], "loop_count": 0,
|
|
159
|
+
"current_step": 0, "status": "running",
|
|
160
|
+
"created_at": "ISO-8601", "updated_at": "ISO-8601" }
|
|
161
|
+
```
|
|
162
|
+
3. Write status.json before executing any step
|
|
163
|
+
|
|
164
|
+
### A_FINAL_REPORT
|
|
165
|
+
|
|
166
|
+
1. Read critique trend if available (impeccable's critique persists snapshots automatically)
|
|
167
|
+
2. Update status.json with `status: "completed"` and final scores
|
|
168
|
+
3. Present summary table with scores, iterations, commands executed
|
|
169
|
+
|
|
170
|
+
</actions>
|
|
171
|
+
|
|
172
|
+
</state_machine>
|
|
173
|
+
|
|
174
|
+
<execution>
|
|
175
|
+
|
|
176
|
+
## 1. Parse & Route
|
|
177
|
+
|
|
178
|
+
1. If `-c` / `--continue` or keyword "continue"/"next" → S_RESUME
|
|
179
|
+
2. If `--chain` present → use directly
|
|
180
|
+
3. Otherwise → match $ARGUMENTS against intent patterns
|
|
181
|
+
4. If `--enhance` present → chain = enhance, cmd = --enhance value
|
|
182
|
+
5. For enhance chain without `--enhance` → infer from intent
|
|
183
|
+
6. Ambiguous + no `-y` → `request_user_input`:
|
|
184
|
+
```json
|
|
185
|
+
{ "questions": [{ "id": "chain_select", "header": "Chain", "question": "Which workflow?", "options": [
|
|
186
|
+
{ "label": "Build (Recommended)", "description": "New UI from scratch: shape → craft → critique → refine → audit" },
|
|
187
|
+
{ "label": "Improve", "description": "Iterate existing: critique → refine → polish → audit" },
|
|
188
|
+
{ "label": "Enhance", "description": "Targeted improvement: specific command → critique → polish" },
|
|
189
|
+
{ "label": "Harden", "description": "Production-ready: harden → audit → polish" }
|
|
190
|
+
]}] }
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## 2. Setup Context
|
|
194
|
+
|
|
195
|
+
1. If chain starts with `teach` → execute it first, maestro-impeccable handles context loading internally
|
|
196
|
+
2. Otherwise → invoke `$maestro-impeccable` with no args to trigger setup (context + register)
|
|
197
|
+
3. If maestro-impeccable reports PRODUCT.md missing → prepend teach, execute, then resume
|
|
198
|
+
|
|
199
|
+
## 3. Create Session
|
|
200
|
+
|
|
201
|
+
Write `.workflow/.maestro/ui-craft-{ts}/status.json` with chain steps before any execution.
|
|
202
|
+
|
|
203
|
+
## 4. Execute Chain
|
|
204
|
+
|
|
205
|
+
For each step in chain, sequentially:
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
Step {n}/{total}: $maestro-impeccable {command} {target}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
After each step: update status.json `current_step` and step `status`.
|
|
212
|
+
|
|
213
|
+
**Rules:**
|
|
214
|
+
- `teach`, `shape`, `craft` are interactive -- do NOT suppress their user gates
|
|
215
|
+
- After `teach` completes → re-run context loader for fresh PRODUCT.md
|
|
216
|
+
- After `craft` completes → the build exists, ready for evaluation
|
|
217
|
+
- Gate steps (critique/audit) → transition to quality gate logic
|
|
218
|
+
|
|
219
|
+
## 5. Quality Gate
|
|
220
|
+
|
|
221
|
+
When chain reaches a gate step (critique or audit):
|
|
222
|
+
|
|
223
|
+
### 5a. Execute Gate Command
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
$maestro-impeccable critique {target}
|
|
227
|
+
```
|
|
228
|
+
or
|
|
229
|
+
```
|
|
230
|
+
$maestro-impeccable audit {target}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### 5b. Parse Score
|
|
234
|
+
|
|
235
|
+
From critique output, extract:
|
|
236
|
+
- **score**: Nielsen's total (N/40) -- from "**Total** | | **N/40**" row
|
|
237
|
+
- **P0_count**: count of `[P0]` tagged findings
|
|
238
|
+
- **P1_count**: count of `[P1]` tagged findings
|
|
239
|
+
- **suggested_commands**: list of "$maestro-impeccable <cmd>" from "Suggested command" fields
|
|
240
|
+
|
|
241
|
+
From audit output, extract:
|
|
242
|
+
- **score**: dimension total (N/20) -- from "**Total** | | **N/20**" row
|
|
243
|
+
- **P0_count**: count of `[P0]` findings
|
|
244
|
+
|
|
245
|
+
### 5c. Evaluate
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
critique_pass = (score >= threshold) AND (P0_count == 0)
|
|
249
|
+
audit_pass = (score >= threshold * 0.5) AND (P0_count == 0)
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### 5d. On PASS
|
|
253
|
+
|
|
254
|
+
→ advance to next chain step
|
|
255
|
+
|
|
256
|
+
### 5e. On FAIL
|
|
257
|
+
|
|
258
|
+
1. Collect suggested commands from P0/P1 findings
|
|
259
|
+
2. If no suggestions found → use fallback mapping (see quality_gate_routing)
|
|
260
|
+
3. De-duplicate, cap at 3 commands per iteration
|
|
261
|
+
4. Sort: P0-suggested first
|
|
262
|
+
5. Execute each: `$maestro-impeccable {cmd} {target}`
|
|
263
|
+
6. Re-run gate command (critique/audit)
|
|
264
|
+
7. Increment loop_count
|
|
265
|
+
8. Append to status.json `gate_history`
|
|
266
|
+
|
|
267
|
+
### 5f. On Max Loops Exceeded
|
|
268
|
+
|
|
269
|
+
→ force advance to next chain step with warning
|
|
270
|
+
|
|
271
|
+
## 6. Final Report
|
|
272
|
+
|
|
273
|
+
Present summary: chain type, critique score with trend, audit score, loop count, commands executed, pass/partial status.
|
|
274
|
+
|
|
275
|
+
Update status.json: `status: "completed"`, `final_scores`, `completed_at`.
|
|
276
|
+
|
|
277
|
+
If issues remain → suggest: "Run `$maestro-ui-craft --chain improve {target}` to continue iteration."
|
|
278
|
+
|
|
279
|
+
</execution>
|
|
280
|
+
|
|
281
|
+
<quality_gate_routing>
|
|
282
|
+
|
|
283
|
+
### Finding → Command Fallback Mapping
|
|
284
|
+
|
|
285
|
+
When critique/audit findings lack explicit "Suggested command", map by category:
|
|
286
|
+
|
|
287
|
+
| Finding Category | Command |
|
|
288
|
+
|-----------------|---------|
|
|
289
|
+
| Visual hierarchy, layout, spacing, alignment | layout |
|
|
290
|
+
| Color, contrast, palette, monochromatic | colorize |
|
|
291
|
+
| Typography, font, readability, hierarchy | typeset |
|
|
292
|
+
| Animation, motion, transitions, micro-interaction | animate |
|
|
293
|
+
| Copy, labels, error messages, UX writing | clarify |
|
|
294
|
+
| Responsive, mobile, breakpoints, touch targets | adapt |
|
|
295
|
+
| Performance, loading, speed, bundle, jank | optimize |
|
|
296
|
+
| Complexity, overload, clutter, cognitive load | distill |
|
|
297
|
+
| Bland, safe, generic, lacks personality | bolder |
|
|
298
|
+
| Aggressive, overwhelming, loud, overstimulating | quieter |
|
|
299
|
+
| Onboarding, empty state, first-run, activation | onboard |
|
|
300
|
+
| Edge cases, i18n, error handling, overflow | harden |
|
|
301
|
+
| Personality, memorability, joy, delight | delight |
|
|
302
|
+
|
|
303
|
+
### Commands Never Auto-Selected
|
|
304
|
+
|
|
305
|
+
| Command | Reason |
|
|
306
|
+
|---------|--------|
|
|
307
|
+
| teach | Project setup (run in S_SETUP only) |
|
|
308
|
+
| shape | Requires user interview |
|
|
309
|
+
| craft | Full build with multiple gates |
|
|
310
|
+
| live | Interactive browser mode |
|
|
311
|
+
| document | Generates DESIGN.md (setup) |
|
|
312
|
+
| extract | Design system extraction (setup) |
|
|
313
|
+
| overdrive | Requires explicit user vision |
|
|
314
|
+
| critique | Gate command, not a fix |
|
|
315
|
+
| audit | Gate command, not a fix |
|
|
316
|
+
|
|
317
|
+
</quality_gate_routing>
|
|
318
|
+
|
|
319
|
+
<error_codes>
|
|
320
|
+
| Code | Severity | Description |
|
|
321
|
+
|------|----------|-------------|
|
|
322
|
+
| E001 | error | maestro-impeccable skill not found |
|
|
323
|
+
| E002 | error | No intent or target specified |
|
|
324
|
+
| E003 | error | Invalid --chain type |
|
|
325
|
+
| E004 | error | Invalid --enhance command |
|
|
326
|
+
| E005 | error | Resume session not found |
|
|
327
|
+
| W001 | warning | PRODUCT.md missing, prepending teach to chain |
|
|
328
|
+
| W002 | warning | Max quality gate loops exceeded, forcing continue |
|
|
329
|
+
| W003 | warning | Could not parse score from critique/audit output |
|
|
330
|
+
</error_codes>
|
|
331
|
+
|
|
332
|
+
<success_criteria>
|
|
333
|
+
- [ ] Intent classified and chain type selected
|
|
334
|
+
- [ ] Context loaded (PRODUCT.md present or taught)
|
|
335
|
+
- [ ] Session dir created with status.json before execution
|
|
336
|
+
- [ ] All chain steps executed via $maestro-impeccable
|
|
337
|
+
- [ ] Quality gate evaluated with parsed scores
|
|
338
|
+
- [ ] Refine loop executed when gate failed (if applicable)
|
|
339
|
+
- [ ] Gate history and scores persisted to status.json
|
|
340
|
+
- [ ] Final report with scores and trend presented
|
|
341
|
+
</success_criteria>
|
|
@@ -60,6 +60,16 @@ When `--yes` or `-y`: Skip interactive selection, auto-pick top-scored variant,
|
|
|
60
60
|
|
|
61
61
|
<execution>
|
|
62
62
|
|
|
63
|
+
### Step 0: Load UI Specs
|
|
64
|
+
|
|
65
|
+
Load project UI conventions before generating designs:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
maestro spec load --category ui
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
If specs not initialized, continue without — the workflow still produces valid output.
|
|
72
|
+
|
|
63
73
|
### Step 1: Parse Input and Resolve Target
|
|
64
74
|
|
|
65
75
|
1. Parse flags from `$ARGUMENTS`: `--styles N`, `--stack`, `--targets`, `--persist`, `--full`, `-y`
|