惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Exploit Database - CXSecurity.com
J
Java Code Geeks
H
Help Net Security
B
Blog RSS Feed
G
Google Developers Blog
博客园 - 司徒正美
MongoDB | Blog
MongoDB | Blog
量子位
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
P
Proofpoint News Feed
小众软件
小众软件
人人都是产品经理
人人都是产品经理
云风的 BLOG
云风的 BLOG
V
V2EX
月光博客
月光博客
C
Check Point Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
A
Arctic Wolf
Help Net Security
Help Net Security
Schneier on Security
Schneier on Security
D
DataBreaches.Net
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Palo Alto Networks Blog
T
Tenable Blog
L
LangChain Blog
Attack and Defense Labs
Attack and Defense Labs
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
Forbes - Security
Forbes - Security
F
Fortinet All Blogs
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
大猫的无限游戏
大猫的无限游戏
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Y
Y Combinator Blog
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Engineering at Meta
Engineering at Meta
NISL@THU
NISL@THU
GbyAI
GbyAI
博客园 - Franky
S
Secure Thoughts
有赞技术团队
有赞技术团队
PCI Perspectives
PCI Perspectives
U
Unit 42

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Nobody Reads My Docs Anymore—Not Even the AI Agents
mixcode@github · 2026-06-12 · via DEV Community

A few days ago, I sat down to do something I've done a hundred times: write documentation for a library I made.

The project is called binarystruct—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.

Satisfied with the code, I prepared to write the docs. And then, I had a sudden realization: No human is ever going to read this.

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: "Implement a ZIP encoder using this library."

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

Then I actually measured it. And that's when I discovered I was almost completely wrong about what helps.


The Twist: I Built a Manual No Agent Would Read

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: did they succeed, and how many tokens did they burn doing it—with the manual present versus stripped out.

The results were a wake-up call:

  1. The manual went unread. On the library, agents almost never opened my carefully crafted llms-full.txt. They ran an ls, opened the example tests and the source, got what they needed, and stopped. In one library run, the self-directed agents never opened the manual.

  2. When forced to read it, they did worse. 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 up ~20–30% with no gain in success.

  3. But agents don't always distrust docs—and that's the dangerous part. When a fact is checkable (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 convention they can't verify—a unit, a default, an ordering—they trust the prose blindly. 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, every time, never once checking the code.

  4. Then flip the repo type, and the manual suddenly earns its keep. Point the same experiment at a CLI tool 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 on their own, and a focused manual cut their token cost by ~30%. The manual wasn't the thing that mattered; whether the answer already sat in the code was.

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, "Evaluating AGENTS.md", 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 auto-generated ones, thick with redundant restatement, actually hurt success rates. But the human-written 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.)

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


The One Law: A Manual's Value Is the Residue

Here's the result everything else falls out of:

A manual's value = what the task needs − what's already legible to the agent.

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

This law immediately explains the split I measured. It is not "agents ignore manuals." It's where the contract lives:

  • Source-legible library → 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).

  • CLI, service, compiled binary, or indirection-heavy code → the contract is not 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.

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

Working with the agent, I distilled this into the Agent-Friendly Guide. What follows are its principles, ordered by leverage—highest first.


The Principles of Agent-Friendly Codebases

1. Keep the Read Surface True—and Mind the Verifiability Gradient

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

But not all drift bites equally:

  • Verifiable drift self-corrects. 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).

  • Unverifiable-convention drift is catastrophic. 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).

So when you diff docs against code, prioritize the unverifiable: 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.

2. Put Critical Info on the Verified Read Path

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

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

  • Inside runnable Example tests.
  • In the doc surface the agent actually reads (verified, not assumed).
  • In CLAUDE.md, which Claude Code is hardcoded to read at the start of every session.

3. Design the API to Shrink the Error Surface (The Deepest Lever)

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

type Header struct {
    Signature   uint32  `binary:"const=0x04034b50"`      // validate the magic number automatically
    CompSize    uint32  `binary:"valueof=bytelen(Body)"` // derive the length; no manual bookkeeping
    Body        []byte  `binary:"[CompSize]byte"`
}

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 "remember to…" is a candidate for a design change that removes the need to remember.

4. Name the Traps (Don't Hide Them)

APIs have warts. Document them explicitly with the why and a rule (e.g., an inconsistent argument order: "stream first, then order, then value; the value-first variant has no stream") 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.

5. Copy-Pasteable Recipes for the Common Path

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

6. Selection Surface: Help the Agent Choose

Before use comes select. State in one line what the tool is for, what it is not 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 --help description; for an MCP tool, the tool description. This matters most for tools, where the agent picks among many at invocation time.

7. Contributor Guidelines for Agents (AGENTS.txt)

If agents are going to extend your codebase, write down the architectural invariants they must preserve — above all, "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." Name the file AGENTS.txt (not .md) so it doesn't clobber a maintainer's own AGENTS.md or CLAUDE.md.

8. Prove It With a Clean-Agent Evaluation

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

  1. Correctness first. Run N fresh agents per condition and compare pass-rate, not vibes.

  2. Cost second. Count the novel tokens the reasoning model processes (intake + output, excluding cache re-reads).

And know the trap that makes this experiment lie: on small, well-documented targets the token axis saturates — 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 this task couldn't see the difference. The decisive experiment is the failure regime: 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.


The Ouroboros: Automating Agent-Readiness

To make these principles easy to apply, I built a public repository and a companion Claude Code plugin called agent-ready: 👉 agent-friendly-guide

Install it, then run /agent-ready inside any repository. The skill offers three modes:

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

It also carries a drift-audit 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.

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.


Conclusion

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

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.