by jeff
Google Labs open-sourced DESIGN.md, a format giving AI coding agents a persistent, structured understanding of design tokens and brand visual identities.
Every time a designer hands a project to a coding agent, the same problem appears. The agent builds something that looks close but not right. Wrong shade of blue, a font that doesn't match, spacing pulled from thin air. The root cause: agents have no reliable place to read the design system. DESIGN.md is a proposed fix from Google Labs.
The format combines two layers in a single Markdown file. A YAML front matter block holds machine-readable design tokens: colors as hex values, typography as named scales, spacing and border-radius as dimension values. Below the fence, prose sections explain the rationale behind every choice. Why this shade of terracotta, what the type scale signals emotionally. Tokens give agents exact values. Prose tells them how to apply those values in context.
AI design tokens with lint, diff, and export
A token reference like {colors.tertiary} inside a component block points to a defined hex value elsewhere in the file. The CLI validates these relationships: npx @google/design.md lint DESIGN.md catches broken references, flags missing primary colors, and checks WCAG contrast ratios, returning structured JSON any agent can act on. The diff command compares two DESIGN.md files and reports regressions. The export command converts design tokens to Tailwind config or W3C DTCG format.
The spec is in alpha and under active development. Google Labs released DESIGN.md on GitHub, with the full specification in docs/spec.md and the package available via npx @google/design.md.