For thorny problems I let the agent give me a simplified flow-chart in mermaid syntax. LLM's brain-farts are easily visible then. I correct the flow-chart "Ah, you're right!" and then let it translate it to code. Works wonders.
that's smart! I’ve actually been thinking about integrating something like Mermaid flowcharts directly into Nia’s output—visual context can make cursor etc understand context way better. have you found any particular types of problems where the flowchart approach really shines (or falls short)? Would love to hear more