roast-my-design-system 3.2.0 → 3.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.
package/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # roast-my-design-system
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/roast-my-design-system?color=2dd4bf&label=npm)](https://www.npmjs.com/package/roast-my-design-system) [![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
4
+
3
5
  ## A Claude Code skill that roasts your repo's design system with real data.
4
6
 
5
- Run this skill on your codebase and get three things: a health score for your design system, the receipts behind it (every colour, spacing value, duplicated component and inline style, with real file paths), and the first fixes ranked by payoff. It benchmarks you against an Ideal Design System, 29 scanned public repos, and 10 reputable design systems (Primer, Polaris, Carbon, shadcn/ui…), and generates one shareable HTML report: **keep it as the audit, or hand it to Claude as the punch list for the fix.**
7
+ Run this skill on your codebase and get three things: a health score for your design system, the receipts behind it (every colour, spacing value, duplicated component and inline style, with real file paths), and the first fixes ranked by payoff. It benchmarks you against an Ideal Design System, 30 scanned public repos, and 10 reputable design systems (Primer, Polaris, Carbon, shadcn/ui…), and generates one shareable HTML report: **keep it as the audit, or hand it to Claude as the punch list for the fix.**
6
8
 
7
9
  ## Why this exists
8
10
 
@@ -12,16 +14,16 @@ Your AI agent (Claude, Cursor, Copilot) builds UI by imitating what's already in
12
14
 
13
15
  - **Pre-refactor audit.** Run `/roast-my-design-system` before a design-system cleanup to get the measured baseline: every colour, spacing value, duplicated component and inline style, with real file paths.
14
16
  - **Diagnosing almost-right AI output.** When Claude keeps generating UI that looks slightly off, the report shows which duplicated components and stray values it is imitating, and where the canonical ones live.
15
- - **Making the case without a meeting.** Drop the self-contained HTML report in Slack: a health score and three benchmarks (ideal norms, the 29-repo median, 10 reputable systems) argue for the design system for you.
17
+ - **Making the case without a meeting.** Drop the self-contained HTML report in Slack: a health score and three benchmarks (ideal norms, the 30-repo median, 10 reputable systems) argue for the design system for you.
16
18
  - **The fix loop.** Hand the report back to Claude as the punch list and work through the Where to start section, file by file.
17
19
 
18
20
  The full report for vercel/ai-chatbot, top to bottom:
19
21
 
20
- ![The full diagnosis report for vercel/ai-chatbot in dark mode: health score, three-yardstick tiles, palette forensics, spacing receipts, typography, offenders, duplicates, and the where-to-start close](https://raw.githubusercontent.com/pencilrebel/roast-my-design-system/main/assets/report-full-dark.png)
22
+ ![The full diagnosis report for vercel/ai-chatbot in dark mode: health score, three-yardstick tiles, palette forensics, spacing receipts, typography, offenders, duplicates, and the where-to-start close](https://raw.githubusercontent.com/pencilrebel/roast-my-design-system/main/assets/report-full-dark.png?v=3.3.0)
21
23
 
22
24
  The same report in light mode (one file, built-in toggle):
23
25
 
24
- ![The diagnosis report in light mode](https://raw.githubusercontent.com/pencilrebel/roast-my-design-system/main/assets/report-light-hero.png)
26
+ ![The diagnosis report in light mode](https://raw.githubusercontent.com/pencilrebel/roast-my-design-system/main/assets/report-light-hero.png?v=3.3.0)
25
27
 
26
28
  ## What makes the numbers trustworthy
27
29
 
@@ -30,7 +32,7 @@ The same report in light mode (one file, built-in toggle):
30
32
  - **No network, no telemetry.** Everything runs locally. Nothing about your code leaves your machine.
31
33
  - **Honest exclusions.** Test files, Storybook stories, docs sites, example apps, SVG artwork, and email templates (which *must* inline styles) are excluded, so you can't discredit the numbers on a technicality.
32
34
  - **Intent-aware counting (v3).** Runtime-computed inline styles, compound-component APIs and wrapper components are not crimes and are not counted as ones. Token-led repos are judged on their hardcoded strays, not their token architecture. Repeated arbitrary values are read as decisions without names, not drift.
33
- - **A real benchmark.** The "Avg Design System" yardstick comes from scanning 29 public React repos (cal.com, excalidraw, outline, twenty, dub, langfuse…). Median: 88 colours, 12 greys, 17 duplicated components, 42 inline style blocks.
35
+ - **A real benchmark.** The "Avg Design System" yardstick comes from scanning 30 public React repos (cal.com, excalidraw, outline, twenty, dub, langfuse…). Median: 96 colours, 14 greys, 14 duplicated components, 42 inline style blocks, 91 arbitrary Tailwind values.
34
36
  - **A second yardstick: reputable systems.** Curated, scoped scans of 10 well-known design systems (shadcn/ui, Primer, Polaris, Carbon, Material UI, Chakra, Ant Design, GOV.UK, Spectrum, Cloudscape) show what disciplined looks like at scale.
35
37
 
36
38
  ## Install
@@ -85,7 +87,7 @@ Open Claude Code in the repo you want roasted and type:
85
87
  You get the roast in chat plus `design-system-roast.html` at your repo root: a self-contained page (open it, Slack it, email it, no external requests) with:
86
88
 
87
89
  - a **health score** computed from how your numbers sit against the ideal
88
- - stat tiles comparing you to all three yardsticks: Ideal, the 29-repo average, and the reputable systems
90
+ - stat tiles comparing you to all three yardsticks: Ideal, the 30-repo average, and the reputable systems
89
91
  - a **light/dark theme toggle** in one file
90
92
  - the usage-weighted palette bar, the grey ramp, the off-scale spacing receipts, the duplicate-component receipts with clickable file paths, and the worst-offenders ledger
91
93
  - a **Where to start** close: up to three moves derived from your repo's own numbers, each with a file-path receipt
@@ -100,15 +102,16 @@ Three real roasts of public repos, hosted as-is (the same self-contained HTML th
100
102
 
101
103
  ## What it measures
102
104
 
103
- | Metric | Ideal Design System | Median of 29 scanned repos | Median of 10 reputable systems |
105
+ | Metric | Ideal Design System | Median of 30 scanned repos | Median of 10 reputable systems |
104
106
  |---|---|---|---|
105
- | Distinct colours | ~24 | 88 | 24 |
106
- | Shades of grey | up to 13 | 12 | 5 |
107
- | Off-scale spacing values | ~12 | 26 | 6 |
107
+ | Distinct colours | ~24 | 96 | 24 |
108
+ | Shades of grey | up to 13 | 14 | 5 |
109
+ | Off-scale spacing values | ~12 | 27 | 6 |
108
110
  | Typefaces | 2–3 | 2 | 1 |
109
111
  | Border radii | up to 10 | 12 | 2 |
110
- | Duplicated components | 0 | 17 | 10 |
111
- | Inline style blocks | 0 | 42 | 11 |
112
+ | Duplicated components | 0 | 14 | 10 |
113
+ | Inline style blocks | 0 | 42 | 12 |
114
+ | Arbitrary Tailwind values | ~20 | 91 | 0 |
112
115
 
113
116
  Yes, the median repo is already a mess. That's the point.
114
117
 
package/bin/roast.mjs CHANGED
@@ -88,6 +88,13 @@ console.log(`\nWant the fixes, not just the roast? The free Claude Code skill ru
88
88
  scan, then walks the punch list with you: https://github.com/pencilrebel/roast-my-design-system`);
89
89
 
90
90
  if (!noOpen) {
91
- const opener = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'start' : 'xdg-open';
92
- spawnSync(opener, [outPath], { stdio: 'ignore', shell: process.platform === 'win32' });
91
+ // Windows: `start` treats a first quoted arg as the window TITLE, and Node
92
+ // quotes paths containing spaces pass an empty title so the path lands
93
+ // in the file slot. Linux: xdg-open may be absent (headless, WSL); the
94
+ // report path is already printed above, so a failed open is harmless.
95
+ if (process.platform === 'win32') {
96
+ spawnSync('cmd', ['/c', 'start', '', outPath], { stdio: 'ignore' });
97
+ } else {
98
+ spawnSync(process.platform === 'darwin' ? 'open' : 'xdg-open', [outPath], { stdio: 'ignore' });
99
+ }
93
100
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "roast-my-design-system",
3
- "version": "3.2.0",
4
- "description": "Roast your design system with real data. A deterministic, zero-dependency scanner that counts every colour, grey, spacing value, typeface, duplicated component and inline style in your repo, scores it 0-100 against Ideal Design System norms and a 29-repo benchmark, and generates a shareable HTML diagnosis.",
3
+ "version": "3.3.1",
4
+ "description": "Roast your design system with real data. A deterministic, zero-dependency scanner that counts every colour, grey, spacing value, typeface, duplicated component, inline style and arbitrary Tailwind value in your repo, scores it 0-100 against Ideal Design System norms and a 30-repo benchmark, and generates a shareable HTML diagnosis.",
5
5
  "keywords": [
6
6
  "design-system",
7
7
  "design-tokens",