AGENTS.md for web design: a template that works
Most AGENTS.md examples cover tests and linting. This one covers taste: the seven parts that stop your coding agent producing a generic website.
AGENTS.md is a plain Markdown file in the root of a repo that coding agents read as standing instructions. Most examples online are about running tests and linting. Very few cover what matters on a marketing website: taste. Here's the structure we use for client sites and kits, section by section, with the reasons behind each part.
Which tools read it
| Tool | File it reads | Tip |
|---|---|---|
| Codex, Cursor, Windsurf | AGENTS.md | Cursor also supports .cursor/rules/*.mdc with alwaysApply: true |
| Claude Code | CLAUDE.md | Make CLAUDE.md a single line, @AGENTS.md, so you only maintain one file |
| Lovable, Bolt, v0 | Varies | Paste the rules as the first message, and tell them to keep plain HTML/CSS and not convert to React |
The 7 parts of a design-focused AGENTS.md
1. A map of the repo
Say which files the AI may edit and which it never touches. For example: content goes in index.html, colours and fonts only in themes/, and the base stylesheet is off-limits. Most design drift starts with an agent "fixing" something in a shared stylesheet.
2. The story order
A table of sections, in order, each with its one job. This stops the AI shuffling sections or adding a "Features" grid that tells the visitor nothing.
3. Copy rules
Specific beats impressive, every claim needs a noun, write to one person, a headline length limit, a banned-word list and no invented numbers. Copy rules make the biggest difference of any section in the file.
4. The "never" list
Write out the defaults explicitly: gradients, card grids, centred hero with two pills, default fonts and icons, shadows everywhere. Models follow a concrete "never" list far better than an abstract "make it premium".
5. The "always" list
The positive patterns that give the site its identity: eyebrow, then a headline with one italic word, then a short lede; hairline separators; one accent colour; varied section rhythm; mobile checks.
6. Motion rules
Motion has to explain something or reward the visitor, and new motion goes in one place inside its own guarded block. Without this rule, agents add fade-ups to everything.
7. Definition of done
A checklist per section: no placeholder content left, passes the "never" list, checked at 390px and 1440px, no console errors, alt text present. Agents use it to check their own work before handing it back.
Starter template
# AGENTS.md
## Repo map
index.html page content (edit here)
themes/*.css colour + font tokens (the ONLY place for colours/fonts)
assets/base.css shared styles (never edit for one-off tweaks)
brief.md source of truth for all copy
## Story order
| # | Section | Its one job |
|---|---------|-------------|
| 1 | Hero | the promise + two hard facts |
| 2 | Proof | specific habits/results, not adjectives |
| 3 | ... | ... |
## Copy rules
1. Specific beats impressive. Name the object, place, number.
2. Write to one reader ("you").
3. Headlines 2–6 words, one italic word.
4. No invented numbers, reviews or logos.
5. Banned: unlock, elevate, seamless, curated, world-class, nestled.
## Never
- gradients/glow, glass cards, 3 identical icon cards in a row
- centred hero + two pill buttons, Inter/Poppins display, default icons
- fade-up on everything, uniform section padding
## Always
- tokens from themes/, one accent + one highlight
- hairlines over shadows; one dark section to change pace
- one section per turn; check 390px + 1440px
## Done means
- [ ] copy from brief.md only - [ ] passes "Never"
- [ ] no console errors - [ ] alt text on every imageCommon mistakes
- Too long. If it's over about 150 lines, the important rules get lost. Move reference material into separate files and link to them.
- Taste words without examples. "Elegant" means nothing to a model. "Light grotesk headline with one serif italic word" is something it can do.
- No order of work. Without "one section per turn", agents rewrite the whole page every time.
See a complete one
Every Beyond Kit ships with a full AGENTS.md for its industry, plus the brief, themes, sections and prompt workflow it refers to.
FAQ
Does Claude Code read AGENTS.md?
Claude Code reads CLAUDE.md. Put a single line, @AGENTS.md, in CLAUDE.md to import your AGENTS.md, so you maintain one file for every tool.
How long should AGENTS.md be?
Keep it short enough to be read in full each session, roughly under 150 lines. Put long reference material in separate files and link to them.