start-vibing 4.2.0 → 4.3.1

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.
@@ -0,0 +1,457 @@
1
+ # Design Intelligence Rubric
2
+
3
+ > The missing layer between WCAG/Nielsen checklists and "does this feel
4
+ > designed or vibecoded?" — used by sd-audit as Phase 3g.
5
+
6
+ ## Why this exists
7
+
8
+ A UI can pass axe (zero WCAG violations), Nielsen (10/10 heuristics green),
9
+ Lighthouse (100 perf score) and still be visually horrible: card-stacked mobile
10
+ dashboards, microtext tables on phones, no visual hierarchy, shadcn defaults
11
+ slapped onto every surface with zero variant discipline, inline arbitrary
12
+ pixel values everywhere. This rubric codifies those **implicit** criteria.
13
+
14
+ Every category is scored **0–10** per page × viewport. Total score → a single
15
+ **design-intelligence score (DIS)** 0–100. Scores below 60 auto-flag MEDIUM
16
+ findings; below 40 auto-flag HIGH.
17
+
18
+ ## Evidence requirement
19
+
20
+ Each category's score MUST cite ≥1 piece of evidence from the audit session:
21
+ - **SHOT** (screenshot path)
22
+ - **CSS** (computed style excerpt)
23
+ - **DOM** (snapshot quote)
24
+ - **CODE** (source file + line, via Grep, for vibecode detection)
25
+
26
+ A score without evidence is invalid. Auditor records `n/a` instead of guessing.
27
+
28
+ ---
29
+
30
+ ## Category 1 — Visual hierarchy (weight 1.0)
31
+
32
+ **Rationale:** Reber et al. processing fluency + Tractinsky aesthetic-usability — clean dominance hierarchies literally reduce cognitive load; beauty buys friction tolerance only after hierarchy is solved (artifact Parts 1–3).
33
+
34
+ **Question:** On this view, what is the single primary goal? Is it the most
35
+ dominant element visually?
36
+
37
+ | Score | Criteria |
38
+ |---|---|
39
+ | 10 | One dominant element ≥ 2× larger or distinctly heavier than rest. Supporting info subordinate. Example: Cash App balance. |
40
+ | 7 | Primary clear but competing CTAs present. |
41
+ | 4 | Multiple equal-weight elements; user has to hunt. |
42
+ | 0 | Flat wall of cards/tables, no signal of where to look. |
43
+
44
+ **Detect:** `browser_evaluate` → collect computed `fontSize`, `fontWeight`, `lineHeight`, `color` of h1–h6, buttons, key metrics. Compute size-dominance ratio. Ratio > 2 → 10. Ratio < 1.3 → ≤4.
45
+
46
+ **Example fail (beats-market):** admin dashboard mobile — 10 equal-weight metric cards, no hero. Score: 2.
47
+
48
+ ---
49
+
50
+ ## Category 2 — Density calibration per viewport (weight 1.2)
51
+
52
+ **Rationale:** Fitts's Law + thumbzone ergonomics — density must respect the physical reach envelope of the device; cramming desktop density onto mobile violates motor cost.
53
+
54
+ **Question:** Does information density match the device context?
55
+
56
+ | Viewport | Expected primary entities visible above fold |
57
+ |---|---|
58
+ | Mobile 375×812 | 6–8 compact rows OR 1 hero + 4–5 rows |
59
+ | Tablet 768×1024 | 8–12 rows or 4 cards in 2×2 |
60
+ | Desktop 1440×900 | 12–20+ rows or data-dense tables |
61
+
62
+ **Score:**
63
+ - 10 if density within ±20% of target
64
+ - 5 if half or double target
65
+ - 0 if <25% of target (wasteful) or >3× (cramped illegible)
66
+
67
+ **Detect:** Count `role=listitem | region | article` elements with `getBoundingClientRect` intersecting viewport. Compare to viewport target.
68
+
69
+ **Example fail (beats-market):** admin dashboard mobile — 3 cards above fold (target 6–8). Score: 3. Orders mobile = 20 rows visible but microtext = also fail (see Category 7).
70
+
71
+ ---
72
+
73
+ ## Category 3 — Consistency: spacing scale (weight 0.8)
74
+
75
+ **Rationale:** Gestalt proximity + rhythm — shared spacing units fuse related elements and separate distinct ones; arbitrary magic numbers break grouping perception.
76
+
77
+ **Question:** Do paddings, margins, gaps come from a scale (4/8px or 0.25rem) or are they arbitrary magic numbers?
78
+
79
+ **Detect:**
80
+ - `browser_evaluate` → collect computed `padding`, `margin`, `gap` from ≥50 elements.
81
+ - Grep codebase for `p-\[\d+px\]`, `m-\[\d+px\]`, `gap-\[\d+px\]` (Tailwind arbitrary values).
82
+ - Count: on-scale vs off-scale.
83
+
84
+ | Score | Criteria |
85
+ |---|---|
86
+ | 10 | 95%+ values on a 4/8 scale; no arbitrary pixel values in code |
87
+ | 7 | 80–95% on-scale; a few arbitrary values in leaf components |
88
+ | 4 | 50–80% on-scale; arbitrary values common |
89
+ | 0 | Random pixel values everywhere; no visible scale |
90
+
91
+ ---
92
+
93
+ ## Category 4 — Consistency: typography scale (weight 0.8)
94
+
95
+ **Rationale:** Processing fluency (Reber) — a discrete type scale accelerates recognition; a shapeless set of sizes forces re-parsing of hierarchy on every screen.
96
+
97
+ Same method for font-size, font-weight, line-height. Look for `text-\[\d+px\]` and arbitrary font-size. Expected: 6–10 sizes total in a designed system; 30+ sizes = vibecoded.
98
+
99
+ ---
100
+
101
+ ## Category 5 — Consistency: color palette (weight 0.8)
102
+
103
+ **Rationale:** Valdez & Mehrabian (1994) — saturation × value drive emotional response more than hue; a disciplined palette with controlled lightness/saturation ranges is the single highest-leverage decision for perceived quality (artifact line 43).
104
+
105
+ **Detect:**
106
+ - Collect computed `color`, `background-color`, `border-color` from ≥100 elements.
107
+ - Unique colors count. <15 = disciplined. 30+ = vibecoded.
108
+ - Grep for `#[0-9a-f]{6}`, `rgb\(`, Tailwind arbitrary colors.
109
+
110
+ | Score | Criteria |
111
+ |---|---|
112
+ | 10 | ≤12 distinct colors, all from tokens |
113
+ | 7 | 12–20 colors, mostly tokens |
114
+ | 4 | 20–30 colors |
115
+ | 0 | 30+ colors, raw hex/rgb inline |
116
+
117
+ ---
118
+
119
+ ## Category 6 — Whitespace & breathing room (weight 0.7)
120
+
121
+ **Rationale:** *Ma* (間) — negative space is substance, not absence; whitespace signals confidence and lets figure/ground perception resolve without strain.
122
+
123
+ **Question:** Does content have room to breathe, or is it crammed?
124
+
125
+ **Detect:** Compute average `padding-inline + margin-inline` per content block. Compare to container width. Measure content-to-chrome ratio.
126
+
127
+ | Score | Criteria |
128
+ |---|---|
129
+ | 10 | Content 60–75% of width, 25–40% whitespace |
130
+ | 7 | Content 75–85% |
131
+ | 4 | Content 85–95% OR <50% (too sparse) |
132
+ | 0 | Content touching edges, no breathing |
133
+
134
+ ---
135
+
136
+ ## Category 7 — Text legibility (weight 1.2)
137
+
138
+ **Rationale:** Miller 4±1 (Cowan 2001) + Postel's robustness — legible bodies keep working-memory cost low; dense microtext forces re-reading and exhausts the 4-chunk budget that forms and scannable text depend on.
139
+
140
+ **Detect:** `browser_evaluate` → collect `fontSize` computed px. Find minimum across visible text.
141
+
142
+ | Viewport | Min body | Min meta | Min input |
143
+ |---|---|---|---|
144
+ | Mobile | 16px | 13px | 16px (iOS zoom floor) |
145
+ | Desktop | 14px | 12px | 14px |
146
+
147
+ | Score | Criteria |
148
+ |---|---|
149
+ | 10 | All text meets mins |
150
+ | 5 | One or two elements below by ≤1px |
151
+ | 0 | Widespread microtext (tables, chips, meta) below min |
152
+
153
+ **Example fail (beats-market):** orders mobile — table cells computed at ~8px. Score: 0.
154
+
155
+ ---
156
+
157
+ ## Category 8 — CTA hierarchy (weight 1.0)
158
+
159
+ **Rationale:** Hick-Hyman Law — decision time grows with the log of equally-weighted options; multiple competing primaries flatten hierarchy into a choose-your-adventure and cost measurable conversion (Baymard PDP data).
160
+
161
+ **Question:** Is there ONE primary CTA per view?
162
+
163
+ **Detect:** Count buttons with `variant=default | primary | filled` OR bg-primary class. >1 above fold = competing.
164
+
165
+ | Score | Criteria |
166
+ |---|---|
167
+ | 10 | Single primary CTA, rest secondary/ghost |
168
+ | 7 | Single primary + 1 competing |
169
+ | 4 | 2–3 competing primaries |
170
+ | 0 | Every button styled primary |
171
+
172
+ Reference: Baymard PDP — 51% of e-commerce pages fail due to competing CTAs.
173
+
174
+ ---
175
+
176
+ ## Category 9 — State coverage (weight 1.1)
177
+
178
+ **Rationale:** Norman's "make system state visible" (Seven Stages of Action) + Nielsen H1 visibility-of-system-status — missing loading/empty/error states break the user's feedback loop and strand them in uncertainty.
179
+
180
+ Per page, does the UI handle: default / loading / empty / error / success?
181
+
182
+ **Detect per scenario:**
183
+ - Loading: Grep source for `isLoading`, `pending`, `Skeleton`, `aria-busy`.
184
+ - Empty: Grep for `isEmpty`, `EmptyState`, zero-result ternaries.
185
+ - Error: Grep for `role="alert"`, error boundaries, `onError`.
186
+
187
+ | Score | Criteria |
188
+ |---|---|
189
+ | 10 | 5/5 states rendered or demonstrably coded |
190
+ | 8 | 4/5 (usually missing success toast) |
191
+ | 5 | 3/5 (missing empty + error) |
192
+ | 0 | Only default; fetch returns broken UI on failure |
193
+
194
+ ---
195
+
196
+ ## Category 10 — Touch targets (mobile only, weight 1.0)
197
+
198
+ **Rationale:** Fitts's Law (MT = a + b·log₂(2D/W)) — acquisition time scales inversely with target width; sub-44px targets on fingers multiply error rate and exhaust motor patience.
199
+
200
+ **Detect:** `browser_evaluate` → get `getBoundingClientRect` of every
201
+ clickable (buttons, links, `[role=button|link|tab|checkbox|radio|switch]`,
202
+ `<input>`, `<select>`, `<summary>`, anchors with click handlers). Record
203
+ the smaller of `width × height` per target.
204
+
205
+ ### Spec reconciliation
206
+
207
+ Three conflicting specs define "how big a touch target should be":
208
+
209
+ | Spec | Size | Nature | Citation |
210
+ |---|---|---|---|
211
+ | **WCAG 2.5.8 Target Size (Minimum) — AA** | **24 × 24 CSS px** | Baseline (legal/accessibility floor, with spacing exception) | https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum |
212
+ | **Apple Human Interface Guidelines** | **44 × 44 pt** | Platform-native target (iOS) | https://developer.apple.com/design/human-interface-guidelines/accessibility#Interactivity |
213
+ | **Material Design (Android)** | **48 × 48 dp** | Platform-native target (Android) | https://m3.material.io/foundations/accessible-design/accessibility-basics |
214
+ | **WCAG 2.5.5 Target Size (Enhanced) — AAA** | 44 × 44 CSS px | Advisory ceiling | https://www.w3.org/WAI/WCAG21/Understanding/target-size |
215
+
216
+ sd-audit reconciles as follows:
217
+ - **Baseline = 24 × 24 CSS px** — WCAG 2.5.8 AA pass; legally sufficient
218
+ (with 24px center-to-center spacing exception).
219
+ - **Target = 44 × 44 CSS px** — HIG / Material / WCAG AAA; the single
220
+ pragmatic "platform-native" size across iOS + Android + web (Android
221
+ 48 dp ≈ 44 CSS px at default DPI).
222
+ - Spacing exception keeps sub-44 icons compliant with WCAG AA but does NOT
223
+ earn full design-intelligence points — they still feel cramped on a
224
+ phone, which is what Fitts's Law above predicts.
225
+
226
+ ### Scoring ladder
227
+
228
+ Per-target classification:
229
+ - **Full points** (≥ 44 × 44 CSS px) — platform-native, HIG/Material-clean.
230
+ - **Half points** (24 – 43 CSS px, min dimension) — WCAG AA pass but
231
+ sub-optimal; counts as half a compliant target.
232
+ - **Zero points** (< 24 CSS px, min dimension) — WCAG AA FAIL; raises a
233
+ separate `a11y-wcag22-2.5.8` finding in addition to pulling this score.
234
+
235
+ Let `N` = total targets, `n44` = count ≥ 44×44, `n24` = count in
236
+ [24, 44), `n0` = count < 24. Compute
237
+ `compliance = (n44 + 0.5 × n24) / N`.
238
+
239
+ | Score | Criteria |
240
+ |---|---|
241
+ | 10 | `compliance ≥ 0.95` AND `n0 == 0` — essentially all targets ≥ 44 |
242
+ | 7 | `0.80 ≤ compliance < 0.95` AND `n0 == 0` — some half-credit (24–43 px) targets, none under 24 |
243
+ | 4 | `0.50 ≤ compliance < 0.80` OR `0 < n0 ≤ 2` — common icon-only button fail; any WCAG breach |
244
+ | 0 | `compliance < 0.50` OR `n0 ≥ 3` — widespread <24 px targets, structural problem |
245
+
246
+ Any `n0 > 0` ALWAYS also raises a separate finding with prefix
247
+ `a11y-wcag22-2.5.8` (the rubric scores design intelligence; the finding
248
+ records the legal breach).
249
+
250
+ ---
251
+
252
+ ## Category 11 — Motion & feedback / perceived performance (weight 0.6)
253
+
254
+ **Rationale:** Doherty threshold (Doherty & Thadhani, IBM 1982) — system response <400 ms sustains flow; above that, perceived unresponsiveness begins. Paired with INP (Core Web Vitals) for the measurable proxy.
255
+
256
+ **Question:** Do interactions give feedback? Are animations tasteful and respect `prefers-reduced-motion`? Does every interaction land within the Doherty ceiling?
257
+
258
+ **Detect:**
259
+ - `browser_evaluate` with `matchMedia('(prefers-reduced-motion: reduce)')` + check for `transition` / `animation` on interactive elements.
260
+ - Missing hover/focus feedback on buttons = major fail.
261
+ - >3s animations = excessive.
262
+
263
+ **Perceived-performance sub-criterion (Doherty 400 ms ceiling, alongside INP).**
264
+ - Parse `session_dir/vitals/<page>.json` for INP (from `web-vitals@5` attribution build).
265
+ - For each primary interaction (Step 2.5 Phase A enumeration — clicks on CTA, form submit, nav link, combobox, modal trigger), compute **end-to-end response time** = click → visual feedback (spinner / state change / new pixels painted), not just INP.
266
+ - Fail rule: an interaction that **passes INP** (≤ 200 ms rating "good") but whose **user-perceivable response exceeds 400 ms** (e.g., INP fires at 150 ms but the resulting navigation/paint lands at 900 ms with no intermediate skeleton/optimistic UI) **penalizes C11**. Doherty is the ceiling; INP is the low-floor subset. Apply the Nielsen 0.1 s / 1 s / 10 s progress rule for anything over 400 ms (skeleton, optimistic UI, determinate bar + ETA + cancel for >10 s).
267
+
268
+ | Score | Criteria |
269
+ |---|---|
270
+ | 10 | Hover/focus/active feedback everywhere; animations ≤300 ms; reduced-motion respected; every interaction under Doherty 400 ms OR shows skeleton/optimistic state |
271
+ | 7 | Most interactions feedback; reduced-motion partial; occasional >400 ms interaction without feedback |
272
+ | 4 | Some interactions static; reduced-motion ignored; multiple interactions cross Doherty with no intermediate state |
273
+ | 0 | No hover/focus feedback at all OR autoplay video + parallax with no disable OR interactions routinely exceed 400 ms with blank waits |
274
+
275
+ ---
276
+
277
+ ## Category 12 — Nav pattern matches platform (weight 1.0)
278
+
279
+ **Rationale:** Fitts's Law + Hick-Hyman Law — nav patterns succeed when they minimize both motor cost (thumbzone/edge placement) and choice cost (limited top-level destinations, chunked per Miller 4±1).
280
+
281
+ | Viewport | Expected nav |
282
+ |---|---|
283
+ | Mobile (≤768) | Bottom tab bar (3–5), full-screen menus, gesture back |
284
+ | Tablet | Hybrid (collapsible sidebar or top tabs) |
285
+ | Desktop | Persistent sidebar or top navbar with search |
286
+
287
+ **Detect:** On mobile viewport, check for `<nav>` in fixed bottom position. On desktop, fixed left sidebar OR top header with nav.
288
+
289
+ | Score | Criteria |
290
+ |---|---|
291
+ | 10 | Nav matches platform convention |
292
+ | 5 | Hybrid but functional (e.g., bottom FAB + hamburger) |
293
+ | 0 | Hamburger-only on mobile OR bottom tabs on desktop |
294
+
295
+ ---
296
+
297
+ ## Category 13 — Table-on-mobile detection (weight 1.2, mobile only)
298
+
299
+ **Rationale:** Platform affordance + thumbzone — desktop tables violate mobile reading models (microtext, horizontal overflow, no visible sort); transformation to card/list is the minimum cost to preserve parse-ability.
300
+
301
+
302
+ **Detect:** At ≤768px, find `<table>` with >3 visible columns OR `display: table` containers with horizontal scroll AND text < 13px.
303
+
304
+ | Score | Criteria |
305
+ |---|---|
306
+ | 10 | No table or table transformed to card-per-row |
307
+ | 5 | Table present but scrolls clean with sticky first col |
308
+ | 0 | Squashed desktop table with microtext |
309
+
310
+ **Example fail (beats-market):** admin orders mobile — 8-col desktop table rendered at 375px with ~8px text. Score: 0.
311
+
312
+ ---
313
+
314
+ ## Category 14 — Modal/sheet appropriateness (weight 0.8)
315
+
316
+ **Rationale:** Fitts's Law + thumbzone — on mobile, close affordances belong where the thumb lives; centered dialogs with top-right dismiss violate reach on phones and strand users in forced-modal states.
317
+
318
+ | Viewport | Expected modal pattern |
319
+ |---|---|
320
+ | Mobile | Bottom sheet (slide-up) or full-screen with close top-left |
321
+ | Tablet | Centered dialog OR bottom sheet |
322
+ | Desktop | Centered dialog |
323
+
324
+ **Detect:** Open every `role=dialog` trigger. Measure position + dimensions. On mobile, centered dialog with close in top-right = fail.
325
+
326
+ | Score | Criteria |
327
+ |---|---|
328
+ | 10 | Correct per viewport |
329
+ | 5 | Centered on mobile but within reach |
330
+ | 0 | Unreachable thumb-zone close, wrong pattern for device |
331
+
332
+ ---
333
+
334
+ ## Category 15 — Color semantics (weight 0.6)
335
+
336
+ **Rationale:** Jakob's Law (users spend most time on other products) + learned convention — red/green/amber mappings are pre-installed in users' mental models; using them decoratively forces re-learning and breaks status recognition at a glance.
337
+
338
+ **Detect:** Collect colors used on: error messages, success states, warnings, info. Red = error? Green = success? Or decorative-only?
339
+
340
+ | Score | Criteria |
341
+ |---|---|
342
+ | 10 | Semantic colors distinct and consistent across app |
343
+ | 5 | Used but inconsistent (red elsewhere as brand) |
344
+ | 0 | No semantic color system |
345
+
346
+ ---
347
+
348
+ ## Category 16 — Design-system coherence (weight 1.1)
349
+
350
+ **Rationale:** Tesler's Law (conservation of complexity) + von Neumann consistency — complexity does not disappear, it moves; a disciplined system absorbs variation once inside tokens/variants/primitives so every downstream surface stays predictable. Incoherent systems push the same complexity onto users (re-learning each screen) and onto engineers (ad-hoc classes per component). This is why C16 carries one of the highest weights: coherence is not polish, it is the mechanism that conserves attention.
351
+
352
+ **The meta-category.** Does the app LOOK like it was designed by one team with one vision? Or does it look like a collection of shadcn defaults?
353
+
354
+ **Detect (aesthetic signal):**
355
+ - Does at least one of: custom color palette, custom font pairing, custom spacing rhythm, custom radius language, custom motion language, custom illustration/icon set EXIST?
356
+ - Grep package.json for ≥1 of: `typeui.sh`, `framer-motion`, custom fonts beyond system, Lottie, MagicUI, Aceternity, custom token file.
357
+
358
+ | Score | Criteria |
359
+ |---|---|
360
+ | 10 | Strong identity — you could recognize this app from a cropped screenshot |
361
+ | 7 | Some identity (brand color + maybe custom font) |
362
+ | 4 | shadcn defaults + 1 accent color |
363
+ | 0 | Pure shadcn defaults, zero customization, looks like `npx shadcn-ui@latest init` |
364
+
365
+ **When score ≤4:** recommend a typeui.sh aesthetic skill OR a frontend-design
366
+ session. See `design-skills-catalog.md`.
367
+
368
+ ---
369
+
370
+ ## Category 17 — Vibecode detection (weight 1.0)
371
+
372
+ **Rationale:** Norman's reflective layer (Emotional Design, 2004 — artifact line 547) — vibecoded surfaces pass the visceral/behavioral layers but fail reflective judgment; code that reads as "hand-assembled divs" telegraphs lack of intentional system, which is exactly what distinguishes "designed" from "vibecoded" output.
373
+
374
+ **Question:** Does the code follow patterns (components, variants, tokens)
375
+ or is it hand-assembled divs with inline styles?
376
+
377
+ **Detect (source grep):**
378
+ - Count `<div className="..."` without surrounding component → raw-div score
379
+ - Count inline `style={{` → inline-style count
380
+ - Count `@media` queries inline vs breakpoint tokens
381
+ - Count arbitrary Tailwind values (`\[\d+px\]`, `\[#[0-9a-f]+\]`)
382
+ - Check if shadcn components are wrapped into domain components (MetricRow, OrderCard) or used raw per page
383
+ - Check if types are co-located in `types/` vs inline `any`
384
+
385
+ | Score | Criteria |
386
+ |---|---|
387
+ | 10 | Domain components, design tokens, typed props, variants via CVA |
388
+ | 7 | Some composition, some raw shadcn usage |
389
+ | 4 | Mostly raw primitives, inconsistent composition |
390
+ | 0 | Flat page files with 500+ lines of inline JSX; zero reuse |
391
+
392
+ ---
393
+
394
+ ## Scoring formula
395
+
396
+ ```
397
+ DIS = Σ(score_i × weight_i) / Σ(weight_i) × 10
398
+
399
+ weight_sum = 14.8
400
+ max_raw = 148.0 → normalized to 100
401
+
402
+ Example (beats-market admin dashboard mobile):
403
+ C1 hierarchy: 2 × 1.0 = 2.0
404
+ C2 density: 3 × 1.2 = 3.6
405
+ C3 spacing: 7 × 0.8 = 5.6
406
+ C4 type: 6 × 0.8 = 4.8
407
+ C5 color: 7 × 0.8 = 5.6
408
+ C6 whitespace:4 × 0.7 = 2.8
409
+ C7 legibility:8 × 1.2 = 9.6
410
+ C8 CTA: 6 × 1.0 = 6.0
411
+ C9 states: 4 × 1.1 = 4.4
412
+ C10 touch: 6 × 1.0 = 6.0
413
+ C11 motion: 5 × 0.6 = 3.0
414
+ C12 nav: 4 × 1.0 = 4.0
415
+ C13 table: 10 × 1.2 = 12.0 (no table on dashboard)
416
+ C14 modal: 6 × 0.8 = 4.8
417
+ C15 color-sem:6 × 0.6 = 3.6
418
+ C16 coherence:3 × 1.1 = 3.3
419
+ C17 vibecode: 4 × 1.0 = 4.0
420
+ raw = 85.1 → DIS = 57.5 → MEDIUM severity
421
+ ```
422
+
423
+ ## Output format
424
+
425
+ Write `.super-design/sessions/<id>/design-intelligence.json`:
426
+
427
+ ```json
428
+ {
429
+ "pages": [
430
+ {
431
+ "page_url": "/admin",
432
+ "viewport": "375x812",
433
+ "categories": {
434
+ "visual_hierarchy": { "score": 2, "evidence": ["screens/admin_mobile.png", "styles/admin_mobile.json"], "notes": "10 equal-weight metric cards, no hero" },
435
+ "density": { "score": 3, "evidence": ["screens/admin_mobile.png"], "notes": "Only 3 metrics above fold; target 6-8" }
436
+ },
437
+ "dis": 57.5,
438
+ "severity": "MEDIUM",
439
+ "top_findings": ["F-0042", "F-0043", "F-0049"]
440
+ }
441
+ ],
442
+ "overall_dis": 54.2,
443
+ "overall_severity": "MEDIUM",
444
+ "weakest_categories": ["visual_hierarchy", "density", "design_system_coherence"]
445
+ }
446
+ ```
447
+
448
+ Each category score ≤ 4 SHOULD spawn a finding with `template_id` from the M-family (M1–M15) in `fix-agent-playbook.md`.
449
+
450
+ ## Cross-references
451
+
452
+ - Mobile-specific categories (C2, C7, C10, C12, C13, C14) reference
453
+ `.claude/skills/mobile-app-patterns/SKILL.md` for fix patterns.
454
+ - Design-system coherence (C16) references `design-skills-catalog.md` for
455
+ typeui.sh skill suggestions.
456
+ - Vibecode (C17) references `fix-agent-playbook.md` V-templates (spacing,
457
+ type, color tokens).
@@ -0,0 +1,133 @@
1
+ # Design Skills Catalog
2
+
3
+ > Map of installed design skills and when to recommend each. Used by
4
+ > sd-audit (Category 16 design-system-coherence findings) and sd-fix
5
+ > (when proposing aesthetic realignment above template scope).
6
+
7
+ ## Installed typeui-* skills
8
+
9
+ All from https://www.typeui.sh/design-skills — already present in
10
+ `.claude/skills/`. Claude auto-invokes them when their description matches
11
+ the task. sd-audit MUST reference them by name in findings; sd-fix MUST
12
+ mention them as optional realignment paths when design-system-coherence
13
+ score ≤ 4.
14
+
15
+ | Skill | Best for | Visual signature | When to recommend |
16
+ |---|---|---|---|
17
+ | **typeui-dashboard** | Admin panels, data apps, SaaS | Dark theme, cloud-platform density (AWS/GCP feel), data-first | DIS C16 fail on admin/dashboard routes |
18
+ | **typeui-application** | Developer tools, productivity | Vercel/GitHub-inspired, clean neutrals, high information density | SaaS products without strong identity |
19
+ | **typeui-enterprise** | B2B workflows, compliance, finance | Clean, high-contrast, conservative | Procurement-facing, corporate |
20
+ | **typeui-ant** | Form-heavy enterprise | Structured, predictable, Ant Design-adjacent | CRM, admin with many forms |
21
+ | **typeui-clean** | Marketing sites, simple products | Minimalist, generous whitespace | Pre-launch landing pages |
22
+ | **typeui-bento** | Feature grids, portfolios | Modular grid blocks | Homepage feature sections |
23
+ | **typeui-bold** | Consumer brands, challenger products | Strong typography, vivid color, confidence | Startups differentiating vs incumbents |
24
+ | **typeui-artistic** | Creative tools, design products | Expressive type, unusual layouts | Non-enterprise, vibe-forward |
25
+ | **typeui-dramatic** | Portfolios, agencies, brand sites | High-contrast, theatrical | Hero-heavy marketing |
26
+ | **typeui-neobrutalism** | Gen-Z, indie brands | Raw borders, hard shadows, bold | Statement brands |
27
+ | **typeui-paper** | Content, editorial, reading | Paper-textured, print-like | Blogs, publications |
28
+ | **typeui-doodle** | Learning, kids, playful | Hand-drawn, sketch feel | Education, creative tools |
29
+
30
+ ## How each skill gets applied
31
+
32
+ Each typeui-* skill contains:
33
+ - **Design tokens** (colors, spacing, radius, shadows) as CSS variables
34
+ - **Component variants** adapted to shadcn/ui structure
35
+ - **Layout patterns** demonstrated
36
+ - **Do/Don't examples**
37
+
38
+ When Claude invokes a skill (via matching description or explicit mention),
39
+ it follows the skill's specific tokens + patterns instead of defaults.
40
+
41
+ ## Other design-related skills installed
42
+
43
+ | Skill | Purpose | Cross-ref |
44
+ |---|---|---|
45
+ | **mobile-app-patterns** | Duolingo/Linear/Arc mobile patterns | Mandatory for mobile DIS scoring |
46
+ | **web-design-guidelines** | 100+ WCAG + UX rules (Vercel Labs) | Feeds Nielsen + WCAG manual pass |
47
+ | **composition-patterns** | React compound/composition patterns | C17 vibecode detection |
48
+ | **react-best-practices** | Vercel-Labs performance patterns | P-templates |
49
+ | **shadcn-ui** | shadcn component usage | V-templates (variants) |
50
+ | **tailwind-patterns** | Tailwind scale adherence | C3/C4/C5 consistency checks |
51
+ | **frontend-design** (plugin) | Full UI design loop with competitor research | Deep aesthetic reset |
52
+
53
+ ## Selection matrix (used by sd-fix / sd-audit recommendations)
54
+
55
+ | Current state | Target vibe | Recommend |
56
+ |---|---|---|
57
+ | Vibecoded admin with shadcn defaults | Professional dashboard | `typeui-dashboard` or `typeui-application` |
58
+ | Admin with too many forms | Structured enterprise | `typeui-ant` or `typeui-enterprise` |
59
+ | Landing with no identity | Consumer bold | `typeui-bold` or `typeui-dramatic` |
60
+ | Creative-app landing | Expressive | `typeui-artistic` or `typeui-doodle` |
61
+ | B2B-serious | Conservative | `typeui-enterprise` |
62
+ | Editorial / blog | Readable long-form | `typeui-paper` |
63
+ | Feature-grid homepage | Modular showcase | `typeui-bento` |
64
+
65
+ ### Vibe → typeui skill (primary → fallback)
66
+
67
+ Covers every vibe enumerated in the artifact Part 4 (12-vibe vocabulary). The
68
+ primary skill carries the aesthetic; the fallback handles adjacent contexts or
69
+ fills gaps when the primary would over-commit. When a project vibe has no
70
+ single-perfect skill (e.g. Premium/luxury, Warm/organic), the fallback plus
71
+ `/frontend-design` is the intended path.
72
+
73
+ | Part-4 vibe | Primary skill | Fallback | Notes |
74
+ |---|---|---|---|
75
+ | Minimal / clean | `typeui-clean` | `typeui-application` | Default pick for pre-launch marketing and "honest SaaS". |
76
+ | Bold / confident | `typeui-bold` | `typeui-dramatic` | Challenger brands, consumer launches. |
77
+ | Playful / friendly | `typeui-doodle` | `typeui-artistic` | Education, kids, creative tools. |
78
+ | Serious / professional (B2B) | `typeui-enterprise` | `typeui-ant` | Procurement-facing, compliance. |
79
+ | Technical / data-dense (SaaS admin) | `typeui-dashboard` | `typeui-application` | Dark-theme analytics, operator consoles. |
80
+ | Editorial / reading | `typeui-paper` | `typeui-clean` | Long-form content, publications. |
81
+ | Modular / showcase | `typeui-bento` | `typeui-application` | Feature grids, portfolios. |
82
+ | Expressive / artistic | `typeui-artistic` | `typeui-dramatic` | Design tools, non-enterprise vibe-forward. |
83
+ | Raw / statement (neobrutalism) | `typeui-neobrutalism` | `typeui-bold` | Gen-Z, indie, deliberate rule-breaking. |
84
+ | Premium / luxury | `typeui-dramatic` | `typeui-paper` | No dedicated luxury skill — combine dramatic hero with paper's typographic restraint, then commission custom tokens via `/frontend-design`. |
85
+ | Tech / cyberpunk | `typeui-dashboard` | `typeui-bold` | Dashboard dark base + bold accent/glow; extend via `/frontend-design` for neon/chromatic detail. |
86
+ | Warm / organic | `typeui-paper` | `typeui-doodle` | Paper carries the warmth via texture + typographic rhythm; doodle adds hand-made detail for craft brands. |
87
+ | Retro / nostalgic | `typeui-paper` | `typeui-doodle` | Paper's print-era cues fit mid-century/editorial retro; doodle for 90s/zine nostalgia. `/frontend-design` required for period-specific palettes. |
88
+ | Dark / cinematic | `typeui-dramatic` | `typeui-dashboard` | Dramatic for narrative hero surfaces; dashboard for operator/app surfaces that must stay dark through the product. |
89
+
90
+ Read this table as: "if the positioning brief (sd-research §4) lands on vibe X,
91
+ sd-audit/sd-fix should recommend the **primary** skill first; if the project
92
+ has constraints that rule it out (e.g. already on a light palette), fall back
93
+ to the secondary; if both are partial, log a non-blocking advisory that
94
+ `/frontend-design` is required to finish the aesthetic."
95
+
96
+ ## Recommending a skill in a finding
97
+
98
+ When `design-intelligence.categories.design_system_coherence.score ≤ 4`,
99
+ sd-audit MUST add a non-blocking advisory finding:
100
+
101
+ ```json
102
+ {
103
+ "id": "F-NNNN",
104
+ "rule": "design-system-coherence",
105
+ "severity": 2,
106
+ "risk_for_fix": "HIGH",
107
+ "finding": "UI uses pure shadcn defaults with no identity. Recommend applying a design skill to establish visual language.",
108
+ "template_id": "DSC-1",
109
+ "advisory_only": true,
110
+ "recommended_skills": ["typeui-dashboard", "typeui-application"],
111
+ "why": "Admin/dashboard context; dark theme already present; data density matches cloud-platform skills.",
112
+ "application": "User runs /simplify or a frontend-design session with the chosen skill active — this is not auto-fixable, needs human design decision."
113
+ }
114
+ ```
115
+
116
+ Do NOT auto-apply design skills via sd-fix — aesthetic changes are always
117
+ HIGH risk and require human sign-off. The finding is informational:
118
+ sd-fix emits it into fix-report.md as "Proposed aesthetic direction" with
119
+ a preview capability (sd-research already has screenshots of competitors
120
+ in similar aesthetics to show reference).
121
+
122
+ ## Integration with frontend-design plugin
123
+
124
+ If the user runs `/frontend-design` after super-design, the plugin can
125
+ read `design-intelligence.json` and pre-load the `recommended_skills`
126
+ automatically as seed context.
127
+
128
+ ## References
129
+
130
+ - typeui.sh catalog — https://www.typeui.sh/design-skills
131
+ - shadcn/ui — https://ui.shadcn.com
132
+ - Karri Saarinen, Quality — https://linear.app/now/why-is-quality-so-rare
133
+ - Vercel Design Engineering — https://vercel.com/blog/design-engineering-at-vercel