cd /news/ai-agents/a-copy-paste-agents-md-for-a-one-per… · home › topics › ai-agents › article
[ARTICLE · art-175294] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

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.

recommendation

Split your AGENTS.md into permanent rules plus a rewritten-each-session HANDOVER.md, and require agents to re-run and cite checks before claiming a task is finished.

more in playbook: Working with AI coding agents
by read6 min views2 publishedNov 24, 2026

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.


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.
- <project-specific rule: build command, code style, forbidden
  directories>

## 3. Routing
- Lead: <your main agent>. Plans, delegates, verifies, integrates,
  and is the only agent that talks to the human.
- Workers get a written brief (WORKER_BRIEF.md) with scope, files
  they may touch, and acceptance checks. No brief, no work.
- Try routes in this order.
  1. <cheap or free route> for bounded code work.
  2. <capable model> for ambiguous diagnosis, architecture, and
     anything consequential.
  3. <paid route> only with an approval logged in DECISIONS.md.
- Workers never hold credentials beyond what their task needs.

## 4. Approvals log
- Before any publish, spend, submission, or contract: post the
  exact artifact to <your ops chat> and wait for a reply.
- No reply means no. Fail closed.
- Append every decision to DECISIONS.md, one line each:
  `- YYYY-MM-DD: <decision> - <who approved, conditions, cap>`
- Log rejections too, with the reason.
- A standing approval must name its scope and its spending cap.
  "Fine, go ahead" is not a standing approval.

## 5. Verify before done
- Do not say done, fixed, or passing until you have run the check
  in this session and can quote the output.
- For delegated work, the lead re-runs the worker's acceptance
  checks. A worker's report is a claim, not evidence.
- If a check cannot run, say so and say what is unverified.
- Closeout order: verify, update HANDOVER.md, then report.

The template is deliberately small, about 55 lines. If it grows past 80, something in it should have been a handover note.

Start with sections 1 and 5. They cost nothing and change agent behavior the fastest. Add routing once you run more than one agent. Add the approvals log the first time an agent publishes or spends something you did not expect.

Then check it. Every few weeks, read the file and ask of each line whether an agent could break it without anyone noticing. If yes, add a check or delete the line.

The free repo has this template. The paid Agent-Ops Starter Kit adds the other operating documents (handover, decision log, worker brief, opportunity pipeline), Telegram and Slack scripts for approving from your phone, and a service installer and CI workflow. Details and purchase.

You do not need any of it to use the template above.

The template and starter files are on GitHub at GiGwebs/agent-ops-starter-kit.

Disclosure. The Agent-Ops Starter Kit is my own product, and the link above is a sale link. This article was drafted and reviewed by AI agents I run, and published with my approval.

── more in #ai-agents 4 stories · sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/a-copy-paste-agents-…] indexed:0 read:6min 2026-11-24 · —