Sub topic 8
Revise the plan until it is right
This chapter assumes you can already write a planning request and review a plan for wrong assumptions, as covered in earlier chapters. It also assumes you can read a diff and run your project's tests. Here you will learn how to turn review findings into a revised plan, and how to know when the plan is ready.
Why revise instead of fixing it in code
A plan is cheap to change. A wrong assumption costs one sentence to correct in the plan. After implementation, the same mistake can cost several edited files, new tests, and a messy diff to untangle.
Revision is also where you narrow scope. The first plan often includes extra work, or leaves out a constraint you forgot to state. Fixing both at this stage keeps the later steps small.
The revision loop
Each round has the same shape: the agent proposes, you review, you reply with specific corrections, and the agent returns an updated plan.
Write feedback the agent can act on
Good feedback names the part of the plan, states the correction, and gives the reason when the agent could not know it. Compare these two replies.
Vague:
This doesn't look right. Can you try again?Specific:
The plan looks good with two changes:
- Use the shared Redis client instead of an in-memory counter, since we run several processes.
- Add the limit values to the existing config file instead of hard-coding them.
Please update the plan. Do not edit any files until I reply "approved".The specific reply does three things. It corrects a false assumption (a single process). It adds a project convention the agent may not have noticed (config file). It repeats the no-edits rule, so the agent does not treat the feedback as permission to start coding.
What to check in the revised plan
Do not assume the agent changed only what you asked. Read the new version and confirm three things:
- Each correction you requested appears in the plan.
- The file list, steps, and risks changed to match. A switch from an in-memory counter to Redis should change the files, the risks section, and the tests.
- Nothing unrelated was added or removed.
Ask the agent to mark what changed if the plan is long. For example: "List what you changed from the previous version."
Narrow the scope when the plan grows
Revisions can make a plan larger. If a step now touches many files, split it or cut it. You can ask for this directly:
Step 2 now covers the route, the config, and the Redis client. Split it into separate steps, and move anything optional into a "Later" list that we will not implement now.A "Later" list keeps good ideas without letting them leak into the change.
When to stop revising
Stop when your review checklist passes: the plan solves the problem you described, lists only files you expect, rests on assumptions that are true for your project, and has a concrete verification method. More rounds after that rarely help. If the same issue keeps returning after two or three rounds, the cause is usually missing context, so add the missing fact yourself instead of asking for another rewrite.
Exercise
An agent's first plan uses an in-memory counter, but your service runs on several processes. Write a feedback message that corrects this, and name two things in the revised plan you should check.
Show answer
Example feedback: "Use the shared Redis client instead of an in-memory counter, since we run several processes. Please update the plan and do not edit any files until I reply 'approved'." In the revised plan, check that the file list, risks, and tests changed to match Redis (for example, the removed in-memory assumption and any Redis setup in tests), and that nothing unrelated was added.
Exercise
After two revisions, the agent keeps proposing a library you cannot use. What should you do next?
Show answer
Add the missing constraint yourself in the next message, for example "Do not add new dependencies", instead of asking for another rewrite. Repeated failures usually mean the agent lacks context.