Write tests first. Have agent iterate until they are satisfied.
The point is that it boils down to writing the tests correctly, regardless of who is implementing the actual code. Hand-written code without test coverage has the same problems as AI generated code.
Ok agentic Ron Jeffries
https://ravimohan.blogspot.com/2007/04/learning-from-sudoku-...
> Have agent iterate until they are satisfied.
Or have them rig the tests so that they always pass.