<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Build Loops</title>
    <description>The latest articles on DEV Community by Build Loops (@buildloops).</description>
    <link>https://dev.to/buildloops</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4064191%2Fe637e748-c970-4615-b9c5-940d72798bfe.png</url>
      <title>DEV Community: Build Loops</title>
      <link>https://dev.to/buildloops</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/buildloops"/>
    <language>en</language>
    <item>
      <title>AGENTS.md Is Programming for Your AI Agent, Not Documentation for Humans</title>
      <dc:creator>Build Loops</dc:creator>
      <pubDate>Wed, 05 Aug 2026 13:15:07 +0000</pubDate>
      <link>https://dev.to/buildloops/agentsmd-is-programming-for-your-ai-agent-not-documentation-for-humans-1g4o</link>
      <guid>https://dev.to/buildloops/agentsmd-is-programming-for-your-ai-agent-not-documentation-for-humans-1g4o</guid>
      <description>&lt;p&gt;If you use a coding agent for any real length of time, you hit the same wall: the agent keeps making mistakes you already corrected. Wrong package manager. Banned patterns. Edits to files that shouldn't be touched. You fix it, it happens again, you fix it, and eventually you're supervising the tool more than it's saving you time.&lt;/p&gt;

&lt;p&gt;The standard advice is "write better prompts" — which treats a memory problem as a wording problem. The actual fix is architectural: give the agent a permanent, project-level context file it reads at the start of every session. It's called &lt;code&gt;AGENTS.md&lt;/code&gt;, and it's the closest thing your agent has to a memory.&lt;/p&gt;

&lt;p&gt;But here's the catch: most people create one and see no change, because they filled it with prose. They wrote a document, and the agent ignored it — because a document isn't what it's supposed to be. Prose is ambiguous, and it gives the agent nothing it doesn't already assume about a generic project. &lt;code&gt;AGENTS.md&lt;/code&gt; is programming for an AI agent, not documentation for humans. This article explains why that distinction is everything — and what the file looks like when you write it as code.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why your agent forgets everything
&lt;/h2&gt;

&lt;p&gt;Coding agents are stateless. Between sessions, they retain nothing. Every conversation starts from scratch: a blank context, plus a set of guesses derived from code the agent saw in training — which is other people's code, not yours.&lt;/p&gt;

&lt;p&gt;That's the entire reason you repeat yourself. It's not that the model is bad, and it's not that you're bad at prompting. The agent genuinely does not know that your project uses &lt;code&gt;pnpm&lt;/code&gt;, that your tests need a running database, or that &lt;code&gt;dist/&lt;/code&gt; is generated and must never be edited. It has to guess, it guesses wrong, you correct it, and the correction evaporates the moment the session ends.&lt;/p&gt;

&lt;p&gt;Anthropic's numbers confirm how wide this gap is: engineers use AI in roughly 60% of their work but fully delegate only 0–20% of tasks. The missing piece isn't model capability — it's setup. A well-configured agent can run autonomously; a stateless one requires constant babysitting.&lt;/p&gt;

&lt;p&gt;The file fixes this because of a mechanism that almost no guide explains: &lt;strong&gt;the agent re-reads it at the start of every session.&lt;/strong&gt; Instructions you type in a chat get buried under newer tokens and drift out of attention — that's context drift, and it happens in every long conversation. Instructions in a file don't decay, because they're re-read, not remembered. The agent doesn't recall your rules from a previous session; it loads them fresh, every single time.&lt;/p&gt;

&lt;p&gt;Think of it as onboarding documentation for an AI employee. A README tells humans what the project is. &lt;code&gt;AGENTS.md&lt;/code&gt; tells the agent how to work here: the exact commands, the conventions, the "don't touch" zones, and the traps that have already hurt someone.&lt;/p&gt;




&lt;h2&gt;
  
  
  AGENTS.md is code, not prose
&lt;/h2&gt;

