Design systems

Teach the pipeline to stop.

We split component work across a team of AI agents. The most useful thing it learned was when to ask us.

, Founder & Creative Director4 min read

The first time we had an AI agent build a serious design system component, we did it the obvious way: one agent, one long conversation, a designer steering. The kind of component with a popover, nested states and full keyboard support. It took days of back and forth, and it worked. Then we read the code. The agent had rebuilt behaviour the underlying library already provided, a few accessibility attributes were quietly wrong, and nobody could say which of the hundred decisions in that chat had been made on purpose.

So we took it apart and rebuilt it as a team. This is what we learned, short version.

Give every agent one job.

The work now runs in three stages. First, understand: one agent reads the design, one reads the rules of the component library, one proposes a structure. Then build: one writes the component, one audits accessibility, one writes the stories and interaction tests. Then check: one compares the result with the design, one runs the type and lint checks. Each agent sees only what its job needs. A narrow agent is a predictable one.

Fig. 01Three stages, eight narrow jobs

01 / Understand

  • Reads the design
  • Reads the library rules
  • Proposes a structure

Each sees only what its job needs

02 / Build

  • Writes the component
  • Audits accessibility
  • Writes stories and tests

No code before the rules are read

03 / Check

  • Compares with the design
  • Runs types and lint

Always starts fresh

? When no rule settles it, the pipeline stops and asks. One answer from a person goes to every agent.

Work passes between stages only as written documents, shown here travelling along the links. A missing section is marked missing, not guessed at. The checkers never see the builders’ reasoning, only the result.

They talk in documents, not chat.

No agent passes work on in conversation. Each one writes a file with required sections, and the next one reads it. If something is missing, the file says it is missing, rather than leaving a gap the next agent will fill with a guess. The builder is not allowed to write a line until it has read the library rules. That one requirement removed most of the problems in our first version, which had come from research that was done and never reached the agent writing the code.

The agents that check work always start fresh. An agent asked to grade its own output finds it very convincing.

Most failures are missing rules.

Every time the pipeline got something wrong, we sorted the failure into one of three piles. A rule could fix it. A better tool could fix it. Or a person had to decide. The first pile was by far the biggest. An agent will happily invent a token name that sounds right, and the tests will pass while the component renders unstyled. Write the rule down once, with its reason, and that class of mistake stops for good. It is the same habit we apply to the brand packs our production line runs on.

Fig. 02Where each failure went

Three piles of failures. The pile fixed by writing a rule is by far the largest, then the pile fixed by a better tool, then the smallest, decisions only a person could make. BY FAR THE BIGGEST A RULEFIXES IT A BETTERTOOL A PERSONDECIDES
Schematic, to show proportion rather than a count. Every square is one thing the pipeline got wrong. Most of them stop for good once the rule is written down, with its reason, where the agent that needs it will read it.

The failures also change as you go. Early on they are gaps in knowledge. Then they are handoffs that drift between agents. Finally the output is correct but not good. Each phase needs a different fix, so it is worth diagnosing which one you are in before adding another rule.

Decide when to stop before you start.

Every agent gets its exit criteria and a fixed number of attempts before it runs, not after it starts looping. The visual check, for instance, compares, fixes, re-checks and rolls back anything that made matters worse, and it stops when each round improves things by almost nothing. Without those limits, agents polish forever, or pass a problem back and forth between them without anyone noticing.

Build the questions in.

Some things no rule settles. Whether a list allows one choice or several, when the design is ambiguous. What should happen to motion when the file has no motion spec. How a hover path feels in the hand. Whether a screen reader announces things in an order that makes sense; automated audits miss more of this than people assume. For these, the pipeline stops and asks. One answer from a person goes to every agent at once, so the decision is made once and followed everywhere.

We expected these pauses to slow things down. They did the opposite. A question asked before the code is written is cheaper than any fix after it.

What we would keep.

Separate making from checking. Ask the hard questions before generating anything. Keep rules where the agent that needs them will read them. Set the finish line in advance. And let the system say plainly where its competence ends. A component built this way now takes us a fraction of the time it did by hand, and it reads like it was built on purpose. If your design system needs to hold up under that kind of use, tell us about it.

A pipeline that never asks a question isn’t confident. It just hasn’t noticed yet.

Asked often.

Can AI agents build design system components?

Yes, reliably, when the work is split across agents with narrow roles, handoffs are written documents with required sections, separate agents check the work, and the pipeline pauses for human decisions it cannot settle by rule.

Why use several AI agents instead of one?

A single long conversation hides its decisions and grades its own work. Narrow agents are more predictable, and a checker that starts with fresh context catches problems the builder is blind to.

Which decisions should stay with a person?

Ambiguous design intent such as single versus multiple selection, missing specs like motion, how interactions feel, and real screen reader behaviour, which automated accessibility audits only partly cover.

Written by

Tomo Vukasović

Founder & Creative Director

Tomo Vukasović founded Webinsane in Belgrade in 2004 and has led its design work since: product and UX for companies like Pilatus Aircraft and ScholarshipOwl, brand systems, and now AI production, meaning image, video and code made with generative tools at brand quality.

If this is the work you need done, we should talk.

Become a client