DESIGN.md template: a blank design system file for AI coding agents
Copy this blank DESIGN.md template, fill in the brackets, and save it in your project root. It uses the same eleven sections as every finished template on this site, so an AI agent gets a complete answer to "what should this look like?"
# DESIGN.md: [Project name]
[Two sentences. What real-world object does this look like? What should a visitor feel?]
- Style: [one word, e.g. Minimal, Elegant, Playful]
- Built for: [the kinds of pages this covers]
- Not for: [where this style should not be used]
## 1. Color
| Token | Value | Use |
|---|---|---|
| `bg` | `#______` | Page background |
| `surface` | `#______` | Cards, panels, inputs |
| `text` | `#______` | Headings and body text |
| `muted` | `#______` | Secondary text |
| `border` | `#______` | Dividers and outlines |
| `primary` | `#______` | Primary button, key actions |
| `on-primary` | `#______` | Text on primary |
| `accent` | `#______` | Links, focus ring, highlights |
| `success` | `#______` | Success states |
| `warning` | `#______` | Warning states |
| `danger` | `#______` | Errors, destructive actions |
- [Rule: what the accent is for and what it is never for]
- [Rule: gradients and tints allowed or not]
## 2. Typography
- Heading font: [family, fallback]. Weight [___], letter-spacing [___].
- Body font: [family, fallback]. Base size [__]px, line-height [___].
- Mono font: [family].
- Loading: [where the fonts come from and which weights]
| Step | Size / line-height | Weight | Use |
|---|---|---|---|
| display | __px / ___ | ___ | Hero headline |
| h1 | __px / ___ | ___ | Page title |
| h2 | __px / ___ | ___ | Section title |
| h3 | __px / ___ | ___ | Card title |
| body | __px / ___ | ___ | Paragraphs, controls |
| small | __px / ___ | ___ | Help text |
| caption | __px / ___ | ___ | Labels, badges |
Use only these steps. Do not add in-between sizes.
## 3. Spacing and layout
- Spacing scale: [e.g. 4, 8, 12, 16, 24, 32, 48, 64 px]. Every margin, padding and gap comes from this scale.
- Container: [max width and side padding]
- Section rhythm: [space between page sections]
- Grid: [columns and gutter]
- Density: [comfortable or compact, and what that means in px]
## 4. Shape and depth
- Radius: [__]px on surfaces; [__]px on buttons, inputs and badges.
- Border: [__]px solid `border`.
- Shadow, small: [value or none]
- Shadow, large: [value]
- [Rule: what is allowed to have a shadow]
## 5. Components
### Button
[Height, padding, radius, label size and weight. Primary and secondary fills. Hover, disabled and focus states.]
### Input
[Height, fill, border, radius, label position. Focus and error states.]
### Card
[Fill, border, radius, padding, shadow. What a card may contain.]
### Navigation
[Height, layout, link style, active state.]
### Badge
[Size, shape, how status colors are applied.]
### Table and list
[Row height, dividers, header style, alignment.]
## 6. Motion
- Fast: [__]ms for [what]. Base: [__]ms for [what].
- Easing: [curve]
- [Rule: what may animate and what may not]
- Respect prefers-reduced-motion: remove movement, keep opacity changes.
## 7. Icons and imagery
- Icons: [set, stroke width, size, color]
- Imagery: [photos, illustrations or screenshots, and how they are framed]
## 8. Voice and microcopy
[One sentence on tone.]
- Buttons: [pattern and two examples]
- Errors: [pattern and one example]
- Empty states: [pattern and one example]
## 9. Accessibility
- Body and muted text meet WCAG AA (4.5:1) on `bg` and `surface`.
- Every interactive element has a visible :focus-visible state and a 44 by 44 px hit area on touch screens.
- Never use color alone to carry meaning.
## 10. Do and don't
Do:
- [three or four moves that define the style]
Don't:
- [three or four moves that break it]
## 11. Rules for the agent
- Use only the tokens in this file. If a value is not here, it does not exist.
- Reuse an existing component before creating a new one.
- One primary button per view.
- Do not change layout structure, copy meaning, routes or behavior unless I ask.
- When this file and existing code disagree, this file wins. Fix the code.
- When this file is silent, stop and ask me. Do not guess.
- Before you finish any UI task, re-read sections 1 to 5 and list every place you broke a rule.
What a DESIGN.md file is
A DESIGN.md file is a Markdown document that describes how your product should look, written for an AI coding agent to read. It sits in the project root and holds your design system as plain text: color tokens, typography, spacing, component rules and a short list of things the agent must never do.
Agents such as Claude Code and Cursor write interface code one request at a time. Without a written reference they choose new values on every request, which is why AI-built projects slowly become inconsistent. A DESIGN.md gives them the same answers every time.
How to fill in this DESIGN.md template
Work from top to bottom. Each section narrows the choices for the next one.
- Start with the mood line. Name a real object the interface should resemble, such as a printed manual or a paint-chip card. A concrete reference steers an agent better than adjectives like "clean" or "modern".
- Fill the eleven color tokens. Give every color one job. Check that
textandmutedreach 4.5:1 contrast on bothbgandsurface. - Choose two fonts at most and write the seven-step scale. Say where the fonts are loaded from and in which weights.
- Pick one spacing scale and one radius. Most inconsistency in AI-built sites comes from in-between values such as 14px padding or a 10px corner on one card.
- Describe components by numbers and states. "Height 44px, radius 8px, hover darkens the fill" can be checked. "Nice modern buttons" cannot.
- Keep section 11 as it is. Those rules tell the agent what to do when the file does not cover a case, which is where most drift begins.
What makes a DESIGN.md work in practice
- Values, not vibes. Every rule should be something you could verify by inspecting the page.
- One source of truth. When you want a visual change, edit the file and ask the agent to apply it. Do not patch individual pages.
- Explicit prohibitions. Agents follow "never add a second accent color" more reliably than they infer it.
- A reminder in the agent's own instructions file. One line pointing to DESIGN.md keeps it in use after the first session.
Do not want to start from blank?
Each finished template on this site is this same file already filled in for a specific style, with a live preview. Load one into your AI tool, ask it to swap in your brand color, and you have a working design system in a minute. If you already have a live site that needs restyling, follow the guide to redesign an existing site with AI.
DESIGN.md template questions
Where do I put the DESIGN.md file?
In the root folder of your project, next to files such as package.json or README.md. Then reference it from the file your agent reads automatically (CLAUDE.md for Claude Code, a rule in .cursor/rules or AGENTS.md for Cursor, AGENTS.md for Codex, GEMINI.md for Gemini CLI) with a line like: Read DESIGN.md before any UI change.
Is DESIGN.md an official standard?
It is a convention, not a formal standard. The name is used by several AI design and coding tools for a Markdown file that describes a design system for agents. There is no single required structure, so what matters is that your file is complete, specific and consistently followed.
How long should a DESIGN.md be?
Long enough to answer every routine styling question and short enough to be read on every task. The templates on this site are roughly 120 to 150 lines. If yours grows much beyond that, move rarely used component rules into a second file and link to it.
Should I write hex values or describe the colors in words?
Both. Exact values remove guesswork, and a short note on what each token is for stops the agent from using the right color in the wrong place.
Design system templates you can copy
- PlainMinimal black-on-white system for SaaS, tools and docs.
- AtelierElegant serif system for portfolios, studios and brands.
- Night ShiftDark neon system for AI products and developer tools.
- Soft PopRounded, friendly system for consumer and learning apps.
- RawHard-edged brutalist system for indie and creative sites.
- ConsoleCompact system for dashboards, admin panels and internal tools.