Karpathy ranted. Someone shipped it. Your AI behaves now.
Your AI keeps rewriting code you told it not to touch, then swears it's sure when it's dead wrong. There's a 65-line text file that fixes both — and it became one of the most-starred files on GitHub. Here's the part nobody mentions: Karpathy didn't even write it.
Andrej Karpathy posted four complaints about AI coding on Twitter. Silent assumptions. Bloated code. Collateral damage to files nobody asked about. Fake confidence.
A developer turned those four rants into four rules, dropped them in a file, and open-sourced it. No secret model. No magic prompt. Just house rules — the kind you'd give a good junior dev.
Four rules. That's the whole thing.
Drop it in once.
Drop the rules in a file called CLAUDE.md at the root of your project. Claude Code reads it automatically, every session. Not just Claude — the same four rules work as a rules file in Cursor and Codex.
# House Rules ## 1 · Think before coding State assumptions explicitly. If uncertain, ask. If multiple interpretations exist, present them — don't pick silently. ## 2 · Simplicity first Minimum code that solves the problem. Nothing speculative. No features beyond what was asked. ## 3 · Surgical changes Touch only what the task requires. Unrelated code, comments, formatting: leave them alone. ## 4 · Goal-driven execution Convert vague asks into verifiable success criteria. If you're guessing, say so — before coding, not after.
What actually changes.
Ask for a button change, get a refactored auth flow. 200 lines you didn't want, two files you didn't mention, and an AI that's "sure" right up until production breaks.
It asks the one clarifying question first, ships the three lines that solve it, leaves everything else untouched, and flags exactly where it's unsure. Like a junior dev you'd actually promote.
Go straight to the source.
Want the copy-paste version? Comment RULES.
Drop RULES on today's reel (or reply to this email) and I'll send you the file ready to paste into your project.
Send me the file ↗