Case study
Designing a system AI can follow
A token-based design system for a product team where 4 in 5 commits were AI-assisted
TL;DR
- Between early 2025 and mid-2026, the share of commits written with an AI co-author went from 1% to about 80%. UI was shipping faster than anyone could review it.
- I started a token-based design system on my own, first in Figma and then as a code-first system with rules written for AI agents. Engineers adopted it one by one until it became the standard for two brands: Spuree Studio and Continuity Folio.
- As the codebase grew 29x, hardcoded colors stayed flat, and 98% of color styles in production now use tokens.
1. Context: AI was writing the UI
Spuree had no dedicated front-end engineer. Full-stack engineers built the interface, and over 2025 they started building it with AI.
Inconsistency was there before AI. My first design audit, in April 2025, found 24 issues, and changing the primary color meant listing 14 Figma locations by hand. AI multiplied the amount of UI being written, and the same problems grew with it:
- April 2026. Six pages had five different ways of setting their side padding: 40px, 64px, 16px of margin, a container class, or none at all.
- The same month, an AI coding agent opened a pull request to unify that padding. It replaced carefully tuned responsive spacing with one fixed value, which would have taken about a quarter of a phone screen's width. An engineer caught it in review.
Review alone couldn't keep up. I noticed engineers were building features with AI that didn't follow the design system, so I started making the system into something both people and AI would read. It began as my own project.
2. Who the system serves
The system had three kinds of users, and each needed something different.
| What they needed | What the system gives them | |
|---|---|---|
| Designers | One source of truth, light and dark | Figma variables in three layers: primitives, theme, mode |
| Engineers | A way to tell in review whether a value is right | CSS variables, semantic Tailwind classes, and prototypes they can run |
| AI agents | Rules they can read, understand and be stopped by | A skill file, agent instructions, a prompt and type file per component, and lint rules |
In my prototypes, AI tools loaded the system automatically. In production, engineers gave the system folder to their AI tools themselves.
The engineers shaped this too. After the padding review, one engineer suggested naming spacing by role instead of by number: once every value has a name, any custom value stands out in review.
3. Principles and architecture
Three token layers. The Figma system has 521 primitives (the raw scales), 158 theme tokens (what each value is for) and 44 mode tokens (which value to use in light or dark). The primary color shows the chain: Electric Blue/500 becomes primary-light, Electric Blue/800 becomes primary-dark, and the mode layer picks one.
One name from design to code. A Figma variable becomes a CSS variable (--primary), which becomes a Tailwind class (bg-primary). When we changed the primary color in 2026, the change touched 3 files: four variables, plus two hardcoded values swapped for tokens.
Principles that AI can't guess. The code-first version, the CONT'D system, is built on a few explicit rules:
- Neutral ink does 90% of the work. Only two colors carry meaning: brass means a person needs to decide something, and cue means an AI agent did something.
- Every meaningful color comes in a pair: a mark value for small shapes and a text value that passes contrast.
- One shadow per screen, and it belongs to the page.
- Rows are the default; cards are the exception.
It has 17 components in four groups (brand, core, objects, feedback), 164 tokens and 20 written guidelines. That is far fewer than the Figma library's 723 variables, because the CONT'D system was specified from scratch instead of carrying the full Tailwind scales.
4. Options and trade‑offs
A tool for engineers, not a gate
As vibe coding spread, engineers started building small features, including how they looked, without going through design. I didn't want to compete for projects, but I felt responsible for keeping the product consistent. Audits and suggestions came first. Then I wanted to give engineers something better to build with, so I made the system code-first and readable by AI.
Build on shadcn instead of starting over
Before there was a designer, the engineers had already chosen shadcn and Tailwind. I built the system on top of their choice rather than replacing it. The cost showed up later: my version had no spacing theme, which I only found during the padding audit.
Strict where AI drifts, flexible where judgment matters
Color, spacing, fonts and component props are hard rules, checked by lint. Voice, hierarchy and "one decision per screen" are written rules with reasons, because they need judgment.
What I chose not to systematize
Users' own images aren't restricted, because an asset tool has to show the asset. Email templates and 3D model colors keep literal values, because those environments can't read CSS variables.
Figma and code, kept in step by hand
The two weren't linked. The system didn't change often, so I updated both sides myself.
Dark first for Studio
The system supports both themes, but Spuree Studio is a creative tool, so we shipped it dark-only for a more immersive workspace. Folio ships both.
One honest limit: the lint rules shipped with the system for prototypes. They weren't wired into production.
5. How AI fits in
Structured so AI can use it reliably:
Every rule says why
When an agent meets a case the rules don't cover, the reason is what lets it decide.
Agent instructions hold just four core rules
Short enough to be read every time.
Each component ships with a short prompt and a type file
The prompt for the provenance line reads, in part: "An object with no provenance is an object no one can inherit."
Lint messages tell the agent what to do
For example to replace a raw hex color with a color token.
The whole system installs as a skill in Claude Code
How I worked with it. I wrote the spec and the rules. AI generated the first pass. I reviewed every screen and corrected it, often many rounds over the same details. Then I built working prototypes on the system with Claude Code and shared them on GitHub, where engineers took them directly. My first-run journey case study covers that handoff in detail.
Fidelity in production. When an engineer brought the CONT'D system into production, they checked every visual change against the system's own reference page by measuring computed styles, in both themes, until the two matched.
6. Adoption, governance and maintenance
Adopted from the bottom up. No one assigned this. I built the system, shared it as a resource, and engineers started using it on their own, one by one. It became the company standard, used by more than 15 engineers.
Audits catch the drift. I ran design audits in April 2025 (24 issues) and July 2025 (15). From December 2025 they became a standing Design Audit project: 30 tickets, all closed.
How a change gets made: the spacing story.
- The AI-written pull request flattened the responsive padding.
- An engineer caught it in review. Another kept the breakpoints, moved all page padding into one standard class, and proposed semantic spacing names for the system.
- I turned the proposal into a ticket and tested options with that engineer in Figma.
- About two months later, I added a spacing theme to the system and published it.
Who can change it. I maintain the tokens and publish the Figma library. Engineers propose changes through review. In production, the system is stored as a protected copy that the code formatter can't rewrite, so tooling can't quietly change it.
7. Evolution
- January 2025: first Figma library, on the shadcn base the engineers had chosen.
- 2025 to early 2026: audits, a new primary color, unified page padding.
- Mid-2026: semantic spacing added.
- July 2026: the Continuity brand guidelines.
- August 2026: the CONT'D system goes into production. I re-dressed an existing prototype in the new system instead of rebuilding it.
| Spuree system (2025) | CONT'D system (2026) | |
|---|---|---|
| Source of truth | Figma | Code and a written spec |
| Base | shadcn and Tailwind | A "paper on a desk" metaphor |
| Color | Electric Blue primary | Neutral ink, plus brass and cue for meaning |
| Written for AI | A skill file and lint rules | Adds agent rules, plus a prompt and type file per component |
8. Results
29x
more code, while hardcoded color classes went from 98 to 91
98%
of color styles use tokens, up from 78%
33 → 3
files touched by a primary color change: the 2025 fix vs the 2026 change
15+
engineers on one system across two brands
Also: semantic color classes grew from 346 to 5,361.
9. My role and collaboration
The design system was my own project, built by me working with AI. In the later part of my time at Spuree I led a team of 2. The other designers worked mostly in Figma, using the library, and I gradually brought them into prototyping with Claude.
The engineers made the system better. One caught the AI's padding regression in review. Another moved page padding into one standard class and proposed semantic spacing. Another brought the CONT'D system into production and checked it pixel by pixel.
10. What I learned
A design system doesn't make the designer unnecessary. It moves the work. Prototypes in real code closed the gap between Figma and production. By 2026, engineers could ship polished UI on their own, and some brought me their own designs for feedback before building. My time moved from drawing screens to research, flows, requirements, and earlier involvement in how things got built. I became the team's UX advisor, including on projects I wasn't formally part of.
Instructions for AI drift too. One component's prompt still said "always uppercase, always square" after the code had moved to sentence case and rounded corners. A stale prompt is a bug.
Make the system automatic in production. In my prototypes, AI loaded the system and its lint rules on its own. In production, engineers had to hand the system to their AI tools, and people reviewing code did the checking. Next time, the production instructions for AI would point to the system from day one, and every submission would be checked automatically.
Give tokens an owner. The token files had no dedicated owner. I'd make the designer an owner, so every token change gets a design review.
Check color more rigorously. Our danger red reached only 3.23:1 contrast on the dark page, because it was the one color without separate mark and text values. Now every color that carries meaning is checked as a pair.
Measure from day one. I pulled these numbers out of the git history after the fact. Tracked from the start, they would have shown much earlier whether the system was working.