In my experience I've found that segmenting my project into small chunks and building layer upon layer of process code works best.
Giving too many tasks for AI to build gets difficult to manage and consumes much time in fixing mistakes made by AI as its understanding is stretched over too many parameters.
Layer by small layer works best.
That creates a scenario where you are re-doing functions to adapt to new layer processes...but I find I do much less correcting and recurrent testing.
This requires some time/thought to break down a project into manageable chunks.
You probably know this already...but it's my 2¢ worth
Cheers