"Vague prose doesn't change agent behavior any more than it changes a new hire's behavior on day one" is exactly right, and the comparison holds further than it first looks. What actually changes a new hire is a failing test, a linter and a review that blocks, not the onboarding doc. Same here: the rules that survive are the ones something else enforces.
The pattern that has worked best for me is treating the file as a pointer to enforcement rather than a substitute for it. State the rule, then state which check fails when it is broken.
Anything in the file with no corresponding check is a preference, and marking it as one keeps the genuinely load-bearing lines from being diluted.
The do-not-touch section is the part I'd lean on hardest. We keep something similar across our own repos and the plain list alone doesn't hold up on its own -- an agent working under task pressure will still edit a frozen path if nothing but a comment is stopping it. What's actually worked for us is a pre-commit check that rejects any diff touching those paths unless a human explicitly overrides it, so the rule gets enforced rather than just documented. The review_cadence field in the header is a nice idea too, but I'd want something checking it -- a stale last_updated sitting there for six months doesn't page anyone on its own, it just quietly stops being true.
Dhrutika Rathod
The strongest point here is that
CLAUDE.md/AGENTS.mdshould encode decisions the model cannot reliably infer, not repeat generic engineering advice. The Preferred/Avoid examples and concrete code patterns make that distinction very clear.One thing I’ve found useful in production AI work at IT Path Solutions is treating these files almost like an architectural contract: keep the rules small, tie them to actual tooling/tests where possible, and remove a rule once the repository no longer needs it. Otherwise the context file becomes another source of drift.
The five-minute A/B test is especially practical. If removing the file doesn’t measurably change the agent’s implementation choices, you’ve probably documented knowledge rather than constraints.