roast-my-design-system 9.2.3 → 9.2.4

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
@@ -142,11 +142,11 @@ Eleven reports, hosted exactly as the tool writes them. Every number determinist
142
142
 
143
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:
144
144
 
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 where the agent will have to guess, the fixes you can make right now, each with what it is worth and 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.2.2)
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 where the agent will have to guess, the fixes you can make right now, each with what it is worth and 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.2.4)
146
146
 
147
147
  The same report in light mode (one file, built-in toggle):
148
148
 
149
- ![The diagnosis report in light mode](assets/report-light-hero.png?v=9.2.2)
149
+ ![The diagnosis report in light mode](assets/report-light-hero.png?v=9.2.4)
150
150
 
151
151
  ## Why the numbers hold
152
152
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "roast-my-design-system",
3
- "version": "9.2.3",
3
+ "version": "9.2.4",
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": [
@@ -1066,8 +1066,9 @@ function whereToStartSection() {
1066
1066
  c.push({ score: 40, metric: null, title: `Delete the ${dead.length} theme variable${dead.length === 1 ? '' : 's'} nothing uses`,
1067
1067
  sub: `${dead.slice(0, 3).map((r) => `--${esc(r)}`).join(', ')}${dead.length > 3 ? ' and more' : ''} sit in ${esc(P.shadcn.sheet.file)} next to the real theme, and nothing in the repo reads them. An agent opening that file sees 2 colour systems and can not tell which one is dead. ${dead.length * 2} lines to delete; the cheapest fix on this page.` });
1068
1068
  }
1069
- if (agentFiles.length === 0) c.push({ score: 60, metric: null, title: 'Write the agent rules file',
1070
- sub: `No CLAUDE.md, no AGENTS.md. One page naming the canonical components and the tokens file stops your agent guessing on every UI change. Cheapest fix on this list.` });
1069
+ // The agent rules file is not a fix here: it has its own section ("Give the
1070
+ // agent the answers") and must not compete with fixes for the three places
1071
+ // (Greg, 2026-09-30).
1071
1072
  if (componentsMeasured && hardDupes.length > 0) {
1072
1073
  // Pick the pair with the strongest copy-paste evidence: sibling files in
1073
1074
  // app code (same basename, neither in a shared package) are true
@@ -1206,6 +1207,9 @@ function whereToStartSection() {
1206
1207
  // already green, or the move lands inside the band it started in.
1207
1208
  for (const item of c) {
1208
1209
  item.delta = 0; item.target = null; item.why = 'not part of the score';
1210
+ // No score, no points: an unscored report promised "+10" and "raises the
1211
+ // score, by 5" on commerce, strapi and three more (2026-09-30).
1212
+ if (healthScore === null) { item.why = 'no score here'; continue; }
1209
1213
  if (!item.metric) continue;
1210
1214
  const tile = bigStats.find((st) => st.metric === item.metric);
1211
1215
  const now = tile?.healthValue;
@@ -1218,7 +1222,12 @@ function whereToStartSection() {
1218
1222
  if (nb && nb.gain > 0) item.target = nb;
1219
1223
  else item.why = healthOf(item.metric, now) === 'good' ? 'already green' : 'no points on its own';
1220
1224
  }
1221
- const top3 = c.sort((a, b) => (b.delta - a.delta) || (b.score - a.score)).slice(0, 3);
1225
+ // A fix that pays only once finished still outranks one that never pays:
1226
+ // sorting on delta alone put shadcn-admin's one paying fix second, behind a
1227
+ // fix worth nothing (2026-09-30).
1228
+ const tier = (item) => (item.delta > 0 ? 2 : item.target ? 1 : 0);
1229
+ const top3 = c.sort((a, b) => (tier(b) - tier(a)) || (b.delta - a.delta)
1230
+ || ((b.target?.gain ?? 0) - (a.target?.gain ?? 0)) || (b.score - a.score)).slice(0, 3);
1222
1231
  if (!top3.length) return '';
1223
1232
  // The headline is the score with every move applied together, not the sum of
1224
1233
  // the parts: two moves on the same tile must not be counted twice.
@@ -1244,7 +1253,9 @@ function whereToStartSection() {
1244
1253
  ? `${ofThese(paying.length)} could raise the design system health score from <b class="proj">${healthScore} to ${after}</b>.${later.length ? ` ${cap(COUNT[later.length - 1])} more ${later.length === 1 ? 'pays' : 'pay'} ${inFull(later.length)}.` : ''}${rest}`
1245
1254
  : later.length
1246
1255
  ? `${ofThese(later.length)} ${later.length === 1 ? `raises the score, by ${later[0].target.gain},` : 'raise the score'} ${inFull(later.length)}.${rest}`
1247
- : `${total === 1 ? 'It does' : 'They do'} not move the score. ${total === 1 ? 'It is' : 'They are'} here because ${total === 1 ? 'it stops' : 'each one stops'} the agent guessing.`;
1256
+ : healthScore === null
1257
+ ? `This repo gets no score, so there is no score to raise. ${total === 1 ? 'This fix is' : 'These fixes are'} here because ${total === 1 ? 'it stops' : 'each one stops'} the agent guessing.`
1258
+ : `${total === 1 ? 'It does' : 'They do'} not move the score. ${total === 1 ? 'It is' : 'They are'} here because ${total === 1 ? 'it stops' : 'each one stops'} the agent guessing.`;
1248
1259
  const title = paying.length || later.length ? 'Fixes you can make right now to increase the health score' : 'Fixes you can make right now';
1249
1260
  const chip = (item) => item.delta > 0
1250
1261
  ? `<span class="delta" title="once all of them are done">+${item.delta}</span>`
@@ -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.2.3';
4
+ export const VERSION = '9.2.4';
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.