
The one where Fluo's design system learned to keep agents on track.
I build Fluo with AI agents. Its design system makes sure anything we prototype, me or an agent, stays consistent without anyone policing it.
If you're in a rush, here's a summary 👇
Fluo's design system is what lets me try a new screen without worrying about it. The colors work in light and dark on their own, each component comes with notes on when to use it, and when something goes off the system, the code says what to use instead. It was also built for the agents I work with. An agent that has never seen the project finds the system by itself and builds a screen that follows it.
My Role
Designer and builder. I designed the system and built what keeps it in place, from the tokens and components to the lint rules and the component contracts, working with AI coding agents.
Problem
I build Fluo with AI agents, and they write interface fast. The trouble is they also drift fast: a hex color here, a random z-index there, a card rebuilt by hand because nobody knew one already existed. I had a guide, but a guide only helps if someone reads it, and nothing told the agent when it got something wrong. When I finally looked, 163 values were off the spacing grid, four screens had each built the same option card on their own, and the guide still listed a component I had deleted.
Goal
Make the system something an agent finds without being told, follows while it works and gets corrected by when it slips. If the rules can check themselves, I can prototype freely.
Two themes from one set of tokens
Screens only use colors by their role, like card, primary or muted text, never a raw value. That way a new screen already works in light and dark the moment it's drawn. The same tokens are exported for Figma and Paper, so a prototype outside the code starts from the same place.


Type, shape and a grid of 4
Three typefaces, each with its own job, and a defined style for every kind of text. Spacing, sizes and corners all move in steps of 4px, with a fixed set of radii.
- Screen titlePractice
- Section titleTalk about you
- Item titleTo be and to have
- BodyEvery slip becomes a card.
- Small body (default)8 cards · 4 min
- KickerDaily review
- Caption5-day streak
- Numbers0/12 · 10:24
rounded-xs · 4pxrounded-sm · 8pxrounded-md · 12pxrounded-lg · 16pxrounded-xl · 20pxrounded-2xl · 24pxrounded-3xl · 32pxrounded-4xl · 36pxrounded-full
Components with contracts
Every component has a contract next to it: what it's for, when to use it and when not to. Agents read these contracts to pick the right piece, and a test fails if a component shows up without one.
- Grouping content on the page (card)
- A list item or clickable row (list)
- A highlight inside a card (inset)
- Building rounded-* bg-card ring-1… by hand: a test fails
- A shadow on something that doesn't float
- Changing the variant's radius through className
<Surface variant="card" padding="lg">
<Kicker>Plan</Kicker>
<p className="font-heading text-xl">Fluo Monthly</p>
</Surface>Lessons the model writes
The lessons in Fluo aren't drawn one by one. After each conversation, a model turns the learner's slips into study cards, and it describes each card as a json-render spec instead of writing code. That means the design system has a second reader: the model. It can only build with the components in the card catalog, each with strict props and a short description it understands. The app then renders the card with the same tokens as every other screen, handles the flip, and checks every spec. If one fails twice, the learner gets a simple text card instead.
{
"type": "CardFace",
"props": { "side": "front" },
"children": [
{ "type": "Tag", "props": { "category": "grammar" } },
{ "type": "Cloze", "props": {
"before": "Last weekend I",
"answer": "went",
"after": "to the beach with my family.",
"translation": "No último fim de semana eu…"
} }
]
}
Rules that answer back
The rules live in the linter, and every error explains what to use instead, so the fix is right there. Try one of the classes an agent might write.
<div className="flex bg-zinc-900">Tailwind palette colors don't switch themes. Use a semantic color: bg-background, bg-card, text-foreground, text-muted-foreground, bg-primary… See DESIGN.md › Colors.
How an agent finds it
I never have to paste the guide into a prompt. The repository points every agent to it, and before an agent can say it's done, a hook checks what it changed.
Read before any screen
Every agent opens it first. It points to DESIGN.md and lists six non-negotiable rules.
Prototype from the real screens
Every screen of the app lives in Storybook with sample data, in both themes, on phone and desktop. When I want to try something, I start from the real screen instead of redrawing it, so the idea already uses the system.


The proof
To be sure this works, I gave an agent that knew nothing about the project a single task: build an achievements screen. A script then checks whether it followed the system.
- Created or changed files
- Used the system's components
- Story under Screens/
- npm run lint
- npm run typecheck
- Design system tests
- New stories (render + accessibility)
Results
The system went from version 1.0.0 to 1.4.1 in two days, with every change written down. Every component story is tested for accessibility in both themes. Most of all, I stopped worrying about prototypes drifting. The same checks run while I work, when an agent finishes and before anything ships.