
What happened
A developer shared a set of rules and prompts designed to prevent AI coding assistants (Claude Code, Cursor, Codex) from introducing bugs or unintended changes. The core recommendation is creating a CLAUDE.md file in the project root with explicit prohibitions—such as "do not modify files I did not ask you to modify" and "do not refactor working code without being asked"—which these tools read automatically at the start of each session.
Why it matters
As codebases grow, AI assistants begin fixing one problem while breaking another, a structural issue that cannot be solved by better prompting alone. The rules address this by replacing vague directives ("write clean code") with clear prohibitions that have an immediate boundary. The approach also includes safeguards like requiring the model to show a plan before editing, demanding test evidence instead of claims that something works, and saving project state so changes can be rolled back.
What to watch
The author emphasizes that rules learned from actual breakage are more effective than those imagined in advance—each time the model fails, that specific failure should be appended to the rules file. Starting fresh sessions every 3–5 tasks (with a summary of what was done, what's next, and what was tried and abandoned) prevents context decay. A kill switch—a STOP.txt file that halts all work immediately—lets developers safely leave autonomous work running.
Summaries like this, in your inbox every morning.
The article addresses a real problem: as AI coding assistants become more capable within a single conversation, they also become more dangerous at scale. The author's observation—that after the first two weeks of apparent magic, the model begins fixing problem A while breaking problem B—reflects the gap between single-task performance and multi-file coherence. The proposed solution does not try to train the model better or prompt it harder; instead, it treats this as a structural problem that requires constraints.
The rules framework is grounded in a specific insight: vague instructions fail because they have no enforcement boundary. "Please be careful" or "write clean code" are aspirational but behaviorally empty. Prohibitions—"do not modify files I did not ask you to modify"—are actionable because they have a clear edge. The same logic extends to the five prompts: each one shifts the burden of verification away from the model's self-review (which inherits its own assumptions) onto external evidence. Requiring a test to pass, or a plan to be stated before execution, creates a checkpoint that the model cannot rationalize around using the same flawed logic that created the bug.
The author also identifies context decay as a practical failure mode. Long sessions accumulate abandoned directions and corrected mistakes, which stay in the context window and corrupt the signal. The solution—starting fresh every 3–5 tasks with a summary of what was tried and abandoned—is a form of state reset that prevents the model from re-proposing failed approaches. Finally, the reversibility principle (saving state before running agents, gating only irreversible actions) is a risk-management insight: it frees the model to iterate in low-stakes areas while maintaining human control over high-stakes decisions like deployment.
For example, today's edition would include:
AI-summarized, only the topics you pick — one digest a day via Email, Slack, or Discord.
Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →
Ask AI anything about this article. Q&As are published on this page for other readers too.
California Governor Gavin Newsom signed an executive order to speed third-party AI safety oversight and indepe…

Nvidia CEO Jensen Huang told CBS there is a "0pc chance" AI ends the world by 2030, calling such warnings "com…

OpenAI recently disclosed six incidents of agents gone awry, including notes during GPT-5.6 Sol training telli…

RAND published a paper recommending the US adopt a 'Freedom of Action' strategy to 'secure geopolitical advant…

MIT Technology Review's year-long investigation with Times of San Diego detailed more than 1,050 deaths near t…

The UN's Independent International Scientific Panel on AI issued its first thematic brief, urging greater atte…
