Why AI Coding Agents Need a Different Instruction Manual Than Humans
Imagine handing someone a codebase and saying: "Update the docs, but don't break anything." A human developer reads the README, pokes around, and figures out the rules. An AI coding agent? It has to guess.
Today is 6 July 2026, and AI agents are getting better at writing code—but they're still running into a recurring problem. They get a task and a README, then have to improvise answers to questions they shouldn't have to ask: Which package manager does this project use? Are those generated files safe to touch? What counts as "done"? That's where AGENTS.md comes in, and it's surprisingly practical.
The Gap Between README and Agent Instructions
A README answers the question "What is this project?" It's written for humans: you learn what the code does, how to run it locally, and where to find the rest of the docs.
But coding agents need something different. They need to answer "What should I know before I touch this repo?" That's where AGENTS.md steps in.
According to guidance on the format, AGENTS.md is a predictable place to put coding-agent instructions: setup commands, test commands, code style, security considerations, and nested instructions for large monorepos. The split is useful because a README and an AGENTS.md file serve completely different readers. A README is for the people building and learning. AGENTS.md is for the tools doing the work.
What Actually Goes Wrong
Here's a concrete example. Imagine your project has both source files and auto-generated files sitting in the same directory. Without clear boundaries written down, an AI agent might happily edit something it shouldn't. Or it might run tests, but not the right ones—maybe it skips the linting step because nothing told it linting mattered.
The typical workaround? You write longer, more detailed prompts:
"Update the docs, but don't touch generated files, use pnpm, run the lint and test commands, keep the PR small, and tell me what you couldn't verify."
With AGENTS.md, that prompt shrinks to:
"Update the quickstart docs for the new config flag."
The agent already knows the rest from the file.
How Goose (and Other Agents) Use It
This isn't theoretical. A tool called Goose—an open source AI agent with a desktop app, CLI, API, MCP extensions, and skills—shows why this matters in practice. Without AGENTS.md, every task requires the agent to ask you (or guess) about the basics. With AGENTS.md in the repo, Goose can read the standing rules once and apply them to every task.
The pattern extends beyond one tool. Any coding agent that's smart enough to read a file can follow clearer instructions if they're written down.
A Clean Split: AGENTS.md and Skills
One important boundary: AGENTS.md should stay focused on standing rules—the things that apply to almost every task in a repo. But every team also has repeatable workflows. Those shouldn't bloat AGENTS.md into a junk drawer.
The cleaner approach: AGENTS.md stays short and points to skills—reusable instruction sets for specific kinds of work. For a backend service, AGENTS.md might route database migrations, API changes, and releases to separate skills. The file stays readable, and detailed task routines live somewhere appropriate.
The distinction is simple: if a rule should apply to almost every task, put it in AGENTS.md. If it's a workflow for one kind of work, make it a skill.
What to Actually Put in AGENTS.md
Here's a practical starting point:
Project Map
Tell the agent what lives where:
src/contains application code.tests/contains tests.docs/contains user-facing docs.generated/is produced by tooling; do not edit it manually.
Commands
List the blessed way to do things:
- Install:
pnpm install - Test:
pnpm test - Lint:
pnpm lint - Typecheck:
pnpm typecheck
Working Rules
Set boundaries:
- Keep changes scoped to the user's request.
- Prefer existing helpers before adding abstractions.
- Do not deploy, publish, migrate, or delete data without explicit approval.
- Do not include secrets, private data, or local-only paths in committed files.
Completion
Define what "done" looks like:
- Run the relevant checks or explain why they were not run.
- Summarize changed behavior.
- List remaining risk or follow-up.
Skills
Route to task-specific workflows:
- For database migrations, use the migration review skill.
- For API changes, use the contract-checking skill.
- Before a release, use the release-notes skill.
That's enough to be useful. It's also short enough that someone might actually maintain it. Avoid architecture essays, aspirational values, every command in the repo, and private context you wouldn't want in a prompt transcript. If the instruction doesn't change the agent's behavior, cut it.
How to Know If It's Working
Try this on a low-risk repo where you already work with an agent:
Step 1: Run a task without AGENTS.md
Give the agent a simple job—say, "Add an example for a new config flag." Watch what you have to explain in your prompt.
Step 2: Create an AGENTS.md file
Use the template above. Keep it to five sections. Short and actionable.
Step 3: Run the same task again
Give the agent the same job with only the core task in your prompt.
Step 4: Check these three things
Did the agent run the right checks? Did it avoid generated files? Did your prompt get shorter?
If all three are yes, the repo got less ambiguous. If not, the file probably needs to be more specific or simpler.
Conclusion
AGENTS.md isn't a magic safety layer or a trendy new best practice. It's a simple, boring place to put the instructions you were already repeating: setup, checks, boundaries, and what done means. The practical bar is this: can the agent do a small task with less prompting and still show the checks it ran? If yes, the file is doing its job.
Merits
- Prompts get shorter and more focused on the actual task.
- Agents run consistent checks without needing to be reminded each time.
- Files and boundaries stay clearer—less guessing about generated vs. source code.
- Works with any coding agent, not tied to one tool.
- Easy to maintain if you keep it short and focused.
- Reduces the chance of agents accidentally breaking things.
Demerits
- Requires discipline to keep the file up-to-date as the project evolves.
- Teams already using detailed prompts might not see immediate benefit.
- Doesn't solve all agent reliability problems—just reduces unnecessary guessing.
- Overkill for very small projects or throwaway code.
- Requires agent tools that actually read and respect the file format.
Caution
This article is educational, intended to explain how coding agents work with project documentation. If you create an AGENTS.md file with placeholder values (like paths or commands), replace them with your actual project setup. Verify all instructions against your project's real structure and tooling before agents act on them. The examples here are illustrative; your repo's specific rules may differ.
Frequently asked questions
- What's the difference between AGENTS.md and a regular README file?
- Can I use AGENTS.md with any coding agent, or is it tool-specific?
- How do I know if my AGENTS.md file is clear enough for an agent to follow?
- Should AGENTS.md include security policies and access controls?
- What should I do if my AGENTS.md file gets too long?
- Can AGENTS.md replace code comments and inline documentation?
- How often should I update AGENTS.md as a project evolves?
- What happens if an agent encounters an instruction in AGENTS.md that it doesn't understand?
Tags
#AIAgents #CodingAutomation #Documentation #SoftwareDevelopment #DeveloperTools #CodingEfficiency #InstructionDesign


Responses
Sign in to leave a response.