Design SystemsAIdesign.md

design-system.md — The AI-Ready Design System File Explained

DesignDNA Team5 min read

You've scanned a website with DesignDNA. Now you're staring at a file called design-system.md. What exactly is it, and why does it matter more than any other output DesignDNA produces?

What Is design-system.md?

design-system.md is a human-readable, AI-optimized Markdown document that contains the complete design language of a website — its colors, typography, spacing, component patterns, and interaction rules — distilled into a single portable file.

It is simultaneously:

  • A style guide for your team to reference
  • A context file for AI coding agents to read
  • A living spec that can be regenerated any time your design evolves

The format is intentionally Markdown. Not JSON, not YAML, not a proprietary schema. Markdown because every LLM in existence has been trained on Markdown, making it the highest-signal format you can drop into an AI context window.

The AI Slop Problem

There's a quiet epidemic in vibe coding and AI-assisted development. You start a session, ask your AI agent to build a button, and it looks great. Two screens later, the button is a slightly different shade of blue, the border radius changed, and the font weight is wrong. Three weeks later your app looks like five different designers worked on it from different planets.

This is AI slop — the design drift that accumulates when AI coding agents have no stable reference for your visual system.

The root cause is simple: the AI doesn't know your design system. It's guessing. And it guesses differently every time.

How design-system.md Solves This

When you attach design-system.md to your AI project context, you give every coding session a ground truth. The AI stops inventing — it references.

## Colors

- Primary: var(--color-primary) → #6D3FFF
- Background: var(--color-background) → #09090B
- Foreground: var(--color-foreground) → #FAFAFA
- Muted: var(--color-muted) → #27272A

## Typography

- Display: Inter, 700, tracking -0.03em, line-height 1.05
- Body: Inter, 400, 16px, line-height 1.65
- Caption: Inter, 500, 12px, letter-spacing 0.22em

## Spacing Scale

4 · 8 · 12 · 16 · 20 · 24 · 32 · 40 · 48 · 64 · 80

## Button — Primary

- background: var(--color-primary)
- padding: 10px 20px
- border-radius: 9999px (pill)
- font: Inter 500 14px
- hover: brightness(1.1)

Drop this in your project root as design-system.md (or DESIGN.md). Reference it at the start of any AI session: "Use the design system in design-system.md for all UI work."

The difference is immediate and dramatic.

How DesignDNA Generates It

DesignDNA scans the live DOM of any website and runs a multi-step extraction pipeline:

  1. Color clustering — Thousands of raw color values get K-means clustered in OKLCH color space and labeled semantically (primary, background, muted, destructive)
  2. Typography extraction — Font samples across heading and body elements get normalized to a clean type scale with semantic role labels
  3. Component detection — Structural heuristics identify buttons, cards, inputs, and navigation elements and cross-reference their styles with extracted tokens
  4. AI enrichment — A language model reads the raw token data and generates the semantic narrative layer: usage rules, component DOs and DON'Ts, and the overall design character description

The result reads like a design brief written by a senior designer, not a config dump.

Compatible AI Tools

design-system.md works as context for any AI coding tool that supports file references or project context:

Google Stitch — Google's AI UI generator reads design system context to produce on-brand screens. Upload your design-system.md to anchor Stitch's output to your actual visual language.

Claude Design / claude.ai/design — Anthropic's design-focused Claude mode generates components when given explicit design context. Paste your design-system.md at the start of any conversation.

Cursor — Drop design-system.md in your project root and add it to .cursorrules or reference it in your first message. Cursor's Agent mode will respect every token for the entire session.

Claude Code — The terminal-native Claude agent reads files in your project directory. With design-system.md present, it generates components that match your system without being told twice.

OpenAI Codex — Codex-powered tools benefit from explicit design constraints. Feed design-system.md as context to stop it generating arbitrary hex values.

Google Antigravity — Google's experimental AI coding agent. Provide your design system file to guide its component generation toward your visual identity.

Lovable — The AI app builder that turns prompts into full-stack apps. Attach your design-system.md to ensure Lovable's UI output matches your brand, not a generic template.

Replit — Replit AI generates and deploys code. Reference your design system file in the Replit Agent context to keep generated UI consistent across your project.

Practical Workflow

Here's the workflow that eliminates design drift:

  1. Scan your live site (or a reference site) with DesignDNA
  2. Download design-system.md from the results
  3. Commit it to your repository root
  4. Reference it at the start of every AI coding session: "Our design system is in design-system.md. Respect all tokens, spacing, and component patterns defined there."

The Bigger Picture

design-system.md is what happens when you take a style guide seriously enough to make it machine-readable. It's the bridge between your visual identity and the AI systems that will increasingly write your frontend code.

In a world where vibe coding and AI-generated UI is the norm, the teams that ship consistently designed products will be the ones who gave their AI agents a real design system to work from — not a blank canvas and a prayer.

Extract yours now. Scan any website with DesignDNA →


See also: tokens.json, variables.css, theme.css, figma-export.json