r/opencodeCLI • u/m-ritter • 3h ago
Having a second agent review the plan before OpenCode writes any code
When an agent builds straight from a prompt, the misunderstandings show up late, as a diff that touches files nobody meant to change or skips a case that seemed obvious. By then the fix is a debugging session.
Splitting the work into a plan step and a build step works much better. The agent first asks what done means, reads the relevant code and writes a plan: the files it will touch, the steps, what is out of scope, and the checks that prove each point. Before I approve it, a different installed agent reads that plan cold and lists what is missing or risky, so the gaps get answered while they are still cheap.
After approval the build runs test first in small slices. Agents that did not write the code then check the result against every agreed point and record evidence, and I approve the finished change before a pull request opens. Nothing gets merged or pushed without my yes.
I built QualityLayer around this loop, and it runs natively in OpenCode. I'm the developer: https://github.com/maxritter/qualitylayer