&lt;p&gt;Here's the mental shift that changes everything. Documentation &lt;em&gt;describes&lt;/em&gt; a system. Code &lt;em&gt;causes&lt;/em&gt; behavior. When you write &lt;code&gt;AGENTS.md&lt;/code&gt; like a README — descriptive, warm, comprehensive — you're writing prose the agent reads and mostly ignores, because prose is ambiguous and the agent already has a default behavior baked in.&lt;/p&gt;

&lt;p&gt;When you write it like code, every line has a job. A line that doesn't change an edit, doesn't earn its place. The rules for writing it well are the same rules you'd apply to good code:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Token cost is real.&lt;/strong&gt; Every word in this file is loaded into context at the start of every single session, for every single task. A 500-word backstory about your team's engineering philosophy displaces 500 words of actual task context. And context bloat isn't free — Chroma's 2025 study found that all 18 frontier models tested degrade in accuracy as input grows, some dropping from 95% to 60% past a threshold. A bloated file isn't neutral; it's actively making the agent worse. Keep it under ~200 lines. If removing a line wouldn't change the agent's output, delete it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Specificity beats aspiration.&lt;/strong&gt; "Write clean, maintainable code" does nothing — the agent already tries to do that. Only include rules that are specific to your project and that the agent couldn't figure out from reading the code. "Use &lt;code&gt;pnpm&lt;/code&gt;, not npm" changes behavior. "Follow best practices" doesn't.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Every "never" needs an "instead."&lt;/strong&gt; Pure prohibitions create dead ends. "Never use &lt;code&gt;any&lt;/code&gt;" leaves the agent guessing what to do. "Never use &lt;code&gt;any&lt;/code&gt; — use &lt;code&gt;unknown&lt;/code&gt; and narrow it with type guards" gives it an escape route. The same rule in miniature: "Use &lt;code&gt;pnpm&lt;/code&gt;" is a fact the agent will forget; "Never use npm — install and run everything with &lt;code&gt;pnpm&lt;/code&gt;" changes a behavior and names the alternative in one line.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structure aids parsing.&lt;/strong&gt; Headers, bullets, and exact commands are easier to prioritize than paragraphs. The same content, organized, is ten times more useful.&lt;/p&gt;

&lt;p&gt;One more thing worth being honest about: this is leverage, not magic. As Martin Fowler puts it, context engineering raises the &lt;em&gt;probability&lt;/em&gt; of useful results — it can never &lt;em&gt;guarantee&lt;/em&gt; them. No matter how good your file is, an LLM is still an LLM. When a rule absolutely must hold, don't write it in Markdown; enforce it deterministically with a hook. Treat the file as your agent's guidance, and hooks as its guardrails.&lt;/p&gt;




&lt;h2&gt;
  
  
  The drop-in template
&lt;/h2&gt;

&lt;p&gt;Here's the skeleton. It deliberately mixes two kinds of content. The &lt;strong&gt;lean core&lt;/strong&gt; — sections 1, 5, 6, 7, 9 — is the part that changes edits: exact commands, conventions, guardrails. The &lt;strong&gt;workflow contract&lt;/strong&gt; — sections 2, 3, 4, and the "when in doubt" checklist in section 8 — tells the agent &lt;em&gt;how to operate&lt;/em&gt;: plan before code, an approval gate, a skills whitelist. That's not filler; it programs how the agent works with you. It reflects one popular workflow — supervised "vibe engineering," where the agent writes its own implementation prompts and you approve them. Run that workflow and it pays off; work more autonomously or manually and drop it — the lean core works everywhere. Either way, this is a template, not a finished file: anything that isn't true for your project gets deleted, not kept.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# AGENTS.md&lt;/span&gt;

You are a principal-level &lt;span class="nt"&gt;&amp;lt;role&amp;gt;&lt;/span&gt; engineer and AI implementation agent working on &lt;span class="nt"&gt;&amp;lt;PROJECT&amp;gt;&lt;/span&gt;, &lt;span class="nt"&gt;&amp;lt;one-line&lt;/span&gt; &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;.

