Make Your AI List Its Assumptions Before It Writes Code
Before your AI writes a single line of code, make it list its assumptions and say: "Correct me now, or I proceed." That one line is the cheapest bug-fix you will ever ship.
The failure mode: silent guesses
The most expensive failure in agentic coding is rarely a syntax error. It is the agent quietly filling a gap you never specified — the wrong database, the wrong auth flow, the wrong edge-case behavior — and building an afternoon of confident, wrong code on top of it. You find out only at review, after the rework is already baked in.
Agents will not question their own assumptions or flag missing context unless you force them to. Left alone, they optimize for producing an answer, not for being right. The guardrail is to make the assumptions visible before they harden into code.
The one instruction
Add a single directive to your prompt — or bake it into your CLAUDE.md / AGENTS.md / system prompt so every task inherits it:
Before writing any code, list every assumption you're making about
requirements, architecture, and scope. Then stop and wait. I'll say
"correct me" or "proceed."
That is the whole technique. It costs the agent seconds and it costs you one read. Three things make it work:
- List, don't just plan. A plan hides its premises inside prose. An explicit assumption list — "I'm assuming Postgres, not SQLite; assuming the API is public; assuming pagination is out of scope" — is scannable, and wrong items jump out.
- Then wait. The stop is the point. Without it the agent lists assumptions and charges ahead in the same turn, so you are back to reviewing finished code.
- Cover requirements, architecture, and scope. Those are the three places silent guesses hide. Naming them steers the agent away from listing trivia.
Rules of thumb: what to make it surface
| Category | Example assumption to catch |
|---|---|
| Requirements | "Assuming soft-delete, not hard delete." |
| Architecture | "Assuming a new service, not extending the existing one." |
| Scope | "Assuming tests are out of scope for this pass." |
| Data & edge cases | "Assuming empty input returns [], not an error." |
| Dependencies | "Assuming I can add a new library." |
If any line is wrong, you fix it in one sentence. If all are right, you've lost ten seconds and gained a written contract for the change.
Power user: make it the default, not a ritual
- Promote it to a memory file. Put the instruction in
CLAUDE.md,AGENTS.md, or your agent's system prompt so you never have to remember it. Every task starts with an assumptions pass. - Pair it with plan mode. Read-only planning modes exist precisely so the agent explores and asks before touching files — the assumptions list is the artifact you review there.
- Skip it when the diff is one sentence. Over-planning a trivial change wastes as much time as under-planning a complex one. If you can describe the exact diff yourself, just let it build.
- Ask it to rate confidence. "Flag any assumption you're below 80% sure about" surfaces the risky guesses without drowning you in obvious ones.
Resources
- Best practices for using AI in VS Code — "Tell the AI to ask clarifying questions" and "Plan first, then implement."
- Codex best practices — OpenAI — ask the agent to plan and interview you before it starts coding.
- Best practices for Claude Code — plan mode: state assumptions explicitly, ask before implementing.
<div class="cta"> Building with coding agents? Yeda AI designs, audits, and ships production AI workflows. <a href="/contact">Talk to us</a> · <a href="/blog">Read the blog</a> </div>