Planning

Plan with your agent before it writes code

The cheapest time to disagree with your agent is before the code exists. How to review a plan as code plus consequences, and decide with both numbers in front of you.

The cheapest moment to disagree with your agent is before it writes anything. Once there are four hundred lines, the conversation is about fixing them, not about whether they should exist.

Review the plan as code plus consequences

A plan you can actually review has three parts:

  1. Today's code. The lines that will change.
  2. The change. What they become.
  3. What it buys and what it costs. In numbers, under real load.

Most plans are written as bullet points. They read well and hide the cost.

A real example

Checkout is slow because it renders the receipt PDF while the customer waits. The agent proposes moving the render to a queue. The p99 drops from 4.2 seconds to 260 milliseconds.

The cost is in the other number. On Black Friday, orders rise twelve-fold by noon, four workers fall behind, and receipts arrive nine minutes late. Autoscaling the workers keeps that under forty seconds.

That is the decision, and it is only visible with both numbers in front of you.

Plan in a deck

deck lets your agent present a plan exactly like that: today's checkout code, the proposed change shown as old lines going and new lines arriving, and a chart of what the change does to latency and to the busiest day of the year. You can try that exact deck here.

You decide, comment on the lines you want different, and the agent writes the code with your decision in hand.

Questions

Should I make my AI agent plan before coding?

For anything that adds state, changes failure handling or touches money, yes. Disagreeing with a plan is much cheaper than rewriting code.

What should a good plan include?

The code that will change, what it becomes, and what it costs under real load, ideally with numbers.

Can I try a planning deck without installing anything?

Yes. The Black Friday plan runs in the browser on the deck home page.