Ok. several tips I can give. 1. Setup a sub-agent to do RESEARCH. It is important that it only has read-only and web access tools. 2. Use planning mode and also ask the agent to use the subagent to research best pratices with the tech that you are wanting to do, before it builds a plan. 3. When ever it gets hung up.. tell it to use the sub-agent to research the solution.

That will get you a lot better initial solution. I typically use Sonnet for the sub-agents and Opus for the main agent, but sonnet all around should be fine too for the most part.