A copy-paste AGENTS.md for a one-person AI-agent company (and the 5 sections that matter) A developer published a copy-paste AGENTS.md template for solo operators running coding agents on a repository, arguing that these instruction files decay as rules pile up and stale facts get mixed with permanent ones. The template splits guidance into five sections: a pointer to a separately rewritten HANDOVER.md for current state, permanent rules only, agent routing and delegation, human approval gates with an append-only decision log, and a verification rule requiring agents to cite check results before reporting a task done. It is plain markdown and works with any agent that reads files from the repo, including Claude Code, Codex and Devin. If you run coding agents on a repo, you probably have an AGENTS.md. You probably also have a vague sense that the agents stopped reading it carefully a while ago. This post covers why that file decays, which five sections are worth keeping, and a complete template you can paste in. It is plain markdown. It works with any agent that reads files from your repo, whether that is Claude Code, Codex, Devin or something else. Most of these files start as a brain dump. Someone writes the build command, the code style, a few "never do this" lines, and a paragraph about the architecture. It is useful for a week. Then three things happen. The file turns into a diary. Every time an agent makes a mistake, a new rule gets appended. Nobody removes the old ones. Within a couple of months the file is long, partly contradictory, and mixes permanent rules with facts that went stale in March. Current state ends up in the wrong place. "The staging deploy is broken" is true today and false next week. It does not belong next to "run tests before committing", which is true every day. When both live in one file, the agent cannot tell which lines to trust. Nothing checks the file. An agent can ignore a rule and report success, and no part of the setup notices. A rule with no check behind it is a suggestion. The fix is not a longer file. It is a shorter one with a clear job for each section, and with the fast-changing parts moved out. One pointer to a separate handover file, plus two rules about that file. The agent reads it first every session. It rewrites it at closeout instead of appending to it. That handover file holds the objective, what is deployed, what is in flight, what is blocked on you, and the single next action. Keep it to a few hundred words. Because it is rewritten each time, it cannot pile up. This replaces the usual "every session starts from zero" problem with a file, and a file is easier to inspect than a memory feature. Only the rules that hold on every day. Where secrets live. What is gitignored. When to use a script instead of a model call. What a worker may and may not touch. If a rule only applies this week, it belongs in the handover file. If a rule has never been needed, delete it. Who does what. One lead agent plans, delegates, verifies and talks to you. Workers get a written brief with a bounded scope and acceptance checks. No brief, no work. Routing also says which route to try first. Cheap or free for bounded work, a stronger model for ambiguous diagnosis, and a paid route only with an approval on record. If you write nothing here, the agent picks the most capable and most expensive route every time. Anything that publishes, spends money, or commits you to something needs a human yes first. The agent posts the exact artifact to wherever you read messages and waits. Each yes or no goes into an append-only log, one line per decision, with a date. When something goes wrong, "who approved this and why" has a one-command answer. Rejections go in too, so a rejected idea does not come back next month under a new name. The shortest section and the most useful. Do not report a task as finished until you have run the check and can cite the result. "Tests pass" means the tests ran in this session. For delegated work, the lead re-runs the worker's checks itself. A worker saying "it works" is a claim, not evidence. Paste this at your repo root as AGENTS.md. Replace everything in angle brackets and delete any line that does not apply. AGENTS.md Keep this file short. Permanent rules only. Anything that changes week to week goes in HANDOVER.md. 1. Current state - Read HANDOVER.md first, every session. It is the only source of current state: objective, what is deployed, what is in flight, what is blocked on the human, and the next action. - Rewrite HANDOVER.md at closeout. Do not append. Keep it under 500 words. Move old notes to HISTORY.md. - If this file and HANDOVER.md disagree, HANDOVER.md wins. Fix this file. 2. Rules - Secrets live in ~/.agent-ops.env or $AGENT OPS ENV . Never in this repo, in chat, or in logs. .env files are gitignored. - state/ holds local logs and dedup state. It is gitignored. - If a task has a fixed spec, write a script. Use model calls only where judgment is needed. - Stay inside the scope of the brief. If the task needs a file or service outside it, stop and ask. - Workers do not delegate to other workers. -