Modern Foundations · AI Evaluation
Don't Tell Anybody, These Are Evals
We built a token system designed to be machine-readable, with semantic naming, mathematical scales, and intent encoded in its structure. The question at hand: can a machine-readable schema infer hierarchy, suggest appropriate values, and generate correct output? Lydia and I tested the schema against three AI models to find out.
Evaluated with
Background
The Hypothesis
The design decisions behind the new foundation, the token reduction, the semantic naming, the mathematical scales, were made with AI legibility as an explicit goal. And they were the kind of decisions you could actually test: color rebuilt on an OKLCH model for perceptually uniform ramps, elevation on an exponential formula instead of hand-tuned presets, radius and spacing on semantic tiers tied to component hierarchy. Mathematically derived, not eyeballed.
The argument is simple and sharp: if names encode intent and relationships are mathematical, a model should be able to reason over the system the way a designer would, inferring hierarchy, suggesting appropriate values, and generating consistent output without a lookup table.
you can't eval a vibe
But "AI-inferable" is a claim, not a fact, until it's tested. So we built a simple eval: translate the design docs into a machine-readable schema, remove the docs, and ask the model the same questions again. If the schema can still answer correctly, it is reasoning from the system itself rather than just copying the source documentation.
The approach
Docs 🤝 Schema
We started with the docs designers already read for spacing, corner radius, and typography, and asked a model to translate them into a structured schema: what each token is for, when to use it, and the rules around it. Written for a model, not a person.
The rules it wrote down read like design guidance: "Choose the intent first, then the value." That's exactly how we want a designer to work, too.
The test
Take Away the Docs
Then we removed the source docs and asked questions against the schema alone.
-
How many page titles can I have?
Exactly one. Anything below it uses a smaller title style.
-
Is this paragraph text or UI text?
If it could be pasted into a document and still make sense, it's paragraph text. Labels and helper copy are UI text.
Right answers, with the right reasoning, and no docs to lean on. The schema was carrying the knowledge on its own.
When we asked how it built the schema, the model described structure we had designed but never written down: spacing that groups into small, medium, and large, a radius ladder with a fully round escape hatch, and type on a consistent scale. It found the system's logic from the values alone.
The harder test
Three Systems, One Question
We ran the same process on two older token sets with much thinner documentation, then asked all three systems the same questions. The first answers were mostly right. One follow-up showed where the real difference was.
Constraint reasoning
The page's layout gap is 24px. How far apart should an input and its submit button sit? The model got there because the rule lives in the schema, not in the prompt.
First answer
24px
Matches the layout gap, so the two read as separate pieces.
Reasoned answer
16px
Tighter than the layout gap, so they read as one action.
The reframe
Stress Tests Are Evals
We weren't testing whether a model could recite token values. We were testing whether it could make the call a designer would make. That's an eval.
Here's the honest part: this was early. The tokens evolved even further afterward, partly because the evals showed us where a name carried an assumption a model couldn't infer. Find the gap, tighten the name, run it again. That's also where my job shifted from designer to the subject matter expert who could tell whether the model was right or just confident. Knowing when the answer is wrong is the skill.
What we found
Three Ways Generated UI Breaks
The evals also showed that a design system's structure either causes or prevents the most common ways AI-generated UI goes wrong.
First, semantic collapse.
Everything gets styled like UI chrome, including text meant to be read. The fix: Reading text and UI text are separate, named roles, so the model doesn't have to guess.
Second, token literalism.
UI assembled like LEGO pieces. Correct tokens, wrong composition. The fix: Tokens describe how to build, not what already exists.
Third, prompt sensitivity.
"Explain this" and "describe this" produce two different layouts. The fix: The decisions live in the system, not in the prompt.
we're making schemas for design languages that models can reason over
The cleanup work, fewer tokens, clearer names, mathematical scales, was never just for designers and engineers. It was infrastructure for AI. We're already using it that way: automated contrast checks across every foreground and background pairing that rerun when a brand theme is applied.
Looking ahead
What's Next
- As models improve, the quality of a token system may become the limit on the quality of AI design output.
- The approach should generalize. Even sparse token values were enough to produce a working schema, so any design system could be evaluated this way.
- The same schema-based reasoning became the foundation for how AI agents build components in the Fluent design repository.