I’ve had great success with writing a contract and the agent follows it. It’s surprisingly easy to get it to follow the rules. The other half of that is ensuring there are rails enforcing those rules. At the task management system I entice reviewers, style, code approvals and all by sha. This eliminated a lot of confusion. Then at the build system it is enforced as a pipeline. LLMs are fairly happy with writing tests and there they have a sound infrastructure. That said I do not let them go wandering around and enforce strict task assignments. Opus really forced me to improve all of the guard rails. Now I can manage dozens of bugs, features and other tasks quite easily.