Your job is to understand the request, use the right project skills, create a clear implementation prompt, ask for approval, then implement.
&lt;span class="p"&gt;
---
&lt;/span&gt;
&lt;span class="gh"&gt;# 1. Product&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;PROJECT&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;what&lt;/span&gt; &lt;span class="na"&gt;it&lt;/span&gt; &lt;span class="na"&gt;does&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;.

Build only:
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;feature&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;feature&amp;gt;&lt;/span&gt;

Do not overbuild.
&lt;span class="p"&gt;
---
&lt;/span&gt;
&lt;span class="c"&gt;&amp;lt;!-- Optional: workflow contract. Sections 2–4 (and the "when in doubt" checklist in section 8) only pay off when you run a supervised, agent-driven workflow (plan, approve, implement). Lean-core-only users can delete them. --&amp;gt;&lt;/span&gt;

&lt;span class="gh"&gt;# 2. Workflow&lt;/span&gt;

For every implementation request:
&lt;span class="p"&gt;
1.&lt;/span&gt; Read &lt;span class="sb"&gt;`AGENTS.md`&lt;/span&gt;.
&lt;span class="p"&gt;2.&lt;/span&gt; Read the skills explicitly mentioned by the user.
&lt;span class="p"&gt;3.&lt;/span&gt; Read clearly needed supporting skills from the approved skill list.
&lt;span class="p"&gt;4.&lt;/span&gt; Inspect relevant code.
&lt;span class="p"&gt;5.&lt;/span&gt; Ask a focused question only if the task has meaningful ambiguity.
&lt;span class="p"&gt;6.&lt;/span&gt; Create a detailed prompt file in &lt;span class="sb"&gt;`prompts/`&lt;/span&gt;.
&lt;span class="p"&gt;7.&lt;/span&gt; Ask: "I prepared the implementation prompt at &lt;span class="sb"&gt;`prompts/&amp;lt;file-name&amp;gt;.md`&lt;/span&gt;. Is this good to execute?"
&lt;span class="p"&gt;8.&lt;/span&gt; Implement only after user approval.
&lt;span class="p"&gt;9.&lt;/span&gt; Run available checks.
&lt;span class="p"&gt;10.&lt;/span&gt; Share exact steps to test or run the completed feature.

Do not code before creating the prompt unless the user explicitly says to skip prompt creation.
&lt;span class="p"&gt;
---
&lt;/span&gt;
&lt;span class="gh"&gt;# 3. Skills&lt;/span&gt;

Use only these skills:
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="sb"&gt;`.agents/skills/&amp;lt;skill&amp;gt;`&lt;/span&gt;

Do not invent new skills.
&lt;span class="p"&gt;
---
&lt;/span&gt;
&lt;span class="gh"&gt;# 4. Prompt files&lt;/span&gt;

Prompt files live in the &lt;span class="sb"&gt;`prompts/`&lt;/span&gt; directory.

Each prompt must include:
&lt;span class="p"&gt;
-&lt;/span&gt; goal
&lt;span class="p"&gt;-&lt;/span&gt; skills read
&lt;span class="p"&gt;-&lt;/span&gt; existing code inspected
&lt;span class="p"&gt;-&lt;/span&gt; decisions or assumptions
&lt;span class="p"&gt;-&lt;/span&gt; files likely to change
&lt;span class="p"&gt;-&lt;/span&gt; implementation requirements
&lt;span class="p"&gt;-&lt;/span&gt; security requirements
&lt;span class="p"&gt;-&lt;/span&gt; acceptance criteria
&lt;span class="p"&gt;-&lt;/span&gt; checks to run
&lt;span class="p"&gt;-&lt;/span&gt; exact manual test steps expected after implementation

&lt;span class="c"&gt;&amp;lt;!-- End of the optional workflow contract. Everything from here is lean core — keep it even without the workflow sections. --&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;
---
&lt;/span&gt;
&lt;span class="gh"&gt;# 5. Architecture&lt;/span&gt;

