DESIGN.md: The missing layer between your design system and AI

Nick Babich
Written by Nick Babich
Nov 26, 2026

How do you make a design system accessible to AI agents? 

Many product teams using AI design tools ask this question. The truth is: No matter how well you structure and document your design system, it’s not enough to feed AI a link to your design system source and assume AI will use it effectively when crafting a design for you.

Just because AI knows which tokens and components exist doesn’t mean it knows when to use them or how to combine them.

DESIGN.md fills that gap.

What is DESIGN.md?

DESIGN.md is a Markdown file that acts as a persistent design specification for AI agents. It gives them enough context to make system-compliant design decisions.

The word persistent matters.

Without DESIGN.md, much of the design context you give AI lives either in design artifacts or inside individual prompts. 

Without DESIGN.md, you have to explicitly tell the AI model in your prompt:

  • “Use our brand colors.”
  • “Keep the layout spacious.”
  • “Use our existing components.”
  • “Don't create new patterns unless necessary.”

And when you start a new session, you have to explain many of the same things again.

DESIGN.md moves that design knowledge out of individual prompts and into a reusable specification that can travel with the project.

What should go inside DESIGN.md

Google developed the DESIGN.md format and has since published a draft structure for the file.

The specification defines eight primary Markdown sections: 

  1. Overview
  2. Colors
  3. Typography
  4. Layout
  5. Elevation and depth
  6. Shapes
  7. Components
  8. and Dos and Don'ts
Animated capture of a DESIGN.md file generated by Google Stitch, open in a code editor. It starts with YAML front matter for a food-ordering app called Warm Table, listing color tokens such as primary and surface, followed by typography styles.
A DESIGN.md file generated by Google Stitch

You can omit sections (when they’re irrelevant), and the format is deliberately extensible.

The file can begin with YAML front matter that contains structured design tokens. YAML answers the “what?”: Which colors, typography styles, spacing, and corner radii do we have in our design system?

For example:

---
name: Product Design System

colors:
  action-primary: "#635BFF"
  text-primary: "#1A1A1A"
  text-secondary: "#666666"
  surface-primary: "#FFFFFF"
  surface-secondary: "#F7F7F8"

spacing:
  xs: 4px
  sm: 8px
  md: 16px
  lg: 24px

rounded:
  sm: 4px
  md: 8px
---

The Markdown that comes after YAML answers the “how and when?”: How do we use colors, typography, spacing, and components in an actual design? 

For example:

## Colors

Use the primary action color to communicate interaction and priority.
A screen should normally contain only one visually dominant primary action.

Use `surface-secondary` for grouping related secondary content.

Pairing the what with the how is fundamental: 

  • A color token tells AI that a value exists.
  • A rule tells AI how that value fits into the visual hierarchy.

The same applies to typography and any other visual styles. 

How DESIGN.md relates to a design system

Does this mean that DESIGN.md replaces your design system? Nope.

DESIGN.md is neither an alternative to your Figma variables, your coded components, nor your full design system documentation. Each of these serves a specific purpose, and DESIGN.md isn't meant to replace any of them.

Your actual design system should remain the source of your implementation primitives.

DESIGN.md simply provides another layer on top of those primitives: the interpretation layer.

Think of DESIGN.md as a map to your existing design system. It provides AI agents with a clear starting point for understanding how your product's design works, where to find relevant resources, and which rules to follow when making design decisions. Your documentation stays the home of the full guidance. DESIGN.md gives agents the short version, plus pointers to the rest.

Let me illustrate how this works using a button component example.

Side-by-side comparison. On the left, four button styles: Primary in magenta, Secondary in pale lavender, Inverted in dark navy, and Outlined with a thin border. On the right, a DESIGN.md excerpt titled Buttons and Action Bars, describing a primary call to action with a minimum height of 52 pixels, a secondary or ghost call to action, and a sticky booking dock.
A button component design (left) and a button component description in the DESIGN.md file 

Your component library may define:

Button
  primary
  secondary
  tertiary
  destructive

DESIGN.md explains what the system should do with this component as a set of instructions for AI, such as: 

  • Use Primary for the single action that advances the user's main task. 
  • Use Secondary for important alternative actions that should stay visible but shouldn’t compete with the primary action. 
  • Use Tertiary for low-emphasis actions within content or supporting workflows. 
  • Never place two Primary buttons next to each other.

Keep these instructions short and very focused (don’t copy your entire design system documentation into DESIGN.md!) because the ultimate goal is to make the design system legible to an AI agent.

6 practical recommendations for creating and using DESIGN.md

Less is more

A 5,000-line DESIGN.md may hold a lot of valuable information, but it doesn’t necessarily provide better context for AI. Every additional line of text you add to this file competes for the model's attention. Large context also costs tokens, and irrelevant details can make it harder for the agent to identify which constraints really matter.

In my experience, a DESIGN.md file of around 1,000 lines of text produces the best possible results. 

Rather than piling on more instructions, I’d optimize DESIGN.md for decision density rather than document length (focus on adding information that changes a design decision). 

For example, when I need to explain how to use colors, instead of adding:

Our product uses blue as its primary color.

I’d write: 

Use {colors.action-primary} only for interactive elements and the primary action in a flow.
Do not use the brand color decoratively on large surfaces.

