If you try to one shot it, you're going to have a bad time... even with the best frontier models.
- Have clear, specific requirements (with no conflicts/confounds)
- Use a more expensive frontier model to plan the workflow in discreet units (context rot). You should target using at most half the context for a session without having to compact.
- Use capable models to handle the discreet units with TDD (test driven development)
- Do adverserial reviews with a different model family that has low sycophancy (tendency to agree with the user)
- Have checkpoints where you review decisions and judge the results
- If you're using openrouter don't let it float on any provider. Use presets to filter out heavily quantized models (fp4, etc) if you start getting really squirrelly results, in the middle of an otherwise good run, look at the openrouter logs. You probably failed over to a bad provider. Filter them out with the preset or guardrails.
The prompts should specifically instruct it to come back to you if it has any questions. Newer models (I'm looking at you Opus) will try to figure it out for you without saying anything and this is where things often go sideways
This will usually get you 90-95% there, depends on the language and the project. If it's something without a good training sets and documentation, you're still going to have a lot of issues (e.g. we had a Mulesoft project where I ended up hand coding a lot of things because the training set is weak and Mulesoft's documentation is horrible... the models just didn't have enough information).
I use this for larger projects and the are always minor issues but the results, especially with the latest generation of models, the overall output is strong and saves a lot of time.
Finally, don't believe the crap you see on SNS. Unless you have some really expensive hardware at home... you're not going to be able to do anything useful with a local model and you're definitely not going to be able to do it fast. Anyone who tells you that produced anything serious with a local Qwen with q4 weights is lying or doesn't make anything really functional.