AI-first design systems
Until now, design systems were built for people. A developer opens the docs, reads a component’s description, looks at examples in Storybook, copies the code. But more and more UI code today is written by an agent rather than a person (the “Vibe coding: websites” and “Vibe coding: interfaces” topics). If a design system is “unreadable” for an agent, it starts inventing component props that don’t exist, using random spacing instead of tokens and breaking consistency faster than any person ever could. An AI-first design system is designed so that an agent understands it as reliably as a human developer does, or even more reliably. You can build a minimal version of such a system on your own, without an engineering team. We’ll cover exactly how at the end of the topic.
An important note for later. In this topic, the word “token” means a design token: a named style value (a color, a spacing step, a radius). It’s not the “token” from the LLM topics, the unit of text (see the glossary). Two different terms with the same name will show up side by side here. So wherever there could be confusion below, it says explicitly which token we mean. Where to get a system in code — bring it over from Figma, build it from scratch or take one off the shelf — is covered in the “Design system in code: from Figma, from scratch or off the shelf” topic; this one is about making it readable for an agent.
Case study: Astryx from Meta
One example of this approach as of 2026 is Astryx, Meta’s open-source design system on React (a component-based JS library for interfaces) and StyleX (Meta’s styling system for strictly typed component CSS properties). The company tested it internally and then opened it up as “agent-ready” (astryx.atmeta.com). The system is still in beta and requires React 19 or newer. It directly answers the question “how do you make a design system that an AI agent won’t ‘hallucinate’?” Its decisions are worth breaking down in detail, because this is working practice, not abstract theory. The example below is based on public materials at the time of writing and contains specific technical details: particular CLI flags, command names, documentation links. As with any fast-moving tool, check the specifics against the current documentation before you apply them.
Predictable names and prop conventions. All components and their props are named by a strict, uniform pattern, with no synonyms and no “pretty” alternative names. This sharply lowers the chance that the agent invents a nonexistent prop by analogy with a similar component.
Machine-readable documentation instead of prose. The agent doesn’t have to “parse” text documentation. The Astryx CLI returns a structured JSON manifest: the full list of commands, arguments, flags and response formats. It’s similar to an OpenAPI spec for an API, the standard machine-readable way to describe what requests an API accepts and what it returns. The agent reads data instead of trying to make sense of marketing copy.
A CLI as a single interface for both people and agents. The command npx @astryxdesign/cli init --features agents generates an AGENTS.md file (or its equivalent for a specific tool, such as .cursorrules or .cursor/rules/*.mdc for Cursor) with a component index, behavior rules and a command reference. From there, the agent works through the same API as a human developer: astryx component Button, astryx template dashboard --skeleton, astryx manifest --json.
An MCP server. The design system hosts its own MCP server (astryx.atmeta.com/mcp). Any compatible agent (Claude Code, Cursor and others) can connect to it and query components and documentation “live”. There’s no need to carry the whole body of docs in the context window by hand.
A mandatory three-step workflow. The documentation literally teaches the agent to follow steps instead of inventing structure from scratch. First, pick a ready page template for the idea (astryx build "<idea>"). Then scaffold that template in the project (astryx template <name> <path>). And only then read the props of a specific component (astryx component <Name>).
A dense output format instead of a “friendly” one. The --dense flag on every command strips formatting meant for human eyes and leaves the most information in the fewest tokens. The agent’s context window is limited and “expensive”, and polite, wordy documentation is wasted space in it.
Explicit constraints and anti-patterns right in the agent’s instructions. The generated AGENTS.md contains not only “what you can do” but hard “don’ts”: don’t use bare <div>s, don’t write inline styles, don’t substitute “magic” values for design tokens.
Composition hints in the code itself. Components come with JSDoc annotations that show correct composition. JSDoc is a standard format for comments right in the code that describes how to use a function or component, and both people and tools can read it. It’s more than a list of props: these are ready patterns for using them together. That way the agent doesn’t invent combinations the system never planned for.
The general toolkit: not just Astryx
Astryx is a telling example, but not the only way to solve the problem. The three tools below are worth knowing apart from this specific case. They apply to any design system, not only to ready agent-ready systems like Astryx:
Storybook and Storybook MCP. Storybook is a long-established tool where each component of a design system lives as an isolated, documented “card” with all its variants and states. Historically it was built for a human developer who picks the right component by eye. Storybook MCP turns the same information into a source the agent can reach directly through the MCP protocol (the “Tools: a reference guide” topic). The agent can ask which components exist and what variants they have. It doesn’t need to rely on what it remembers about the project from the conversation, or invent the component again. For a team that already has Storybook, this is often a faster way to an “agent-ready” state than building its own CLI harness from scratch, the way Astryx did.
Figma Code Connect. A separate Figma feature that explicitly links a specific component in a Figma file to a specific component in a real code repository. It’s not just “a similar name” but a direct, declarative link. When the agent reads a mockup through Figma MCP (the “Vibe coding: interfaces” topic), Code Connect doesn’t tell it “draw something like this button” but “this is exactly this Button from this file, with these props”. It’s the same “golden examples” and “single source of truth” principle as in the rest of the topic, only built right into Figma instead of assembled by hand. Code Connect is available only on the Organization and Enterprise plans; the remote Figma MCP reads files on any plan, and writing requires a Full seat.
Shared context for the whole team, not for one person. You don’t need a separate tool for this, just discipline. Everything the agent should rely on (AGENTS.md, tokens, “golden examples” — see below) lives in the repository next to the code, not in someone’s personal settings or one person’s chat history. Then the agent of any team member, in a terminal, an IDE or a cloud session, starts from the same up-to-date context. And changes to the rules go through regular review, like any other code.
Other teams’ systems, with documentation and components you can use to show the agent “I want it like this”, are collected at Design Systems Surf — 100+ systems, with free basic browsing. You can see there how different teams handle naming, tokens and component documentation.
What to add yourself: thoughts for the designer, not just the engineer
Astryx’s practice mostly solves the engineering side of the question. But a design system is first and foremost a design artifact. Here are a few things you’re better off thinking through yourself instead of leaving them to the developers:
Naming is a design decision, not just a technical one. If a component has an ambiguous or “cute” name like SuperCard next to a plain Card, the agent will sooner or later mix them up or blend the props of one into the other. Take part in agreeing on component naming when the library is being built in Figma. This is no longer just a matter of naming aesthetics; it’s about how reliable the whole system is under AI agents.
Tokens as the single source of truth, synced rather than documented separately. It’s not enough to write “use tokens” in a guideline. If Figma Variables and tokens in code are synced by hand and drift apart, at some point the agent will get a value from Figma MCP (the “Vibe coding: interfaces” topic) that no longer exists in code, and vice versa. The AI-first approach requires one machine-readable source (JSON/YAML) that generates both Figma styles and code tokens. The agent can now write variables into Figma through Figma MCP (it needs a Full seat, see “Vibe coding: interfaces”), but constant two-way sync with code still needs a pairing: the Tokens Studio plugin or the Variables REST API (Enterprise only) on the Figma side, Style Dictionary on the code side.
“Golden examples” instead of exhaustive documentation. Agents copy a pattern far more reliably from one high-quality, complete example (“here’s what a correctly built dashboard page looks like”) than they reconstruct it from an abstract list of every possible prop on its own. A design system gains less from the most detailed docs possible than from a small set of canonical, carefully curated “page templates”. That’s exactly what Astryx does with template --skeleton. Build these templates into the design system from the start instead of adding them after the fact.
Guardrails as linting, not only as instruction text. The agent can ignore rules written in AGENTS.md, especially in a long session where those instructions “fall out” of the context window (the “Foundations” topic). So duplicate the rules as an automatic check. It can be ESLint/stylelint (programs that automatically check code against style rules and catch errors before it runs) or a git hook (a script that runs automatically at a certain git step, for example before a commit, and can block it). A check like this blocks a commit with inline styles or a random hex color no matter whether the agent remembers the rule at that moment.
A separate “agent” changelog. People read release notes. Agents don’t, unless you specifically teach them to. It makes sense to keep a versioned, structured log of breaking changes made specifically for agents: “the size prop was renamed to variant, the old large value is now lg”. The format should be something you can feed to the agent when a dependency is upgraded. Then it migrates the usages itself instead of breaking half the system with one npm update.
A QA loop specifically for AI-generated UI. Since the agent builds interfaces fast, review has to keep up with that speed. A useful tool is a script that compares the final styles with the tokens and highlights any “unbound” value (a hardcoded color, a random spacing value) for a manual or second-agent check before merging. This follows directly from the “Evaluating and critiquing AI output” topic, applied specifically to a design system.
A minimal version without a team and without Astryx
Everything above is the practice of companies like Meta with an engineering team that can afford its own CLI and MCP server. A solo designer or a freelancer without developers may have none of this arsenal. That’s no reason to put the AI-first approach off until “someday, when there’s a team”. A minimum viable version of the same principle fits into three files you can set up in one evening:
- One
CLAUDE.md/AGENTS.mdin the project root with naming conventions, the palette and explicit “don’ts”. Astryx generates this with a CLI command; here you just write it by hand once and update it as the project goes. - One token file (
tokens.json, or even just a list in the sameCLAUDE.md: hex colors, spacing, radii). It’s the single source of truth the agent reads instead of plugging in random values every time. - Two or three “golden examples” — not an abstract description of components, but the saved code of one well-built page or screen that the agent can explicitly refer to: “build a new page exactly like the page in golden-example.tsx, just with different content”.
Create a CLAUDE.md in this project with our conventions: palette [paste hex codes], spacing [paste the scale], fonts [paste]. Spell out the "don'ts" explicitly: don't hardcode colors, don't write inline styles, don't use bare divs instead of shadcn/ui components. Take this page (paste path/code) as the golden example and reference it in the file
That’s enough for the agent in a new session not to start inventing the layout from scratch. It’s not Astryx-level, but it’s the same “machine-readable source of truth instead of prose” principle, available without an engineering team. You can grow into an MCP server or your own CLI later, when the project and the team around it grow. That’s an add-on to the minimal version, not a requirement for it.
Command examples for practice
Here’s the list of components in my design system (paste it). Check the names for ambiguity — are there pairs an AI agent might mix up?
Generate a sample AGENTS.md file for our design system: which rules must be included so the agent doesn’t build layouts out of bare divs and inline styles
Describe how I could sync variables from Figma with tokens in code so that both sides have a single source of truth
Help me structure an ‘agent’ changelog for a design system: which fields are required for each breaking change entry
We already have Storybook, but no agent-ready CLI like Astryx — where do I start so the agent can rely on Storybook directly through MCP?
Explain in plain words how Figma Code Connect differs from component names simply matching in Figma and in codeAsk the agent to generate a draft AGENTS.md from the real list of components in your design system (or part of it): with a component index, naming conventions and explicit “don’ts”. Read the result critically. Are there rules in it you personally disagree with, and why?
Sources: Astryx Design System, Working with AI — Astryx docs, Meta's Astryx Brings a CLI and MCP Server to an Open-Source React Design System Agents Can Read — MarkTechPost
Sources
- Astryx Design Systemastryx.atmeta.com
Meta’s open-source design system on React 19+ and StyleX, in beta
- Working with AI — Astryxastryx.atmeta.com
AGENTS.md generation, the MCP server, the --dense flag
- Code Connecthelp.figma.com
Code Connect on the Organization and Enterprise plans
- Rate limits & access — Figma MCP serverdevelopers.figma.com
remote Figma MCP limits by plan and seat
- Variables — Figma REST APIdevelopers.figma.com
the Variables REST API is Enterprise only
- Storybook MCPstorybook.js.org
Storybook’s MCP server for agents
Found a mistake or an outdated fact? Write to hey@iskra.guide