Docs Written for AI: Your README Is Being Read as a Manual by Agents
In the agent era, documentation's first reader is no longer human — it's AI. A docs strategy written for AI (CLAUDE.md, SKILL.md, ADRs) halves agent mistakes and makes your project easier to hand over.

A quiet shift has happened: the first reader of your repo's documentation is no longer human — it's AI. Agents read your README, CONTRIBUTING, and comments not to "learn" but to use directly as action instructions. Docs written for humans aim for narrative flow; docs written for AI demand precision, zero ambiguity, and executability — two completely different genres.
Three layers, each with a job
In practice, AI-facing docs work best in three layers.
Layer 1: the project constitution (CLAUDE.md / AGENTS.md). Lives at the repo root; the agent reads it on entry. What goes in? Stack and versions ("use pnpm, not npm"), absolute no-go zones ("don't touch migrations/", "ask me before adding dependencies"), common commands (dev/build/test, one per line). One principle: only include what would go wrong if unwritten — overlong instructions get diminishing compliance.
Layer 2: task skills (SKILL.md). Reusable workflows: "release process," "standard steps for adding an API endpoint," "checklist for writing migration scripts." Unlike the constitution, skills load on demand — the agent reads the release skill only when releasing. The test: if you've dictated a process to an agent more than twice, it should be a skill.
Layer 3: decision records (ADRs). Architecture Decision Records answer "why was it designed this way." The layer vibe coders skip most and long-term value most. Agents have no project memory; seeing context like "why Postgres over SQLite" completely changes the quality of their subsequent decisions. Each ADR can be short: context, decision, consequences — three paragraphs suffice.
Style notes for AI readers
First, use imperatives, not descriptions. "All new files must use TypeScript strict mode; any is forbidden" beats "this project uses TypeScript strict mode." AI obeys "must/forbidden" far better than "we usually."
Second, give counter-examples. Saying what's right isn't enough; show what's wrong. E.g., "Wrong: fetching directly in components; Right: all data requests go through lib/api.ts." Agents are pattern matchers; counter-examples precisely cut off their favorite wrong path.
Third, keep docs in sync with code, or don't write them at all. Stale docs are poison to AI — humans doubt outdated docs, AI follows them literally. Updating docs alongside architecture changes should be a fixed step in your workflow; you can even make the agent do it ("after changing code, update related docs" goes in the constitution).
A lesser-known fact: docs are distribution
When someone else's agent researches "is there an existing library for X," it reads your README and docs. AI-readable docs mean your project gets picked more often in agent-driven evaluations. Clear install steps, explicit scope boundaries, one line saying what it is — these serve humans and agents alike. In that sense, documentation is now your project's API.
Related articles

After pairing with AI, the bottleneck shifts from "how fast you code" to "how fast you decide." This guide gives you a copy-paste daily rhythm: 15 minutes of morning planning (1 goal + 3 verifiable tasks), a noon checkpoint (judge against acceptance criteria, not code), and an evening review plus a "context handoff note." Rhythm is the real secret to not getting burned as a solo developer with AI.

The biggest waste in vibe coding isn't tokens — it's rewrites caused by building the wrong thing. My rule: before any code, force the AI to interrogate you. This guide gives you a 10-question checklist, a one-line opener, and a three-round convergence method that turns "I thought I was clear" into "the AI actually got it." In practice, it cuts rework by more than half.

AI-written code that runs isn't necessarily good code. This guide covers 7 smells specific to generated code — defensive overkill, apologetic comments, ghost abstractions, and more — each with detection tips and fixes, so you catch them before they fossilize.