A CLAUDE.md the assistant ignores is not a content problem. It is a delivery problem. The fix is how, when, and with what authority the rule reaches the session.
What this covers
- CLAUDE.md is loaded as guidance, not enforced as policy. The assistant decides what to do with it.
- Long CLAUDE.md files lose signal because the model starts treating later instructions as background.
- Three changes move follow-rate up: shorten the file, move enforcement-grade items into hooks, and route the long tail by path.
- Pathrule injects path-scoped memories, rules, and skills into Claude Code at hook time so the slice the assistant sees matches the work in front of it.
Advisory does not mean ignored, it means optional
CLAUDE.md is loaded by Claude Code as project guidance at session start. The model reads it the way a thoughtful new colleague would read an onboarding doc. Some lines feel important and the model follows them. Some lines feel like background and the model skims them. Some lines conflict with the active task and the model uses judgment.
Practitioners writing about this in 2025 and into 2026 land on a similar number: the file is followed reliably about eighty percent of the time. The remaining twenty percent is where the frustration lives. The right rule was in the file. The assistant did not act on it. The team finds out in code review or, worse, in production.
That is the gap to close.
Why long files lose more signal than short ones
The pattern starts the same way for almost every team. Day one CLAUDE.md has eight clear instructions. Day ninety it has eighty. Each addition was justified. None of them were wrong.
The problem is that the model has an attention budget. Practitioners observing frontier models report the budget is somewhere around one hundred fifty to two hundred instructions before signal degrades. Smaller models hit the wall sooner. Past that point the late instructions are treated as background and the early instructions occupy almost all of the working attention.
A team that just added the eighty-third instruction has no way to know which one the model is now skipping. The follow-rate dropped silently.
Three layers that move the number up
There are three honest answers, and they work best together.
First, shorten the file. Most CLAUDE.md sections describe behavior the model already does well. Those lines can be deleted without changing outcomes. A team can usually cut CLAUDE.md in half with no observable regression. The remaining instructions get more of the attention budget per session.
Second, move enforcement-grade items into hooks. Claude Code supports PreToolUse and UserPromptSubmit hooks. A hook runs every time, no judgment. If a rule must happen on every commit, every test run, every release, it belongs in a hook, not in prose. Formatting and linting are the obvious examples. The non-obvious ones are the rules a team really wishes the model never skipped.
Third, route the long tail by path. A rule that applies to one folder does not need to be in every session. A schema gotcha for one table does not need to be loaded when the assistant is working on a marketing page. This is where Pathrule lives.
How Pathrule routes the long tail
Pathrule is a path-indexed knowledge graph for AI coding assistants. It routes team memories, rules, and skills into Claude Code, Cursor, Codex, and Windsurf at hook time.
Team-written content lives at a path in a workspace tree that mirrors the repo. Retrieval walks from the active path up the ancestors. A UI tweak in apps/web/dashboard gets the rules that apply to that surface, not the rules about database migrations. A billing change gets the billing invariants, not the marketing voice guidelines.
Strict rules are always injected on a path match. Advisory rules go through relevance filtering. The slice arrives as system context before the first tool call, from a precomputed local cache, in single-digit milliseconds.
CLAUDE.md keeps the conventions that really do apply everywhere. Pathrule carries the rest.
What changes for the team
The visible change is that CLAUDE.md gets shorter and the follow-rate on the items left in it goes up. Less to read, less to skim, less to skip.
The less visible change is that the team can finally add a learned exception without paying a tax. A schema gotcha from a postmortem becomes a memory attached to the path where the schema lives. The next session in that area sees it. No other session has to.
Onboarding gets calmer too. The new hire opens the repo and the assistant already knows what the team has learned, in the area the new hire is working in. The team did not have to write a new onboarding doc to make that happen. They just wrote the knowledge once, at the path where it applies.
How to try this on a real repo
The smallest useful first pass is two changes. Trim CLAUDE.md to the items that really apply everywhere. Pick one path where the assistant repeatedly makes the same mistake and write a Pathrule memory or rule for that path.
Open Claude Code in that folder. Watch the slice arrive before the first tool call. Notice whether the assistant behaves differently this time. Repeat the loop on the next path.
Every signup gets three months of Pathrule PRO on the house, no credit card. If you want help shaping the first migration with us, hello@pathrule.io is open.
Top comments (0)