An agent with no rules guesses.
Without instructions, a coding agent falls back on the average of everything it has seen. It asks too much, builds too much and stops half-done. A good AGENTS.md fixes that in about a thousand words.
AGENTS.md best practices we build in.
Working rules
Act on the clear reading, finish the whole goal, prove it works by running it, and keep changes small.
Guardrails
Never push to main or touch secrets. Confirm before anything that can't be undone: deletes, deploys, migrations, money.
Writing rules
Plain-English commits, pull requests and reports, so a reviewer understands the change in one read.
Company knowledge
Your stack, commands, test runner, terms and current focus, in a project file that wins on conflict.
Written from your codebase, not a template.
Before you ask.
What is AGENTS.md?
A Markdown file of standing instructions for AI coding agents. Codex, Cursor and Gemini CLI read AGENTS.md at the start of a session, and Claude Code reads the same rules from CLAUDE.md.
What is the difference between AGENTS.md and CLAUDE.md?
They hold the same kind of rules. Claude Code reads CLAUDE.md and most other agents read AGENTS.md. We keep one file and link the other name to it.
Should it be global or per project?
Both. A global file holds how each engineer wants agents to work. A project file holds that repo's stack and commands, and wins on conflict.
How long should it be?
Short. Ours is about 1,200 words. Every line costs context on every task, so a rule that doesn't change behavior gets cut.
Get your free AI audit.
Twenty minutes, and we are honest about where AI helps your business and where it doesn't. If there's nothing worth building yet, we'll tell you.