<?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: mixcode@github</title>
    <description>The latest articles on DEV Community by mixcode@github (@mixcode).</description>
    <link>https://dev.to/mixcode</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%2F3963844%2F1fc2cc74-ca49-4fe4-8ad6-e9c38632f439.png</url>
      <title>DEV Community: mixcode@github</title>
      <link>https://dev.to/mixcode</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mixcode"/>
    <language>en</language>
    <item>
      <title>Nobody Reads My Docs Anymore—Not Even the AI Agents</title>
      <dc:creator>mixcode@github</dc:creator>
      <pubDate>Fri, 12 Jun 2026 06:04:28 +0000</pubDate>
      <link>https://dev.to/mixcode/nobody-reads-my-docs-anymore-not-even-the-ai-agents-dec</link>
      <guid>https://dev.to/mixcode/nobody-reads-my-docs-anymore-not-even-the-ai-agents-dec</guid>
      <description>&lt;p&gt;A few days ago, I sat down to do something I've done a hundred times: write documentation for a library I made.&lt;/p&gt;

&lt;p&gt;The project is called &lt;a href="https://github.com/mixcode/binarystruct" rel="noopener noreferrer"&gt;&lt;code&gt;binarystruct&lt;/code&gt;&lt;/a&gt;—a Go library that helps serialize and deserialize binary data using struct tags. With tools like Claude Code, Cursor, and Gemini by my side, I had finally updated the library after years of neglect.&lt;/p&gt;

&lt;p&gt;Satisfied with the code, I prepared to write the docs. And then, I had a sudden realization: &lt;strong&gt;&lt;em&gt;No human is ever going to read this.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Almost every developer using my library today would not read my documentation; they are copying my repository URL, pasting it into a coding agent, and saying: &lt;em&gt;"Implement a ZIP encoder using this library."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So I decided to adapt my repository for these new AI consumers. I read the community standards, scaffolded the emerging &lt;code&gt;llms.txt&lt;/code&gt; and &lt;code&gt;llms-full.txt&lt;/code&gt; files, wrote a detailed agent-facing manual, and prepared for a future of frictionless AI integrations.&lt;/p&gt;

&lt;p&gt;Then I actually measured it. And that's when I discovered I was almost completely wrong about what helps.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Twist: I Built a Manual No Agent Would Read
&lt;/h2&gt;

&lt;p&gt;To verify that my new agent-facing manual actually helped, I ran a quantitative study—not the usual "hey agent, was this doc useful?" (agents are relentlessly agreeable), but a controlled experiment. I took fresh, sandboxed agents, gave them a real build task against my library, and counted two things: &lt;strong&gt;did they succeed&lt;/strong&gt;, and &lt;strong&gt;how many tokens did they burn&lt;/strong&gt; doing it—with the manual present versus stripped out.&lt;/p&gt;

&lt;p&gt;The results were a wake-up call:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The manual went unread.&lt;/strong&gt; On the &lt;em&gt;library&lt;/em&gt;, agents almost never opened my carefully crafted &lt;code&gt;llms-full.txt&lt;/code&gt;. They ran an &lt;code&gt;ls&lt;/code&gt;, opened the example tests and the source, got what they needed, and stopped. In one library run, the self-directed agents &lt;strong&gt;never opened the manual&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;When forced to read it, they did &lt;em&gt;worse&lt;/em&gt;.&lt;/strong&gt; Prepending "read the manual first" to a well-documented library made the agent ingest ~8k tokens of prose on top of source it was going to read anyway—pushing token cost &lt;strong&gt;up ~20–30%&lt;/strong&gt; with no gain in success.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;But agents don't always distrust docs—and that's the dangerous part.&lt;/strong&gt; When a fact is &lt;em&gt;checkable&lt;/em&gt; (a signature, a macro, a flag), agents cross-check it against the source and route around a wrong doc just fine. But when a fact is a &lt;em&gt;convention they can't verify&lt;/em&gt;—a unit, a default, an ordering—they trust the prose &lt;strong&gt;blindly&lt;/strong&gt;. I planted one wrong line ("amount is a percentage 0–100" when the code meant a 0–1 fraction) and every agent failed the task, confidently, &lt;strong&gt;every time&lt;/strong&gt;, never once checking the code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Then flip the repo type, and the manual suddenly earns its keep.&lt;/strong&gt; Point the same experiment at a &lt;em&gt;CLI tool&lt;/em&gt; instead of a library and the result inverts. A CLI's operational contract—its flags, exit codes, side effects, the incantation for running unattended—lives in no function signature the agent can read, so this time the agents reached for the root docs &lt;em&gt;on their own&lt;/em&gt;, and a focused manual &lt;strong&gt;cut their token cost by ~30%&lt;/strong&gt;. The manual wasn't the thing that mattered; whether the answer already sat in the code was.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So the romantic vision—write a beautiful manual, agents read it, everything works—was wrong on its face. (And I'm not alone here: a recent paper from ETH Zurich, &lt;a href="https://arxiv.org/abs/2602.11988" rel="noopener noreferrer"&gt;"Evaluating AGENTS.md"&lt;/a&gt;, ran a massive study on coding agents and found the same split—repository context files added over 20% inference cost across the board, and the &lt;em&gt;auto-generated&lt;/em&gt; ones, thick with redundant restatement, actually &lt;em&gt;hurt&lt;/em&gt; success rates. But the &lt;em&gt;human-written&lt;/em&gt; files—the ones that captured non-inferable detail the code couldn't tell you—came out ahead, and the authors' recommendation was to write down only what isn't already obvious from the code—the exact concept of "residue" arrived at independently.)&lt;/p&gt;

