Plan Before Code

Force a planning step before any code so the model surfaces assumptions and architecture you can correct cheaply.

TL;DR

  1. Ask for a plan before any code; review the plan, then tell the model to implement it.
  2. Planning surfaces assumptions and design choices while they are still cheap to change.
  3. This single habit reportedly lifts success on complex tasks from roughly one third to two thirds.

Why Plan First

    Cheap Corrections

    Fixing a plan is a sentence; fixing a wrong implementation is a rewrite.

    Edit one plan step <<< re-do 5 files.
    Surfaces Assumptions

    The plan makes the model's hidden guesses visible before they harden into code.

    "Assumes the API returns ISO dates."
    -> you catch it if it is wrong.
    Big Success Jump

    A deliberate planning step markedly raises success on complex tasks.

    ~1/3 -> ~2/3 success on hard tasks
    (reported by practitioners).

Ask For The Plan

    Request Structure

    Ask for files to touch, the approach, and assumptions, no code yet.

    "Before coding, give a plan: files to
    change, approach, assumptions. No code."
    Request Options

    For design decisions, ask for a couple of approaches with trade-offs.

    "Propose 2 approaches with trade-offs
    and recommend one."
    Hold The Code

    Explicitly tell the model to stop after the plan and wait.

    "Stop after the plan and wait for my go."

Review The Plan

    Check Assumptions

    Correct any wrong premise before a line of code depends on it.

    "Dates are epoch ms, not ISO. Adjust."
    Check Scope

    Trim steps that over-reach or touch files that should stay untouched.

    "Do not change the auth module.
    Keep it to the reducer."
    Approve Explicitly

    Give a clear go so the model implements the agreed plan, not a new idea.

    "Plan looks good. Implement steps 1-3."

Then Implement

    Reference The Plan

    Tie the implementation back to the approved steps.

    "Implement the plan above, step by step."
    Checkpoint Long Tasks

    For big plans, implement in stages and review each before continuing.

    "Do step 1, then pause for review."
    Keep The Plan Visible

    A written plan doubles as the spec you verify the result against.

    Compare the diff to the plan:
    did it do what we agreed?

Tips

  1. Have the plan list files to change, the approach, and any assumptions, so you can catch wrong turns early.
  2. Approve or edit the plan explicitly before you say 'now implement it'.

Warnings

  1. Skipping planning on a multi-step task invites the model to commit to a wrong design and build on it.
  2. A plan you did not read is worthless; the value is in catching the bad step before code exists.

In Practice

FAQ