Karpathy CLAUDE.md Grows to Ten Rules: New Self-Check Protocol for AI Coding Loops

June 28, 2026

A document attributed to Andrej Karpathy — who joined Anthropic’s pre-training team five weeks ago — began circulating on X on Friday, and AI developers say the six rules it adds to the familiar four-rule community template change how they think about agentic workflows, not just how they prompt.

The document is not the one most developers already have. In late January, after Karpathy described his shift from 80 percent manual coding to 80 percent agent-driven work on X, developer Forrest Chang distilled those observations into a four-rule andrej-karpathy-skills repository that now has more than 200,000 combined stars across two repositories. The document circulating Friday is something different: a ten-rule file with a subtitle that reads “A Short List of Rules, Earned by Watching the Same Mistakes Twice.”

Its authenticity has not been publicly confirmed. Karpathy has not commented.

Four Rules You Already Know

  1. Think Before Coding — state assumptions, surface ambiguity, ask rather than guess
  2. Simplicity First — minimum code that solves the stated problem
  3. Surgical Changes — every changed line must trace to what was asked
  4. Goal-Driven Execution — convert vague instructions into verifiable success criteria

The Six New Rules

  1. Verification — before fixing a bug, write a test that reproduces it; fix; run test; only then is the bug fixed

  2. Goal-Driven Execution (extended) — define “done” in machine-verifiable terms before any code is written; for multi-step work, a plan comes first

  3. Debugging — read full error and stack trace; reproduce before fixing; change one variable at a time

  4. Dependencies — treat every added package as permanent, uncontrolled code; prefer standard library

  5. Communication — prohibit confident-sounding guesses when uncertainty is the accurate answer

  6. Common Failure Modes — named patterns the agent should recognize and stop:

    • Kitchen Sink: asked to fix a faucet, renovates the kitchen
    • Wrong Abstraction: same logic in three places without extracting a function
    • Optimistic Path: code only for the happy case
    • Runaway Refactor: one file becomes ten

Loop Engineering Context

Boris Cherny, Claude Code’s creator at Anthropic, said in June 2026: “I don’t prompt Claude anymore. I have loops running that prompt Claude and figuring out what to do. My job is to write loops.”

The four-rule file addresses turn-by-turn behavior. The six additions address loop-level behavior — what happens when the agent runs without a human reviewer at every step.

Technical Mechanism

When Claude Code launches, it reads CLAUDE.md at the project root and injects its contents as conversation context — not as a system prompt. Per Anthropic’s Agent SDK documentation, CLAUDE.md “shapes behavior alongside whichever system prompt you choose.”

The /goal command, added to Claude Code version 2.1.139 in May 2026, uses a separate, faster verifier model to check whether the completion condition is met after each turn.

Developers should download guidelines only from official repositories — forrestchang/andrej-karpathy-skills or multica-ai/andrej-karpathy-skills on GitHub — rather than from copies with unfamiliar provenance. Adversa AI and LayerX have documented cases where malicious CLAUDE.md files in cloned repositories instructed Claude Code to exfiltrate credentials.