&lt;p&gt;So my grand documentation plan had mostly failed—but a failed plan that tells you &lt;em&gt;why&lt;/em&gt; is a result. The more I dug, the more everything seemed to fall out of one underlying law.&lt;/p&gt;




&lt;h2&gt;
  
  
  The One Law: A Manual's Value Is the Residue
&lt;/h2&gt;

&lt;p&gt;Here's the result everything else falls out of:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A manual's value = what the task needs − what's already legible to the agent.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;"Legible" means everything the agent gets for free: the &lt;strong&gt;source code&lt;/strong&gt; it reads, the &lt;strong&gt;API names&lt;/strong&gt; that advertise their own meaning (&lt;code&gt;arrayRepeat&lt;/code&gt;, &lt;code&gt;timeout_ms&lt;/code&gt;), and its &lt;strong&gt;training prior&lt;/strong&gt; (it already knows HTTP 404, that manga reads right-to-left). Whatever the task needs &lt;em&gt;beyond&lt;/em&gt; those three is the &lt;strong&gt;residue&lt;/strong&gt;—and the residue is the only thing a manual supplies that nothing else can.&lt;/p&gt;

&lt;p&gt;This law immediately explains the split I measured. It is &lt;strong&gt;not&lt;/strong&gt; "agents ignore manuals." It's &lt;em&gt;where the contract lives&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Source-legible library&lt;/strong&gt; → the contract is right there in the signatures and docstrings. The agent reconstructs it cheaply, the residue is near-empty, and a separate manual is dead weight (neutral when ignored, a tax when forced).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CLI, service, compiled binary, or indirection-heavy code&lt;/strong&gt; → the contract is &lt;em&gt;not&lt;/em&gt; legible from what the agent can read. Exit codes, side effects, unattended flags, a remote API's schema—none of it lives in a signature. Here a lean, focused manual is the only surface that carries the contract—and it's exactly the case where the agent went looking for it.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same artifact, opposite verdict—decided entirely by whether the contract was already legible. That single diagnostic is the heart of the whole method.&lt;/p&gt;

&lt;p&gt;Working with the agent, I distilled this into the &lt;strong&gt;Agent-Friendly Guide&lt;/strong&gt;. What follows are its principles, ordered by leverage—highest first.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Principles of Agent-Friendly Codebases
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Keep the Read Surface True—and Mind the Verifiability Gradient
&lt;/h3&gt;

&lt;p&gt;If documentation disagrees with the code, the agent may trust the docs and fail silently. The asymmetry is the whole point: a &lt;strong&gt;missing&lt;/strong&gt; fact costs &lt;em&gt;tokens&lt;/em&gt; (the agent reads the source and recovers); a &lt;strong&gt;wrong&lt;/strong&gt; fact costs &lt;em&gt;correctness&lt;/em&gt; (the agent trusts it and fails).&lt;/p&gt;

&lt;p&gt;But not all drift bites equally:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Verifiable drift self-corrects.&lt;/strong&gt; A wrong comment about a signature, a macro, or a flag is harmless—the agent checks the code and ignores it (I measured this across Go, JS, C, and PHP: it recovered every time).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unverifiable-convention drift is catastrophic.&lt;/strong&gt; A wrong unit, default, or ordering—something with no checkable output—has nothing to catch it. The agent trusts it blindly and fails (every time, across five languages).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So when you diff docs against code, &lt;strong&gt;prioritize the unverifiable&lt;/strong&gt;: conventions, units, defaults, semantics. For a source-shipped library, eliminating this drift is the single highest-value thing you can do—above writing any manual.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Put Critical Info on the Verified Read Path
&lt;/h3&gt;

