How to write an effective AGENTS.md: record what agents can't infer themselves
adnan_hashmi · x · 2026-11-29
A guide by Steve Kearns at the Agentic AI Foundation on writing AGENTS.md files that actually improve coding agent behavior.
Key points
- AGENTS.md tells coding agents how to work in a repo: where code lives, which commands to run, files needing special handling, and completion criteria
- The format is deliberately lightweight — no mandatory sections or schema, just Markdown suggestions covering structure, build/test commands, conventions, testing, and security
- The core test: for each instruction, ask whether knowing it would change what the agent does; if not, it belongs elsewhere
- Unlike a README, it should capture repository knowledge agents can't reliably infer: build commands that produce incomplete binaries, generated code that must never be edited directly, architectural rules forbidding certain dependencies, non-obvious validation commands
Bottom line: AGENTS.md is for recording repo-specific knowledge that affects agent actions, not restating what agents can discover themselves.
More from coding & agent
- Fine-tuning a Company Brain LoRA with Tinker to replace retrieval in Claude Code — jacob_posel · 2026-11-29
- Building with agents on iPad: a demo of the annotate feature — aaraalto · 2026-11-29
- The better agents get, the harder it is to tell if you're steering or in the way — andreisavu · 2026-11-29
- Claude prompt templates: deep problem solver and reusable project context brief — manishkhosiya · 2026-11-29
- Parallel Task Coordinator: a prompt to run multiple tasks through Claude at once — manishkhosiya · 2026-11-29
- Google Antigravity Remote Works as a Mobile PWA, Developer Tips — cgarciae88 · 2026-11-29