design-contract
AGENTS.md0 starsChanged 49 days agoApache-2.0View on GitHub
Instructions for any coding agent working in a repository that has this pack available. The full version, with the reasoning, is SKILL.md — this is the short form for agents that read AGENTS.md by convention (Cursor, Codex, Copilot, Aider and others). Find the design doc. Check DESIGN.md, docs/DESIGN.md, DESIGN-SYSTEM.md, CLAUDE.md, AGENTS.md, a design-system/ directory, a tokens.css, or a Tailwind theme block. One usually exists and usually has not been read. - If one exists, it governs. Read it fully first.…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,117 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- design-contractSkill
- design-contractSkill
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Find the design doc: Check DESIGN.md, docs/DESIGN.md, DESIGN-SYSTEM.md, CLAUDE.md, AGENTS.md, a design-system/ directory, a tokens.css, or …
- Distinctive: line 15
If one exists, it governs: Read it fully first. When a request conflicts with it, say so and cite the section rather than quietly following …
- Distinctive: line 39
Do not commit third-party screenshots to the repository.
- Very specific: line 45
No em dashes anywhere a visitor can read: Use a colon, a full stop, commas, or ·.
- Very specific: line 56
Branch on
ready, not onnot failed: Every surface that reads has four branches, and the fourth is the one that gets skipped: - Distinctive: line 86
Run it on a clean tree and read the diff — do not report work done on the strength of a fixer's own summary.
- Very specific: line 141
Do not add a rule you cannot trace to a section of the design doc.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Instructions for any coding agent working in a repository that has this pack
available. The full version, with the reasoning, is SKILL.md —
this is the short form for agents that read AGENTS.md by convention
(Cursor, Codex, Copilot, Aider and others).
Before writing any UI
Find the design doc. Check DESIGN.md, docs/DESIGN.md,
DESIGN-SYSTEM.md, CLAUDE.md, AGENTS.md, a design-system/ directory, a
tokens.css, or a Tailwind theme block. One usually exists and usually has
not been read.
- If one exists, it governs. Read it fully first. When a request conflicts with it, say so and cite the section rather than quietly following the request.
- If none exists, do not invent one per file. That is the actual cause of
work that looks generated: each file is locally plausible, and together
they are incoherent. Offer to write one from
method/DESIGN-TEMPLATE.md, or at minimum settle and write down three decisions: one accent and the share of emphasised surface it carries; one radius, one spacing base, one type ramp with line heights; and what the page ground is versus a plate.
When using a reference or a screenshot
Borrow structure. Never transplant a device.
Structure is how a page is ordered and what it groups — an argument about information, usually transferable. A device is the marker highlight, the cream ground, the hand-drawn figure, the dark closing slab — it carries another brand's voice and arrives as costume.
A screenshot is mostly device. So state which parts you are taking as
structure and which you are rejecting, before building. Full method in
method/references.md.
Do not commit third-party screenshots to the repository.
When writing user-visible copy
Two rules, both in method/voice.md:
- No em dashes anywhere a visitor can read. Use a colon, a full stop,
commas, or
·. Do not substitute a hyphen or en dash — rewrite the punctuation. Source comments are exempt. - One register, and never the engineering one. Describe what the product is for and who it affects, not how it is built. If the reader would have to look a word up, it does not ship.
When the surface reads something
Full argument in method/states.md. The short form:
Branch on ready, not on not failed. Every surface that reads has four
branches, and the fourth is the one that gets skipped:
- loading claims nothing. A skeleton holding the shape the content will take, not a spinner in the middle of nothing.
- ready and empty claims there is none. That is a factual assertion about the world and it has to be earned.
- ready and full is the happy path.
- failed claims I could not find out. Different words, a retry, and never the empty state's words.
data?.items ?? [] collapses the fourth into the second, which is a wrong
branch rather than a missing one: the surface says "you have none" in the
voice it reserves for true things. An empty state is a claim, and nobody
reads it as one.
For a destructive action: an undo window when the action is reversible, a confirmation when it is irreversible, and always a confirmation when it reaches past the person clicking. An undo that does not actually restore is worse than no undo.
Before reporting the work done
node enforce/design-check.mjs # needs a design-check.config.mjs
node enforce/design-check.mjs --fix # only the findings marked [--fix]
node pipeline/contrast.mjs <palette.json>--fix applies the rewrites the config already states and leaves the rest.
Run it on a clean tree and read the diff — do not report work done on the
strength of a fixer's own summary. When the app runs, use the gate instead,
which shoots the app either side of the fix and reports what moved:
node pipeline/fix-gate.mjs --base <url> --routes / /pricingIt exits non-zero whenever anything moved. That is the instruction to look at the masks it wrote, not a failure.
Then render it and look at it, narrow width first
(node pipeline/shots.mjs --base <url> --routes /). A design doc cannot tell
you a section is one card too long, and neither can a checker.
Defaults when no design doc says otherwise
Each of these reliably marks work as generated:
- The three-card feature row (icon, bold line, two lines of grey)
- Gradient text (
background-clip: text) - Side-stripe borders (
border-l-4) - Hard rules between sections
- A second accent for "secondary" actions
- Em dashes in user-visible copy
- A card grid where a table is meant
- Centred body copy
- Emoji as UI iconography
- Dark as a full-width section rather than a contained object
- Invented social proof: star ratings, made-up metrics, fake product screenshots, "trusted by thousands". This one is dishonest rather than merely generic, and a placeholder testimonial is exactly what filling a layout asks for.
And the four lanes, which is what the list above is really about, because the parts reassemble even when each one is avoided: standard SaaS landing; bootcamp marketing; AI-design template (glassmorphism, blue-to-purple gradient text, identical cards, an unmeasured hero metric); and editorial-typographic. The last is on the list because it is good and because converging on it by accident is the same failure as the other three. A lane you did not choose is slop even when the lane is beautiful.
What not to do with the checker
enforce/design-check.mjs holds geometry, colour, punctuation, measurable
floors, and the interaction rules a machine can decide: the focus indicator,
pointer targets, accessible names on icon-only controls, hover-only
affordances, unguarded animation, fields, raw images, hand-rolled shells and
the flex-1 shrink fault. --fix settles only the findings whose target the
config names; it will never invent an accessible name, choose between two
allowed values, or answer a contrast failure. It deliberately does not
check composition,
hierarchy or taste — and it cannot check whether an empty state would be a
lie on failure, which is why the states rules are read rather than run.
Do not add a rule you cannot trace to a section of the design doc. A rule
with no argument behind it produces noise, and noise teaches people to pass
--force, which costs every rule at once.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

