Curriculum

Curriculum

Catch Hidden Assumptions in an Agent Plan

Scenario

An agent proposes a 3-step plan for didPassQuiz(score). Spot the hidden assumption.

Selected choicePick a choice below
Result—

Try it yourself

Compare three agent plan statements and spot which ones hide a contract bug.

Reveal the explanation
  1. "If score > 100, clamp score to 100 and return Pass."

    Hidden assumption! Clamping hides invalid data instead of returning INVALID_SCORE.

  2. "Convert string inputs with Number(score) before checking >= 60."

    Hidden assumption! Silently converts "" to 0 and "60" to 60 instead of rejecting non-integers.

  3. "Check Number.isInteger(score) && score >= 0 && score <= 100; throw INVALID_SCORE otherwise; return score >= 60."

    Aligned plan. Zero hidden assumptions; safe to approve.

Correcting a faulty assumption during the plan step costs one sentence; correcting it after 5 files are edited takes far longer.

Review first

Your turn

Spot the hidden assumption in: "For missing room IDs in lookupRoom, return 0 so callers never see an error."

Common mistake Approving "never see an error" without realizing it confuses missing rooms with full rooms.

Check your work

Correct the plan: return explicit "UNKNOWN_ROOM" for absent keys and reserve 0 for known full rooms.

Quick check

When is the cheapest and safest moment to correct a wrong assumption in an agent’s approach?
Show the answer and reasoning

Correct answer During plan review, before any code files are edited

Fixing assumptions in the plan prevents wasted edits and broken contracts.