better-code-agent / templates
AGENTS.md0 starsChanged 10 days agoMITView on GitHub
A map, not a manual. Only what an agent can't work out from the code. Add a line when you've had to correct the agent twice.
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,337 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 repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- architecture-decisionSkill
- bootstrap-projectSkill
- implement-taskSkill
- plan-featureSkill
- review-changeSkill
- review-testsSkill
- update-referencesSkill
- verify-doneSkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Check (must be green before any commit or "done"): scripts/check.sh
- Very specific: line 9
Run one test: <!-- e.g. pnpm vitest run path/to/file.test.ts -->
- Distinctive: line 10
Run the app: <!-- e.g. pnpm dev -->
- Very specific: line 17
Start: read git log --oneline -15, the last entries of docs/PROGRESS.md, and the active plan.
≈ “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
<!-- One line: what this project is and who uses it. -->A map, not a manual. Only what an agent can't work out from the code. Add a line when you've had to correct the agent twice.
Commands
- Check (must be green before any commit or "done"):
scripts/check.sh - Run one test:
<!-- e.g. pnpm vitest run path/to/file.test.ts --> - Run the app:
<!-- e.g. pnpm dev -->
Where things are
- Rules:
.claude/rules/(testing, architecture, security, code-quality, stack-practices, planning-memory, commits). Read the relevant one before that kind of work. - Memory:
docs/ROADMAP.md,docs/PROGRESS.md,docs/plans/,docs/adr/.
Workflow
- Start: read
git log --oneline -15, the last entries ofdocs/PROGRESS.md, and the active plan; run the check. - Bigger than one commit: write a plan in
docs/plans/and get it approved first. - One task at a time: test first, implement, check green, commit, log in
docs/PROGRESS.md. - Done means: acceptance criteria met, check green with the output shown, plan and progress updated, committed.
- Existing tests are the spec. Never delete, skip, loosen or rewrite an existing test to make a check pass. If tests contradict each other or one looks wrong, stop and ask which behaviour is intended.
Conventions
<!-- Decisions not visible in the code, e.g. "use the error helpers in src/lib/errors.ts". -->Gotchas
<!-- Misleading spots, e.g. "src/legacy/ is live; don't copy its patterns". -->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.

