ds-critic: a design review with two auditors
A prototype that turns a design-system review into a tool: Claude builds a screen from IBM Carbon, and a linter and an LLM critic check it independently.

In brief
- The problem
- Most of my work with AI had been using it to build things. I wanted to build a tool that uses AI as part of how it works, and a design-system review, the kind I did by hand when Growth moved onto Hawkins, was a good test: some of it can be measured and some of it takes judgment.
- What changed
- A public demo with a recorded run anyone can watch, live generation behind invite links, and an evals page that measures each auditor's precision and recall on 27 screens plus 8 held out. A run costs about $0.19.
- My part
- I set the goal and the constraints, approved each plan and decision as Claude Code proposed them, and made the calls that were mine, like keeping live generation behind invite links. I marked the critic's spacing and action verdicts blind, which led to the one rule change, and every paid eval or recording run waited for my go. Claude Code wrote all of the code.
Keep reading for the full story, or skip to the next case study, Kestrel Gives: rebuilding a charity auction with AI →
The full story
I wanted to build a tool that uses AI, not just use AI to build tools
By this fall, most of what I’d made with AI was AI helping me build something: a site, an app, a prototype. I wanted to try the other side, a tool where a model is one of the working parts, and to learn what that takes: how you decide what the model should do, how you check its work, and what it costs to run.
I picked a job I know well. When Growth moved its components into Hawkins, Netflix’s design system, part of my work was reviewing screens against the system: checking whether they used the components the way they’re documented, stuck to the tokens, met contrast, and made the main action clear. Some of that is mechanical, and a linter could check it. Some of it is judgment, the kind a senior designer brings to a review. ds-critic is an automated version of that review, and the interesting part is what happens when the two kinds of checking disagree.
Two auditors, kept apart on purpose
You describe a screen in plain language, and Claude builds it using only IBM Carbon’s components and tokens. The screen renders live as real Carbon Web Components, and then two auditors check it against five rules:
- R1–R3, decided by a deterministic linter: components used as documented, tokens only (no hard-coded color or spacing), and contrast and accessible labels.
- R4 and R5, decided by an LLM critic: consistent spacing, and one clear primary action with any destructive action set apart.
The critic also gives its own verdict on R1–R3, but it never sees the linter’s result, so its opinion stays independent. Where they disagree, one of them is wrong, which is exactly the signal I wanted. Violations are marked on the elements that cause them, the score is the share of rules passed, and Fix it sends the failures back to the generator and scores the result again, including when the fix makes things worse.

