Yeda AI Tips · #152

Español

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:

  1. 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.
  2. 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.
  3. 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

CategoryExample 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

Resources

<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>