Skip to content

The 4-Line CLAUDE.md: Behavioral Principles Over Rule-Lists

Summary

The article argues that large rule-lists in CLAUDE.md degrade agent behaviour through context dilution (every line loads every turn) and poor transferability (specific rules never stop growing). It distills the fix into four behavioural principles drawn from Karpathy's diagnosis — the bottleneck is judgment, not capability — plus a thin layer of context the agent genuinely can't infer.

Key Details

  • Four behaviours: don't assume/surface tradeoffs; write the minimum, nothing speculative; touch only what you must; define success criteria and loop until verified.
  • Litmus test for any line: would removing it cause a mistake the agent couldn't recover from? If not, cut it.
  • On top of the behaviours, add only build/test/lint commands, non-obvious conventions, and one-line "scars" — never architecture or style the agent can read from the code.
  • Honest caveat: tens of thousands of stars prove resonance, not efficacy.

Why Rolf Thinks This Matters

Further Reading