&lt;p&gt;Agents find documentation by &lt;code&gt;ls&lt;/code&gt; + &lt;em&gt;filename relevance&lt;/em&gt; (e.g., &lt;code&gt;example_test.go&lt;/code&gt;, &lt;code&gt;main.go&lt;/code&gt;)—not by grepping content. They open the files whose names look task-relevant, get enough, and stop. A bolt-on manual is &lt;strong&gt;skipped&lt;/strong&gt; once the task-relevant reads satisfy them—and you &lt;em&gt;cannot&lt;/em&gt; bait them to it by naming. (I tested a file literally named &lt;code&gt;read_first_for_coding_agent.md&lt;/code&gt;; it barely moved the open rate.)&lt;/p&gt;

&lt;p&gt;So place the decisive traps and recipes directly where the agent is guaranteed to look. &lt;strong&gt;Which surface that is, is repo-specific—verify it, don't assume.&lt;/strong&gt; In one library the agents went straight to the tag-reference doc and the &lt;code&gt;Example&lt;/code&gt; tests and &lt;strong&gt;never opened &lt;code&gt;doc.go&lt;/code&gt;&lt;/strong&gt;, so a pointer placed in godoc was never seen. Watch what a clean agent actually opens, then put the content &lt;em&gt;there&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inside runnable &lt;code&gt;Example&lt;/code&gt; tests.&lt;/li&gt;
&lt;li&gt;In the doc surface the agent actually reads (verified, not assumed).&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;CLAUDE.md&lt;/code&gt;, which Claude Code is hardcoded to read at the start of every session.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Design the API to Shrink the Error Surface (The Deepest Lever)
&lt;/h3&gt;

