r/SoftwareEngineering • u/Evening_Hawk_7470 • 5h ago
controversial rule we added to our backend repo: AI coding agents are banned from editing files until they write a 10-line plan and a failing test in read-only mode first
we now hit a breaking point, you see, last month where pull request volume doubled while code review morale went straight off a cliff. people were opening 700-line agent-generated prs for tiny tickets, half full of invented abstractions or silently deleted assertions that kept ci green.
instead of banning coding agents altogether, we put one annoying guardrail on every pr in our jvm backend repo: nobody lets an agent write production code on turn one anymore. first pass stays strictly read-only (ask mode or plan mode depending on whether someone uses claude code, codex, or junie inside intellij) to trace callers and output a short editable plan. second pass writes a failing characterization test locking down existing behavior. only after a human skims those two outputs does the agent switch to code mode
pushback during week one was predictable: "this kills the speed advantage on small tickets." and honestly, on trivial 10-line typos they were right, typing it by hand is faster than babysitting any agent loop. on anything touching legacy billing or multi-module dependencies though, our median pr size dropped by half and review rounds stopped turning into archaeological digs.
also kinda curious whether other engineering teams have adopted explicit "read-only plan + failing test first" policies for coding agents, or if you rely purely on pr size limits and human review?

