# A design system that checks itself

Our own page pattern failed our own checker. What we're changing so that a shipped pattern can't break the rules meant to protect it.

October 28, 2026 · WhatMatters · design, development, ai

Source: https://whatmatters.so/journal/design-system-that-checks-itself

A design system is a promise: use these pieces and the result will look and behave the way we said. The promise only holds if something checks it.

We build with WMDS, our own system, and it ships a checker, `wmds-check`. It reads the source and flags things a page shouldn't do, like overriding a component's colour with `!text-brand` instead of using a supported option.

## The pattern that broke its own rules

We keep a gallery of copy-and-paste page patterns. One of them, a ruled footer, looked right and was documented as ready to copy. Then we copied it exactly into a page and ran the checker on the result.

It failed. Three errors for `className` overrides on `TextLink`, and one warning for a raw `4rem` type size. The pattern we tell people to copy word for word broke the check meant to protect it.

Nobody was careless. The check wasn't running on the files people copy from, so the gap stayed invisible until a page used it.

## Fix the system, not the page

There were two easy exits. Loosen the checker so the override passes, or tell people to ignore the error. Both make the rule meaningless.

We're doing the slower thing:

- Give `TextLink` a supported brand tone, so the pattern doesn't need an override.
- Add a 4rem step to the type scale, so no one writes a raw value.
- Run `wmds-check` over every pattern in CI, so a shipped pattern that fails the checker fails the build before anyone copies it.

## Why this matters more with AI in the loop

An AI agent builds pages from the same patterns we do. If a pattern is subtly wrong, the agent doesn't notice. It copies it faithfully, many times. A check that the whole team, human or not, runs the same way is how a small mistake stops multiplying.

The principle is simple: when you find a violation that a program could have caught, build the check instead of writing a reminder. Rules people have to remember get forgotten. Checks that fail the build don't.
