What is DESIGN.md? The format, what goes in it, and what most files get wrong

Every explainer on this describes the format. We went and measured what people actually write: 299 public DESIGN.md files pulled from GitHub. Most of them are not what you would expect, and the gap between the format and the practice is the useful part.

Updated July 27, 2026

What is DESIGN.md, and where did it come from?

DESIGN.md began at Google Labs as the format behind Stitch, its UI generation tool. Google open-sourced the specification, and the spec now lives on GitHub. It spread quickly beyond Google: Atlassian published an account of testing portable design context in practice, and a catalogue ecosystem grew up around it.

The .md is simply markdown. The file has no special syntax, no schema to validate against, and no build step. That is deliberate: an agent reads it the way it reads any other file in your repository.

Why a file rather than a prompt

A coding agent asked to build UI has to get its visual values from somewhere. Absent a source, it uses library defaults — which is why AI-built products converge on one look. You can supply values in a prompt, but prompts live in a conversation and conversations decay as they grow.

A file does not decay. That is the entire mechanism, and everything else about the format follows from it.

The format is not clever. It just lives somewhere that gets re-read, which turns out to be the whole problem.

What do real DESIGN.md files actually contain?

Rather than assume, we sampled. We pulled 299 repository-root DESIGN.md files from GitHub code search and measured what was in each one. The first result was a surprise and it reframes everything else.

Only 24% of public DESIGN.md files are about design

Of 299 files, just 72 carried a colour or typography section. The rest are software architecture documents — how a system is built, not how a product looks. DESIGN.md is a filename collision, and the visual-design meaning is currently the minority one. If you add one to a repository, expect some readers to arrive expecting an architecture doc.

Within those 72 genuine visual-design files, the picture is consistent. The median file is 1,337 words across 263 lines, so these are not stubs — people are putting real effort in. They are putting it into the same three sections and skipping the same four.

Files covering it
Typography83%
Colour67%
Components67%
Spacing57%
Motifs or principles43%
Elevation26%
Motion25%
Do's and don'ts24%
Accessibility22%
Radius21%
Iconography10%
Section coverage across 72 public visual-design DESIGN.md files. Detection is heading-based and deliberately generous, so these are an upper bound — the true coverage is lower, not higher.

Colour and typography are near-universal. Radius, elevation, iconography and accessibility are rare. And one omission is bigger than any of these, because it is invisible until someone flips a switch.

The dark mode problem: 69% of files skip it

Of the 72 visual-design files we measured, 50 contain no dark mode at all — no .dark block, no prefers-color-scheme, no second set of values. That is 69%.

This is the most consequential gap in the format as it is practised, and it fails quietly. Everything looks correct in light mode. Then a user toggles the theme and the agent has to invent every dark value on the spot: a background that was never chosen, a foreground that was never contrast-checked, an accent that washes out because nobody raised its chroma for a dark ground.

Dark mode is not an inversion

Inverting the lightness scale produces a dark theme where the accent is a pale wash and elevation stops working, because shadows barely read on dark grounds. Raise surfaces instead of deepening shadows, keep the background off pure black, keep the foreground short of pure white, and raise accent chroma rather than lowering it.

## Color

### Light
--background: oklch(0.98 0.006 85)
--foreground: oklch(0.22 0.014 85)
--card:       oklch(1 0 0)
--muted-foreground: oklch(0.48 0.012 85)
--primary:    oklch(0.52 0.13 152)
--border:     oklch(0.90 0.008 85)

### Dark
--background: oklch(0.17 0.010 85)   /* not pure black */
--foreground: oklch(0.95 0.006 85)   /* not pure white */
--card:       oklch(0.22 0.010 85)   /* raised, not shadowed */
--muted-foreground: oklch(0.70 0.010 85)
--primary:    oklch(0.68 0.16 152)   /* higher chroma to survive the dark ground */
--border:     oklch(0.30 0.010 85)
Both modes stated together. This is the single highest-value thing you can add to an existing file.

Only 6% of the files we measured use OKLCH. It is worth the switch here specifically because its lightness channel is perceptually uniform, so you can move a hue without re-checking every contrast pair.

What should be in a DESIGN.md, section by section?

Colour — semantic roles, both modes

