KIRUPA šŸŠ
KIRUPA šŸŠ
HomeArchiveLeaderboardAbout
Sign in

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.

KIRUPA šŸŠ's avatar
KIRUPA šŸŠ
Nov 30

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:

A kirupa.com tutorial page with handwritten callouts pointing at its pixel headings, the style picker, the Filed under link, the TL;DR box, the body text font, the kirupaBot chat button, the voice of the writing, link colors, a diagram and its arrows, alt text for screen readers, a code block, and inline code

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:

The ROFL Design System's front page in Pixel and light mode, behind its Illustrations page in Ukiyo-e and dark mode

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:

Famous Robots : r/Infographics

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:

ROFL is one source with two outputs: pages with live previews for people, and index.md, a section, and JSON for agents

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:

A table comparing one request with and without ROFL. With ROFL, the agent reads about 10K to 15K tokens of context, uses about 40K to 60K new tokens on the first build, needs 1 to 3 review rounds, and uses about 2M to 6M tokens in total. Without ROFL, those numbers are about 60K to 130K, 150K to 250K, 5 to 9 rounds, and 8M to 25M.

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:

Share of design checks passing at each attempt. Without ROFL, about 55% pass on the first try, then 70%, 85%, 95%, and finally 100% on the fifth. With ROFL, 100% pass on the first try.

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

User's avatar

Keep reading

KIRUPA šŸŠ

Thought provoking and educational content that lives at the intersection of design šŸŽØ, development šŸ¤–, and business šŸ’°.

  • About
  • Archive
  • Recommendations
  • Sitemap
Ā© 2026 KIRUPA šŸŠ Ā· Privacy āˆ™ Terms āˆ™ Collection notice
Start your SubstackGet the app
Substack is the home for writing, podcasting, and media founders.