&lt;p&gt;Documentation prevents mistakes &lt;em&gt;about&lt;/em&gt; the API; code design prevents &lt;em&gt;the opportunity&lt;/em&gt; for mistakes. In &lt;code&gt;binarystruct&lt;/code&gt;, declarative struct tags do the bookkeeping that agents (and humans) get wrong:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;Header&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Signature&lt;/span&gt;   &lt;span class="kt"&gt;uint32&lt;/span&gt;  &lt;span class="s"&gt;`binary:"const=0x04034b50"`&lt;/span&gt;      &lt;span class="c"&gt;// validate the magic number automatically&lt;/span&gt;
    &lt;span class="n"&gt;CompSize&lt;/span&gt;    &lt;span class="kt"&gt;uint32&lt;/span&gt;  &lt;span class="s"&gt;`binary:"valueof=bytelen(Body)"`&lt;/span&gt; &lt;span class="c"&gt;// derive the length; no manual bookkeeping&lt;/span&gt;
    &lt;span class="n"&gt;Body&lt;/span&gt;        &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;byte&lt;/span&gt;  &lt;span class="s"&gt;`binary:"[CompSize]byte"`&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By removing the need for the agent to manually calculate offsets or keep a length field in sync with its data, the most common source of integration bugs simply vanishes. Heuristic: every place your docs say &lt;em&gt;"remember to…"&lt;/em&gt; is a candidate for a design change that removes the need to remember.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Name the Traps (Don't Hide Them)
&lt;/h3&gt;

&lt;p&gt;APIs have warts. Document them explicitly with the &lt;em&gt;why&lt;/em&gt; and a rule (e.g., an inconsistent argument order: &lt;em&gt;"stream first, then order, then value; the value-first variant has no stream"&lt;/em&gt;) rather than hiding them or making a breaking change. If a competent developer could write a wrong call from the signature alone, that's a trap—name it.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Copy-Pasteable Recipes for the Common Path
&lt;/h3&gt;

&lt;p&gt;Give the agent a known-correct template for the one or two patterns that cover most real usage. A copy-pasteable recipe for a &lt;em&gt;variable-length record layout&lt;/em&gt; means the agent copies a correct structure instead of stitching it together from primitives and guessing.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Selection Surface: Help the Agent Choose
&lt;/h3&gt;

&lt;p&gt;Before &lt;em&gt;use&lt;/em&gt; comes &lt;em&gt;select&lt;/em&gt;. State in one line what the tool is for, what it is &lt;em&gt;not&lt;/em&gt; for, and the trigger phrases that match how an agent would describe the task. For a library that's the README's first sentence; for a CLI, the &lt;code&gt;--help&lt;/code&gt; description; for an MCP tool, the tool &lt;code&gt;description&lt;/code&gt;. This matters most for tools, where the agent picks among many at invocation time.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Contributor Guidelines for Agents (&lt;code&gt;AGENTS.txt&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;If agents are going to &lt;em&gt;extend&lt;/em&gt; your codebase, write down the architectural invariants they must preserve — above all, &lt;em&gt;"when the same behavior lives in more than one place (a reference path plus an optimized or generated one), a change must land in all of them."&lt;/em&gt; Name the file &lt;code&gt;AGENTS.txt&lt;/code&gt; (not &lt;code&gt;.md&lt;/code&gt;) so it doesn't clobber a maintainer's own &lt;code&gt;AGENTS.md&lt;/code&gt; or &lt;code&gt;CLAUDE.md&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Prove It With a Clean-Agent Evaluation
&lt;/h3&gt;

&lt;p&gt;You cannot grade your own homework. Spawn a fresh agent in a clean directory, have it build something real against your &lt;em&gt;published&lt;/em&gt; package, and read its friction log. Measure on two axes, &lt;strong&gt;in this order&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Correctness first.&lt;/strong&gt; Run N fresh agents per condition and compare &lt;strong&gt;pass-rate&lt;/strong&gt;, not vibes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cost second.&lt;/strong&gt; Count the novel tokens the reasoning model processes (intake + output, excluding cache re-reads).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And know the trap that makes this experiment lie: &lt;strong&gt;on small, well-documented targets the token axis saturates&lt;/strong&gt; — at equal success, a capable agent solves from source either way and the delta collapses to ≈neutral. Read naively that says "artifacts don't matter." It doesn't; it says &lt;em&gt;this task couldn't see the difference.&lt;/em&gt; The decisive experiment is the &lt;strong&gt;failure regime&lt;/strong&gt;: construct the exact condition your artifact targets — an unverifiable drift, or a missing piece of residue — and watch the pass-rate move from near-zero to near-perfect.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Ouroboros: Automating Agent-Readiness
&lt;/h2&gt;

&lt;p&gt;To make these principles easy to apply, I built a public repository and a companion Claude Code plugin called &lt;strong&gt;&lt;code&gt;agent-ready&lt;/code&gt;&lt;/strong&gt;: 👉 &lt;strong&gt;&lt;a href="https://github.com/mixcode/agent-friendly-guide" rel="noopener noreferrer"&gt;agent-friendly-guide&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Install it, then run &lt;code&gt;/agent-ready&lt;/code&gt; inside any repository. The skill offers three modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/agent-ready&lt;/code&gt;&lt;/strong&gt; (or &lt;code&gt;--full&lt;/code&gt;) — audits the codebase, scaffolds the documentation (&lt;code&gt;llms.txt&lt;/code&gt;/&lt;code&gt;llms-full.txt&lt;/code&gt;/&lt;code&gt;AGENTS.txt&lt;/code&gt;), and runs a clean-agent evaluation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;--scaffold&lt;/code&gt;&lt;/strong&gt; — runs the audit and scaffolds the templates, stopping before the evaluation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;--audit-only&lt;/code&gt;&lt;/strong&gt; — generates a prioritized readiness gap report without writing any files.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It also carries a &lt;strong&gt;drift-audit&lt;/strong&gt; step — the insurance for that one catastrophic case. It verifies every doc claim against the code; in my tests it caught and rewrote injected unverifiable-convention drift across Go, JS, C, and PHP, flipping the downstream task from all-fail to all-pass.&lt;/p&gt;

&lt;p&gt;The method itself is vendor-neutral — it reasons about "an agent," not a product — and it's been validated across ten ecosystems (Go, Python, JavaScript, C, Rust, JVM, Shell, Swift, PHP, and Ruby) and on more than one model family.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;When we write for AI agents, the instinct is to pile on more documentation. The measurements say otherwise: spend your effort on the &lt;strong&gt;residue&lt;/strong&gt;—the project-specific knowledge that lives nowhere else—keep the surface the agent actually reads &lt;em&gt;true&lt;/em&gt;, and make misuse hard by design. The rest, the agent already knows.&lt;/p&gt;

&lt;p&gt;Even the AI Agents don't read my documents, but now I know they don't have to, and I don't have to either. I tell the agents what they don't know—the story about our project, our workflow, and our difficulties—like a grandma telling folklore to her grandchildren. And then they just tuck them somewhere they're likely to look. I don't remember where they hid them, but anyway, they'll be there. Less work, less time, and I got my weekends back. Happy Life.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>development</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