The single most consequential decision in the file is naming by *role* rather than by hue. --primary tells an agent where the value goes; --blue-600 does not. Roles let it apply your system correctly in situations you never anticipated, and they survive a rebrand.

86% of the files we measured use no semantic role names. They list hexes, or they name colours by hue. That is the difference between a file an agent can apply to a component you never described and a file it can only copy from. The semantic token layer is doing the real work here.

Typography — families, scale, and what each does

Name the families, the weights, the tracking, and the scale steps. The common failure is writing *a serif for headings, a sans for body* — an instruction the agent has to resolve, and it will resolve it differently each time.

## Typography

Heading: "Fraunces", serif — 600, tracking -0.02em
Body:    "Inter", sans-serif — 400, line-height 1.6
Mono:    "JetBrains Mono" — 400, tabular figures in tables

Scale: 0.8125 / 0.875 / 1 / 1.25 / 1.5 / 2 / 3rem
H1 uses 3rem at 1.05 line-height; body copy never exceeds 68ch.
Preview unavailable here. Browse complete kits in the kit gallery.

Spacing, radius, elevation

One spacing scale, radius that varies with element size, and two or three elevation levels that agree about a light source. Radius is covered by only 21% of files and elevation by 26%, which is why so much generated UI carries one 0.5rem corner on every element regardless of size.

## Spacing
Scale: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 96px
Section rhythm: 96px desktop, 64px mobile.

## Radius
sm 0.25rem (inputs) · md 0.5rem (buttons) · lg 0.875rem (cards) · xl 1.25rem (modals)

## Elevation
0 flush — use a border, no shadow
1 cards — 0 1px 2px rgb(0 0 0 / 0.06)
2 dropdowns — 0 4px 12px rgb(0 0 0 / 0.08)
Dark mode: raise the surface, do not deepen the shadow.

Motifs and don'ts — the part most files skip

Tokens tell an agent which values to use. They say nothing about what to do when it meets a component your file never mentioned. Motifs and prohibitions cover that gap, and they are the difference between a file that constrains output and one that merely colours it.

76% of files state no prohibitions and 57% state no motifs. These are the two cheapest sections to write and the two most often absent.

## Motifs
- Hairline rules separate sections; no boxed cards on marketing pages.
- Numerals are tabular everywhere they can be compared.
- One accent per screen. If two things compete, one becomes muted.

## Don't
- No gradient text, ever.
- No shadow on a flush surface — use --border.
- Never hardcode a hex. If a role is missing, add the role.

Component treatments and iconography

Cover the primitives that carry the most identity: buttons, inputs and cards, with their states. You do not need every component. Iconography is the cheapest section in the file and the rarest in practice at 10% — name the icon library, the stroke width, the size steps, and one line on image treatment.

Preview unavailable here. Browse complete kits in the kit gallery.

What are the most common mistakes?

Beyond the missing sections, one failure mode shows up in over half the corpus: writing an adjective where a value belongs.

54% of the files we measured contain at least one vague adjective standing in for a decision. The most common were *clean* (39% of files), *modern* (36%) and *professional* (22%), followed by *generous whitespace*, *elegant* and *beautiful*. And 44% contain no concrete spacing or size value anywhere in the file.

The test for every line

Read a line and ask whether two competent people would produce the same pixels from it. 'Clean and modern' fails. '96px between sections on desktop' passes. Anything failing is still a decision you have not made, and the agent will make it for you — differently each time.

  1. Adjectives instead of values. The most common defect, in over half of files.
  2. Dark mode omitted. In 69%, and it fails silently.
  3. Colours named by hue rather than role. In 86%, and it breaks the moment the agent meets a component you did not describe.
  4. No prohibitions. In 76%. Prohibitions are followed more reliably than preferences.
  5. A section that says 'use your judgment'. Worse than no section, because it grants back exactly the discretion the rest of the file was trying to withdraw.

Where does the file go, and how do agents find it?

Put it at the repository root, beside AGENTS.md. The root matters: a DESIGN.md nested in docs/ is a document for humans, and agents that look for the convention look at the root.

Then reference it from your agent instructions in one line, so it is discovered rather than stumbled upon. It is a sibling of those files rather than a competitor — the four files do different jobs.

# AGENTS.md

## Design
Never hardcode theme colors, spacing or radii. Use the tokens in DESIGN.md.
State it as a prohibition. Prohibitions are followed more reliably than preferences.

