Prompting Agents for Maximum Accuracy
My simple but bulletproof recipe for prompting agents for maximum accuracy. This workflow doesn't require a 'plan mode', as it is contained within the prompts themselves - this also makes this recipe harness-independent and will work great across Codex, Claude Code etc.
Step-by-step copyable instructions
analyze the current state of the codebase and identify how to best implement <feature X> and if are we missing any prerequisites for itform a plan on how to tackle the feature implementation and potential prerequisites, ask questions if any part of the requirements is unclearwrite the plan to filesplit the current plan into logical parts so we can begin implementing it piece by piecebefore implementing part 1, what are the edge cases you didn't consider?write the updated plan to fileimplement part 1analyze the code you just wrote for any potential issues, rank them from low to high severityimplement the ones you deem crucial for proceeding with the rest of the planbefore implementing part 2, what are the edge cases you didn't consider?...Why it works
This creates a nice controlled loop of planning, execution, and validation.
I've noticed that compaction has less of a detrimental effect than expected, likely due to lots of reflection on the code throughout the thread.
Tested and confirmed working great with Codex (gpt-5.5 medium) and Cursor (Sonnet 4.6 medium).
