What is DESIGN.md?
DESIGN.md is an open format specification published by Google Labs (Apache-2.0). It gives AI coding agents a persistent, structured understanding of a design system, so generated UI stays consistent with the brand instead of drifting on every prompt.
Think of it as a single plain-text document readable by both engineers and models: YAML tokens lock down exact values, while Markdown prose explains when and why those values apply.
The problem it solves
When you ask an AI agent to build a landing page or add a pricing table, the model has no persistent memory of your visual system. Without shared context it invents colors, font sizes, border radii, and spacing from training averages.
Putting DESIGN.md in your repository turns your design system into version-controlled context:
- Tokens give agents exact numbers — primary and surface colors, type scale, spacing rhythm, corner radii, motion timings, and component properties.
- Prose gives agents judgment — visual hierarchy, layout rules, voice conventions, and explicit do’s and don’ts that a flat JSON map cannot express.
Anatomy of a DESIGN.md file
A DESIGN.md document combines two layers in one Markdown file:
- YAML design tokens — normative values placed in the
---frontmatter block at the top of the file or in fenced```yamlblocks inside sections. - Markdown prose — human-readable guidelines organized into ordered
##sections (Overview,Colors,Typography,Layout,Elevation & Depth,Shapes,Motion & Micro-interaction,Voice & Content Strategy,Components,Do's and Don'ts).
---
version: alpha
name: Heritage
colors:
primary: "#1A1C1E"
tertiary: "#B8422E"
---## Colors
- **Primary (#1A1C1E):** Deep ink for headlines and core text.
- **Tertiary (#B8422E):** "Boston Clay" — the sole driver for interaction.Because it is plain Markdown and YAML, DESIGN.md diffs cleanly in git, passes pull-request reviews, and converts directly into CSS variables, Tailwind v4 @theme blocks, or shadcn/ui themes.
How it relates to AGENTS.md, CLAUDE.md, and tokens.json
AGENTS.md/CLAUDE.mdvsDESIGN.md—AGENTS.mdandCLAUDE.mdgovern repository workflows, build/test commands, and engineering rules;DESIGN.mdowns visual tokens and UI guidelines. See DESIGN.md vs AGENTS.md vs CLAUDE.md for the routing setup.- DTCG
tokens.json/ Figma Variables vsDESIGN.md— JSON token files store machine values well, but lack the prose rationale and negative constraints agents need when composing screens. Both can coexist: keepDESIGN.mdas the agent-facing spec and generate downstream CSS or JSON from it.
Who is it for?
- Designers — document visual decisions once in a reviewable specification.
- Developers — keep AI-generated components aligned with production tokens without repeating styles in every prompt.
- AI coding agents — Claude Code, Cursor, GitHub Copilot, Windsurf, OpenAI Codex, Kiro, Vercel v0, Google Stitch, and Bolt consume
DESIGN.mddirectly or via wrapper rules.
Official resources
- google-labs-code/design.md on GitHub — specification repository and official examples
- Full specification — Google Stitch
DESIGN.mdformat reference - DesignMD Pro Discovery — curated
DESIGN.mdfiles extracted from production websites
Next steps
- Quickstart — add a
DESIGN.mdto your project in 5 minutes - Installation & CLI — repository placement,
@google/design.mdCLI, and MCP connection - Frontmatter & Structure — detailed breakdown of the format specification