The Demotion Ladder: A Year of Governing Claude Code
Why prose rules fail for AI coding agents, and how a demotion ladder of hooks, write partitions and build-enforced checks holds the line instead.
Over 14 months, Claude Code was used to develop a production system with over 1,000 endpoints, implementing a set of rules for various aspects of the codebase. These rules were stored in numerous documentation files, totaling more than 5,000 lines of text. Despite the extensive documentation and the agent's ability to learn from feedback, there were instances where the code quality suffered, with issues like incorrect mapper usage, hacks in handlers, and unnecessary internal logic.
The author discovered that the rules were competing with the task, and that rules applied to each unit of work, leading to a need for a more focused approach. They found that prohibitions tend to degrade compliance over time, while positive instructions remain consistent. The author realized that they had been on the wrong side of this asymmetry by writing prohibitions instead of positive instructions.
Written by urgent.news from HackerNoon's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.