1 min read

Rules Eat Context

Somewhere in your project there's a plain text file that your AI reads before it reads anything else.

Before your code. Before your conversation. Before the error message you're asking it to fix. A small document that sits at the mouth of a finite pipe and decides how much of everything else can get through.

A team's version hit 600 lines.

Their agent started hallucinating function names from three prompts ago. They deleted half the file. The hallucinations stopped.

Not because the rules were wrong. Because the rules were eating the memory the agent needed to think.

That file. CLAUDE.md, .cursorrules, agents.md. Whatever you call it. Every line in it is a line subtracted from the window where your conversation, code, and error messages live. Most people write theirs like a company handbook. Cover every edge case. Specify every convention. Hope the machine reads it all.

That's backwards.

The more precisely you instruct, the less room the agent has to follow.

Start with five lines. What the product is. What it's built with. Stop. Every time the agent does something wrong, add one line. Over weeks the file becomes a precise record of what your project actually needs. Not what you imagined it might need.

I tested this.

My file was 280 lines. I sorted every line into three buckets: prevents real damage, describes a preference, leftover frustration from a bad session.

The third bucket was the biggest.

Cut to 140. The agent got noticeably better on two tasks, because it had room to hold actual codebase in memory instead of my opinions about import ordering.

You suspected this already. You noticed the agent getting worse as you added more instructions. You were right.

I wrote about the cost side of this in The Cognitive Loan. The rules file is where that cost becomes countable. Every line has a price. Count yours.

The deeper skill isn't writing rules. It's managing the thing that builds for you.

Open your rules file. If you're over 200, delete the bottom third. Keep lines that prevent real mistakes. Kill the rest. Run one session with the shorter file.

Watch what happens.