AGENTS.md is the broader convention for agent instructions and is read by a growing set of tools. DESIGN.md holds the visual contract; AGENTS.md points at it.

What does a complete file look like when rendered?

This is the part every other explainer leaves out. A DESIGN.md is only as good as the interface it produces, and the sections above are not an illustration — they are the serialised form of the kit below.

Terrain Vivant

Live render

Rendered from the kit's actual tokens, fonts, and treatments

Terrain Vivant/Dashboard
Search...⌘K
TV

Dashboard

Welcome back — here's how Terrain Vivant is performing today.

Jan 1 – Jan 30, 2026
Overview
Analytics
Reports
Notifications

Active users

12.6k

+4%

Trending up this month

vs. previous 30 days

MRR

$64.6k

+12%

Strong recurring growth

Net of churn

Retention

94%

+1%

Engagement above target

Rolling 28-day window

NPS

54

+6

Meets growth projections

Survey · n=1,204

Total revenue

Last 12 months

$64.6k+18.2%

12m30d7d
JanFebMarAprMayJunJulAugSepOctNovDec

Recent sales

You closed 265 deals this month.

AR

Alex Rivera

alex@terrainvivant.com

+$1,999.00
MO

Mira Okonkwo

mira@terrainvivant.com

+$39.00
JF

Jonas Feld

jonas@terrainvivant.com

+$299.00
SQ

Sana Qureshi

sana@terrainvivant.com

+$99.00
TL

Theo Lindgren

theo@terrainvivant.com

+$2,400.00

Recent transactions

View all
CustomerStatusDateAmount
AR

Alex Rivera

Founder & CEO

Paid2m ago$1,999.00
MO

Mira Okonkwo

Head of Product

Pending1h ago$39.00
JF

Jonas Feld

Design Lead

Processing3h ago$299.00
SQ

Sana Qureshi

Engineering Lead

PaidYesterday$99.00
TL

Theo Lindgren

Brand Director

Refunded2d ago$2,400.00

Typography

Space Mono

Color system

28 semantic roles, light + dark

Agent outputs

DESIGN.md, CSS, Tailwind, shadcn

The tokens, type and motifs from the sections above, rendered as a live system.

Kit showcase · live surfaces

Terrain Vivant

Live render

Terrain Vivant rendered from its real tokens across 3 surfaces.

Landing pageFull marketing page — hero, social proof, features, a metrics/graph section, and CTA — as alternating full-bleed bands in the kit's captured surfaces. Scroll to explore.
TV
Terrain Vivant
Sign in
Institutional, report, and campaign microsite teams

Sample headline

Supporting copy goes here.

terrainvivant.com/overview

Active users

12.6k

+4%

MRR

$64.6k

+12%

Retention

94%

+1%

Trusted by teams atNorthwindLumenCedarVertexHalcyon

Why Terrain Vivant

Everything you need to ship

Brochure websites

Clear defaults keep every screen consistent from first draft to launch.

Annual reports

Accessible components and visible states are built into the system.

Event microsites

Reusable patterns give product, marketing, and content one visual language.

By the numbers

Growth you can measure

Live

Monthly recurring revenue

$64.6k+12%

Targets

Active users12.6k
MRR$64.6k
Retention94%
All targets on track this quarter

Activity

Last 12 months of usage

Retention 94%NPS 54
JFMAMJJASOND

Start building with Terrain Vivant today

A bold two-color institutional editorial system built on vivid green and cobalt blue full-screen surfaces, with monospace type throughout and zero-radius geometry.

TV
Terrain Vivant

terrainvivant.com

Product

  • Features
  • Pricing
  • Changelog

Company

  • About
  • Careers
  • Contact

Resources

  • Docs
  • Guides
  • Status

© 2026 Terrain Vivant. All rights reserved.

App dashboardProduct UI: sidebar, KPI cards, area chart, recent sales, and a transactions table.
Terrain Vivant/Dashboard
Search...⌘K
TV

Dashboard

Welcome back — here's how Terrain Vivant is performing today.

Jan 1 – Jan 30, 2026
Overview
Analytics
Reports
Notifications

Active users

12.6k

+4%

Trending up this month

vs. previous 30 days

MRR

