How Vercel Uses design.md to Keep Agent-Generated Pages On-Brand
Inside a code repository, getting an AI coding agent to respect brand standards is relatively straightforward. At Vercel, repository-local skills like product-design sit right beside production components and shipped pages, giving agents direct access to real code examples and design system tokens.
The harder problem shows up outside the repository, in standalone artifacts like renewal proposals, benchmark reports, build-versus-buy briefs, or one-off microsites. These pages are frequently generated in v0, Claude, or Codex without access to internal component trees, yet they still need to carry Vercel’s typography, restraint in color, and information hierarchy.
Vercel’s solution is a single publicly hosted context file: vercel.com/design.md . In August 2026, John Phamous and Kevin Corbett documented how they built and iterated on this system in How our agents build on-brand pages with design.md. Their write-up details how to adapt a design system for external AI workflows.
Looking for the extracted tokens? Preview and download Vercel’s DESIGN.md on DesignMD Pro or browse more free DESIGN.md examples.
1. Why Porting Design Guidelines Straight into a Prompt Failed
Vercel’s first attempt was the obvious shortcut: collapse the repository’s product-design skill and its reference docs into one public prompt file that any agent could fetch from a URL.
That approach broke down for two reasons:
- Design prose is subjective: Phrases like “keep the layout clean” mean something different to every model, producing inconsistent layouts from the same text.
- No component reference frame: Inside a codebase, prose guidance sits next to real React components and shipped examples. Outside the codebase, models only have text to work from, so they reinvent type scales, spacing, and table geometry on every run.
An external design.md has to state the concrete constraints that a codebase normally supplies.
2. The Three-Part Architecture Behind design.md
After setting the direct port aside and rewriting from scratch, Vercel converged on a three-part system:
1. design.md for Design Judgment and Hierarchy
Rather than letting models guess styling primitives, design.md focuses on structural and editorial judgment:
- Reader framing: How to structure a page for both a quick executive scan and a detailed technical audit.
- Copy and evidence: How to pair concrete claims with honest caveats, and organize typography and color so data supports prose.
- Brand asset rules: Exact rules down to Vercel’s wordmark and triangle logo.
- Named anti-patterns: Explicitly naming recurring generated-design tropes so agents recognize and avoid them reliably.
In their first controlled comparison, Vercel ran the same renewal proposal prompt, mock data, model, and viewport once without design.md and once with it loaded:
- Without
design.md: The model output a generic SaaS dashboard. - With
design.md: The page led with the renewal recommendation, grouped commercial evidence into one grid, placed peer metrics on a single comparable scale, and kept supporting details accessible without competing with the summary.
2. A Public Stylesheet (vercel-brand.css) to Lock Down Mechanics
Because models kept inventing their own typography, spacing, and grids, Vercel removed those mechanical decisions from the model altogether.
They published a public stylesheet (vercel-brand.css) packaging headers, tables, stat strips, and chart styles as CSS primitives, then documented the exact class names and tokens inside design.md.
This split produces two immediate advantages:
- Agents compose HTML using documented classes and tokens instead of inventing ad-hoc CSS.
- Smaller context footprint: Because the stylesheet is loaded by the browser at render time rather than injected into the prompt, the CSS implementation never consumes the LLM’s context window.
3. An Eval Loop Driving Every Rule
Every line in design.md earned its place through repeatable evaluation. Vercel froze seven real-world scenarios with fixed mock inputs and render configurations:
- Usage and performance report
- Renewal proposal
- Benchmark report
- Interactive planning page
- Build-versus-buy brief
- Security governance brief
- Presentation deck
With prompts and inputs locked, output differences traced directly to changes in design.md. Comparing all seven outputs side by side also confirmed the guidance was not forcing every page into one rigid template: the interactive planning page placed controls front and center, while the renewal proposal led with the recommendation and commercial comparison.
3. Turning Review Feedback into Rules and Deterministic Checks
Vercel ran more than 200 evaluations across Claude Opus 4.8 and Codex (GPT-5.5), including targeted checks and dry runs. To manage them, they built a local review harness that renders full pages and supports blind A/B comparisons. Every run stores the prompt, inputs, model configuration, design.md version, screenshots, and reviewer feedback.
Each correction is routed to the narrowest layer capable of enforcing it consistently:
- Judgment fixes go into
design.mdas prose. - Reusable layout or visual mechanics move into the public stylesheet.
- Mechanically verifiable failures become deterministic checks in code.
- One-off model quirks stay out of the rules until they repeat across models.
For example, in early renewal proposals, commercial terms tables were repeatedly squeezed to the same narrow width as body prose even when horizontal space was available. After confirming the same failure across historical runs, the team encoded the fix in two places: a prose rule in design.md (“Let evidence tables use the full available width”) and a deterministic check in code that flags tables ignoring available width.
Quantifying the Impact (and Its Caveats)
To verify whether encoded rules actually prevented known failures, Vercel tested three desktop scenarios using Codex (GPT-5.5), generating each page once with design.md and once without (first attempt, no rerolls). Running their deterministic checks across all six outputs showed:
- Without
design.md: 91 known mechanical failures triggered - With
design.md: 39 known mechanical failures triggered (57% fewer)
Vercel is careful to note two caveats: deterministic checks only catch failure modes that were already observed and codified (they do not measure overall design quality), and six pages is too small a sample for broad reliability claims—every page still contained at least one blocking defect on its first attempt. Still, the test demonstrates that once a failure mode is named and encoded, it tends to stay fixed.
4. Keeping design.md Current in Production
After shipping design.md with the eval harness, Vercel keeps it updated through internal Slack usage.
Inside Vercel’s Slack workspace, employees tag @design-agent, built on eve (also open-sourced as eve-design-template ), and paste raw data into a thread. The agent loads the latest design.md and stylesheet, builds the page, and replies with a full-page screenshot and deployment URL.
Every week, automation collects and clusters recurring complaints from Slack threads, GitHub reviews, and Figma comments. A human reviewer decides where each accepted fix belongs (@design-agent, the product-design skill, design.md, the stylesheet, or deterministic checks), and new page types become new eval scenarios. Tracking how often each complaint recurs confirms whether a rule actually worked.
5. How Your Team Can Build the Same Loop
You do not need an automated runner or LLM judge to start. Begin with one recurring artifact and one controlled comparison:
- Pick one repeated artifact: Choose a task with a real reader and real inputs (a proposal, performance report, or product brief) and write a short rubric checking that supplied facts survived, the reader’s decision is clear, and recurring manual edits are resolved.
- Save a baseline first: Generate the page once with no design context and keep the prompt, inputs, configuration, and screenshot. You cannot verify improvement without a before state.
- Start from your last ten corrections: Collect recurring comments from PR reviews, design critiques, or Slack, and rewrite each into an observable rule (e.g., “Let evidence tables use the full available width” instead of “Make tables less cramped”). Group scope, reader task, observable decisions, and primitives into your first
DESIGN.md. - Constrain repeatable mechanics: Publish a stylesheet or token layer for typography, spacing, and layout primitives so prose guidance stays focused on judgment rather than reinventing CSS values.
- Run a blind matched comparison: Regenerate with identical inputs, model, and viewport using your file, shuffle it with the baseline, and grade both against your rubric.
- Update the spec instead of hand-editing outputs: Whenever you have to steer or patch a generated page manually, encode the generalized fix back into
DESIGN.md, your stylesheet, or code checks and re-verify on the next first-attempt run.
To start faster, inspect existing production examples first:
- Browse the DesignMD Pro Discovery Gallery to inspect real
DESIGN.mdfiles extracted from production websites and see how YAML design tokens pair with written design judgment. - Read What is DESIGN.md? for the specification overview, or test your own file with the DESIGN.md Validator.