Carbon, because its rules are written down
The first version, in October, used GitHub’s Primer, because its tokens were easy to check mechanically. When I picked the project back up, Claude compared a few design systems and proposed IBM Carbon, and I went with it. Its Web Components are maintained and open source, but more importantly, Carbon publishes detailed usage guidance for each component, which gives the critic something real to cite. The other candidates were either component libraries without written usage rules, still in beta, or winding down.
Two decisions made the tool honest. The generator returns a flat list of nodes rather than code, so nothing it writes runs in the browser, and every element has an id that a violation can point to. And the canvas builds that list as plain DOM, exactly like markup, rather than through React. That came from two bugs: React set a progress bar’s values as strings, so “8” of “10” compared as greater and drew a full bar, and every heading came out as an h1, because a Carbon heading reads its level once, as it’s added to the page, before React had set it up. Treating the model’s output like markup fixed both, and it’s a fairer test of what the model wrote.
The model wouldn’t break the rules
The plan for the demo was to ask for something bad and let the auditors catch it. One prompt asked for a big, bright red (#ff0000) cancel button right next to the upgrade button, and the generator used Carbon’s danger button in its own section instead, away from the primary action. Another asked for a fancy custom credit card widget, and it built the card from a standard Carbon list. Both runs scored 80 or better. The design system’s rules in the prompt outweighed the request every time, which is what you’d want in a product, but it meant a visitor would never see the auditors do anything.
So the recorded run on the landing page starts from a hand-built screen with four planted violations, and it says so on the page. Everything after that is live model output, and the critic isn’t told the violations were planted. It caught all four, and it also failed spacing on the planted button’s one-off padding, which is exactly the kind of call the linter can’t make. One Fix removed the fake component and the extra primary button, labeled the unlabeled input, and scored 100.

The evals measure which auditor is right
The evals page scores both auditors, rule by rule, on 27 screens. Eleven were built by hand, each with a known defect, so the truth is known for every rule; sixteen were generated once from fixed prompts and frozen, so they don’t change between runs. Before any rule changed, 8 more screens were frozen and kept out of the tuning, so they’re the fairer test of whether a change helped.

The spacing and action rules have no measurable truth on generated screens, so I marked those myself, blind. The marking page hides the critic’s verdict until I’ve saved my mark, and the mark locks once it’s revealed. Those marks led to the one change to the rules. The critic was passing a Carbon button set whose only button Carbon renders as secondary, so the screen had no primary action at all. It was judging the node list instead of what appears on the page. Claude rewrote the action rule to say so, I approved it, and recall on that rule went from 0 of 1 to 1 of 1, with nothing else moving.
A few smaller choices kept the evals from flattering the critic. The first draft of one rule’s wording included an example that named an eval screen’s exact defect, so it came out before anything ran. On the marking page, “Violated” was first a filled primary button next to an outlined “Not violated”, which nudges the answer, so both now look the same. And the same critic ran twice on the same screens and gave 135 of 135 identical verdicts, so a change in the numbers means a change in the rules, not noise.
Neither auditor sees the rendered page
The most useful finding was a blind spot both auditors share. In the red-button run, the one rule that failed was a raw pixel value in a border, and the Fix replaced it with a token, passing every rule. But the new style set a border color with no border style, so the red outline most likely disappeared. Neither auditor caught it, because both judge the node list, not what the browser draws.

That miss and one other became planted screens, listed on the evals page as known gaps. Today the critic catches both and the linter catches one, after a rule for what each component’s slots can hold was added, but they stay on the page so a good score can’t hide them.
Mistakes along the way
The first eval baseline caught a bug in our own fixture, not the critic. The “clean” screen the planted defects were built on didn’t follow the catalog’s own usage for a list item, and the critic flagged it on nine screens and was right each time. The screen was fixed and the baseline re-run, and the evals page still says the first run was superseded and why.
The first recording of the landing run had the same kind of bug. The hand-built screen put a tag in a slot meant for one button, so it rendered above the row it belonged to, and the Fix copied it unchanged without either auditor noticing. Editing the model’s output to hide it wasn’t an option, so the screen was fixed and the run recorded again.
Keeping a public demo cheap
A run is two model calls and costs about $0.19, and every call is logged with its exact cost, matched against the Anthropic console to the cent. That number set the caps: $2 a day for the whole site, me included, which is about ten runs, and a monthly limit on the account behind that. Anonymous visitors see the recorded run, and live generation needs an invite link, which has its own daily budget, expires, and can be revoked at any time. If the model refuses, times out, or a cap is hit, the page falls back to the recorded run and says why.
How I built it
ds-critic is Next.js and TypeScript, with Carbon Web Components, the Anthropic SDK and Claude Opus 5.5 for both the generator and the critic, Zod for the structured output, and Neon Postgres for the call log, on Vercel. Claude Code proposed most of the design and wrote all of the code, and I worked as its director. I set the goal and the constraints, approved each plan and decision, and made the calls that were mine, like keeping live generation behind invite links and deciding when to go live. I caught problems on the previews, like violation markers that drifted off their elements, and did the blind marking that changed the rules. Every eval or recording run that cost money waited for my go, with a spending ceiling set before it started.
Live on November 17
The tool went from the Carbon port to live in about two weeks, with most of the work in the last few days. You can watch the recorded run, read the rules, and see the evals, including the gaps.
If I did it again, I’d check the rendered page from the start, measuring contrast and spacing in the browser instead of from the node list, since that’s where both auditors are blind.