$64.6k

+12%

Strong recurring growth

Net of churn

Retention

94%

+1%

Engagement above target

Rolling 28-day window

NPS

54

+6

Meets growth projections

Survey · n=1,204

Total revenue

Last 12 months

$64.6k+18.2%

12m30d7d
JanFebMarAprMayJunJulAugSepOctNovDec

Recent sales

You closed 265 deals this month.

AR

Alex Rivera

alex@terrainvivant.com

+$1,999.00
MO

Mira Okonkwo

mira@terrainvivant.com

+$39.00
JF

Jonas Feld

jonas@terrainvivant.com

+$299.00
SQ

Sana Qureshi

sana@terrainvivant.com

+$99.00
TL

Theo Lindgren

theo@terrainvivant.com

+$2,400.00

Recent transactions

View all
CustomerStatusDateAmount
AR

Alex Rivera

Founder & CEO

Paid2m ago$1,999.00
MO

Mira Okonkwo

Head of Product

Pending1h ago$39.00
JF

Jonas Feld

Design Lead

Processing3h ago$299.00
SQ

Sana Qureshi

Engineering Lead

PaidYesterday$99.00
TL

Theo Lindgren

Brand Director

Refunded2d ago$2,400.00
Component sheetButtons, inputs, badges, controls — all shadcn, all themed.

Terrain Vivant UI

Every shadcn component, themed by this kit.

Buttons

Badges

Default
Secondary
Outline
SuccessWarning

Avatar / chips

TV
editorialinstitutionalflat

Form

Controls

Feedback

Onboarding72%

Sample headline

A bold two-color institutional editorial system built on vivid green and cobalt blue full-screen surfaces, with monospace type throughout and zero-radius geometry.

Tabs

AccountTeamBilling

Manage your account settings and preferences.

Alert

Heads up

Your trial ends in 7 days. Upgrade to keep access.

Tooltip

Add to library
The same file applied across three surfaces. Coherence across contexts is what a DESIGN.md buys.

Should you write one by hand or generate it?

Hand-writtenGenerated from a kit
Best whenA brand already exists to transcribeStarting from nothing
Usual failureAdjectives instead of values; dark mode omittedAccepting the first result without editing
Dark modeMissing in 69% of real filesDerived alongside light
Motifs and don'tsSkipped in 57% and 76%Included, worth reviewing
Both work. They fail differently.

If you hand-write it, the two sections to force yourself through are dark mode and the don'ts. The corpus is unambiguous that those are the ones people skip, and they are the ones that determine whether the file constrains anything.

Get a complete DESIGN.md in one command

Every Identity Forge kit serialises to a full DESIGN.md — light and dark tokens, a real font pairing, motifs and don'ts — and installs the token files alongside it. Free kits need no account.

Who created DESIGN.md?

Google Labs, as the format behind its Stitch UI generation tool. Google open-sourced the specification, which now lives at github.com/google-labs-code/design.md. Adoption has spread well beyond Google — Atlassian has published its own account of using it.

What does the .md in DESIGN.md mean?

Just markdown. There is no special syntax, no schema and no build step. The file is plain markdown so an agent reads it exactly as it reads anything else in the repository.

Is DESIGN.md an official standard?

It is a published, open-sourced specification with a clear origin rather than a ratified standard. In practice tools agree on the shape — a markdown file of visual values at the repo root — and vary in which sections they read.

Where should the file live?

The repository root, beside AGENTS.md. A DESIGN.md nested in docs/ reads as documentation for humans; agents that look for the convention look at the root.

How long should it be?

The median public file is 1,337 words. Length is not the point — completeness is. A 400-word file with both colour modes, a type scale and five prohibitions beats a 2,000-word file of adjectives.

Can I copy someone else's DESIGN.md?

You can, and you will get their brand. It is a reasonable way to study the format and a poor way to arrive at an identity. Copy the structure, generate the values from your own brand.

Does it replace a design system?

It is the agent-readable projection of one. If you have Figma libraries and a component library, DESIGN.md is how their decisions reach a coding agent — not a replacement for them.

What if my agent ignores it?

Check three things in order: that it is referenced from AGENTS.md, that it is phrased as a prohibition rather than a preference, and that the values are actually values. Most 'ignored file' reports turn out to be a file full of adjectives.