The second version gives the agent a decision rule.

Reference tokens by their actual names

If your design system already contains semantic tokens, use those names.

Instead of writing:

Use dark gray for primary text.

write:

Use {colors.text-primary} for primary text.

This creates a connection between the reasoning layer and the implementation vocabulary. It also makes the agent less likely to invent a new hex value simply because the prose said “dark gray.”

Document relationships, not just isolated values

One of the most valuable things you can add to DESIGN.md is information about how parts of the system relate to each other.

For example:

Cards should be used only when grouping content creates a meaningful conceptual boundary.
Do not wrap every section in a card.
A card inside another card should be avoided unless the nested surface represents an independently interactive object.

These are exactly the kinds of decisions that separate coherent product design from generic AI-generated UI.

Use DESIGN.md alongside other Markdown files

DESIGN.md doesn't have to work in isolation. In fact, it's most effective when used alongside other Markdown files, such as CLAUDE.md (if you use Claude Code) and AGENTS.md, as well as MCP servers that give AI agents access to your design tools and resources.

Each of these serves a different purpose: 

  • CLAUDE.md provides Claude Code with project-specific instructions, context, and development conventions. 
  • AGENTS.md defines instructions and rules for AI coding agents working on your project. 
  • DESIGN.md explains your product's visual language, design principles, and UI guidelines. It can also act as a map to your existing design system documentation. 
  • MCP servers connect AI agents to external tools and resources, such as Figma or zeroheight, allowing them to retrieve design information directly.

The important thing is that you don't need to duplicate all your design system documentation in DESIGN.md. Instead, use it as a starting point that helps AI agents discover where the relevant information lives. For example, DESIGN.md can point to your design tokens, component library, accessibility guidelines, and interaction patterns, while an MCP server can provide access to the latest design data in Figma and the latest documentation in zeroheight.

For a step-by-step setup that combines your design system package, a documentation MCP, and skills files, check out Luke Murphy’s guide to setting your AI coding tool up to use your design system.

Diagram of three boxes connected by arrows. CLAUDE.md answers "How should Claude work?" and lists workflow, architecture, commands, engineering conventions, and verification rules. DESIGN.md answers "How should the product look, feel, and behave?" and lists design principles, tokens, layout rules, component usage, interaction patterns, and dos and don'ts. Current prompt answers "What do I want the agent to do now?" with the example "Review this checkout screen and fix design-system violations."
How I set up context for Claude in a Claude Code project.

Murphy Trueman recently wrote an excellent article that introduces a useful model for structuring context for AI agents and shows where DESIGN.md fits in that broader context architecture.

Make your don'ts specific

The Don’ts section is the last and often overlooked section in the DESIGN.md file. All too often, it features rules that aren’t very useful, such as “Don’t craft bad UX.” But with a little bit of effort, you can turn this section into a handy validation tool.

  • “Do not create a card solely to group basic text blocks” is useful.
  • “Do not create a card solely to group a heading and one paragraph” is much better.

Good constraints describe an observable violation. And that becomes especially powerful when DESIGN.md is used not only to generate interfaces but also to review them.

Automate DESIGN.md creation and refinement 

Cassie Groos raised an important point about DESIGN.md in her recent LinkedIn post: a manually maintained DESIGN.md can go out of date the moment someone changes a design token.

And I agree with her. If you treat DESIGN.md as a separate copy of your design system, you create another source of truth that needs constant maintenance. Over time, it can do more harm than good by giving AI agents outdated instructions.

Maintaining DESIGN.md more carefully won’t solve this. Keep your actual design system as the single source of truth and make it accessible to AI. That means using structured design tokens, machine-readable component documentation, and tools like MCP servers (the zeroheight MCP, for example) that allow agents to retrieve information directly from the source. 

With that setup in place, you can automate DESIGN.md creation and refinement (make it part of your design workflow) and use the file to provide high-level design guidance.

DESIGN.md is a foundational layer for AI agents

Traditional design systems were primarily built for Designer → Developer collaboration.
AI changes that relationship to Designer/System → Agent → Interface.

As AI agents become increasingly capable of generating interfaces, the problem is no longer simply whether an AI can build a button, a form, or an entire screen. The more important question is: Can it make the same design decisions your product team would?

There’s a layer between having the primitives and reasoning with the primitives, and you need to invest in building a DESIGN.md file that supports it.

As we move from tools that merely generate isolated UI toward agents that can design, implement, evaluate, and refine entire experiences, I suspect these machine-readable reasoning layers, such as DESIGN.md and AGENTS.md, will become an important piece of the context your agents need.

If you want to add DESIGN.md to your AI-assisted design process, start with atomic elements like colors, typography, spacing, and corner radii. Create a simple DESIGN.md file and feed it into the AI tools you use (Claude, Codex, etc.) along with any other Markdown files you rely on to provide proper context. Then see how it impacts the quality of the output the AI generates for you.   

Nick Babich
Nick Babich
Nick Babich is a product designer and tech enthusiast. He has spent the last 15 years working in the software industry with a specialized focus on development. He counts advertising, psychology, and cinema among his myriad interests.
Try zeroheight
The design systems platform that keeps teams and agents in sync
Start for free
Share this post