Your CLAUDE.md is full of wishes: 7 rungs that make a rule stick
You start a project with Claude. A few weeks in you have a file of rules, and every line got there because something went wrong once. The agent pushed to main. Never commit to main; always work on a branch. A test reached the live API and moved real data. Tests never call production. A handler wrote to the database directly. All writes go through the repository. That file is everything the…
Claude, an AI assistant, helps project teams create a file of rules after a few weeks of working together. The rules are based on experiences where something went wrong, and the agent follows them to avoid mistakes. However, many of these rules are simply wishes that never get enforced, making them ineffective. The article presents seven rungs that make a rule stick, starting with Rung 1 which makes the artifact regenerate, erasing any edits made.
Rung 2 blocks any action by a hook rejecting the tool call before it runs. Rung 3 ensures the wrong call has no valid shape, preventing it from being compiled. Rung 4 involves an AST guard that parses the structure of the code, catching violations in CI. Rungs 5 to 7 deal with cross-artifact guards, runtime detectors, and writing rules where they always load, respectively.
The end goal is to have a rule with a machine check that catches violations immediately, making the rule truly effective.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.