What is design system drift?
Design system drift is the gap between the approved design system (its tokens and components) and what a team actually ships. It shows up as hardcoded colors where a token exists, spacing values off the scale, and hand-built buttons or inputs where a shared component already exists. Each case looks harmless in a diff. Together they raise maintenance cost and make the product inconsistent.
Why code review alone misses it
Reviewers read diffs, not rendered pages. A class combination, a CSS-in-JS value or a third-party stylesheet can produce an off-system color that no line in the diff makes obvious. As more contributors and AI coding tools write frontend code, the person responsible for frontend standards cannot read every change, so review depends on everyone remembering the rules.
The approaches compared
There are six common ways to check design system use. Each sees something different, so they work best in combination. Tool details below were checked against each project's own documentation on November 11, 2026.
| Approach | Examples | Where it runs | What it sees | How it decides | Blind spots |
|---|---|---|---|---|---|
| Code review | Pull request reviewers | Pull request | The diff | Human judgment | Scale, consistency, rendered output |
| Lint rules | @shadcn/lint, onsystem, Deslint, Stylelint plugins | Editor, pre-commit, CI | Source files | Deterministic rules | Values resolved at build or run time |
| Source scanners with a PR app | Buoy | CLI, CI, GitHub App | Source files across many frameworks | Deterministic rules | Values resolved at build or run time |
| AI pull request reviewers | UX Pilot Design PR Review, 21st.dev Design Bug Bot | GitHub App | The diff and nearby code; Design Bug Bot also renders changed pages | Model judgment | Repeatability; results can vary between runs |
| Rendered-page checks | Fidel | CI and GitHub App | The rendered preview page plus the pull request's code | Deterministic rules | States the preview does not render |
| Design-file checks | Figma Check designs | Figma | Figma layers | Rules, no generative AI | Code entirely |
Lint rules
Lint rules are the cheapest layer and catch problems before a pull request exists. @shadcn/lint covers Tailwind v4 design systems in React, Svelte and Vue. onsystem flags hardcoded colors, spacing and radius in React and suggests a design system <Button> over a native <button>. stylelint-declaration-strict-value requires variables for chosen CSS properties. They read source, so they cannot see a value that only exists after the build.
Source scanners with a pull request app
Buoy scans source code for hardcoded values, arbitrary Tailwind values and duplicate components across React, Vue, Svelte, Angular and server templates. Its GitHub App posts a review with suggested fixes. It reads tokens from CSS variables, Tailwind, JSON and Style Dictionary, and supports baselines for existing violations.
AI pull request reviewers
AI reviewers such as UX Pilot's Design PR Review Agent and 21st.dev Design Bug Bot read the change and comment in plain language, covering accessibility, states and layout as well as tokens. They need no rule configuration. A model decides, so the same change can get different comments, and Design Bug Bot never blocks a merge by design.
Rendered-page checks
A rendered-page check looks at the pull request's preview page instead of the source, so it sees the final color on screen, whatever produced it. Fidel works this way, and also flags raw buttons and inputs where the design system has a component. It only sees states the preview page actually renders.
Design-file checks
Figma Check designs flags hardcoded colors, text, radius and spacing in Figma layers that could use variables or styles. It runs on the design file before handoff and never looks at code, so a team using it still needs a pull request check.
How to set it up, step by step
- Put the system in code. Tokens in a Tailwind config, Tailwind v4
@themeblock or CSS custom properties, and components in a shared package. Every check depends on this being the single source of truth. - Lint in the editor. Add one lint rule for hardcoded colors first. Fixing a value while writing it is cheaper than fixing it in review.
- Baseline what already exists. Accept current violations once and check only new or changed code, so the first week is not a wall of old findings.
- Check the pull request preview. Add a check that runs on each pull request against the preview deployment, so values produced at build or run time are covered too.
- Run comment-only first. Post findings as comments for a few weeks. Count how many were wrong or were intentional exceptions.
- Block selectively. Turn on merge blocking only for categories that stayed accurate, usually colors first. Never block on results a tool marks as uncertain.
Example Stylelint rule that requires variables for color properties:
{
"plugins": ["stylelint-declaration-strict-value"],
"rules": {
"scale-unlimited/declaration-strict-value": [
["/color$/", "fill", "stroke"],
{ "ignoreValues": ["currentColor", "transparent", "inherit"] }
]
}
}
What to check first
- Colors. The most visible drift and the easiest to match exactly against tokens.
- Components. A hand-built button or input where a shared component exists is harder to spot in review than a wrong color, and every copy is code the design system team no longer controls.
- Spacing scale. Useful, but noisier, because layouts legitimately compute values. Start advisory.
- Typography. Check font family and size tokens once the first three are stable.
Keeping AI-generated code on the system
AI coding tools write plausible UI that often ignores local conventions. Three things help: describe the design system in the agent's rules file, give the agent a lint or MCP tool that checks its output (onsystem and Buoy both ship one), and keep a pull request check that does not depend on the agent following instructions. The last layer matters most, because it applies the same way to people and agents.
Where Fidel fits
Fidel is the pull request layer. It reads tokens and components from your repo (Tailwind v3 and v4, CSS custom properties, shadcn/ui), checks the rendered preview page for colors that match no token and tokens that resolve to the wrong value, and flags raw <button> and <input> elements where your design system has a component. Results are one pull request comment, with anything it could not verify listed separately. It comments only by default; blocking merges is opt-in.
See pricing or run npx usefidel init in your repo.