Purpose
What a design system is for.
A design system is a collection of patterns, practices and guidance that helps an organization build and design its products. Sharing parts saves work, but what a system really shares is decisions. Nathan Curtis calls it “a platform to identify, decide on, and document what to share”.
Five goals stand behind those decisions:
- Consistency. The same thing looks and behaves the same everywhere. The UK government’s GOV.UK Design System, for example, exists “to make government services consistent with GOV.UK”.
- Brand identity. Every product looks like it comes from the same organization, in background, type and color. The BBC’s Global Experience Language has carried one visual identity across many products since 2010.
- Voice and tone. Every product sounds like the same organization, in buttons, errors and empty states.
- Accessibility. Every product works for everyone, by default. For example, the BBC tested its own typeface, Reith, with readers who have dyslexia or vision impairment.
Less duplication. Duplication wastes work twice: engineers rebuild what exists, and designers redraw it.
A design system team learns these decisions over time. An agent, here an AI that writes and changes UI code, has only what the system puts in front of it, so a decision the system leaves out is one the agent has to guess.
What I’m sharing comes from my own experience building design systems: at Apple, where Continuum became the standard for UI in Platform Infrastructure Engineering; at Netflix, where I created the Federated Component System and contributed to its design system, Hawkins; and at StubHub, where I led Design Foundations, the team behind the Broadway design system.
Here we’ll cover what worked at StubHub, what others have measured, how a decision reaches an agent, and the checks outside it, then the tools I’m building. The goal is agent output that is consistent, on brand and accessible, not only fast. Putting the right context in front of an agent also cut cost: at StubHub, adjustments to our agent tooling cut AI workflow spend by about 80% for the heaviest users.
At StubHub
What we built for Broadway, and what each part did.
Since the Design Foundations team already owned all the foundational layers of front-end development, it also made sense for us to drive StubHub’s front-end AI strategy.
Early on, we pointed a model at Storybook, where our components are documented, and at the codebase. It didn’t work well. Storybook wasn’t enough, and searching the code often cost a lot of time and burned through tokens.
To start addressing these issues we built three things for Broadway:
- An agent-config repo of baseline guidance on React, testing, accessibility, internationalization, etc.
- Claude Code plugins covering most of our front-end workflows. The most relevant here was Hopper, which took a Figma design through research, a spec and a plan to a built, verified component.
- Maestro, an MCP server tailored to serve Broadway information.
Hopper and Maestro are covered next.
Hopper
Hopper took on the front-end workflow from design through implementation. It ran in phases, starting with reading the design specs via Figma’s MCP server. Each phase was a skill with one or more subagents. Two things mattered:
- The work stayed outside the orchestrating window, so the main context stayed small.
- Each subagent used the model best suited to its task.
Less prompting. Before Hopper, getting from a Figma design to a spec took constant prompting: read this, research that, did you think of accessibility? With Hopper it mostly ran on its own. Accessibility was in the guidance and had its own adversarial pass.
Checks before a person. Adversarial steps checked the research, spec and plan before a person did, through three lenses: architecture and composability, accessibility and internationalization, and performance. Nothing was written until the plan was reviewed, and a verify step checked the work after it was built and tested.
Code Connect. Hopper also used Figma Code Connect, which held the mapping from Figma properties to React props in Broadway. We worked on it with Figma’s help, and it added real value: it came out in the Figma MCP’s output, where it could guide Hopper’s queries to Maestro. The mapping is the system’s decision about which design piece is which component, put where the agent reads the design.
Maestro
Maestro grew out of the need to further improve the output coming out of Hopper while helping reduce the token spend. We started with a very simple MCP server providing a copied summary of our design system and quickly evolved it into a pipeline for design system information from code to agent.
Maestro provided only six tools that focused on querying Broadway information and returned guidance on use, composition and relationships.
It drew on two sources:
- Component data generated for Storybook’s MCP server.
- A guidance document per component, generated from that data and the component’s source.
How Maestro indexes
Many systems build large components configured by options, like a modal whose props set its header, content and footer. Each new case needs another option, which makes them brittle.
Broadway composed instead, before we used AI:
- It’s more flexible.
- It reduces churn and rewrites.
- It reduces complexity.
All three affect AI too. Maestro indexed the whole (Modal) and the parts (ModalHeader, ModalFooter) as separate entries, each with a generated description. A ready-made modal covers the common case, so teams don’t compose it again.
How Maestro scores
Each request was scored two ways:
- BM25, for the words
- Embeddings, for the meaning
A rerank fused them into one ranking. Maestro then added related components and ways to compose them, from the relationships between components (composed-with, related-to). The model no longer read large Markdown files and discarded most of them.
What Maestro changed
Context. Before Maestro, an agent parsed the code and read the guidance and stories every time. By a rough estimate, that took 100,000 to 300,000 tokens before work began, and afterwards a complex component or page took 20,000 to 50,000.
Duplication. Agents stopped rebuilding components that already existed and used them properly. A second button is a second decision about what a button is, and two decisions drift apart.
Cost
The heaviest users went from about $15,000 to about $3,000 a month in AI workflow spend, about 80% less. The change came from adjustments to Maestro, Hopper and StubHub’s code search tool, which I built.
The evidence
What others have measured, and what nobody has.
Loaded whole, or in pieces
Atlassian published the one measurement I found of the two approaches, in an internal test on a login screen. One gave the agent the whole design system in a single DESIGN.md file. The other let it fetch from Atlassian’s MCP server. The file:
- took about 92% more tokens
- took more time
- led agents to re-create components instead of importing them
Atlassian calls the results inconclusive, and says DESIGN.md worked well for a one-shot prototype from scratch.
AVERAGE TOKENS, LOGIN-SCREEN TASK
| Approach | Average tokens (millions) |
|---|---|
| No context | 4.20 |
| MCP server | 3.75 |
| Skill | 4.43 |
| DESIGN.md | 7.21 |
AVERAGE TOKENS, LOGIN-SCREEN TASK
| Approach | Average tokens (millions) |
|---|---|
| No context | 4.20 |
| MCP server | 3.75 |
| Skill | 4.43 |
| DESIGN.md | 7.21 |
This is the trade-off Maestro was built around. A file loads everything every time, so it has to be cut to fit, and the usage guidance is what gets cut. An MCP server loads what’s relevant when asked.
Tool definitions cost too
Fetching in pieces isn’t free. An MCP server’s tool definitions load before any work starts, so a server with many tools pays up front:
- In Anthropic’s example, five servers’ tool definitions came to about 55K tokens, and loading them on demand cut upfront token use by 85%.
- Scalekit measured a 43-tool GitHub MCP server at 4 to 32 times the tokens of a command-line tool across five GitHub tasks, mostly from schema overhead. It is a vendor benchmark of 75 runs.
That is why Maestro’s six tools were consolidated, with filtering and truncation. Each returned resource links to the full guidance, not the text, and errors that said how to fix a call. Anthropic’s guidance makes the same case for fewer tools, trimmed responses and errors that say how to fix the call.
What it does to the output
Fetching the right components doesn’t make the output consistent.
Right parts, wrong look. A designer on Indeed’s design system found its MCP server returned the right components and props. Generated interfaces still drifted on typography hierarchy, spacing, color on the wrong surfaces and icon use.
Retrieval “doesn’t solve for quality”. Foundations aren’t fetched unless the prompt asks for it, so they have to be in front of the agent before it does any work. Fetching suits components, not the decisions that make a page look like one product.
What structure bought. In a small experiment with a 57-component design system, token cost was about the same. An agent given machine-readable infrastructure found all 57 components, against 43-44 without it. Variance across trials was 0.04% with it and 26.5% without a design system.
My experience points the same way:
- One example is easy. A set that fits is not. A model produces a good example quickly. Changing it consistently, or making the next one fit the ones before, is much harder without a system to check against.
- Direction and validation come first. A model won’t query everything an MCP server offers on its own. A skill, an agent or a process has to drive those queries up front, and validation has to check what comes back.
That is why Hopper and Maestro worked as a pair: Hopper’s phases drove the queries up front and checked the results.
What nobody has measured
Most systems I checked ship an MCP server or skills, including Primer, Carbon, Polaris, Panda and shadcn. I found no large or independent measurement, for any approach, of what that does to an agent’s output on design-system work. What exists:
- a vendor’s evals on its own systems
- one company’s single-task test
- one author’s 11-trial experiment on his own codebase
- the experience of the people who built these
Reachable decisions
An agent can only honor what it can reach.
Take one decision from this site: paragraphs sit 24px apart. Four steps carry it from the designer to the agent.
Names
A system carries a decision only if an agent can tell which one applies, and a name is the cheapest way to say. On this site, spacing.gap.paragraph says where it applies, and 24px says nothing.
Semantic tokens carry the guidance. A semantic token’s name says what it is for and its description says how to use it. A table that maps primitives to values says neither, so the agent has to guess which value fits. In my experience that guess is much harder for a model than reading a role.
No study I found looks at design tokens directly. Two nearby studies point the same way:
- Code: a 2025 study removed identifiers from code, and summarizing degraded badly.
- Data: a model that queried a knowledge-graph view of a SQL database instead of the SQL went from 16% to 54% accuracy (Allemang and Sequeda). dbt Labs’ own 2026 benchmark favored its semantic layer, though it is vendor-run.
The step to a design system is by analogy: a role is a named concept with a description, as a metric is in a semantic layer.
On this site every color and gap is a role named for its job. Components ask for roles, never raw values, and each role maps per brand to a primitive, so both our sites share one contract and differ only in values. A role can be found by name and checked against how it’s used.
Brand, voice and access
This site’s design library records three kinds of decision: how it looks, how it sounds and who can use it. Each reaches an agent differently:
- Look: colors and gaps are roles, so a component carries the brand by asking for the right one.
- Access: the same roles carry contrast, and the library holds the site to WCAG 2.2 AA. Contrast, target sizes, focus rings and reflow at 320px are audited on every built page.
- Voice: plain, specific, first person, with a list of words it avoids. It’s a document, so an agent has to be pointed to it, and nothing checks it.
Making a system usable by agents is mostly making its decisions reachable and checkable. The gaps show where an agent will guess.
Checks outside the agent
Rules that fail the build, and what they miss.
Anything that can be deterministic stays out of the loop. The agent makes the judgment calls, and checks do the rest: linters and tests for rules a parser can verify, and visual comparison for how a page looks. They cost the agent almost no context and give the same answer every time.
What fails the build
Instructions get forgotten, and an agent repeats the forgetting at speed. In a CHI 2026 study of six real-world UIs, the best setup, assembling pre-built components from a registry, reached 95.08% compliance. So on this site, a rule that can be checked fails the build:
- A linter catches a misspelled token reference in a style.
- A test fails when component code uses a raw color or length instead of a token. The linter doesn’t reach the files components are built from, so the test does.
A raw value looks right until the theme changes:
They have already caught real misses. A navigation rebuild turned up 43 raw color values that bypassed the tokens, and they became token references with no change to the CSS. When the test first ran in full, it flagged 41 hard-coded lengths in components written with AI help. It found four more later. All were fixed.
What isn’t checked
A check outside the agent can’t be argued with, and costs the agent almost no context. It covers only what it scans.
The token test confirms a role exists, and review catches whether it’s the right one for its place. Nothing checks voice. Those are the decisions where an agent can still guess.
What I’m building
Tools to measure, find and build.
Orin DX is my suite of tools for building software with coding agents. Four of them are relevant here, and the loop below shows how the stages fit: know what is in the code, measure what the agent did, learn what to test, and prove the change helped. None has been measured yet, and each tool’s page on Orin DX has its current status.
Lumen
Lumen analyzes agent sessions: it flags the costly or looping ones and measures a rerun. That is the session data the evidence above lacks.
Prism
Prism runs evals on prompt and skill changes for coding agents. That is the kind of eval the evidence above lacks.
Monokl
Monokl is about context cost. Grep returns text and a language server is heavy, so Monokl parses real syntax trees and answers structural questions: definitions, references, dependents and ranked code blocks. That should give an agent more concise, targeted context.
Michi
Michi is a library I’m building in Orin DX to make those tools quick to write. It provides Rust and Node primitives that render compact output an agent can read, aiming for high performance and a small memory footprint.
What carries forward
Four things to take away.
If you do one thing, make sure the guidance and the semantic layer are well thought out, understood and documented. They’re the basis for the context an agent works from. Then keep everything deterministic outside the loop, so the context stays small. Models now spin up ideas faster than anyone can review them, and a system that has already made its decisions is how that speed stays coherent, for the people using it as much as for the agent.
On the last move, a system should say what is decided, not script how an agent gets there. My rule, here and in my Wisp plugins, is to set goals and outcomes and rely on the model’s judgment, then check what the agent made with a second pass that looks for what is wrong.
The four moves, as each looked in practice:
What I saw at StubHub is that agents reused what was there. A decision the system has settled is one the agent doesn’t have to guess.