AI FROM MY POV
ENع

Write a Rules File So Your AI Stops Making the Same Mistake Twice

TL;DRCreate a CLAUDE.md file next to your code. Put your preferences, your coding standards, and your gotchas in it — plain text, no format to learn. Claude reads it automatically at the start of every session and follows it without being told. That's the whole trick.
Does this only work with Claude Code?

The file itself is universal — it's just a Markdown file with instructions. Claude Code and the Claude desktop app both read a file named CLAUDE.md automatically. Other AI coding tools use their own filename (some call it a system prompt or project instructions) but the idea is identical: write the rule once, stop repeating it.

How long should it be?

As short as it can be. Start with 5–10 rules. A rules file people actually follow beats a 200-line policy document Claude only half-reads. Add a line only after you've repeated yourself twice.

Won't a huge rules file slow every session down?

It loads once at the start and costs a small amount of context — that's the trade. Keep it tight and specific instead of dumping every opinion you've ever had, and it stays cheap for what it saves you in repeated corrections.

What's the difference between this and the memory vault from episode 03?

The vault (episode 01–03) is what Claude *remembers* — facts, decisions, lessons from past sessions. The rules file is what Claude *always does* — standing instructions it follows without you asking. Memory is the input; rules are the behavior. The best setup has both, and often a rules file even points at your memory system so Claude knows to check it.

Share

Related