Keep these layers separate:
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;layer&amp;gt;&lt;/span&gt;: &lt;span class="nt"&gt;&amp;lt;responsibility&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;layer&amp;gt;&lt;/span&gt;: &lt;span class="nt"&gt;&amp;lt;responsibility&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;Boundary&lt;/span&gt; &lt;span class="na"&gt;rule&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt; &lt;span class="na"&gt;e.g.&lt;/span&gt; &lt;span class="err"&gt;"&lt;/span&gt;&lt;span class="na"&gt;UI&lt;/span&gt; &lt;span class="na"&gt;must&lt;/span&gt; &lt;span class="na"&gt;display&lt;/span&gt; &lt;span class="na"&gt;stored&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt; &lt;span class="na"&gt;only.&lt;/span&gt;&lt;span class="err"&gt;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;
---
&lt;/span&gt;
&lt;span class="gh"&gt;# 6. Tech stack&lt;/span&gt;

Use:
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;stack&amp;gt;&lt;/span&gt;

Do not use:
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;stack&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;
---
&lt;/span&gt;
&lt;span class="gh"&gt;# 7. Source of truth&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;Name&lt;/span&gt; &lt;span class="na"&gt;the&lt;/span&gt; &lt;span class="na"&gt;authoritative&lt;/span&gt; &lt;span class="na"&gt;source&lt;/span&gt; &lt;span class="na"&gt;the&lt;/span&gt; &lt;span class="na"&gt;agent&lt;/span&gt; &lt;span class="na"&gt;should&lt;/span&gt; &lt;span class="na"&gt;rely&lt;/span&gt; &lt;span class="na"&gt;on&lt;/span&gt; &lt;span class="err"&gt;—&lt;/span&gt; &lt;span class="na"&gt;a&lt;/span&gt; &lt;span class="na"&gt;database&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt; &lt;span class="na"&gt;a&lt;/span&gt; &lt;span class="na"&gt;spec&lt;/span&gt; &lt;span class="na"&gt;document&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt; &lt;span class="na"&gt;a&lt;/span&gt; &lt;span class="na"&gt;config&lt;/span&gt; &lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt; &lt;span class="na"&gt;an&lt;/span&gt; &lt;span class="na"&gt;API.&lt;/span&gt; &lt;span class="na"&gt;It&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="na"&gt;s&lt;/span&gt; &lt;span class="na"&gt;whatever&lt;/span&gt; &lt;span class="na"&gt;your&lt;/span&gt; &lt;span class="na"&gt;project&lt;/span&gt; &lt;span class="na"&gt;treats&lt;/span&gt; &lt;span class="na"&gt;as&lt;/span&gt; &lt;span class="na"&gt;ground&lt;/span&gt; &lt;span class="na"&gt;truth.&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;What&lt;/span&gt; &lt;span class="na"&gt;each&lt;/span&gt; &lt;span class="na"&gt;record&lt;/span&gt; &lt;span class="na"&gt;or&lt;/span&gt; &lt;span class="na"&gt;entity&lt;/span&gt; &lt;span class="na"&gt;stores&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt; &lt;span class="na"&gt;fields&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt; &lt;span class="na"&gt;what&lt;/span&gt; &lt;span class="na"&gt;must&lt;/span&gt; &lt;span class="na"&gt;never&lt;/span&gt; &lt;span class="na"&gt;be&lt;/span&gt; &lt;span class="na"&gt;hardcoded&lt;/span&gt; &lt;span class="na"&gt;or&lt;/span&gt; &lt;span class="na"&gt;assumed.&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;
---
&lt;/span&gt;
&lt;span class="gh"&gt;# 8. Security, code standards, and final rule&lt;/span&gt;

Never expose to browser code: &lt;span class="nt"&gt;&amp;lt;secrets&amp;gt;&lt;/span&gt;.
Never run from browser code: &lt;span class="nt"&gt;&amp;lt;side-effectful&lt;/span&gt; &lt;span class="na"&gt;work&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;.

