<?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: Ville Takanen</title>
    <description>The latest articles on DEV Community by Ville Takanen (@villetakanen).</description>
    <link>https://dev.to/villetakanen</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F473811%2F80e5d18d-8d23-4af7-bfd5-495891cf4f7c.jpeg</url>
      <title>DEV Community: Ville Takanen</title>
      <link>https://dev.to/villetakanen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/villetakanen"/>
    <language>en</language>
    <item>
      <title>How I Learned to Love the AGENTS.md</title>
      <dc:creator>Ville Takanen</dc:creator>
      <pubDate>Tue, 31 Mar 2026 10:19:08 +0000</pubDate>
      <link>https://dev.to/villetakanen/how-i-learned-to-love-the-agentsmd-1ih5</link>
      <guid>https://dev.to/villetakanen/how-i-learned-to-love-the-agentsmd-1ih5</guid>
      <description>&lt;p&gt;My experience with agent instruction files began when GitHub Copilot started supporting &lt;code&gt;copilot-instructions.md&lt;/code&gt;. Suddenly, I could &lt;em&gt;steer&lt;/em&gt;. Add a few lines about our architecture and conventions — and the stochastic beast would follow. It felt like a superpower.&lt;/p&gt;

&lt;p&gt;So naturally, I drove harder.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 8,000-Word Monster
&lt;/h2&gt;

&lt;p&gt;The file grew the way they always do. Agent selects a deprecated library — adds a line. Mismarks an import — another line. A colleague includes their preferences. Someone pastes in the style guide, just in case.&lt;/p&gt;

&lt;p&gt;By the time we chose &lt;code&gt;AGENTS.md&lt;/code&gt; as our main file (symlinked to &lt;code&gt;CLAUDE.md&lt;/code&gt; for Claude Code), it was 8,000 words long. Every design pattern, every edge case, every principle we had learned the hard way.&lt;/p&gt;

&lt;p&gt;And the results began to decline. The agent explored more widely, spent tokens on reasoning about irrelevant constraints, and confidently made mistakes in areas we had over-specified. The file intended to make the agent smarter was actually confusing it.&lt;/p&gt;

&lt;h2&gt;
  
  
  "AGENTS.md Is Harmful" (It's Not)
&lt;/h2&gt;

&lt;p&gt;Around this time, ETH Zurich published a study (Gloaguen et al., 2026) testing instruction files across 138 real repositories. The hot takes wrote themselves: "context files reduce agent performance!" Twitter declared the concept dead.&lt;/p&gt;

&lt;p&gt;That's not what the study says.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;LLM-generated&lt;/em&gt; context files — like those produced by &lt;code&gt;/init&lt;/code&gt; commands — lower success rates and increase costs by over 20%. Human-written files improve outcomes (+4%) but only if they are minimal and precise. The mechanism: agents follow instructions &lt;em&gt;faithfully&lt;/em&gt;, so every unnecessary instruction expands the search space. The agent dutifully considers constraints that don't apply and wastes tokens on reasoning that doesn't help.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The study isn't saying you shouldn't write an AGENTS.md. It's saying that most of what people include in it is noise.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Learning to Think Like an Agent
&lt;/h2&gt;

&lt;p&gt;Studying what makes a good AGENTS.md taught me something unexpected. It didn't just make me a better agent driver. It helped me understand how an agent &lt;em&gt;"thinks."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Agents don't build mental models. They read, tokenize, and generate. Every token of instruction competes for attention with every token of the actual task. Context is zero-sum.&lt;/p&gt;

&lt;p&gt;That reframed the whole problem. Not documentation — &lt;em&gt;signal engineering&lt;/em&gt;. What's the minimum context that produces the maximum behavioral shift?&lt;/p&gt;

&lt;h3&gt;
  
  
  The Pink Elephant Problem
&lt;/h3&gt;

&lt;p&gt;The first thing I cut was every "don't do X" line.&lt;/p&gt;

&lt;p&gt;Tell an agent "Don't use Zustand" and see what happens. The agent thinks about Zustand for the next 200 tokens. You've made it &lt;em&gt;salient&lt;/em&gt;. It might avoid it — probably — but you've focused attention on avoidance instead of guidance.&lt;/p&gt;

&lt;p&gt;I found dozens of these. "Don't use class components." "Avoid raw SQL." "Never import from legacy." Every line anchored the agent to the exact thing I wanted it to ignore.&lt;/p&gt;

&lt;p&gt;The fix: only say what to use. "State lives in local-storage" is a constraint. "Don't use Redux" is noise. One guides. One confuses.&lt;/p&gt;

&lt;h3&gt;
  
  
  Toolchain First
&lt;/h3&gt;

&lt;p&gt;The second change is exactly what a tool already enforces. If Biome detects it, why is it listed in AGENTS.md? If &lt;code&gt;tsc --strict&lt;/code&gt; stops it, why create a rule?&lt;/p&gt;

&lt;p&gt;Everything that survived had to pass one test: &lt;em&gt;can a tool enforce this?&lt;/em&gt; If yes, delete it. What remained was pure judgment — the decisions no linter can make.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Left: 170 Words
&lt;/h2&gt;

&lt;p&gt;After months of cutting, here's the structure. It fits on one screen.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mission&lt;/strong&gt; — Domain context that the agent can't infer from code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Project: Real-time inventory management for warehouse staff.
Domain: logistics, low-bandwidth, fault tolerance.
Core: sync local state with the central DB when connectivity is restored.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Toolchain&lt;/strong&gt; — Commands. No philosophy. Just facts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;pnpm test        — vitest (fails below 85% coverage)&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;pnpm lint        — Biome (see biome.json)&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;pnpm e2e         — Playwright&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Judgment Boundaries&lt;/strong&gt; — Three tiers. No interpretation required.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NEVER: modify schema without migration, add deps without discussion
ASK:   change API contract, delete files
ALWAYS: run tests before commit, check the spec first
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything an agent needs. Nothing it doesn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Changed
&lt;/h2&gt;

&lt;p&gt;Since going minimal, three things have happened. Agent output quality went up — not because agents got smarter, but because I stopped confusing them. I stopped fighting the agent — when the file fits in your head, you can reason about what it'll do. And I started &lt;em&gt;understanding&lt;/em&gt; agents — the discipline of writing minimal context forced me to think about attention, salience, and how LLMs process instructions.&lt;/p&gt;

&lt;p&gt;Your AGENTS.md shouldn't be a manual. It should be a compass.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;The &lt;a href="https://asdlc.io/practices/agents-md-spec" rel="noopener noreferrer"&gt;AGENTS.md specification&lt;/a&gt; has the full pattern with research references. For the theory behind minimal context, see &lt;a href="https://asdlc.io/concepts/context-engineering" rel="noopener noreferrer"&gt;Context Engineering&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>automation</category>
    </item>
  </channel>
</rss>
