I Created an AI-First Design System!
Itās mostly written for my AI agents. Humans are welcome too, and itās a fun read.
Hi everybody - over the past few months, AI agents have been doing a lot of the building on kirupa.com. While the words and the content are still mine, theyāve been helping me create the new pages, diagrams, fixes, slide decks, and even the forum bots. The catch was that every time an agent made something, I had to explain the same things all over again. Thatās the wrong orange. That table doesnāt scroll on a phone. Whereās the āFiled underā link?
So I wrote all of those answers down in one place and made it public. Itās called ROFL, and itās an AI-first design system. In this video, I give a quick tour of it:
š£ Help spread the word! If ROFL gives you a few ideas, Iād love it if you shared it with your own network. Hereās the LinkedIn post and the Twitter / X post, and a quick reshare goes a long way.
Below, weāll cover the basics of what ROFL does, and then dive into what makes it a truly AI-first design system that your agents will love. For the full tour, check out Meet ROFL, an AI-First Design System.
Onwards!
Writing Down the Answers
Think about all of the little decisions that go into a single page on kirupa.com. Which colors to use. How big the headings are. What a code block looks like. How an arrow in a diagram should curve. How the words should sound. What it takes for the page to work with a keyboard or a screen reader. Hereās what that looks like on just one tutorial, with the decisions called out:
For most of the siteās history, the answers to all of those questions lived in exactly one place, which was my head.
That worked fine when I was the only one building things. It stopped working once agents started building things too, because an agent canāt read my mind. It reads whatever pages it happens to stumble on, makes its best guess, and then I spend my evening repeating the same corrections. All of that digging, guessing, and re-correcting also uses a lot more AI tokens than it needs to. Weāll look at how many more a little later.
The fix was to write the answers down as one set of shared guidelines that an agent can look up before it starts. That set of shared guidelines has a name, and itās called a design system. Mine is ROFL, and it lives at kirupa.com/design:
Also, just to be totally clear, ROFL is short for Rolling on the Floor Laughing, which felt right for a site with this much goofiness in it! š
ROFL is a design system in the traditional sense. It has everything youād expect: named colors and sizes, components, page layouts, rules for how the writing should sound, and accessibility requirements. Whatās different is who itās optimized for. Most design systems are written for designers and developers on a team. ROFL is an AI-first design system, which means itās heavily optimized for its primary reader being an AI agent / robot:
Itās still friendly to humans (and, if I do say so myself, pretty entertaining to read), but Iām honestly not the one who reads it the most. My agents are, so the way itās organized, the files it comes in, and even how long each section is are all shaped around what an agent needs before it builds something for kirupa.com.
Built for Agents First
Hereās what being optimized for agents looks like in practice. ROFL comes in two versions, both built from the same source so they never drift apart:
Letās start with the agent version, since agents are ROFLās main readers. If you click the Agent start here button, you end up at plain files written for AI agents to read. An agent canāt read everything every time, so these files are set up to let it grab only the one piece it needs for the job in front of it.
The human version is a website with live examples you can switch between styles, a search box, and a page for each of the 30 components and 27 page layouts. Itās fun to browse, and itās where I go when I want to see everything at once.
What Changed to Make It AI-First
Writing ROFL for agents changed both how itās built and what it says. Letās start with how itās built.
Everything comes from one reviewed source. From that source, a build step generates the pages you browse, the Markdown versions of each section, the short prompts, and the JSON catalogs. If any of those outputs drift out of sync, a check fails, so an agent never reads a stale copy of a rule.
An agent always starts at the same place, a short index that tells it to fetch only the section it needs:
A continuously running test keeps that index under 6,500 characters, because its job is to point the agent in the right direction rather than dump the whole system on it. Each of the 21 sections then has its own task-scoped prompt, and another test keeps every one of those between 150 and 2,000 characters. When I add a new rule and a prompt gets too long, something else has to get trimmed to make room. Exact values, like the 638 named colors, sizes, and spacing values, live in JSON files, so an agent never has to guess a color from a screenshot. Even the catalog of more than 100,000 site assets is split into smaller pieces, so an agent can grab just the piece it needs.
The content changed too. Rules are written as plain instructions an agent can follow, and each one is labeled as either something the site already does or a new recommendation. Every correction I make to a figure becomes a before-and-after pair, so the next agent sees exactly what I sent back and why. Some rules became actual checks. The tool that builds my decks wonāt save a slide that covers my webcam frame or has text thatās too hard to read, and the tool that draws figures wonāt render a callout arrow that breaks the arrow rules.
Then thereās verification. Nightowl has a Design Verification agent that checks every fix a visitor would see against ROFL before it can go live. It has a budget of 12 tool calls to do that, which only works because the rules it needs are small and easy to find.
I measure all of this in two ways. The first is tokens. Hereās how one request, building a table of high scores for the 404 Arcade, compares with and without ROFL, using estimates from my own past sessions:
An agent with ROFL reads about 10K to 15K tokens before it starts, compared to 60K to 130K tokens of stylesheets and sample pages without it. The bigger savings come from the review rounds, because every round sends the whole conversation back to the model. Put together, the request ends up using roughly 4 to 5 times fewer tokens.
The second measure is how often the work passes the design and UX verification checks on the first try. With ROFL, my agents hit 100% compliance on the first pass. Before ROFL, Iād only get to 100% after about 4 or 5 rounds of revisions. Hereās roughly how it went for me:
Those extra rounds were wasted time. Each one meant stopping what I was doing, spotting what was wrong, and explaining a rule Iād already explained before. Every round also sends the whole conversation back to the model, so those revisions cost tokens on top of my time.
Every agent that builds something for kirupa.com reads ROFL first, including the coding agents I work with and all of Nightowl. ROFL doesnāt write anything for me, though. What a tutorial teaches and how it explains it is still my job. ROFL makes sure that once Iāve written it, everything around my words looks and works the way kirupa.com should. I went into more detail on these numbers in Why AI Factories Need a Design System.
Till Next Time
ROFL is still very much a work in progress. Every time I correct an agent about something new, that correction goes back into ROFL so I never have to say it again, which means it grows a little bit every week. Some sections are a lot more polished than others, and Iām sure a few rules contradict each other in ways I havenāt noticed yet.
Everything is public, so feel free to poke around, flip through the styles, and take whatever ideas are useful for your own projects. If youāre building with agents, write your design system for them first. It pays for itself pretty quickly. Your agents read a few small files instead of digging through your whole site, which keeps your AI token bill down. They also get things right in fewer rounds, so you get interrupted a lot less to point out the same problems again.
Whatās the one rule you find yourself repeating to your agents (or your teammates) over and over? Reply to this email, post on the forums, or find me on Twitter / X.
Cheers,
Kirupa š








Discussion about this post