$npx -y skills add educlopez/ui-craft --skill sddesignFull spec-driven pipeline — walks brief → tokens → shape (spec) → craft (build) → converge → ship in one guided run. Writes .ui-craft/spec.md. Run when starting a net-new surface from scratch. Invoke when the user asks for sddesign on their UI, or mentions 'sddesign' alongside
| 1 | <!-- HARNESS MIRROR — do not edit here. Canonical source: skills/ or commands/. After editing source, copy into cli/assets/<harness>/ and repo-root harness mirrors. --> |
| 2 | |
| 3 | **Context:** this sub-skill is one lens of the broader `ui-craft` skill. If the `ui-craft` skill is also installed, read its SKILL.md first for Discovery + Anti-Slop + Craft Test, then apply the specific lens below. |
| 4 | |
| 5 | Run the spec-driven design pipeline for the target the user described. Load the `ui-craft` skill. |
| 6 | |
| 7 | --- |
| 8 | |
| 9 | ## ORCHESTRATE-ONLY RULE |
| 10 | |
| 11 | This command **sequences existing phase commands**. It MUST NOT re-implement or duplicate any logic from them. Every composition rule, wireframe algorithm, craft rule, and convergence engine lives in the phase commands. This command contributes only: |
| 12 | |
| 13 | 1. Gate detection (does the artifact exist?) |
| 14 | 2. Offer prompts (run phase X or skip?) |
| 15 | 3. Progress reporting (the checklist) |
| 16 | 4. Degraded-mode honesty (what was skipped and what that costs) |
| 17 | |
| 18 | When in doubt: call the phase command, don't inline its steps. |
| 19 | |
| 20 | --- |
| 21 | |
| 22 | ## Progress Checklist |
| 23 | |
| 24 | Print this at the start and update it after each gate resolves: |
| 25 | |
| 26 | ``` |
| 27 | [ ] brief [ ] tokens [ ] shape (spec) [ ] craft (build) [ ] converge [ ] ship |
| 28 | ``` |
| 29 | |
| 30 | Use `[✓]` for completed/skipped-with-artifact, `[>]` for the current gate, `[–]` for skipped-without-artifact (degraded). |
| 31 | |
| 32 | --- |
| 33 | |
| 34 | ## Pipeline Gates |
| 35 | |
| 36 | ### Gate 1 — Brief |
| 37 | |
| 38 | Check: does `.ui-craft/brief.md` exist? |
| 39 | |
| 40 | **If yes:** mark `[✓] brief`. Note that brief §6 learned constraints and the a11y/correctness floor are in effect for all downstream gates — they take precedence over any spec.md composition choice. |
| 41 | |
| 42 | **If no:** offer to run `/brief` now. |
| 43 | - User confirms → run `/brief`. When it completes, mark `[✓] brief`. |
| 44 | - User declines → mark `[–] brief`. Note downstream impact: "no brief → craft will use skill defaults; composition will not be anchored to project principles." |
| 45 | |
| 46 | ### Gate 2 — Tokens |
| 47 | |
| 48 | Check: does a token spine exist? (Look for CSS variables `--color-*`, `--font-*`, `--accent-*`, a Tailwind `theme.extend` with tokens, or a token file.) |
| 49 | |
| 50 | **If yes:** mark `[✓] tokens`. |
| 51 | |
| 52 | **If no:** offer to run `/tokens` now. |
| 53 | - User confirms → run `/tokens`. When it completes, mark `[✓] tokens`. |
| 54 | - User declines → mark `[–] tokens`. Note downstream impact: "no token spine → craft will establish a minimal inline token set; it won't match an existing system." |
| 55 | |
| 56 | ### Gate 3 — Shape (spec) |
| 57 | |
| 58 | **Existing-surface guard:** Before running `/shape`, check if `.ui-craft/spec.md` already contains a `## Surface: <name>` block for this surface. If it does, do NOT re-run shape and blindly append a duplicate section — offer to update the existing section or skip shape (the spec already exists). |
| 59 | |
| 60 | Run `/shape` for the surface described in the target the user described. Shape produces its full five-step output (content inventory, ASCII layout, state list, open questions). |
| 61 | |
| 62 | **Persist in pipeline (default):** Inside the `/sddesign` pipeline, shape's Step 6 spec persist is the default — it is auto-confirmed unless the user explicitly opts out of the spec gate. The persist writes `.ui-craft/spec.md` (or appends the surface section). This is the whole point of the pipeline. |
| 63 | |
| 64 | - Persist completes → `.ui-craft/spec.md` is written (or the surface section is appended). Mark `[✓] shape (spec)`. |
| 65 | - User explicitly opts out of persist → mark `[–] shape (spec, unsaved)`. Note downstream impact: "no spec.md → craft (build) will build against shape's printed output; acceptance bar will not be persisted." |
| 66 | |
| 67 | ### Gate 4 — Craft (build) |
| 68 | |
| 69 | Run `/craft <surface>` where `<surface>` matches the description in the target the user described. |
| 70 | |
| 71 | `/craft` declares the **Craft Read** (`references/craft-intent.md`) before building — surface kind, audience, theme/accent, DESIGN_VARIANCE, and the one **signature bet**. The signature bet is built inside this gate, not deferred to converge or polish. If the spec section names a composition, the Craft Read must be consistent with it. |
| 72 | |
| 73 | `/craft` loads `.ui-craft/spec.md` before building. If `[✓] shape (spec)` was set, the spec's chosen composition, component inventory, state lattice, and acceptance bar take precedence over recipe defaults — every acceptance bar item from the spec must be green before craft reports done. |
| 74 | |
| 75 | If `[–] shape (spec, unsaved)`, craft builds against the shape output printed to the terminal. Note in the checklist. |
| 76 | |
| 77 | Mark `[✓] craft (build)` when the build completes. |
| 78 | |
| 79 | ### Gate 5 — Converge |
| 80 | |
| 81 | Run the `visual-anti-slop` preset from `../skills/ui-craft/references/loops.md`. This iterates — evaluate → fix one → re-evaluate — until the zero-critical gate passes or the budget is exhausted (defaul |