10 Rules Claude Users and Devs Forget and It Costs them Hours Every Week
Photo by Justin Morgan on Unsplash
Every time you open a new terminal session, the agent starts with zero memory.
Sometimes you spend the first 500 tokens re-explaining your stack, or worse, you don’t, and it hallucinates an architecture that breaks your codebase.
So, if you aren’t using a persistent instruction file, your cost or infra are broken.

Most people are treating fully autonomous agents like slightly smarter search engines, and it is costing them hours of redundant prompting every single week.

When I was architecting the UFC predictive data pipelines for BoutPredict, context collapse was my biggest technical bottleneck.

Re-explaining my backend constraints and specific formatting rules every single morning was bleeding time.

I am glad we now have a so many CLAUDE.md files on GitHub. Some even trending with 50k+ stars and 5k+ forks.

It’s pretty simple if you’re not aware.

You create a plain text file named CLAUDE.md in your project root.
Claude Code reads this file automatically at the start of every session.
It becomes the permanent DNA of your project.

Out of the dozens of rules circulating in the community, here is the technical teardown of the 10 absolute non-negotiable instructions developers must hardcode into their CLAUDE.md to turn Claude from an unpredictable chatbot into a precision engineering tool.

The Execution Protocols

1. The Architecture Lock

Without a defined stack, Claude defaults to whatever framework it has seen most often in its training data. Define your exact stack once, and the agent stops suggesting incompatible abstractions.

Instruction: “Tech stack: always use these, never suggest alternatives unless I ask. [Insert Language, Framework, Package Manager, Database, and Linter]. If a suggested tool conflicts with this stack, flag it, but use the defined stack anyway unless explicitly overridden.”

2. The Scope Restrictor (No Drive-By Refactoring)

You ask the agent to fix a single database query, and it arbitrarily reorganizes your imports and renames your variables. Scope creep is lethal in production codebases.

Instruction: “Only modify files, functions, and lines of code directly related to the current task. Do not refactor, rename, reorganize, or improve anything I did not explicitly ask you to change. If you notice a secondary issue, mention it in a note, but do not touch it.”

3. The Destructive Action Checkpoint

Claude Code runs in your terminal with raw filesystem access. One misunderstood prompt can drop a production table or overwrite a critical configuration file. You must build a hard wall around destructive actions.

Instruction: “Before deleting any file, overwriting existing code, dropping database records, or executing commands with external side effects (deployments, migrations, API calls), stop completely. List exactly what will be affected and ask for explicit confirmation. I must say yes in the current message.”

4. Eradicate the Filler

When you are iterating rapidly, reading phrases like “Great question!” or “Certainly, I can help with that!” compounds into massive cognitive friction.

Instruction: “Never open responses with filler phrases. Start every response with the actual answer or code. No preamble. No acknowledgment of the question.”

The Persistent Memory Architecture

5. The MEMORY.md State Log

Agents forget your architectural choices between sessions. You must force the agent to maintain an external state log.

Instruction: “Maintain a file called MEMORY.md. After any significant decision regarding architecture, logic, or format, add an entry detailing the date, what was decided, the reasoning, and what alternatives were rejected. Read this file at the start of every session."

6. The ERRORS.md Loop Breaker

If an approach fails on Tuesday, the agent will likely try the exact same failing approach on Friday. You have to break the hallucination loop mechanically.

Instruction: “Maintain an ERRORS.md file. When an approach takes more than 2 attempts to compile or work, log the failed approaches and the final successful solution. Check this file before attempting complex logic to avoid repeating known failures."

7. Session Checkpointing

When you close your laptop, you lose your flow state. Force the agent to write a checkpoint so you can resume instantly.

Instruction: “When I indicate the session is ending, write a brief summary to MEMORY.md detailing what was completed, what is currently in progress, and the exact next step required for the following session."

The Output Constraints (The Karpathy Rules)

Andrej Karpathy recently highlighted specific behaviors that cause LLMs to fail at coding. These final rules are distilled directly from those failures to push coding accuracy into the 90th percentile.

8. Simplest Solution First

Agents love to over-engineer trivial problems.

Instruction: “Always implement the simplest code that could possibly work. Do not add abstractions, flexible layers, or boilerplate that were not explicitly requested.”

9. Flag Uncertainty Explicitly

An agent will confidently hallucinate a plausible-sounding library method before it admits it does not know the API.

Instruction: “If you are uncertain about a library’s behavior, a specific API endpoint, or a technical approach, state your uncertainty explicitly before writing the code. Do not fill knowledge gaps with plausible guesses.”

10. The Strict Diff Output

When the agent finishes a massive multi-file refactor, you should not have to manually hunt down the changes.

Instruction: “After completing any coding task, end the response with a strict list: files changed, one line summarizing the modification per file, and any follow-up actions required.”
Photo by David Travis on Unsplash

CLAUDE.md is not a gimmick.

It is a fundamental shift in how you interact with localized AI.

If you are running an agent without these 10 rules, you are acting as the human middleware.

Create the file in your root directory.
Paste in the constraints.
Stop correcting the same mistakes, and let the agent adapt to your reality.

In case we are meeting for the first time, come over here, it’ll be worth the roller coaster of articles that are gonna come up in the next few weeks.

I swear tracking these updates is a job in itself, lately.

Here’s the list which I’ve built and keep adding on.

And If you need help for analyzing UFC fights, please check out BoutPredict :)