All courses

Reviewing and editing a plan

Check a plan for wrong assumptions, missing steps, files it should not touch, and steps with no way to verify them. Correct the plan in words before approving it, which is the cheapest place to fix a design mistake.

Builds on: Asking for a plan before any edits

Read it card by card Start the whole course

The plan looks fine. Do you say go?

You asked the agent to plan, not edit, for: *add an Export CSV button to the reports page*. It replies: ◂ Agent: 1. Install `pandas` to build the CSV. 2. Add an export handler in `app.py`. 3. Add the button to `templates/base.html`. 4. Tidy up `db.py` so queries are reusable. It sounds competent and confident. Do you type *go ahead*?

A plan is a list of guesses

The agent has read only some of your files. Where it lacks facts, it fills the gaps with what is typical for projects like yours. A plan is those guesses written down where you can see them. Any guess you leave in becomes code. Fixing it now costs one sentence. Fixing it later means reading many changed lines, undoing them and explaining again. So read the plan as claims to confirm, not as a to-do list to admire.

Four checks, then correct in words

1. **Wrong assumptions**: is each fact it states or implies true for *this* project? 2. **Missing steps**: what must happen that isn't listed? Think of edge cases and other places that need the same change. 3. **Files it shouldn't touch**: anything shared, sensitive or outside the task. 4. **No way to verify**: for each step, how will you know it worked? Reply with corrections, ask for a revised plan, re-read it, then approve.

Checking the CSV plan

**Wrong assumption**: `pandas` is a large extra package, meaning outside code the project must download and keep updated. Python's built-in `csv` module already writes CSV files. **Files it shouldn't touch**: `base.html` is the layout every page shares, so the button would appear on every page. The `db.py` tidy-up wasn't asked for, so it is out of scope. **Missing steps**: keep the page's filters in the export, and handle an empty report. **No way to verify**: nothing says how you'd confirm it works. Every check found something, and no code has been written yet.

Your correction, typed before any edits

Be specific and name files. Add the missing check. Ask to see the plan again, so you can confirm it took your corrections on board.
▸ You: Before you change anything, revise
the plan:
- No new packages; use Python's
  built-in csv module.
- Put the button in
  templates/reports.html only. Don't
  touch base.html or db.py.
- Export all rows that match the
  page's current filters.
- Handle zero rows: header line only.
- Add a final step saying how I check
  it: download with 2 filters, compare
  row counts with the page.
Show the revised plan; no edits yet.

Fix the design while it's still words

Treat a plan as claims to check: wrong assumptions, missing steps, files it shouldn't touch, and steps with no check. Correct it in plain words and get a revised plan before any edits. This is the cheapest moment to fix a design mistake.

On Bytewise this lesson comes in small steps with a check at the end, and the app brings it back right before you would forget it.