CopybookSearch

CLAUDE.md rules tested: keep, change or delete

Tested on 1 December 2026. We took the three rules readers copied most from Copybook from 26 November to 1 December and gave each one a real task in a public repo, pinned to one commit. Each task ran 3 times with the rule and 3 times without it in Claude Code (Opus 5.5), and the same again in Codex (gpt-6.2-sol): 36 runs, each in its own copy of the repo in a cloud sandbox with no other rules, skills or plugins, the same short task, no follow-up. What every run had to show was written down before the first run.

Keep: follow the code when the docs disagree (the rule). The task: make cookiecutter report when it writes or reads a replay file. We gave the project a CLAUDE.md that said “Use print() for progress messages”, as the paper behind the rule did; cookiecutter’s own code logs through logging everywhere. Without the rule, all 3 Claude Code runs noticed the mismatch, said so, and used print() anyway. With the rule, all 3 used the code’s logger and named the mismatch. Codex did the same with that line in an AGENTS.md: print() in all 3 runs without the rule, with no word about the mismatch; the logger and the mismatch named in all 3 with it. All 6 runs without the rule also loosened an existing test so the new output would pass it; one run with the rule did too.

Change: Karpathy’s four principles (the rule). The task: add a conjunction option to humanize’s natural_list. All 6 Claude Code runs wrote the same three lines of code, all correct. The rule’s diff was smaller (9 lines against 11 to 14) only because it skipped the docs: all 3 runs with it left two docstring lines saying the function joins with “and”, and one said it left them “to keep the change small”. Without it, 2 of 3 fixed both. Our pre-set test, a smaller diff, read keep; the lines it saved were the docs. In Codex the rule changed little: it reshaped the function’s two-item branch in 3 of 3 runs without the rule and 2 of 3 with it. On the site this tip now points to Scope Guard; if you keep it, our suggested surgical line:

  • surgical edits: only touch what’s required, don’t fix up neighboring code on the way by, but do update the docs and comments your change makes wrong

Change: the two AGENTS.md lines (the rule). The file held both lines: cut taglines and helper text, and weigh UX, DX and AX. The task: add a settings panel (theme, step size, reset) to Vite’s React starter, which already carries taglines of its own. No run added a tagline or helper text, with the rule or without, in either agent. But all 3 Codex runs with the rule also deleted the starter’s own copy (“Get started”, “Your questions, answered”, “Join the Vite community”), which the task never mentioned; none did without it. Either line, or both together, could have prompted that. Our pre-set test read delete: without the rules, no run added filler either. We publish change because of those deletions, and because on 19 November, on a settings screen with more to explain, the same lines took helper text from 10 of 10 runs to 0. Our suggested first line, with the second kept as it is, keeps the cut and asks the agent to leave existing copy alone:

  • Don’t add taglines, helper text or secondary labels. If a screen you build needs them to make sense, fix its layout. Leave existing copy alone unless the task is about it.

One task per rule and 3 runs a side can’t show a small effect, or how a rule does on other tasks. The outdated-docs task is the rule’s own worked example, so it is its friendliest case. The Karpathy task couldn’t test “ask when unsure”, since a headless run has nobody to ask. The suggested wordings are ours and not yet tested. The results with every run’s numbers and all 36 diffs are public.

2 tips14K+ saves on X, as of

Keep

Rules Claude Code, Codex

219 saves

Outdated CLAUDE.md and AGENTS.md review

Agents follow an outdated CLAUDE.md over your code: its old instructions identified, and a rule that puts code first.

Codebase

Change

Rules Claude Code, Codex

15K saves

Two AGENTS.md lines: less text, UX/DX/AX

Taglines, helper text and labels on every screen: one line cuts them so the layout speaks for itself; one weighs UX, DX and AX.

Design + Codebase