Mental Models for the AI EconomyAI Development
Four Rules in One File: The CLAUDE.md Behind 220,000 Stars
Think before coding, simplicity first, surgical changes, goal-driven execution. What each rule prevents, why it matters, and how many hours of cleanup it can save.
The most-starred AI coding project of 2026 contains no code. It is a single Markdown file with four headings, and as of today it has more than 220,000 stars on GitHub. Codebook Fusion’s essay “One Small Text File Got 91,000 GitHub Stars” tells the story well. This is our version: what the file actually says, why each rule earns its place, and how many hours of cleanup it is likely saving you.
A CLAUDE.md file is standing instructions that Claude Code loads at the start of every session. The famous one has four rules: think before coding, simplicity first, surgical changes, and goal-driven execution. They work because each one closes a specific way an agent quietly wastes a reviewer’s time.
Where the file came from
In January 2026, Andrej Karpathy described on X how his coding had flipped from mostly hand-written to mostly agent-written in a couple of months, and listed the ways the agents kept letting him down: wrong assumptions made without asking, bloated abstractions, edits to code nobody mentioned, and work declared done without proof. Within days, a repository called andrej-karpathy-skills turned those complaints into one CLAUDE.md. GitHub shows it was created on January 27, 2026.
One correction to the popular retelling: the fourth rule in the file is not “be honest about what you don’t know.” It is goal-driven execution: define success criteria and loop until they are verified. That matters, because it is the only rule that turns the other three from good manners into something you can check.
Why a file, and not a better prompt
The model does not learn from yesterday’s session. Every new session starts from the instructions it is given and the files it reads. Claude Code’s memory documentation describes the layering: a user-level file in ~/.claude/CLAUDE.md for every project, a project file committed with the repository, and folder-level files that load when the agent works in that folder. A personal CLAUDE.local.md holds preferences you do not want to share.
So a correction you make in chat is spent the moment the session ends. A correction you write into the file is paid once and collected every session after. That is the whole economic argument, and it is the same one behind Harness², the harness that rewrites itself.
Rule 1: Think before coding
What it says: state your assumptions, present competing interpretations instead of choosing silently, push back when there is a simpler path, and stop to ask when something is unclear.
Why it is pivotal: an unstated assumption is the most expensive kind of bug, because it is baked in at line two and only discovered at review. Every line written on top of it has to be read, doubted and often rewritten. One clarifying question costs seconds. The rewrite costs the session.
The headache it saves: the double-check tax. When you cannot tell which decisions the agent made on purpose, you have to verify all of them, and the time you meant to save disappears.
Rule 2: Simplicity first
What it says: the minimum code that solves the problem. No features beyond the request, no abstractions for single-use code, no configurability nobody asked for. “If you write 200 lines and it could be 50, rewrite it.”
Why it is pivotal: models are trained on a lot of framework code and reach for its patterns by default. Every unnecessary layer is a permanent maintenance cost and a reading cost for every future change, made by a human or an agent.
The headache it saves: spending longer understanding what the agent built than it would have taken to write it yourself.
What each missing rule costs you a month
Rule 3: Surgical changes
What it says: touch only what the task requires. Don’t improve neighbouring code, comments or formatting. Match existing style. Mention unrelated dead code instead of deleting it, and clean up only the orphans your own change created. The test: every changed line should trace to the request.
Why it is pivotal: review is the bottleneck in agent-assisted work, as we argued in More Agents, One Person Who Signs Off. A diff that mixes the fix with tidying multiplies the reading and, worse, the number of places a regression could hide.
The headache it saves: the slow retreat. After a few surprise edits, people stop letting the agent see the whole codebase and start pasting isolated snippets. At that point a capable agent has been demoted to autocomplete.
Same bug fix, two different diffs
auth.py+12 requestedutils.pyuntouchedconfig.pyuntouchedmodels.pyuntouchedREADME.mduntouchedtests/test_auth.py+18 requested
- Files
- 2
- Lines
- 30
- Review
- 17m
- Suspects if it breaks
- 2
Rule 4: Goal-driven execution
What it says: turn tasks into verifiable goals. “Add validation” becomes “write tests for invalid inputs, then make them pass.” For multi-step work, state a short plan with a check for each step.
Why it is pivotal: it replaces “done” with evidence. It is also what lets an agent work for longer without you: strong success criteria let it loop on its own, while weak ones (“make it work”) need you to step in constantly. Anthropic’s guidance on harnesses for long-running agents makes the same point about verifying work before moving on.
The headache it saves: the confident wrong answer. Code that “should work” costs you a debugging session. Code that ships with the passing test costs you a glance.
Which rule is your file missing?
WithoutPicks one reading of “export the report” (CSV), writes 200 lines, never mentions PDF was possible.
With“Do you mean CSV for finance or PDF for the client? I’ll assume CSV unless you say otherwise.”
How to write yours this afternoon
- Start with what the project is, in one sentence. Stack and purpose, nothing else.
- Give exact commands, not advice.
pnpm test && pnpm lint, not “run the tests.” - Mine your corrections. Anything you have told the agent twice is a rule. Anything you have never had to say is noise.
- Paste the four rules as the behaviour section, then cut what your stack makes irrelevant.
- Keep it short. Every line is read every session and competes with the others for attention. The memory docs recommend concise, specific instructions; we keep ours well under 200 lines.
- Promote what keeps getting ignored into a hook, which runs as code and cannot be skipped.
The same file works beyond Claude. AGENTS.md, which OpenAI introduced in August 2025 and which is now stewarded by the Linux Foundation’s Agentic AI Foundation, plays the same role for Codex, Cursor and other agents. Many teams keep one file and point the other at it.
Where the four rules stop
They are behaviour, not knowledge. They do not tell the agent your architecture, your data rules or what must never be touched. That is what the project-specific half of the file is for, and what the twelve parts of the agent harness cover: commands, permissions, hooks, subagents, skills and MCP connections. The four rules also bias toward caution; the file says so itself. For a one-line fix, judgment beats ceremony.
For the practice that surrounds the file, read spec-driven, maker-checker, governed scope and the longer loop engineering field guide.
Four rules went viral because everybody was already paying for their absence. Write them down once and stop paying.
Get the next essay the day it publishes.
A few a month, written from real builds. Unsubscribe in one click.

