Discussion about this post

User's avatar
Jurgen De Smet's avatar

You end by asking people to measure this, so here is one data point, qualitative but real: at a client we put Claude Code inside the build with the architecture rules as checks, and new code followed the target architecture by default. What I'd add to Albert's invariant idea is a way to see whether it works: count the moments per week where the agent argues a policy away in review. Each one is a policy still living in your second or third place. If the checks are doing their job, that count drops. See: https://howreadyfor.ai/d/architecture-enforcement-in-ci/

Albert / QuantaCortex's avatar

Tim, the null-price example is the clearest argument for making business policy executable. A dependency test can stop a payment module from importing the wrong module, but it cannot tell an agent that a negotiable-price listing must remain ineligible for payment. I would put that rule beside the use case as a named invariant, with one positive example, one rejected example, and an owner who can approve a policy change. Then a feature slice gives the agent a route through the code while the invariant supplies a stop condition. If it proposes to accept a null price, the test should fail with the domain reason, not merely a generic assertion error. I would also version the rule with the business decision record, so a legitimate change is reviewed as a policy change before it becomes a code edit. Which domain policy in your transactions area would you encode first to test whether this actually reduces architectural review time?

Ready for more?