baldart 5.1.0 → 5.2.0
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/CHANGELOG.md +77 -0
- package/README.md +3 -3
- package/VERSION +1 -1
- package/framework/.claude/agents/CHANGELOG.md +45 -0
- package/framework/.claude/agents/REGISTRY.md +2 -2
- package/framework/.claude/agents/coder.md +3 -3
- package/framework/.claude/agents/remotion-animator-orchestrator.md +4 -3
- package/framework/.claude/agents/ui-expert.md +4 -10
- package/framework/.claude/agents/ui-quality-critic.md +27 -11
- package/framework/.claude/skills/design-system-init/CHANGELOG.md +5 -0
- package/framework/.claude/skills/design-system-init/SKILL.md +2 -2
- package/framework/.claude/skills/e2e-review/CHANGELOG.md +5 -0
- package/framework/.claude/skills/e2e-review/SKILL.md +2 -2
- package/framework/.claude/skills/frontend-design/CHANGELOG.md +20 -0
- package/framework/.claude/skills/frontend-design/SKILL.md +39 -216
- package/framework/.claude/skills/gamification-design/CHANGELOG.md +5 -0
- package/framework/.claude/skills/gamification-design/SKILL.md +2 -2
- package/framework/.claude/skills/ui-design/CHANGELOG.md +60 -1
- package/framework/.claude/skills/ui-design/SKILL.md +127 -75
- package/framework/.claude/skills/ui-design/references/anti-slop.md +106 -0
- package/framework/.claude/skills/ui-design/references/craft-standards.md +259 -0
- package/framework/.claude/skills/ui-design/references/design-brief.md +92 -0
- package/framework/.claude/skills/ui-design/references/design-directions.md +188 -0
- package/framework/.claude/skills/ui-design/references/evaluation.md +125 -165
- package/framework/.claude/skills/ui-design/references/generation.md +125 -92
- package/framework/.claude/skills/ui-design/references/inventory.md +9 -2
- package/framework/.claude/skills/ui-design/scripts/craft-check.mjs +248 -0
- package/framework/agents/component-manifest-schema.md +1 -1
- package/framework/agents/design-system-protocol.md +6 -6
- package/framework/agents/index.md +1 -0
- package/framework/agents/skills-mapping.md +25 -23
- package/framework/docs/PROJECT-CONFIGURATION.md +5 -5
- package/package.json +1 -1
- package/src/commands/configure.js +1 -1
- package/src/utils/__tests__/classify-divergence.test.js +42 -0
- package/src/utils/git.js +45 -9
|
@@ -1,20 +1,39 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ui-design
|
|
3
3
|
effort: medium
|
|
4
|
-
version:
|
|
5
|
-
description: "
|
|
4
|
+
version: 2.0.0
|
|
5
|
+
description: "The local design studio — THE framework skill for designing, prototyping and restyling UI directly in the repo (the internal twin of the Claude Design handoff). Produces context-aware, token-compliant HTML mockups in 3 distinct directions, with a locked Design Read, a deterministic anti-slop craft gate and separated generator/evaluator verification. Use when: (1) designing new pages, screens or components, (2) the /prd skill reaches its UI design phase (Step 3), (3) redesigning/restyling existing pages ('rifai la UI', 'migliora il design', 'restyle'), (4) exploring design options ('3 opzioni', 'opzioni di design', 'direzioni estetiche'), (5) prototyping a page/landing/dashboard locally ('prototipo', 'mockup', 'progetta interfaccia', 'design UI'). SUPERSEDES frontend-design (now a router) and ui-ux-pro-max for ALL design/prototyping work. Not for: implementing an already-approved mockup (→ /ui-implement), in-code UI fixes with no design decision (→ ui-expert agent), motion specs (→ /motion-design)."
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# UI Design Skill
|
|
9
|
-
|
|
10
|
-
Design workflow that produces context-aware mockup options
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
# UI Design Skill — the local design studio
|
|
9
|
+
|
|
10
|
+
Design workflow that produces context-aware mockup options in genuinely
|
|
11
|
+
distinct directions, verifies them through a deterministic craft gate plus
|
|
12
|
+
two independent evaluation lenses, and delivers an approved design with a
|
|
13
|
+
structured UI Element Inventory — entirely locally, when the Claude Design
|
|
14
|
+
handoff channel is not the right fit.
|
|
15
|
+
|
|
16
|
+
**Architecture principle:** the generator never evaluates its own output.
|
|
17
|
+
Quality is judged by a *different agent definition* (`ui-quality-critic`),
|
|
18
|
+
conformance by a fresh-context `ui-expert` instance, and the mechanical
|
|
19
|
+
anti-slop subset by a script no model can rationalize past.
|
|
20
|
+
[DESIGN-CHOICE: same-definition self-review has weak diversity even with
|
|
21
|
+
fresh context — the critic brings a different rubric-calibrated lens, and
|
|
22
|
+
the deterministic gate costs zero tokens.]
|
|
23
|
+
|
|
24
|
+
The design intelligence lives in this skill's references — read them at the
|
|
25
|
+
step that needs them, not all upfront:
|
|
26
|
+
|
|
27
|
+
| Reference | What it holds | Read at |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| [design-brief.md](references/design-brief.md) | Register, regime, dials, Design Read protocol | Step C.0 |
|
|
30
|
+
| [design-directions.md](references/design-directions.md) | Aesthetic direction menu, font/palette pools, reflex-reject lists | Step C.0 (exploration) |
|
|
31
|
+
| [craft-standards.md](references/craft-standards.md) | Always-on craft rules (typography, color, layout, states, motion, forms, CWV, modern CSS) | Step C.1 + D |
|
|
32
|
+
| [anti-slop.md](references/anti-slop.md) | The Tells catalog — bans, rationed patterns, copy tells | Step C.1 + D |
|
|
33
|
+
| [component-discovery.md](references/component-discovery.md) | Reuse-first cascade | Step A |
|
|
34
|
+
| [generation.md](references/generation.md) | Prototype engine rules | Step C.1 |
|
|
35
|
+
| [evaluation.md](references/evaluation.md) | Gate 0 + dual-lens pipeline, verdict, degraded mode | Step D |
|
|
36
|
+
| [inventory.md](references/inventory.md) | Sprint-contract inventory | Step G |
|
|
18
37
|
|
|
19
38
|
## Project Context
|
|
20
39
|
|
|
@@ -25,8 +44,8 @@ own mockups — separating generation from scoring keeps the quality gate honest
|
|
|
25
44
|
`stack.charting.canonical`, `stack.charting.forbidden`, `stack.charting.wrappers_root`.
|
|
26
45
|
|
|
27
46
|
**Gated by features:**
|
|
28
|
-
`features.has_design_system` (when `true`, design-system reads are BLOCKING; when `false`, skip step 1 of Prerequisites and rely on `paths.ui_guidelines` alone).
|
|
29
|
-
`features.has_i18n` (when `true`,
|
|
47
|
+
`features.has_design_system` (when `true`, design-system reads are BLOCKING and the run defaults to in-context regime; when `false`, skip step 1 of Prerequisites and rely on `paths.ui_guidelines` alone).
|
|
48
|
+
`features.has_i18n` (when `true`, mockup copy is realistic **placeholder, not final** — see `references/generation.md` § Content discipline; ref `framework/agents/i18n-protocol.md`).
|
|
30
49
|
|
|
31
50
|
**Overlay:** loads `.baldart/overlays/ui-design.md` if present — extends base by default; sections marked `## [OVERRIDE] <topic>` replace base sections. See `framework/agents/project-context.md` § 5.
|
|
32
51
|
|
|
@@ -40,6 +59,19 @@ reasoning depth for this run — detect it once at kickoff and strip the token
|
|
|
40
59
|
before consuming user input. Level→behavior mapping, parsing contract, and
|
|
41
60
|
precedence caveats: `framework/agents/effort-protocol.md`.
|
|
42
61
|
|
|
62
|
+
## Runtime portability (Claude ↔ Codex)
|
|
63
|
+
|
|
64
|
+
Abstract operations bind per
|
|
65
|
+
[`framework/agents/runtime-portability-protocol.md`](../../../agents/runtime-portability-protocol.md):
|
|
66
|
+
agent spawns (`ui-expert` generator, `ui-quality-critic` lens, fresh
|
|
67
|
+
`ui-expert` evaluator) use the Task tool on Claude and named-agent spawn from
|
|
68
|
+
`.codex/agents/<name>.toml` on Codex; decision gates (`AskUserQuestion` on
|
|
69
|
+
Claude) become plain prompts on Codex; no silent fallback if a named agent is
|
|
70
|
+
missing. **Codex-specific**: `scripts/craft-check.mjs` runs identically (zero
|
|
71
|
+
deps); on a non-multimodal session the visual lenses degrade to source-level
|
|
72
|
+
review with a mandatory `⚠️ DEGRADED` banner — see
|
|
73
|
+
[evaluation.md](references/evaluation.md) § Degraded mode. Never silently
|
|
74
|
+
skip evaluation.
|
|
43
75
|
|
|
44
76
|
## Working Directory (MANDATORY when invoked from `/prd`, since v3.22.0)
|
|
45
77
|
|
|
@@ -50,7 +82,7 @@ artefacts produced by this skill — most notably the `design.html` saved in
|
|
|
50
82
|
Step G — MUST be written inside that directory, NOT into the consumer's main
|
|
51
83
|
checkout. Without this, the design lands on the main repo, the `/prd` Step 7
|
|
52
84
|
stage list at `$WORKTREE_PATH/${paths.prd_dir}/<slug>/design.html` finds
|
|
53
|
-
nothing, and the PRD merged into
|
|
85
|
+
nothing, and the PRD merged into trunk ships without its design asset.
|
|
54
86
|
|
|
55
87
|
**Rule:** every `${paths.prd_dir}/...` reference in this document — including
|
|
56
88
|
Step G's "Copy approved HTML to `${paths.prd_dir}/<slug>/design.html`" — is
|
|
@@ -80,9 +112,8 @@ These reads are BLOCKING. Resolve paths from `baldart.config.yml` before opening
|
|
|
80
112
|
- Propose only libraries in `stack.charting.canonical`. Refuse libraries listed in `stack.charting.forbidden`.
|
|
81
113
|
- If `stack.charting.wrappers_root` is set, propose those project wrappers over raw library usage.
|
|
82
114
|
- If both lists are empty, ask the user which charting library to use before proposing one.
|
|
83
|
-
6. **MUST**
|
|
84
|
-
7.
|
|
85
|
-
8. If brand inputs are missing (e.g. logo, accent palette), ask — never invent.
|
|
115
|
+
6. **MUST** identify the audience segment for the work, using `identity.audience_segments` as the menu of valid choices. If segments are empty, treat the work as undifferentiated.
|
|
116
|
+
7. If brand inputs are missing (e.g. logo, accent palette), ask — never invent.
|
|
86
117
|
|
|
87
118
|
## Design System Alignment
|
|
88
119
|
|
|
@@ -94,6 +125,7 @@ These reads are BLOCKING. Resolve paths from `baldart.config.yml` before opening
|
|
|
94
125
|
- `${paths.design_system}/patterns/*.md` — pattern docs (e.g. theming, overlays, motion)
|
|
95
126
|
- NEVER hardcode hex colors, shadow tuples, or border-width values when the project has a token contract. Use the tokens listed in the contract.
|
|
96
127
|
- If the project uses multi-tenant theming (`features.multi_tenant_theming: true`), themed-surface text/bg pairing is mandatory per the project's theming pattern doc — consult `.baldart/overlays/ui-design.md` for the exact pairing rule.
|
|
128
|
+
- **Precedence on conflict**: project tokens + overlay > `${paths.ui_guidelines}` > the skill's craft-standards defaults (`references/craft-standards.md` § Precedence).
|
|
97
129
|
|
|
98
130
|
---
|
|
99
131
|
|
|
@@ -111,10 +143,10 @@ Run the full cascade: design-system INDEX → project search (`${paths.component
|
|
|
111
143
|
|
|
112
144
|
### Step B — Context Capture
|
|
113
145
|
|
|
114
|
-
Read [references/generation.md](references/generation.md) §
|
|
146
|
+
Read [references/generation.md](references/generation.md) § Prerequisites.
|
|
115
147
|
|
|
116
148
|
1. Identify 1-3 pages where the feature will live.
|
|
117
|
-
2. Capture screenshots via Playwright. Save to `/tmp/prd-design-<slug>/context/`.
|
|
149
|
+
2. Capture screenshots via the Playwright CLI (headless). Save to `/tmp/prd-design-<slug>/context/`.
|
|
118
150
|
**Render-harness preference (closed-loop Stage C):** for **component-level**
|
|
119
151
|
scope (designing/redesigning a primitive, not a whole page), prefer the isolated
|
|
120
152
|
render harness over full-page Playwright — `baldart render build && /ds-render`
|
|
@@ -124,47 +156,57 @@ Read [references/generation.md](references/generation.md) § Context Capture.
|
|
|
124
156
|
|
|
125
157
|
### Step C — Generate 3 Options (GENERATOR)
|
|
126
158
|
|
|
127
|
-
Read
|
|
159
|
+
#### C.0 — Design Read & Direction Lock (MANDATORY, before any HTML)
|
|
160
|
+
|
|
161
|
+
Read [references/design-brief.md](references/design-brief.md). Classify the
|
|
162
|
+
**register** (brand vs product) and the **regime** (in-context vs
|
|
163
|
+
exploration), set the three dials, run the two-altitude slop test on your own
|
|
164
|
+
read, and emit the **Design Read** block — one locked line + per-option
|
|
165
|
+
direction assignments + color commitment + dark/light scene sentence +
|
|
166
|
+
anti-references. In exploration regime pick directions from
|
|
167
|
+
[references/design-directions.md](references/design-directions.md) (rotation
|
|
168
|
+
rule applies). Ambiguity → exactly ONE question to the user; when invoked
|
|
169
|
+
from `/prd`, discovery answers already resolve the read — do not re-ask.
|
|
128
170
|
|
|
129
|
-
|
|
130
|
-
framework. If it is installed, invoke it before generating any HTML — it provides the HTML prototype
|
|
131
|
-
engine (React+Babel or vanilla+Tailwind CDN, Tweaks panel, App Prototype shell with AppPhone state
|
|
132
|
-
manager, Playwright click validation, animated output); follow its rules for the prototype type in
|
|
133
|
-
scope. If it is NOT installed, proceed without it: emit a one-line notice ("huashu-design not
|
|
134
|
-
installed — generating HTML mockups directly") and have `ui-expert` produce the HTML mockups using
|
|
135
|
-
the generation rules in `references/generation.md` plus a Tailwind CDN scaffold. Never block the
|
|
136
|
-
design run on huashu-design's absence.
|
|
171
|
+
Persist the Design Read in the state file (`## UI Design` → `design_read`).
|
|
137
172
|
|
|
138
|
-
|
|
173
|
+
#### C.1 — Generate
|
|
139
174
|
|
|
140
|
-
|
|
175
|
+
Read [references/generation.md](references/generation.md) (binding:
|
|
176
|
+
[craft-standards.md](references/craft-standards.md) +
|
|
177
|
+
[anti-slop.md](references/anti-slop.md)).
|
|
178
|
+
|
|
179
|
+
**Filesystem rule (ABSOLUTE):** every HTML file MUST be written to disk with the `Write` tool at `/tmp/prd-design-<slug>/option-<x>.html` BEFORE opening in a browser. Outputting inline code blocks is not sufficient.
|
|
180
|
+
|
|
181
|
+
Invoke the `ui-expert` agent (spawn per runtime-portability) with:
|
|
141
182
|
- Feature description and discovery answers
|
|
183
|
+
- The C.0 Design Read block + per-option assignments
|
|
142
184
|
- Context screenshots (Read the image files)
|
|
143
|
-
- Codebase-architect findings
|
|
144
|
-
-
|
|
145
|
-
-
|
|
146
|
-
- `huashu-design` prototype rules loaded above (only if the skill is installed; otherwise omit)
|
|
147
|
-
- `identity.design_philosophy` and `identity.language` to drive aesthetic and copy register
|
|
148
|
-
|
|
149
|
-
Output: 3 HTML files written to `/tmp/prd-design-<slug>/` via `Write` tool.
|
|
185
|
+
- Codebase-architect findings + the Step A reuse list
|
|
186
|
+
- The generation rules + craft-standards + anti-slop references (by path — the agent Reads them)
|
|
187
|
+
- `identity.design_philosophy` and `identity.language`
|
|
150
188
|
|
|
151
|
-
|
|
189
|
+
Output: 3 self-contained, token-first, `data-region`-annotated HTML files in
|
|
190
|
+
`/tmp/prd-design-<slug>/`. The generator runs the craft-check self-gate
|
|
191
|
+
before handing off (`references/generation.md` § Generator self-check).
|
|
152
192
|
|
|
153
|
-
|
|
193
|
+
### Step D — Evaluate (deterministic gate + two independent lenses)
|
|
154
194
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
criteria (visual hierarchy, information density, mobile-first layout) — a code-quality reviewer would
|
|
158
|
-
apply a code-correctness lens and miss the design criteria entirely. The GAN separation is preserved
|
|
159
|
-
by using a distinct instance with no memory of the generation pass.
|
|
160
|
-
- Pass the 3 HTML files
|
|
161
|
-
- Pass the context screenshots as reference
|
|
162
|
-
- Pass the evaluation rubric from [references/evaluation.md](references/evaluation.md) (7 criteria, scoring 1-5, hard thresholds) — the evaluator must read that reference, it does not know the rubric natively
|
|
163
|
-
- Request: produce evaluation report at `/tmp/prd-design-<slug>/evaluation-report.md`
|
|
195
|
+
Read [references/evaluation.md](references/evaluation.md) and follow its
|
|
196
|
+
pipeline exactly:
|
|
164
197
|
|
|
165
|
-
**
|
|
198
|
+
1. **Gate 0** — `node <skill_dir>/scripts/craft-check.mjs option-*.html`
|
|
199
|
+
(`--strict-palette` in exploration regime). Blockers → back to generator.
|
|
200
|
+
2. **Screenshots** — 1440px + 375px per option (Playwright CLI, headless).
|
|
201
|
+
3. **Lens A** — `ui-quality-critic` per option (design quality, rubric SSOT
|
|
202
|
+
in `design-system-protocol.md` § "Design Quality Rubric").
|
|
203
|
+
4. **Lens B** — fresh `ui-expert` instance (brief/context conformance, B1–B5).
|
|
204
|
+
5. **Verdict** per option (PASS floors in evaluation.md). FAIL → consolidated
|
|
205
|
+
feedback packet to the generator. **Max 5 iterations per option.**
|
|
166
206
|
|
|
167
|
-
|
|
207
|
+
Non-multimodal runtime → degraded mode with the mandatory `⚠️ DEGRADED`
|
|
208
|
+
banner (never silently skip evaluation). Evaluation artifacts land in
|
|
209
|
+
`/tmp/prd-design-<slug>/evaluation-report.md`.
|
|
168
210
|
|
|
169
211
|
### Step E — Present to User
|
|
170
212
|
|
|
@@ -175,16 +217,23 @@ by using a distinct instance with no memory of the generation pass.
|
|
|
175
217
|
open /tmp/prd-design-<slug>/option-c.html
|
|
176
218
|
```
|
|
177
219
|
(On non-macOS hosts, substitute `xdg-open` / `start`.)
|
|
178
|
-
2. Show screenshots inline as supplement.
|
|
179
|
-
3. For each option: approach name
|
|
220
|
+
2. Show screenshots inline as supplement (desktop + mobile).
|
|
221
|
+
3. For each option: direction/approach name (from the Design Read), one-line
|
|
222
|
+
intent, reused vs. new components. **DO NOT give evaluation scores,
|
|
223
|
+
rankings, or recommendations on which to pick.** The only evaluation
|
|
224
|
+
artifact ever surfaced here is the `⚠️ DEGRADED` banner, when applicable.
|
|
180
225
|
|
|
181
226
|
**STOP.** Wait for user choice.
|
|
182
227
|
|
|
183
228
|
### Step F — Iterate on Feedback
|
|
184
229
|
|
|
185
|
-
1. User chooses option or requests changes.
|
|
186
|
-
|
|
187
|
-
|
|
230
|
+
1. User chooses an option or requests changes. Map each request to its
|
|
231
|
+
`data-region` anchor — feedback is applied surgically to the named
|
|
232
|
+
regions, never by regenerating the whole page from scratch.
|
|
233
|
+
2. Generator applies changes (with context screenshots as reference; craft
|
|
234
|
+
self-check re-run).
|
|
235
|
+
3. Step D re-runs on the changed option (Gate 0 always; lenses on visual
|
|
236
|
+
changes).
|
|
188
237
|
4. Open updated HTML + show screenshot.
|
|
189
238
|
5. Repeat until explicit user approval.
|
|
190
239
|
|
|
@@ -200,8 +249,8 @@ Read [references/inventory.md](references/inventory.md).
|
|
|
200
249
|
location. (The user may override via an overlay-declared `paths.designs_dir`, but the default is
|
|
201
250
|
deterministic.)
|
|
202
251
|
**When invoked from `/prd` (since v3.22.0), prefix the chosen relative path with `WORKING_DIRECTORY` — see the "Working Directory" section near the top of this file.** Concrete absolute target (prd-workflow case): `<WORKING_DIRECTORY>/<paths.prd_dir>/<slug>/design.html`.
|
|
203
|
-
2. Extract UI Element Inventory (sprint contract). **When `features.has_i18n: true`**, the inventory MUST list every user-facing string the design introduces, so whoever implements it (`coder` / `ui-expert`) externalizes each via `t()` + a registry stub per `coder.md` STEP 9 / `framework/agents/i18n-protocol.md`. The mockup HTML itself is a throwaway prototype — its hardcoded copy is realistic placeholder, never the final shipped string, and this skill does NOT populate the registry (mockups are not shipped code).
|
|
204
|
-
3.
|
|
252
|
+
2. Extract UI Element Inventory (sprint contract), walking the `data-region` annotations. **When `features.has_i18n: true`**, the inventory MUST list every user-facing string the design introduces, so whoever implements it (`coder` / `ui-expert`) externalizes each via `t()` + a registry stub per `coder.md` STEP 9 / `framework/agents/i18n-protocol.md`. The mockup HTML itself is a throwaway prototype — its hardcoded copy is realistic placeholder, never the final shipped string, and this skill does NOT populate the registry (mockups are not shipped code).
|
|
253
|
+
3. Record in the state file: chosen option, its Design Read + direction (feeds the rotation rule next run), design decisions, component lists. **Standalone runs** (no PRD state file): write these to `<design-dir>/design-session.md` next to `design.html`.
|
|
205
254
|
4. Clean up `/tmp/prd-design-<slug>/`.
|
|
206
255
|
|
|
207
256
|
### Step H — Registry Coherence Reconciliation (BLOCKING completion gate)
|
|
@@ -248,24 +297,26 @@ catching it after implementation costs a refactor. The weekly `ds-drift`
|
|
|
248
297
|
routine is a safety net, not a substitute for this check.
|
|
249
298
|
|
|
250
299
|
**Downstream visual verification (nudge, not a gate).** The chosen design is
|
|
251
|
-
verified visually **at the mockup stage** here (Step D
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
`/
|
|
255
|
-
|
|
256
|
-
pointer, never a blocking obligation on this skill.
|
|
300
|
+
verified visually **at the mockup stage** here (Step D). The fidelity of the
|
|
301
|
+
*implemented* result against this design is verified **downstream**, when the
|
|
302
|
+
design lands in a live route: that is `/ui-implement` (which folds in
|
|
303
|
+
`/e2e-review` Phase 4) — auto-delegated by `/new` for a UI card, or invoke
|
|
304
|
+
`/ui-implement <design.html-or-CARD-ID>` manually. This is where route-level
|
|
305
|
+
fidelity lives; it is a pointer, never a blocking obligation on this skill.
|
|
257
306
|
|
|
258
307
|
---
|
|
259
308
|
|
|
260
309
|
## Design Principles (quick reference)
|
|
261
310
|
|
|
262
|
-
These are enforced —
|
|
311
|
+
These are enforced — `references/craft-standards.md` + `references/anti-slop.md`
|
|
312
|
+
hold the full rules; `${paths.ui_guidelines}` holds the project spec.
|
|
263
313
|
|
|
264
314
|
- **Minimalism**: every control justifies its existence
|
|
265
|
-
- **Mobile-first**: 320px upward, 44px touch targets, 200% text scaling
|
|
266
|
-
- **Contrast**: every `bg-*` MUST have explicit `text-*` (WCAG 4.5:1)
|
|
315
|
+
- **Mobile-first**: 320px upward, 44px touch targets, 200% text scaling — the mockup is evaluated at 375px too
|
|
316
|
+
- **Contrast**: every `bg-*` MUST have explicit `text-*` (WCAG 4.5:1, APCA secondary gate — zero tolerance)
|
|
267
317
|
- **Multi-tenant theming pairing**: when `features.multi_tenant_theming: true`, themed text-token paired with themed bg-token per the project's theming pattern doc
|
|
268
|
-
- **View State Trinity
|
|
318
|
+
- **View State Trinity+**: loading (skeletons), error (localized message + retry), empty (CTA) — full 8-state taxonomy for key components. The error language follows `identity.language`.
|
|
319
|
+
- **Anti-slop**: the Tells catalog is binding; overrides are declared, never silent
|
|
269
320
|
- **Separation of concerns**: UI / business logic / data layers stay separate
|
|
270
321
|
- **Registry coherence (BLOCKING)**: when `has_design_system: true`, every primitive in the chosen design is reconciled with `INDEX.md` + `components/<Name>.md` + `tokens-reference.md` before sign-off (Step H). New primitive ⇒ new spec same change. Modified primitive ⇒ updated spec same change. Silent reuse of undocumented primitive ⇒ INDEX entry added now
|
|
271
322
|
|
|
@@ -282,6 +333,7 @@ The flow maps directly:
|
|
|
282
333
|
| 3b — 3 Design Options | Steps C + D + E |
|
|
283
334
|
| 3c — Design Iteration | Step F |
|
|
284
335
|
| 3d — Save & Inventory | Step G |
|
|
336
|
+
| 3e — Registry Coherence | Step H |
|
|
285
337
|
|
|
286
338
|
The `/prd` skill should invoke `ui-design` and follow its output rather than duplicating the design workflow internally.
|
|
287
339
|
|
|
@@ -293,13 +345,13 @@ The `/prd` skill should invoke `ui-design` and follow its output rather than dup
|
|
|
293
345
|
|
|
294
346
|
For: hero illustrations, custom icons, empty state artwork, decorative backgrounds, onboarding visuals, campaign assets.
|
|
295
347
|
|
|
296
|
-
Provide: asset type, purpose, relevant section, style-guideline reference, brand colors, aspect ratio. Use `identity.design_philosophy` to set the aesthetic
|
|
348
|
+
Provide: asset type, purpose, relevant section, style-guideline reference, brand colors, aspect ratio. Use `identity.design_philosophy` and the locked direction to set the aesthetic.
|
|
297
349
|
|
|
298
350
|
### To `motion-expert` agent
|
|
299
351
|
|
|
300
352
|
For: hover states, page transitions, expand/collapse motion, micro-interactions, reduced-motion-safe specs.
|
|
301
353
|
|
|
302
|
-
Provide: triggering action, affected element, desired feedback, accessibility requirements. If `stack.animation.canonical` is set, the motion-expert proposes specs targeting those libraries.
|
|
354
|
+
Provide: triggering action, affected element, desired feedback, accessibility requirements, and the MOTION dial value from the Design Read. If `stack.animation.canonical` is set, the motion-expert proposes specs targeting those libraries.
|
|
303
355
|
|
|
304
356
|
---
|
|
305
357
|
|
|
@@ -307,8 +359,8 @@ Provide: triggering action, affected element, desired feedback, accessibility re
|
|
|
307
359
|
|
|
308
360
|
| Skill | When |
|
|
309
361
|
|-------|------|
|
|
310
|
-
| `
|
|
311
|
-
| `
|
|
312
|
-
| `
|
|
313
|
-
| `webapp-testing` |
|
|
314
|
-
| `
|
|
362
|
+
| `ui-implement` | AFTER approval — implements the approved `design.html` into the codebase and self-verifies fidelity. The implementation twin of this skill |
|
|
363
|
+
| `ds-new` / `ds-edit` | When Step H confirms a NEW canonical primitive / an extension of an existing one |
|
|
364
|
+
| `motion-design` | Motion/timing/easing decisions beyond the mockup's scope |
|
|
365
|
+
| `webapp-testing` / `playwright-skill` | Headless browser capture for Steps B and D |
|
|
366
|
+
| `design-sync` | When a Claude Design satellite is bound and Step H nudges `DS_MIRROR_STALE` |
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Anti-Slop Protocol — the Tells catalog
|
|
2
|
+
|
|
3
|
+
The catalog of patterns that mark a design as machine-generated. These are the
|
|
4
|
+
LLM's own statistical defaults, named explicitly so they can be refused
|
|
5
|
+
deliberately. The generator (Step C) treats them as bans; the evaluator
|
|
6
|
+
(Step D) and the deterministic `scripts/craft-check.mjs` gate enforce them.
|
|
7
|
+
|
|
8
|
+
> Distilled from production-tested tells in
|
|
9
|
+
> [impeccable](https://github.com/pbakaus/impeccable) (Apache-2.0, © Paul
|
|
10
|
+
> Bakaus), [taste-skill](https://github.com/Leonxlnx/taste-skill) (MIT, ©
|
|
11
|
+
> Leonxlnx) and [open-design](https://github.com/nexu-io/open-design)
|
|
12
|
+
> (Apache-2.0, nexu-io).
|
|
13
|
+
>
|
|
14
|
+
> **Every ban has an override path**: "unless the brief, brand, or overlay
|
|
15
|
+
> explicitly calls for it" — in that case the option's rationale comment MUST
|
|
16
|
+
> name the override. A ban silently violated is a defect; a ban deliberately
|
|
17
|
+
> overridden with a stated reason is a design choice.
|
|
18
|
+
|
|
19
|
+
## The two-altitude slop test (run at Step C.0 and again at Step D)
|
|
20
|
+
|
|
21
|
+
- **First-order**: if someone could guess the theme + palette from the
|
|
22
|
+
category alone ("AI tool → purple gradient on dark", "wellness → beige +
|
|
23
|
+
serif"), it is the first training-data reflex. Reject it.
|
|
24
|
+
- **Second-order**: if someone could guess the aesthetic family from
|
|
25
|
+
category-plus-anti-references ("AI workflow tool that's *not* SaaS-cream →
|
|
26
|
+
editorial-typographic", "fintech that's *not* navy-and-gold →
|
|
27
|
+
terminal-native dark"), it is the same trap one tier deeper. Reject that
|
|
28
|
+
too, then choose deliberately.
|
|
29
|
+
- **The soul rule**: aim for ~80% proven patterns + ~20% distinctive choice.
|
|
30
|
+
If a screenshot of the result could not be attributed to *this* product by
|
|
31
|
+
someone who knows it, you shipped a template.
|
|
32
|
+
|
|
33
|
+
## Absolute bans (mechanical — craft-check enforces the checkable subset)
|
|
34
|
+
|
|
35
|
+
| Ban | What it is |
|
|
36
|
+
|---|---|
|
|
37
|
+
| **Em-dash in UI copy** | `—` (and `–` used as a separator) anywhere visible. The LLM's signature stylistic crutch; zero-tolerance — "use sparingly" has empirically failed |
|
|
38
|
+
| **Gradient text** | `background-clip: text` — decorative, never meaningful |
|
|
39
|
+
| **Side-stripe accent** | `border-left`/`border-right` > 1px as a colored accent — the canonical "AI dashboard tile", never intentional; doubly wrong on a rounded card |
|
|
40
|
+
| **Two-stop "trust" gradient hero** | purple→blue, blue→cyan, indigo→pink washes. A flat surface + intentional type beats it every time |
|
|
41
|
+
| **Default-Tailwind indigo accent** | `#6366f1 #4f46e5 #4338ca #3730a3 #8b5cf6 #7c3aed #a855f7` — the textbook AI tell |
|
|
42
|
+
| **Emoji as feature icons** | `✨🚀🎯⚡…` inside headings, buttons, list markers. Use 1.6–1.8px-stroke monoline SVG with `currentColor` |
|
|
43
|
+
| **Filler copy** | `lorem ipsum`, "Feature One/Two/Three". An empty section is a composition problem, not a copywriting one |
|
|
44
|
+
| **Invented metrics** | "10× faster", "99.9% uptime", `92%`: either from a real source, or visibly labelled as mock, or absent |
|
|
45
|
+
| **Div-based fake screenshots** | a "product preview" built from styled `<div>` rectangles (fake task lists, fake terminals, fake dashboards) — the #1 LLM-design tell. Use a real capture, a generated image, or an honest labelled placeholder |
|
|
46
|
+
| **The hero-metric template** | big number, small label, supporting stats, gradient accent — SaaS cliché |
|
|
47
|
+
| **Glassmorphism as default** | `backdrop-blur` everywhere without a directional reason |
|
|
48
|
+
| **Broken/unverified image URLs** | guessed Unsplash IDs 404 and ship as broken placeholders — verify every URL, or use seeded `picsum.photos`, or label the placeholder |
|
|
49
|
+
|
|
50
|
+
## Rationed patterns (count-bounded — exceeding the cap is a FAIL)
|
|
51
|
+
|
|
52
|
+
| Pattern | Cap |
|
|
53
|
+
|---|---|
|
|
54
|
+
| Eyebrow kickers (`uppercase tracking` micro-labels above headings) | ≤ ceil(sections/3), hero counts — the #1 violated rule in production tests. When in doubt: drop it, the headline alone is enough |
|
|
55
|
+
| Numbered section markers (`01 / 02 / 03`, `001 · Capabilities`) | 0 — the eyebrow trope one tier deeper |
|
|
56
|
+
| Middle-dot `·` separators | ≤ 1 per line |
|
|
57
|
+
| Marquee / auto-scrolling strip | ≤ 1 per page |
|
|
58
|
+
| Decorative status dots (pulsing green "live" dots) | 0 by default |
|
|
59
|
+
| Identical image+text zigzag splits | ≤ 2 consecutive |
|
|
60
|
+
| Identical card grids (3 equal feature cards) | reshape or vary — a repeated uniform grid is grammar, not design |
|
|
61
|
+
| Icon-tile above every heading | 0 as a pattern; icons earn their place per-instance |
|
|
62
|
+
| `var(--accent)` visible uses | ≤ 2 per screen |
|
|
63
|
+
|
|
64
|
+
## Layout & composition tells
|
|
65
|
+
|
|
66
|
+
- Centered hero over dark radial mesh + three equal feature cards + pricing —
|
|
67
|
+
the default page. Vary structure per the layout-family diversity rule
|
|
68
|
+
(`craft-standards.md`).
|
|
69
|
+
- Split-header (big headline left, small explainer right) as *section* header
|
|
70
|
+
— banned by default; stack vertically, `max-w-[65ch]`.
|
|
71
|
+
- Headlines broken with `<br>` + italic mixed-family words.
|
|
72
|
+
- Vertical 90°-rotated text, decorative crosshairs/hairline overlays,
|
|
73
|
+
`border-t`+`border-b` on every list row.
|
|
74
|
+
- "Scroll to explore" cues — they know what scroll is.
|
|
75
|
+
- Version labels in the hero (`V0.6`, `BETA`, `INVITE-ONLY PREVIEW`) and
|
|
76
|
+
version footers (`v1.4.2 · Build 0048`) on marketing pages.
|
|
77
|
+
- Weather/locale strips (`LIS 14:23 · 18°C`), decorative photo credits
|
|
78
|
+
(`Field study no. 12`), fake live counters ("Reservation 412 of 800").
|
|
79
|
+
- Uniform entrance animation applied to every section — the reflex is the
|
|
80
|
+
tell, not motion itself (see `craft-standards.md` § Motion).
|
|
81
|
+
|
|
82
|
+
## Copy tells (run the Copy Self-Audit before evaluation)
|
|
83
|
+
|
|
84
|
+
Re-read every visible string. Flag and rewrite:
|
|
85
|
+
|
|
86
|
+
- **The Jane Doe effect**: generic names ("John Doe"), fake-perfect numbers
|
|
87
|
+
(`99.99%`, round `50%` — real data reads like `47.2%`), startup-slop brand
|
|
88
|
+
names ("Acme", "Nexus", "SmartFlow", "Cloudly"), filler verbs ("Elevate",
|
|
89
|
+
"Seamless", "Unleash", "Next-Gen", "Revolutionize").
|
|
90
|
+
- **Aphoristic cadence**: "X. No Y." / "Not a feature. A platform." — once is
|
|
91
|
+
a choice; the pattern is the tell.
|
|
92
|
+
- **Poetic micro-labels**: "From the field", "Field notes", "On our desks",
|
|
93
|
+
"Quietly in use at" — mock-humble AI voice.
|
|
94
|
+
- **Generic step labels**: "Stage 1 / Step 2 / Phase 03" — the actual step
|
|
95
|
+
content is the label.
|
|
96
|
+
- Anything that "reads like an LLM trying to sound thoughtful" —
|
|
97
|
+
passive-aggressive humility, fake-craftsman labels, mock-poetic micro-meta.
|
|
98
|
+
AI-generated cute copy is worse than boring copy.
|
|
99
|
+
|
|
100
|
+
## Palette & typography reflexes
|
|
101
|
+
|
|
102
|
+
The named default palettes and fonts the model reaches for, with their
|
|
103
|
+
refusal rules and rotation pools, live in
|
|
104
|
+
[`design-directions.md`](design-directions.md) § "Reflex-reject lists" (LILA
|
|
105
|
+
rule, premium-consumer beige ban, cream/sand body ban, serif discipline, font
|
|
106
|
+
pools). Consult them at direction-lock time (Step C.0), not after generation.
|