&lt;span class="nt"&gt;&amp;lt;Language&lt;/span&gt; &lt;span class="err"&gt;/&lt;/span&gt; &lt;span class="na"&gt;style&lt;/span&gt; &lt;span class="na"&gt;rules:&lt;/span&gt; &lt;span class="na"&gt;explicit&lt;/span&gt; &lt;span class="na"&gt;types&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt; &lt;span class="na"&gt;no&lt;/span&gt; &lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="na"&gt;any&lt;/span&gt;&lt;span class="err"&gt;`,&lt;/span&gt; &lt;span class="na"&gt;small&lt;/span&gt; &lt;span class="na"&gt;functions.&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

When in doubt:
&lt;span class="p"&gt;
1.&lt;/span&gt; Keep it small.
&lt;span class="p"&gt;2.&lt;/span&gt; Use the relevant skill.
&lt;span class="p"&gt;3.&lt;/span&gt; Preserve server/client boundaries.
&lt;span class="p"&gt;4.&lt;/span&gt; Ask a focused question if needed.
&lt;span class="p"&gt;5.&lt;/span&gt; Save a prompt before coding.
&lt;span class="p"&gt;6.&lt;/span&gt; Ask if it is good to execute.
&lt;span class="p"&gt;7.&lt;/span&gt; Implement after confirmation.
&lt;span class="p"&gt;8.&lt;/span&gt; Run available checks.
&lt;span class="p"&gt;9.&lt;/span&gt; Share exact test steps.
&lt;span class="p"&gt;
---
&lt;/span&gt;
&lt;span class="gh"&gt;# 9. Commands and checks&lt;/span&gt;

"Run available checks" (sections 2 and 8) means running these from the project root and reporting the results:
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="sb"&gt;`&amp;lt;command&amp;gt;`&lt;/span&gt; — &lt;span class="nt"&gt;&amp;lt;what&lt;/span&gt; &lt;span class="na"&gt;it&lt;/span&gt; &lt;span class="na"&gt;does&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`&amp;lt;command&amp;gt;`&lt;/span&gt; — &lt;span class="nt"&gt;&amp;lt;what&lt;/span&gt; &lt;span class="na"&gt;it&lt;/span&gt; &lt;span class="na"&gt;does&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

Development and runtime:
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="sb"&gt;`&amp;lt;command&amp;gt;`&lt;/span&gt; — start the dev server
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`&amp;lt;command&amp;gt;`&lt;/span&gt; — run tests

After implementation, run the checks and report the exact output. Never claim a check passed without running it.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the part people skip: &lt;strong&gt;why each section exists.&lt;/strong&gt; Start with the lean core — the four sections that change edits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Product / "Build only"&lt;/strong&gt; — the agent works best when it knows exactly who it's supposed to be and what it's allowed to build. "Do not overbuild" is the anti-hallucination guardrail: it stops the agent from expanding a small request into a rewrite of the codebase.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Architecture + tech stack&lt;/strong&gt; — the "Do not use" list matters as much as the "Use" list. It stops the agent from reaching for the dependency you deliberately avoided.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source of truth&lt;/strong&gt; — one authoritative place for the facts the agent relies on, whatever it is: a database, a spec, a config file. It turns a vague feature request into concrete decisions instead of guesswork.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Commands and checks&lt;/strong&gt; — the highest-ROI section. Exact invocations, including the flag the agent would otherwise guess wrong. And "do not claim a check passed without running it" is the evidence rule: the agent must report real output, not assume success.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then the workflow contract — only when you run a supervised, agent-driven workflow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Workflow&lt;/strong&gt; — this is what turns the file from documentation into programming. The numbered steps and the approval gate are the most important piece: the agent plans, you approve, it executes. That isn't documentation; it's a control loop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skills + prompt files&lt;/strong&gt; — a whitelist ("Do not invent new skills") plus a mandatory plan-before-code step with a defined list of required sections. That's what makes the approval gate real: the agent can't show you a one-line plan.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security + final rule&lt;/strong&gt; — the fallback checklist for situations your rules didn't cover. It tells the agent how to behave when it doesn't know what to do — which is exactly when improvisation goes wrong.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Airflow project shows how far this can go in the real world. Its &lt;code&gt;AGENTS.md&lt;/code&gt; instructs: "Never run pytest, python, or airflow commands directly on the host — always use &lt;code&gt;breeze&lt;/code&gt;." One line, and the agent stops polluting the developer's machine with a wrong-versioned Python environment. That's a guardrail that saves real pain, and it only works because it names the alternative, not just the prohibition.&lt;/p&gt;

&lt;p&gt;If you use Claude Code specifically, one practical note: Claude Code reads &lt;code&gt;CLAUDE.md&lt;/code&gt; natively, not &lt;code&gt;AGENTS.md&lt;/code&gt;. Bridge them with a one-line import:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# CLAUDE.md&lt;/span&gt;
@AGENTS.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;@AGENTS.md&lt;/code&gt; import expands at session start, so you keep a single source of truth and add Claude-specific rules below it.&lt;/p&gt;




&lt;h2&gt;
  
  
  What changed for me
&lt;/h2&gt;

&lt;p&gt;Before I started using &lt;code&gt;AGENTS.md&lt;/code&gt;, every project began the same way: initialize the repo, then type out a long prompt covering everything I wanted built, the conventions, the things not to touch. It worked — for that one session. The next day I'd open a new session and all of it was gone. I'd repeat myself, re-correct a mistake it had already made, and watch it make a similar one anyway. It got frustrating fast.&lt;/p&gt;

&lt;p&gt;The turning point was writing a well-structured &lt;code&gt;AGENTS.md&lt;/code&gt; before anything else. The agent stopped repeating those mistakes — not because I prompted better, but because it could re-read my instructions every session instead of trying to remember them. Work was easier, and there was a side effect I hadn't expected: I was burning fewer tokens. Re-explaining everything session after session is the biggest token waste there is, and when you're paying for a plan, that waste costs real money. A good &lt;code&gt;AGENTS.md&lt;/code&gt; is cheap insurance against it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real-world proof that this scales
&lt;/h2&gt;

&lt;p&gt;A single file might feel like a small thing. The adoption numbers say otherwise.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;AGENTS.md&lt;/code&gt; is now an open standard, released by OpenAI in August 2025 and donated — jointly with Anthropic — to the Linux Foundation's Agentic AI Foundation in December 2025. It's used in more than 60,000 open-source repositories and read natively by every major agent: Codex, Cursor, Copilot, Claude Code (via import), Google's Jules, Gemini CLI, Windsurf, and more. One file, all tools. That's the point of a standard.&lt;/p&gt;

&lt;p&gt;The most extreme use of it is inside OpenAI's own repository, which ships &lt;strong&gt;88 nested &lt;code&gt;AGENTS.md&lt;/code&gt; files&lt;/strong&gt; — a root file for global conventions, and subdirectory files for each subproject. Agents automatically read the nearest file in the directory tree, so the closest one takes precedence. That's how you scale from "one file for my side project" to "one hierarchy for a monorepo."&lt;/p&gt;

&lt;p&gt;At the enterprise end, context configuration is part of the layer that makes the headline agent stories possible. Rakuten runs an autonomous code-repair system across 12.5 million lines of code; TELUS credits full-pipeline AI integration with half a million saved engineering hours. Systems like that have to be reliable — and reliable agents need to understand the codebase they're operating on, which is exactly what a well-written context file is for.&lt;/p&gt;

&lt;p&gt;The message for a solo developer is simpler: if a 60,000-repo open standard and Fortune-500 engineering orgs both treat this file as infrastructure, it's worth the thirty minutes it takes to write yours properly.&lt;/p&gt;




&lt;h2&gt;
  
  
  The mistakes that make your file useless
&lt;/h2&gt;

&lt;p&gt;Most &lt;code&gt;AGENTS.md&lt;/code&gt; files fail for one of five reasons. Here's what they look like and how to fix them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The novel.&lt;/strong&gt; A 500-word essay about your codebase's history. It burns context on every session and buries the rules that matter. Fix: cut ruthlessly. If a sentence wouldn't change the agent's output, it's dead weight.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The wish list.&lt;/strong&gt; "Write clean, well-documented code. Follow best practices." The agent already does this by default, so the file is pure noise. Fix: delete anything the agent would get right without being told.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Negative-only rules.&lt;/strong&gt; "Never use &lt;code&gt;any&lt;/code&gt;." "Don't commit to main." Without an alternative, the agent improvises — usually badly. Fix: every prohibition gets an "instead."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Contradictions.&lt;/strong&gt; "Always write comprehensive tests" and "keep sessions fast, minimize token usage" are in tension. The agent oscillates between them. Fix: set explicit priorities and document the trade-offs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Set and forget.&lt;/strong&gt; This one is the silent killer. A recent study of 356 repositories found stale code references in 23% of AI configuration files — files pointing at renamed paths, deleted modules, and old commands. Stale instructions don't just waste tokens; they actively mislead. Fix: treat the file like code. Review it monthly, put a &lt;code&gt;# last reviewed: YYYY-MM-DD&lt;/code&gt; comment at the top, and delete anything that no longer reflects reality.&lt;/p&gt;




&lt;h2&gt;
  
  
  The 30-minute setup
&lt;/h2&gt;

&lt;p&gt;You can get the full benefit in about half an hour:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Write the file.&lt;/strong&gt; Start with the template above and adapt it to your project: commands, conventions, guardrails. Cut anything that wouldn't change the agent's output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify your commands.&lt;/strong&gt; Run each one yourself. An &lt;code&gt;AGENTS.md&lt;/code&gt; full of commands that don't work is worse than no file at all.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run a real session.&lt;/strong&gt; Give the agent a task that touches your conventions — a refactor, a new endpoint — and watch whether it follows the file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test a guardrail on purpose.&lt;/strong&gt; Ask the agent to do something your file forbids (e.g., "add &lt;code&gt;console.log&lt;/code&gt; here"). If it complies, the rule is too vague — rewrite it as a hard constraint or move it to a hook.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then keep the freshness loop going: commit the file to git, review it monthly, and add a rule any time the agent repeats a mistake. One correction that turns into a rule is a correction you never make again.&lt;/p&gt;




&lt;h2&gt;
  
  
  The one-line takeaway
&lt;/h2&gt;

&lt;p&gt;Your coding agent isn't limited by the model — it's limited by what it knows about your project. A short, specific, maintained &lt;code&gt;AGENTS.md&lt;/code&gt; is the highest-leverage change you can make to your AI workflow. Not because the file is magic, but because it's the agent's only permanent memory.&lt;/p&gt;

&lt;p&gt;Write it like documentation, and you've added a paragraph to a manual. Write it like code, and you've given a teammate a brain.&lt;/p&gt;




&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Does AGENTS.md replace CLAUDE.md?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. &lt;code&gt;AGENTS.md&lt;/code&gt; is the tool-agnostic standard read by most agents. Claude Code reads &lt;code&gt;CLAUDE.md&lt;/code&gt; natively — bridge them with a one-line &lt;code&gt;@AGENTS.md&lt;/code&gt; import in &lt;code&gt;CLAUDE.md&lt;/code&gt; so you keep a single source of truth.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How long should AGENTS.md be?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Under ~200 lines. Every word is loaded into context on every session, and context bloat degrades model accuracy. If removing a line wouldn't change the agent's output, delete it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why does my coding agent keep repeating mistakes?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because it's stateless — it forgets everything between sessions and starts from training-data guesses about your project. &lt;code&gt;AGENTS.md&lt;/code&gt; is re-read at the start of every session, so it acts as the agent's permanent memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where should AGENTS.md live?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At the repository root. For monorepos, add one per subdirectory — agents read the nearest file, so the closest one takes precedence (OpenAI's repo ships 88 of them).&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;CTA:&lt;/strong&gt; Copy the template into your repo and run one session. But before you do, think about your answer to this: what mistake does your coding agent repeat every session? That's the first line of your file. Start with just that one rule — the "instead" included — and test it. One correction that becomes a rule is a correction you never make again.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>claude</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
