roast-my-design-system 9.0.7 → 9.1.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/README.md CHANGED
@@ -1,8 +1,8 @@
1
- <img src="assets/roster_logo_v1.png?v=8.2.0" width="100" alt="roast-my-design-system">
1
+ <img src="assets/roastmds.svg" width="100" alt="roast-my-design-system">
2
2
 
3
3
  # roast-my-design-system
4
4
 
5
- [![npm](https://img.shields.io/npm/v/roast-my-design-system?color=2dd4bf&label=npm)](https://www.npmjs.com/package/roast-my-design-system) [![Socket](https://badge.socket.dev/npm/package/roast-my-design-system)](https://socket.dev/npm/package/roast-my-design-system) [![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE) [![zero dependencies](https://img.shields.io/badge/dependencies-0-2dd4bf)](https://www.npmjs.com/package/roast-my-design-system?activeTab=dependencies) [![no telemetry](https://img.shields.io/badge/no-telemetry-2dd4bf)](#what-makes-the-numbers-trustworthy)
5
+ [![npm](https://img.shields.io/npm/v/roast-my-design-system?color=2dd4bf&label=npm)](https://www.npmjs.com/package/roast-my-design-system) [![downloads](https://img.shields.io/npm/dm/roast-my-design-system?color=2dd4bf&label=downloads)](https://www.npmjs.com/package/roast-my-design-system) [![Socket](https://badge.socket.dev/npm/package/roast-my-design-system)](https://socket.dev/npm/package/roast-my-design-system) [![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE) [![zero dependencies](https://img.shields.io/badge/dependencies-0-2dd4bf)](https://www.npmjs.com/package/roast-my-design-system?activeTab=dependencies) [![no telemetry](https://img.shields.io/badge/no-telemetry-2dd4bf)](#what-makes-the-numbers-trustworthy)
6
6
 
7
7
  [![MCP verified in Claude Code](https://img.shields.io/badge/MCP_verified-Claude_Code-2dd4bf)](#live-answers-over-mcp) [![MCP verified in Cursor](https://img.shields.io/badge/MCP_verified-Cursor-2dd4bf)](#live-answers-over-mcp) [![MCP verified in Windsurf / Devin Desktop](https://img.shields.io/badge/MCP_verified-Windsurf_%2F_Devin_Desktop-2dd4bf)](#live-answers-over-mcp)
8
8
 
@@ -10,77 +10,123 @@
10
10
 
11
11
  Your AI can write the UI. This makes sure it writes *your* UI.
12
12
 
13
- An agent builds UI the way a new hire does on their first day: it looks around the repo and copies what it finds. We measured that on 10 real products, 259 agent sessions, with and without this tool. On everyday work the agent reused the components and tokens that were there and stayed on-system. It went off-system in the places where the repo had no answer to copy. A chart, in a codebase with no chart palette. A theme, where nobody had named the surfaces. And it filled each gap the way the repo's own code did: by hand.
14
-
15
13
  ```bash
16
14
  npx roast-my-design-system@latest
17
15
  ```
18
16
 
19
- Run it at the root of a UI repo. About a second later a self-contained HTML report opens. No account, no network, no telemetry, nothing in your repo is changed.
17
+ Run it at the root of a UI repo. One second later, a report opens.
18
+ No account. No network. No telemetry. Nothing in your repo changes.
19
+
20
+ **Current release: 9.1.** Version history in [CHANGELOG.md](CHANGELOG.md).
21
+
22
+ ## The idea
23
+
24
+ ### An agent copies what it finds.
25
+
26
+ ### It invents where the repo has no answer.
27
+
28
+ We tested this on 10 real open-source products, 259 agent sessions, with and without this tool.
29
+
30
+ Findings each session added, counted by this tool's own rules:
31
+
32
+ | Task | Model | Without roast | Roast MCP and rules installed | Roast edit hook on |
33
+ |---|---|---|---|---|
34
+ | Add a panel, build a dashboard, tighten a list (80 sessions) | Sonnet 5 | 7 | 9 | not run |
35
+ | A Christmas theme, 10 products | Sonnet 5 | 28 | 2 | not run |
36
+ | A new chart, 4 products, 5 runs each | Sonnet 5 | 10 in 20 runs | 0 in 20 runs, hook installed too but it never had to speak | |
37
+ | A new chart, 4 products | Haiku 4.5 | 25 | 39 | 0 in 14 of 15 runs |
38
+ | Chart, status colour, empty state, new component | Haiku 4.5 | 42 in 16 runs | 49 in 16 runs | 3 in 51 runs |
20
39
 
21
- **Current release: 9.0.** What changed in each version is in [CHANGELOG.md](CHANGELOG.md).
40
+ Routine work stayed on-system either way. Invention drifted.
22
41
 
23
- ### The mess an agent adds is a map of the gaps in your system
42
+ Sonnet called the MCP tools in about one session in three. Haiku never did, so for Haiku the MCP on its own changed nothing. The edit hook runs without being asked, and that is the column that goes to zero.
24
43
 
25
- An agent copies what it finds. Where the repo has no answer, it makes one up, and the next agent copies that. This tool draws the map before the gap becomes a layer: it finds the places with no answer, measures the mess already there, writes the rules that keep the agent on-system, and puts a check inside the agent's editor that runs whether or not the agent thinks to ask.
44
+ Where did the agent invent? Where the repo had nothing to copy. Dub has no chart palette. Its own charts hardcode 17 colours. Asked for a chart, Haiku hardcoded 9 more.
26
45
 
27
- **A script does the counting. Claude writes the explanation.** Every number in the report comes from a deterministic read of your files, the same numbers every run. Where an AI reads the scan for you, its text is labelled as written by AI and kept apart from the measurements.
46
+ So the mess an agent adds is a map of the gaps in your system.
47
+
48
+ This tool draws the map.
49
+
50
+ ## Roast. Teach. Guard.
51
+
52
+ **Roast** the repo to find its real design system, the mess in it, and the gaps.
53
+
54
+ **Teach** the agent, through generated rules and a local MCP server.
55
+
56
+ **Guard** every edit, so the agent does not have to remember to ask.
57
+
58
+ ROAST what is in the repo, and what is missing
59
+ ↓
60
+ TEACH rules in the agent files, answers over MCP
61
+ ↓
62
+ GUARD every edit checked, the PR gated
28
63
 
29
64
  ## What you get
30
65
 
31
- **The gaps, named.** A "Where agents will invent" section lists the places where the repo has no answer yet, with the files that prove each one and the single move that closes it. Today it knows one gap for certain, because the agent runs found it: charts that paint their series colours by hand in a repo with no chart palette. Across 126 public repos, 43 look like that. The list grows only when a gap has been measured, never guessed.
66
+ ### Where agents will invent
32
67
 
33
- **A health score you can defend in a meeting.** 0 to 100, the same number every run, measured against 3 yardsticks: the ideal norms of a design system, the median of 34 scanned public products, and 10 reputable systems (Primer, Polaris, Carbon, shadcn/ui and others). Monorepos get a score per package, so `packages/ui` at 80 stops hiding `apps/web` at 40.
68
+ The places where the repo has no answer yet.
34
69
 
35
- **The receipts behind it.** Every colour and its near-identical twin. Every off-scale spacing value, typeface, duplicated or never-imported component, inline style block and `!important`, each with a real file path. One HTML file you can open, Slack or email.
70
+ - the gap, in one line
71
+ - the files that prove it
72
+ - the one move that closes it
36
73
 
37
- **The first fixes, ranked by payoff.** A "Where to start" list derived from your own numbers. Each move has a copy button with a ready-made fix prompt for your agent: the finding, the files, the expected payoff, and rules that respect deliberate craft. Fix, rescan, press the next button.
74
+ One gap is known for certain today, because the runs found it: charts hardcoding colours in a repo with no chart palette. 43 of 126 public repos look like that. A gap joins the list when it has been measured.
38
75
 
39
- **Rules that stop the mess coming back.** A generated `design-system-rules.md` with the canonical components, your token file and the known duplicates to avoid. `--apply` writes it into every agent file you have: Claude, Cursor, GitHub Copilot and Windsurf. Every scan also checks the rules you already have for stale references, and says which of your tools can actually read them.
76
+ ### Fix what makes agents guess
40
77
 
41
- ## Three ways to use it
78
+ The mess the agent will copy, ranked by what fixing it is worth.
42
79
 
43
- ### 1. Roast the repo
80
+ - what was found
81
+ - where, with the file path
82
+ - why it matters
83
+ - what to change
84
+ - a copy button with the fix prompt for your agent
44
85
 
45
- The scan and the report. The full flag list is under [Every command](#every-command).
86
+ Fix, rescan, press the next button.
46
87
 
47
- ```bash
48
- npx roast-my-design-system@latest
49
- ```
88
+ ### A score you can defend in a meeting
50
89
 
51
- ### 2. Put the system inside the agent
90
+ 0 to 100. The same number every run.
52
91
 
53
- The same engine as a local MCP server. Five read-only tools the agent calls while it writes UI, from "is there a Button already?" to "review my changes". The Claude Code plugin bundles it; any other client registers one command. See [Live answers over MCP](#live-answers-over-mcp).
92
+ Measured against three yardsticks: the ideal norms of a design system, the median of 34 product repos at the core of a 112-repo benchmark, and 10 reputable systems (Primer, Polaris, Carbon, shadcn/ui and others).
54
93
 
55
- ```bash
56
- claude mcp add roast -- npx roast-my-design-system@latest --mcp
57
- ```
94
+ Monorepos get a score per package. `packages/ui` at 80 stops hiding `apps/web` at 40.
58
95
 
59
- ### 3. Check what the agent changed
96
+ ### Every finding, with its file path
60
97
 
61
- Three doors to the same check. `--check` reads your git diff in the terminal and exits 1 on findings, so it slots into a script. The plugin's `review` skill does it in chat. And the plugin's edit hook runs it after every file the agent edits, writes or produces with a shell command, handing back only the findings that edit added. The agent does not have to remember to ask.
98
+ - every hardcoded colour, and its near-identical twin
99
+ - every spacing value off the scale
100
+ - every duplicated component
62
101
 
63
- ```bash
64
- npx roast-my-design-system@latest --check
65
- ```
102
+ And 8 more kinds, all in [What it measures](#what-it-measures). One HTML file. Open it, Slack it, email it.
66
103
 
67
- For pull requests there is a sister package, [guard-my-design-system](https://github.com/gregkozakiewicz/guard-my-design-system): a GitHub Action that runs the same rules on the diff and fails the check when new mess arrives.
104
+ ### Rules for your agent
68
105
 
69
- ## What the agent runs showed
106
+ Generated from your repo, into `design-system-rules.md`:
70
107
 
71
- We ran Claude Code headless on 10 public products (cal.com, Dub, Metabase, Plausible, SigNoz, trigger.dev and four more), pinned to one commit each, and counted the design-system findings each session added, by this tool's own rules. 259 sessions, Sonnet 5 and Haiku 4.5, September 2026.
108
+ canonical components
109
+ the token file
110
+ known duplicates to avoid
111
+ spacing steps
112
+ typefaces
113
+ the kit's own vocabulary
72
114
 
73
- Routine work did not drift, with or without help: 7 findings without this tool and 9 with it, over 80 sessions of moving panels and building dashboards. Invention drifted, and in the shape the repo already had. Three numbers:
115
+ `--apply` writes them into every agent file you have: Claude, Cursor, GitHub Copilot, Windsurf. Every scan also checks the rules you already have for stale references.
74
116
 
75
- - **28 to 2.** Findings a Christmas theme added across 10 products, without and with this tool. The agent called the MCP tools in every theme session.
76
- - **42 in 16 runs, to 3 in 51.** Haiku 4.5 asked for a chart, a status colour, an empty state and a new component, without the tool and with the edit hook on.
77
- - **10 in 20 runs, to 0 in 20.** Sonnet 5 asked for a chart, without and with the plugin installed. It called no tool and the hook never had to speak: the rules in its context were enough.
117
+ ### A script does the counting
78
118
 
79
- The agent does not always call a tool when it should: Sonnet in about one session in 3, Haiku never. A check on every edit does not have that problem. Nothing was rendered, so zero findings means on-system by these rules, a floor rather than a design review. Method, tables and limits are in the research write-up, which will be published separately.
119
+ Every number comes from a deterministic read of your files. Claude writes the explanation, labelled as written by AI and kept apart from the numbers.
120
+
121
+ ## How the runs were done
122
+
123
+ Claude Code, headless, on 10 public products pinned to one commit each: cal.com, Dub, Metabase, Plausible, SigNoz, trigger.dev and four more. 259 sessions, Sonnet 5 and Haiku 4.5, September 2026. Every changed file was judged by this tool's rules at the end of the session and at the pinned commit; a finding counts only if the session added it.
124
+
125
+ Nothing was rendered. Zero findings means on-system by these rules: a floor, not a design review. Method, tables and limits are in the research write-up, which will be published separately.
80
126
 
81
127
  ## Live examples
82
128
 
83
- Eleven reports, hosted exactly as the tool writes them: self-contained HTML, every number deterministic, every path real. Four kits, a fresh install, a registry, Stencil, Lit and plain React.
129
+ Eleven reports, hosted exactly as the tool writes them. Every number deterministic, every path real.
84
130
 
85
131
  - **[npx shadcn create, fresh](https://gregkozakiewicz.github.io/roast-my-design-system/examples/shadcn-create-fresh.html)** (factory install, all 61 components): read as a fresh install, "the score is the kit's, not yours"; 13 colours, every theme variable in place, shadcn's own 24 bracket values named and not counted. No score.
86
132
  - **[Unleash](https://gregkozakiewicz.github.io/roast-my-design-system/examples/unleash-mui.html)** (MUI): 1,109 files import the kit and the theme is read 6,166 times; 4 colours and 2 spacings per 100 kit files are written onto components. Score 60.
@@ -94,38 +140,43 @@ Eleven reports, hosted exactly as the tool writes them: self-contained HTML, eve
94
140
  - **[magicuidesign/magicui](https://gregkozakiewicz.github.io/roast-my-design-system/examples/magicui.html)** (registry): counted on the components it publishes, 52 off-theme colours per 100 files in the code it ships, its docs site kept out and named. Score 78.
95
141
  - **[adobe/spectrum-web-components](https://gregkozakiewicz.github.io/roast-my-design-system/examples/adobe-spectrum.html)** (Lit): hardcoded colours sitting beside 744 colour tokens, and 37 !important declarations. Score 66.
96
142
 
97
- The full report for vercel/ai-chatbot, top to bottom, with "What the numbers mean", Claude's read of the scan, under the verdict:
143
+ The full report for vercel/ai-chatbot. The verdict answers what the agent will learn here, the gap section comes first, then "What the repo teaches the agent", Claude's read of the scan:
98
144
 
99
- ![The full diagnosis report for vercel/ai-chatbot in dark mode: a fixed side panel with the health score and what it measures, the stack, how the repo was read as a shadcn install, an index of every section and what is not the team's and not counted; then the summary, the What the numbers mean analysis written by Claude, priced Where to start moves each with its copy-the-fix-prompt button, the wrapped present with the agent rules, an agent trap callout, 3-yardstick tiles including the 2 shadcn tiles, the adoption map treemap, palette forensics, the shadcn theme variable by variable, spacing receipts, typography specimens, offenders, duplicates, and the component usage ledger](assets/report-full-dark.png?v=9.0.6)
145
+ ![The full diagnosis report for vercel/ai-chatbot in dark mode: a fixed side panel with the health score and what it measures, the stack, how the repo was read as a shadcn install, an index of every section and what is not the team's and not counted; then the verdict on what the agent will learn here, the Where agents will invent section, the What the repo teaches the agent analysis written by Claude, priced Fix what makes agents guess moves each with its copy-the-fix-prompt button, the wrapped present with the agent rules, an agent trap callout, 3-yardstick tiles including the 2 shadcn tiles, the adoption map treemap, palette forensics, the shadcn theme variable by variable, spacing receipts, typography specimens, offenders, duplicates, and the component usage ledger](assets/report-full-dark.png?v=9.1.0)
100
146
 
101
147
  The same report in light mode (one file, built-in toggle):
102
148
 
103
- ![The diagnosis report in light mode](assets/report-light-hero.png?v=9.0.6)
149
+ ![The diagnosis report in light mode](assets/report-light-hero.png?v=9.1.0)
150
+
151
+ ## Why the numbers hold
104
152
 
105
- ## What makes the numbers trustworthy
153
+ - **Deterministic.** A zero-dependency Node script reads every file and returns the same numbers every run. About a second on a normal repo.
154
+ - **Read-only. No network. No telemetry.** The test suite fails if package.json ever declares a dependency.
155
+ - **Honest gaps.** What the scan cannot read says "not measured" and drops out of the score.
156
+ - **Honest exclusions.** Tests, stories, docs sites, artwork and email templates are left out. Your own exclusions are printed in the report header with file counts.
157
+ - **A real benchmark.** 112 public React repos. A core fleet of 34 sets the medians; the rest feed the kit profiles, so a shadcn repo is compared with shadcn repos. The builder is in `tools/benchmark/`.
158
+ - **Importable scoring.** `scoreHarvest(harvest)` returns the score and metrics as plain data. The report and a CI check get the same numbers.
106
159
 
107
- - **Deterministic.** A zero-dependency Node script reads every file, about a second on a normal repo, and returns the same numbers every run.
108
- - **Read-only, no network, no telemetry.** Nothing in your repo is modified and nothing about your code leaves your machine. The suite fails if package.json ever declares a dependency.
109
- - **Honest gaps and exclusions.** What the scan cannot read says "not measured" and drops out of the score. Test files, stories, docs sites, artwork and email templates are left out, and your own exclusions are printed in the report header with file counts.
110
- - **A real benchmark.** 112 public React repos scanned; a core fleet of 34 sets the medians, the rest feed the kit profiles so a shadcn repo is compared with shadcn repos. Ten reputable systems (Primer, Polaris, Carbon, GOV.UK and others) are the second yardstick. The builder is in `tools/benchmark/`, so the ruler can be checked.
111
- - **Importable scoring.** `scoreHarvest(harvest)` returns the score and metrics as plain data; the report and a CI check get the same numbers.
160
+ The long version, with scan scoping and what the plugin runs on your machine, is in [docs/reference.md](docs/reference.md).
112
161
 
113
- The longer version, with what each exclusion covers, how a scan is scoped and what the plugin runs on your machine, is in [docs/reference.md](docs/reference.md).
162
+ ## Works with
114
163
 
115
- ## What it works on
164
+ ### Frameworks
116
165
 
117
- **Supported**
166
+ React, Next.js, Remix, Vite
167
+ Stencil, Lit, custom elements
118
168
 
119
- - React repos: Next, Remix, Vite and plain React.
120
- - Web-component repos: Stencil and Lit.
121
- - 4 kinds of repo: product, library, shadcn, registry.
122
- - 5 kit profiles: Tailwind theme, MUI, Mantine, Chakra, Ant Design.
123
- - Any styling on top: Tailwind, styled-components, Emotion, Sass, Less, vanilla-extract, Stitches, CVA, CSS Modules.
169
+ ### Kits and styling
124
170
 
125
- **Recognised, not supported yet**
171
+ Tailwind, shadcn/ui, MUI, Mantine, Chakra UI, Ant Design
172
+ CSS Modules, Sass, Less, Emotion, styled-components, vanilla-extract, CVA, Stitches
126
173
 
127
- - Vue, Angular and Svelte: named in the header, colours and spacing still counted, but components are not measured and the report says so.
128
- - HeroUI, NextUI, Radix Themes, Fluent UI, React Bootstrap and Grommet: named in the header, no kit rules.
174
+ Four kinds of repo: product, library, shadcn install, registry. Each compared with repos built the same way.
175
+
176
+ ### Recognised, not measured yet
177
+
178
+ Vue, Angular, Svelte: named in the header, colours and spacing counted, components not measured. The report says so.
179
+ HeroUI, NextUI, Radix Themes, Fluent UI, React Bootstrap, Grommet: named in the header, no kit rules.
129
180
 
130
181
  ## Every command
131
182
 
@@ -152,13 +203,13 @@ One scan powers all of it; the flags decide what lands on disk. Combine freely.
152
203
 
153
204
  | Command&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | What you get |
154
205
  |---|---|
155
- | <code>...&nbsp;--notes&nbsp;&lt;file.md&gt;</code> | The agent's read of this scan, embedded in the report as **"What the numbers mean"**: which findings matter, which good numbers are accidents, what to fix first. Labelled as written by AI and kept apart from the measured numbers. The Claude Code skill writes and passes it automatically; the flag is here so any agent can |
206
+ | <code>...&nbsp;--notes&nbsp;&lt;file.md&gt;</code> | The agent's read of this scan, embedded in the report as **"What the repo teaches the agent"**: which findings matter, which good numbers are accidents, what to fix first. Labelled as written by AI and kept apart from the measured numbers. The Claude Code skill writes and passes it automatically; the flag is here so any agent can |
156
207
  | <code>...&nbsp;--section&nbsp;"Title"&nbsp;&lt;file.md&gt;</code> | A further agent-written chapter after the notes, same styling, same label, sub-headings allowed. Repeatable |
157
208
  | `... --hook` | The check the Claude Code plugin runs after every edit, for hand-installed setups: reads the hook event on stdin, checks the file that changed, prints only the findings the edit added as JSON. Always exits 0 |
158
209
  | `... --mcp` | The scan as a local MCP server: 5 tools your agent calls while writing UI, plus the `roast-fix` prompt that serves the top fix from a fresh scan. See [Live answers over MCP](#live-answers-over-mcp) |
159
- | <code>/roast-my-design-system</code> (in&nbsp;Claude&nbsp;Code) | The full experience: the roast in chat *and* embedded in the report as "What the numbers mean", the rules offer, and the fix loop with Claude on your own numbers |
210
+ | <code>/roast-my-design-system</code> (in&nbsp;Claude&nbsp;Code) | The full experience: the roast in chat *and* embedded in the report as "What the repo teaches the agent", the rules offer, and the fix loop with Claude on your own numbers |
160
211
 
161
- **"Why this matters"** is generic, ships with the tool and reads the same in every report. **"What the numbers mean"** is your agent's read of your repo, and only appears when an agent passed it.
212
+ **"Why this matters"** is generic, ships with the tool and reads the same in every report. **"What the repo teaches the agent"** is your agent's read of your repo, and only appears when an agent passed it.
162
213
 
163
214
  ## Live answers over MCP
164
215
 
@@ -292,13 +343,13 @@ It runs the same check as `--check` on the files in your git diff and lists each
292
343
  You get the roast in chat plus `design-system-roast.html` at your repo root, a self-contained page with:
293
344
 
294
345
  - a **health score** computed from how your numbers sit against the ideal
295
- - **"What the numbers mean"**: Claude's read of your scan, embedded in the file you'll forward, labelled as written by Claude and kept apart from the measured numbers. The score alone can flatter; this section keeps a shared 85/100 honest
346
+ - **"What the repo teaches the agent"**: Claude's read of your scan, embedded in the file you'll forward, labelled as written by Claude and kept apart from the measured numbers. The score alone can flatter; this section keeps a shared 85/100 honest
296
347
  - stat tiles comparing you to all 3 yardsticks
297
348
  - a **light/dark theme toggle** in one file
298
349
  - 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
299
- - a **Where to start** close: up to 3 moves derived from your repo's own numbers, each with a file-path receipt
300
- - a **Where agents will invent** list: the gaps where the repo has no answer yet, with the files that prove each one and the move that closes it
301
- - a **present** 🎁 below it: `design-system-rules.md` wrapped inside the report. Unwrap, then copy or download the agent rules generated from your scan
350
+ - a **Fix what makes agents guess** list: up to 3 moves derived from your repo's own numbers, each with a file-path receipt
351
+ - a **Where agents will invent** section, first under the verdict: the gaps where the repo has no answer yet, with the files that prove each one and the move that closes it, or the honest empty state when none is found
352
+ - **Give the agent the answers**: `design-system-rules.md` wrapped inside the report as a present. Unwrap, then copy or download the agent rules generated from your scan
302
353
 
303
354
  After the roast, the skill offers to write `design-system-rules.md` to disk and merge it into your CLAUDE.md, `.cursor/rules` or AGENTS.md.
304
355
 
@@ -360,8 +411,6 @@ Yes, the median repo is already a mess. That is the point. An agent arriving in
360
411
 
361
412
  **Your AI can write the UI. This makes sure it writes *your* UI.**
362
413
 
363
- <a href="https://github.com/gregkozakiewicz/roast-my-design-system"><img src="https://img.shields.io/badge/If%20it%20roasted%20you%20fairly%2C%20a%20star%20helps%20other%20people%20find%20it-a855f7?style=for-the-badge&logo=github&logoColor=white" alt="If it roasted you fairly, a star helps other people find it"></a>
364
-
365
414
  ## License
366
415
 
367
416
  MIT. The code is yours to fork, modify and redistribute; the copyright notice travels with it.
package/cli/roast.mjs CHANGED
@@ -100,7 +100,7 @@ Run it yourself
100
100
  For your agent (a plain terminal has no agent to write these)
101
101
 
102
102
  --notes <file> the agent's read of this scan, embedded in the report as
103
- "What the numbers mean", labelled as written by AI and kept
103
+ "What the repo teaches the agent", labelled as written by AI and kept
104
104
  apart from the measured numbers. The Claude Code skill
105
105
  writes and passes this automatically
106
106
  --section "Title" <file>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "roast-my-design-system",
3
- "version": "9.0.7",
3
+ "version": "9.1.0",
4
4
  "mcpName": "io.github.gregkozakiewicz/roast-my-design-system",
5
5
  "description": "Your AI can write the UI. This makes sure it writes your UI. A deterministic scanner scores your design system 0-100 against 112 public repos, reads React and web components (Stencil, Lit), hands you a copy-paste fix prompt for each top finding, writes rules for Claude, Cursor, Copilot and Windsurf with --apply, and runs as a local MCP server with --mcp.",
6
6
  "keywords": [
@@ -351,6 +351,15 @@ let verdict = noSystemLikely
351
351
  ? 'This repo is in good shape, and your agent has rules to read. Keep them in step with the code.'
352
352
  : 'This repo is in good shape. The gap is documentation: your agent still can\'t see the system.')
353
353
  : findings.slice(0, 3).join('. ') + '.';
354
+ // The lead line answers the report's question before the measured verdict
355
+ // does: does this repo give an agent something to copy, and where does it
356
+ // not. A gap named here is one lib/gaps admitted after a fleet probe.
357
+ const gapLead = (noSystemLikely || fresh) ? '' : (() => {
358
+ const gaps = h.gaps ?? [];
359
+ if (!gaps.length) return 'This repo gives an agent something to copy everywhere this scan can measure.';
360
+ const named = gaps.map((g) => g.title.charAt(0).toLowerCase() + g.title.slice(1));
361
+ return `Most of this repo gives an agent something to copy. ${gaps.length === 1 ? 'One gap remains' : `${gaps.length} gaps remain`}: ${esc(named.join('; '))}.`;
362
+ })();
354
363
  if (bench && findings.length && !fresh) {
355
364
  const core = [['colors', tokenLed ? colorStrays : colors.length], ['greys', tokenLed ? greyStrays : greys.length],
356
365
  ['spacing', spacingTotal], ['typefaces', typefaces.length], ['exactDuplicates', hardDupes.length], ['inlineStyles', inline.count]];
@@ -958,7 +967,7 @@ function componentsSection() {
958
967
  function giftSection() {
959
968
  const { text: rulesText, ruleCount } = rulesMarkdown(h);
960
969
  return `<section class="glass pad gift-sec">
961
- ${sectionHead('You sat through the roast', 'so you get a present.')}
970
+ ${sectionHead('Give the agent the answers', 'the rules file generated from this scan, wrapped as a present. Agents do not always ask before inventing, so the plugin also checks every file they edit, and guard-my-design-system checks the pull request.')}
962
971
  <div class="gift-stage">
963
972
  <button class="gift" id="gift" aria-label="Unwrap your generated agent rules file">
964
973
  <svg viewBox="0 0 64 64" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
@@ -1020,7 +1029,7 @@ function notesSection() {
1020
1029
  return `<section class="glass pad notes-sec">
1021
1030
  <div class="sec-head">
1022
1031
  ${eyebrow(`Written by ${esc(arg('notes-author', 'Claude'))} from this scan · ${esc((h.harvestedAt ?? '').slice(0, 10))} · not part of the measurement`)}
1023
- <h2>What the numbers mean</h2>
1032
+ <h2>What the repo teaches the agent</h2>
1024
1033
  </div>
1025
1034
  <div class="notes-body">${notesBody(notesText)}</div>
1026
1035
  </section>`;
@@ -1234,7 +1243,7 @@ function whereToStartSection() {
1234
1243
  delta: item.delta || 0, prompt: promptFor(item),
1235
1244
  }));
1236
1245
  return `<section class="glass pad">
1237
- ${sectionHead('Where to start', head)}
1246
+ ${sectionHead('Fix what makes agents guess', head)}
1238
1247
  <div class="ledger">${top3.map((item, i) => `
1239
1248
  <div class="ledger-row start-row">
1240
1249
  <span class="ledger-idx">${String(i + 1).padStart(2, '0')}</span>
@@ -1249,10 +1258,15 @@ function whereToStartSection() {
1249
1258
  // The September 2026 runs showed agents inventing exactly there; the section
1250
1259
  // names the gap, the files that prove it and the one move that closes it.
1251
1260
  function gapsSection() {
1261
+ if (noSystemLikely || fresh) return '';
1252
1262
  const gaps = h.gaps ?? [];
1253
- if (!gaps.length) return '';
1254
- const head = `${gaps.length === 1 ? 'One place' : `${gaps.length} places`} where this repo has no answer yet. An agent asked to build there will invent, because that is what the repo taught it. Close the gap once and the checks take over.`;
1255
- return `<section class="glass" style="margin-top:16px">
1263
+ if (!gaps.length) {
1264
+ return `<section class="glass pad" style="margin-top:16px">
1265
+ ${sectionHead('Where agents will invent', 'No gap found. This scan checks for one kind of gap so far, a chart palette, and this repo either has one or has no charts. The list grows as more gap kinds are measured on real agent runs; a clean result here says the known gaps are closed, and no more than that.')}
1266
+ </section>`;
1267
+ }
1268
+ const head = `${gaps.length === 1 ? 'One place' : `${gaps.length} places`} where this repo gives an agent nothing to copy. Asked to build there, an agent invents, because that is what the repo taught it. Nothing here is a violation: there is no rule yet to break. Define the answer once and every agent after that inherits it.`;
1269
+ return `<section class="glass pad" style="margin-top:16px">
1256
1270
  ${sectionHead('Where agents will invent', head)}
1257
1271
  <div class="ledger">${gaps.map((g, i) => `
1258
1272
  <div class="ledger-row gap-row">
@@ -1523,8 +1537,8 @@ function exclusionsLine() {
1523
1537
  // Title and description come from the scan; an image and canonical URL are
1524
1538
  // passed in when the report is hosted (--og-image, --og-url), never guessed.
1525
1539
  function ogTags() {
1526
- const title = `${repoName}: ${healthScore !== null ? `${healthScore}/100` : 'design-system diagnosis'}${healthScore !== null ? ' design-system health' : ''}`;
1527
- const desc = verdict.replace(/\s+/g, ' ').trim().slice(0, 200);
1540
+ const title = `${repoName}: where an AI agent will invent UI${healthScore !== null ? ` · ${healthScore}/100` : ''}`;
1541
+ const desc = `${gapLead ? `${gapLead.replace(/<[^>]+>/g, '')} ` : ''}${verdict}`.replace(/\s+/g, ' ').trim().slice(0, 200);
1528
1542
  const image = arg('og-image', null), url = arg('og-url', null);
1529
1543
  return [
1530
1544
  `<meta property="og:type" content="website">`,
@@ -1636,7 +1650,7 @@ function exceptionsBlock() {
1636
1650
  function addIndex(page) {
1637
1651
  // heading text is already HTML-escaped; strip tags and leading counts only
1638
1652
  const short = (t) => t.replace(/<[^>]+>/g, '').replace(/\s+/g, ' ').trim().replace(/^[\d,]+ /, '')
1639
- .replace(/^What your AI agent sees today$/, 'What your agent sees').replace(/^You sat through the roast$/, 'Your present')
1653
+ .replace(/^What your AI agent sees today$/, 'What your agent sees').replace(/^Give the agent the answers$/, 'Agent rules').replace(/^What the repo teaches the agent$/, 'What it teaches').replace(/^Fix what makes agents guess$/, 'What to fix')
1640
1654
  .replace(/^The shadcn theme and the 2 shadcn checks$/, 'shadcn theme and checks')
1641
1655
  .replace(/^Your Tailwind theme, and what goes around it$/, 'Your Tailwind theme').replace(/^Your (\w+) theme, and what is written around it$/, 'Your $1 theme').replace(/, declared .*$/, '')
1642
1656
  .replace(/^off-scale spacing values$/, 'Off-scale spacing').replace(/^inline style blocks?$/, 'Inline styles').replace(/^typefaces?$/, 'Typefaces');
@@ -1772,6 +1786,9 @@ ${ogTags()}
1772
1786
  .verdict-card .b1 { right:-64px; top:-64px; width:256px; height:256px; background:var(--blob); filter:blur(48px); }
1773
1787
  .verdict-card .b2 { left:-40px; bottom:-80px; width:224px; height:224px; background:var(--blob2); filter:blur(48px); }
1774
1788
  .verdict { position:relative; font:600 clamp(18px,2.6vw,24px)/1.45 var(--disp); letter-spacing:-.01em; margin-top:10px; }
1789
+ .verdict-sub { position:relative; margin-top:12px; font-size:14.5px; line-height:1.6; color:var(--dim); }
1790
+ .gap-empty { padding:0 26px 22px; color:var(--dim); font-size:14px; line-height:1.6; }
1791
+ .gap-why { margin-top:6px; color:var(--dim); font-size:13.5px; }
1775
1792
 
1776
1793
  section, .agent { margin-top:28px; }
1777
1794
 
@@ -2093,18 +2110,18 @@ ${sidePanel()}
2093
2110
  : `There is most likely <b>no design system in this repo</b>: almost no colour or spacing values were found. Styling may live outside this codebase (CDN stylesheets, a parent repo, or generated output). No score is given.`}</span></div>` : ''}
2094
2111
  <div class="glass verdict-card">
2095
2112
  <div class="blob b1"></div><div class="blob b2"></div>
2096
- ${eyebrow('Summary')}
2097
- <div class="verdict">${esc(verdict)}</div>
2113
+ ${eyebrow(noSystemLikely || fresh ? 'Summary' : 'What will your agent learn here?')}
2114
+ ${gapLead ? `<div class="verdict">${gapLead}</div><div class="verdict-sub">${esc(verdict)}</div>` : `<div class="verdict">${esc(verdict)}</div>`}
2098
2115
  </div>
2099
2116
 
2117
+ ${gapsSection()}
2118
+
2100
2119
  ${notesSection()}
2101
2120
 
2102
2121
  ${extraSectionsHtml()}
2103
2122
 
2104
2123
  ${whereToStartHtml}
2105
2124
 
2106
- ${gapsSection()}
2107
-
2108
2125
  ${agentSection()}
2109
2126
 
2110
2127
  ${giftSection()}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Where agents will invent. The September 2026 runs (164 sessions, 10 real
2
+ * Where agents will invent. The September 2026 runs (259 sessions, 10 real
3
3
  * products) showed agents copying what a repo already has and inventing only
4
4
  * where the design system has no answer: a theme, a chart. A gap is a place
5
5
  * where the next piece of UI, human or agent, has nothing to reuse, so the
@@ -1,7 +1,7 @@
1
1
  // Single version constant for the engine — imported by diagnose (report
2
2
  // footer) and rules (generated-by line). This is the bump spot that used to
3
3
  // live as a const inside diagnose/index.mjs.
4
- export const VERSION = '9.0.7';
4
+ export const VERSION = '9.1.0';
5
5
  // The shape of harvest.json and summary.json. Bumped only when a field is
6
6
  // renamed, removed or changes meaning; a new field is not a new schema. A
7
7
  // tool comparing two scans compares like with like by this number, not by VERSION.