I have found that most of these antipatterns can be migitated with adversarial reviews, using a framework such a zeroshot to design the review topology.
We have experienced that adverserial review cycles is the only way to really guarantee good outputs from coding agents - best modelled as a cyclic graph.
We build an open source framework that could be the solution to this problem, as it lets you automate the dev - test - review cycle where there is currently a lot of variance among developers: https://github.com/the-open-engine/zeroshot