Imagine you have a company with a specific visual identity — specific fonts, colors, layouts, and tone. You want AI agents to build pages that look like your company made them, not generic AI output.
Two scenarios exist:
| Scenario | Environment | Problem |
|---|---|---|
| Agent works inside your codebase | Has access to real components, examples, design files | ✅ Works well — agent can read everything |
| Agent works outside your codebase | Building reports, proposals, one-off pages in external tools | ❌ Agent has no reference — invents its own style |
When an agent works inside a codebase, it learns by seeing real examples alongside the rules. Outside the codebase, it only gets words — and words alone are interpreted differently by every model.
Example of the problem with words alone:
Instruction: "Keep the layout clean"
Model A interprets: Minimal whitespace, dense information
Model B interprets: Large padding, few elements per row
Model C interprets: Single column, no sidebars
All three followed the rule. None produced the same result.
Vercel solved this with three interconnected layers. Think of them as three different jobs:
┌─────────────────────────────────────────────────────┐
│ Layer 1: design.md → Teaches JUDGMENT │
│ Layer 2: Public Stylesheet → Enforces MECHANICS │
│ Layer 3: Evaluation Loop → Measures IMPROVEMENT │
└─────────────────────────────────────────────────────┘
design.md — The Judgment FileThis is a single public file any agent can load from a URL. It teaches agents:
Why naming anti-patterns matters:
Without a name: "Don't make it look generic" ← vague, ignored
With a name: "Avoid the SaaS Dashboard Pattern:
equal-weight cards, no hierarchy,
no clear primary action" ← specific, actionable
Giving bad patterns names lets agents recognize and avoid them reliably.
The problem it solves:
Agents kept inventing their own typography, spacing, and layout — even when told not to.
The solution:
Take those decisions away from the model entirely by providing a pre-built stylesheet with documented class names.
<!-- Agent writes this (using documented class names) -->
<div class="stat-strip">
<span class="stat-value">$2.4M</span>
<span class="stat-label">Annual Savings</span>
</div>
<!-- Browser loads the stylesheet from a public URL -->
<!-- Agent never reads the CSS — it just uses the class names -->
Why this is clever:
This is how you know whether your guidance is actually working.
The basic cycle:
Generate page → Review output → Encode correction → Rerun → Measure change
↑ │
└──────────────────────────────────────────────────────────────┘
How Vercel structured their evals:
They wrote 7 fixed scenarios based on real use cases:
Each scenario has:
Only design.md changes between runs. This means any difference in output is caused only by the guidance.
This is the most important operational concept. Every rule earns its place through evidence.
When a reviewer finds a problem, the fix goes to the narrowest place that can enforce it:
Type of Problem → Where the Fix Goes
─────────────────────────────────────────────────────
Judgment / composition → design.md (prose rules)
Reusable visual pattern → Stylesheet (CSS class)
Mechanical / checkable → Deterministic code check
Agent behavior issue → The agent's configuration
Model-specific failure → Wait; don't generalize yet
What happened:
A commercial terms table came back squeezed to the same width as the prose, even though the page had room for the table to be twice as wide.
What they did:
design.md: "Evidence tables should use the full width available"Result: Later runs produced correct full-width tables consistently.
Key principle:
❌ Don't fix the generated page by hand
✅ Fix the guidance so the next first attempt is better
After 200+ runs, Vercel ran a controlled test:
| Condition | Known Failures Detected |
|---|---|
Pages generated with design.md | 39 failures |
Pages generated without design.md | 91 failures |
| Improvement | 57% fewer failures |
This result comes with honest limitations — understanding them makes you a better practitioner:
The real value: Once you name a failure and encode it, that failure tends to stay gone.
A guidance file that never updates becomes stale. Here's how to maintain it:
Real usage → Collect feedback → Group repeated complaints →
Propose changes → Human review → Route fix to right layer →
Measure whether complaint frequency drops
Signal sources:
The health metric:
After encoding a fix, count how often that complaint appears in similar work over time. If the count drops → fix worked. If it doesn't drop → something is wrong with the fix.
Here is the process condensed into actionable steps:
Choose something with a real reader and real inputs. Write a short rubric before generating anything:
Generate once without any new guidance. Save everything:
You cannot measure improvement without a before.
❌ Vague: "Make the table feel less cramped"
✅ Observable: "Let evidence tables use the full available width"
Only observable rules can be checked. Structure your file with sections:
If agents keep inventing their own spacing or typography, publish a stylesheet. Put judgment in prose, put mechanics in CSS.
Generate the page again with identical inputs but with your file loaded. Score both against your rubric without knowing which is which (blind review).
Ask these questions about every correction:
1. What did the user have to repeat or steer manually?
2. Is a rule missing or unclear?
3. Can the stylesheet express this correction?
4. Is the failure mechanical enough to check in code?
5. Does this correction generalize beyond this one output?
Update the guidance. Run the comparison again. Measure whether first attempts improved.
PROBLEM: Words alone are interpreted differently by every model
SOLUTION: Words + Constrained Mechanics + Measured Feedback
design.md = Teaches WHY and WHAT (judgment)
Stylesheet = Enforces HOW (mechanics, no invention allowed)
Eval Loop = Proves WHETHER it worked (evidence-based improvement)
Core principle: Name failures → Encode fixes → Measure recurrence
Fix the guidance, not the output
The system works because it treats AI design guidance the same way good software treats bugs: reproduce it, name it, fix it at the source, verify the fix holds.