tokens agents
SEMANTIC
02

Machine-readable logic

Turning the library into an API an agent can query.

A token file tells an agent that a color exists. It does not tell the agent that this red means danger and that one means brand. Meaning is the next layer's job.

Skim, then read

The summary

The gist in a few sentences, then the full argument for this layer.

Your design system has a new user that cannot see your Figma file and can only read, so the job flips from documenting for people to encoding for machines.

The lesson from the most-cited benchmark is structure, not size: the rule is JSON for MCP, Markdown for LLM, and structure raises the floor without replacing governance.

Annotate what you already have, label your tokens with intent, and the agent stops guessing which red means danger.

Your design system has a new user, and it cannot see. An AI agent now builds interfaces from your system, but it cannot look at your Figma file. It can only read. So the job flips: from documenting for people to encoding for machines. If the system is not written for a machine, the agent guesses, and guesses drift.

Tokens told the agent what. This layer tells it when, why, and when not. The work calls it an agentic design system: infrastructure an agent can read, reason over, and build with, through encoded intent and constraints.

Here is the failure everyone hits, the Crimson Trap. An agent needs a color for a Delete button. It finds brand-crimson-500 and system-red-600. Both red. It picks the brand one. Valid, and wrong, because only the second means danger. The agent did not slip. You never told it which red means danger. Skip the meaning layer and the model falls back on the average of the internet's UI, not yours.

The proof is measured, not argued. Diana Wolosin, then at Indeed, with Tony Rucker building the MCP infrastructure, ran a 1,056-prompt benchmark across eight ways of feeding a system to an agent. Their human-written docs were verbose, around 30,000 tokens a query, and structured JSON beat them on both cost and accuracy, roughly five times cheaper. Read the lesson correctly, though: it is structure, not size. Diana's actual rule is JSON for MCP, Markdown for LLM. Structured data like props, sizes, and variants belongs in JSON because it is a contract; natural-language rules still belong in Markdown, with front matter instead of bloat. And it is one team's numbers on one system, so treat it as direction, not law.

Structure is necessary, not sufficient, and this is the honest part. When Indeed put the winning format into production, the team generated 4,300 prototypes in four months, and an audit of a sample still found typography violations, broken spacing, and an invented color palette nobody approved. Structured context raises the floor. It does not remove the need for governance and human review on top. Governed well, the upside is real: Jesse Gardner at New York State turned a five-page state PDF into a working, accessible form in about thirteen minutes, with the system feeding the agent real component code instead of guesses.

You do not rebuild everything to get there. You annotate what you already have: label your top tokens with intent, declare a naming grammar, say in Figma when not to use a component, and put always-on rules in one AGENTS.md.

The teams getting real leverage from AI are not the ones with the smartest agents. They are the ones whose design system the agent can actually read. And once the agent can read the meaning, the next question is what it builds against. Not ad hoc prompts, but a written, versioned spec. That is the intent layer.

Listen

The narrated overview

The same layer, heard. Self-hosted and played from a token-driven player.

Machine-readable logic, the meaning: narrated overview Ready
0:0018:23
audio/02-machine-readable.mp3 Download
Go deep

The annotated sources

The originals, each with one line on why it matters. The annotation is the judgment, and the judgment is the authority.

Ask

The notebook

Interrogate the curated corpus directly, and ask the thing this page did not cover.

Open the notebook

Try asking

  • Which red means danger, and how would an agent know without being told?
  • When does structured data belong in JSON, and when do rules belong in Markdown?
  • What did the audit of AI-built prototypes actually turn up?
FAQ

Machine-readable logic, answered

The questions readers bring to this layer.

  • What does "machine-readable design system" actually mean?

    It means encoding your design decisions so an agent can query them like an API, instead of reading prose docs or guessing from a screenshot. Ask for a button, get the exact prop, variant, and token back, deterministically. The Into Design Systems community calls this an agentic design system.

  • Do JSON tokens actually cut cost versus Markdown?

    The real lesson is structure, not size. Diana Wolosin and Tony Rucker, at the Into Design Systems AI Conference, ran a 1,056-prompt benchmark across eight configurations and found structured JSON beat prose-heavy docs that ran around 30,000 tokens a query. Their rule: JSON for MCP contracts, Markdown for natural-language rules.

  • What is an MCP server for a design system?

    An MCP server turns your design system into something an agent can query live, like an API, over the Model Context Protocol Anthropic introduced in November 2024. Instead of pasting docs into a prompt, the agent asks for a component and gets the real props, variants, and tokens back deterministically.

  • Why does an AI agent pick the wrong color even when the token exists?

    Because you gave it the value but not the meaning. Faced with brand-crimson and system-red, both red, an agent picks the brand one for a Delete button. Valid, and wrong, since only the second means danger. Romina Kavcic calls this the Crimson Trap. Encode the role and the guess disappears.