Performance marketing and search leader who builds — 15+ years in digital growth and product (AT&T/DirecTV, Microsoft, Employbridge, Site Impact), now running his own properties with AI. These essays are field notes from that loop: what AI actually changes about work, product, and the economics underneath. Based in South Florida.
- AI DevelopmentHarness²: The Agent Harness That Rewrites Itself
A harness makes an agent reliable. A harness for the harness makes it get better: every correction is captured, promoted, enforced or deleted.
8 min read · interactive - AI DevelopmentAI Development: Evidence Before Autonomy
A convincing demo is not a release gate. How to evaluate agent-built software, contain failure, and measure the whole delivery loop instead of the typing speed.
7 min read · interactive - AI DevelopmentThe Practice: Spec-Driven, Maker-Checker, Governed Scope
Two credible trials on AI coding point in opposite directions — 55.8% faster in one, 19% slower in the other. The difference isn't the model. It's the practice. Three patterns, with interactive math and cited data.
9 min read · interactive - AI DevelopmentLoop Engineering: The Definitive Field Guide
The leverage point in software has moved from writing prompts to designing the loops that prompt your agents. The complete field guide — Ralph, maker-checker, worktrees, AGENTS.md, memory, and MCP — from someone who runs these loops across a live portfolio.
24 min read - Product StrategyWhen Building Gets Cheap, Product Judgment Gets Expensive
Claude Code expands the space of possible products. The differentiator is no longer a convincing specification—it is choosing, testing and shipping the right experience.
8 min read · interactive - Future of WorkMore Agents. One Person Who Signs Off.
Leaders are using AI more often, but adoption is not ability. As execution accelerates, accepted work—not generated output—becomes the real productivity measure.
8 min read · interactive