Sub topic 7
Review the Plan Like a Design Proposal
This chapter assumes you can read a diff, run your project's tests, and have already asked an agent for a plan using the structure from earlier chapters (files, ordered steps, risks and assumptions, verification). Here you learn how to read that plan critically before you approve it.
Why review matters
A plan is cheap to change. Code is not. If the agent misunderstood the task, the plan shows it in a few lines. After implementation, the same mistake is spread across files, tests, and possibly commits.
Treat the plan the way a reviewer treats a design proposal from a colleague. You are not checking style. You are checking that the proposal solves the right problem, fits the codebase, and can be verified. Confident, well-formatted prose is not evidence of any of this. An agent writes a plausible plan even when it has misread the code.
A review order that works
Review in this order. Each check is cheaper than the next, and an early failure often makes the later checks unnecessary.
- Problem fit. Does the plan solve what you asked for, or something nearby?
- Scope. Are the listed files the ones you expect, and is anything changed that you did not ask for?
- Assumptions. Are the stated assumptions true for this project?
- Step size and order. Can each step be reviewed alone, and does each step leave the code working?
- Verification. Is there a concrete way to tell that the change works?
You can keep the checklist from the topic plan next to the plan while you read:
- [ ] Does the plan solve the problem I described, not a nearby one?
- [ ] Are all listed files ones I expect to change?
- [ ] Is anything changed that I did not ask for?
- [ ] Are the assumptions true for this project?
- [ ] Is there a concrete way to verify the result?
- [ ] Are the steps small enough to review one by one?Check 1: problem fit
Reread your original goal, then read the plan's first step and last step. The plan should connect them.
Mismatches are usually subtle. You asked to reject more than 5 failed login attempts per IP in 10 minutes. The plan limits all login attempts, including successful ones. Or it limits per username instead of per IP. Both are reasonable-sounding features, and neither is the one you asked for.
Watch for numbers and nouns. Limits, time windows, units, and the thing being counted are where the plan most often drifts from the request.
Check 2: scope
Compare the plan's file list to your own mental list of what should change. You do not need to be exact, but you should be able to explain every file.
- A file you did not expect. Ask why. There may be a good reason, such as a shared helper you forgot. There may also be a refactor you did not request.
- A file you expected that is missing. The agent may have overlooked a call site, a config file, or a test.
- Words like "while we're here" or "also clean up". These signal unrequested work. Remove it from the plan, or move it to a separate task.
Unrequested changes make the diff harder to review and harder to revert. A plan is the cheapest place to cut them.
Check 3: assumptions
The risks and assumptions section is the most valuable part of a plan for a reviewer. It lists what the agent believes but has not verified, or cannot verify from the code alone.
For each assumption, decide whether it is true, false, or unknown. Verify the unknown ones yourself or ask the agent to check them by reading code.
Consider this assumption from the example plan: "Assumes a single server process; an in-memory counter is not shared across processes." If your service runs several processes, the whole design is wrong. An in-memory counter would let an attacker multiply the allowed attempts by the process count.
Also look for assumptions the plan does not state. Common hidden ones:
| Hidden assumption | How to check |
|---|---|
| The input value is always present | Look for code paths where it can be missing |
| The environment matches development | Compare deployment config to local config |
| Existing tests cover the area | Run the tests and check coverage of the files in the plan |
| A library or service is already available | Search the dependency file and the existing client code |
| Behavior of error responses can change | Check which clients parse the current format |
If the plan does not say how it knows something, ask. A short question such as "Which file shows that requests carry the client IP?" makes the agent point to evidence instead of memory.
Check 4: step size and order
Good steps have two properties. Each can be reviewed in isolation, and the project still builds and passes tests after each one.
Warning signs:
- A step that reads "implement the feature". It is too large to review.
- A step that depends on a later step to compile or pass tests.
- Tests scheduled only at the end. Prefer tests alongside or just after the code they cover.
- A step that changes behavior and refactors in the same diff.
If a step is too big, ask for it to be split. The goal is to approve and inspect one step at a time later, so the plan's granularity sets the granularity of your review.
Check 5: verification
A plan that says "test that it works" is not a verification method. Look for specifics: which test files, which cases, which commands, and what output counts as success.
For the rate limit example, a concrete plan covers at least these cases:
- Under the limit: the request proceeds normally.
- At the limit: the boundary behavior is defined (is the 5th failure blocked, or the 6th?).
- After the window expires: the counter resets.
- The existing error format is unchanged for blocked requests.
Also check that the existing tests are part of the verification. A new feature can break old behavior, and only the old tests will notice.
Common mistakes when reviewing
- Skimming because the plan looks professional. Formatting says nothing about correctness. Read every assumption.
- Reviewing only the file list. Files can be right while the approach is wrong.
- Approving with silent reservations. If something feels off, say so. The agent cannot read your doubts.
- Rewriting the plan yourself. Describe the correction and let the agent produce the revised plan, so the plan and the agent's understanding stay in sync.
- Fixing problems in code later. A flawed plan that you approve becomes a flawed diff. It is cheaper to correct it now.
Writing review feedback
Good feedback names the problem, gives the correct fact or decision, and says what you want next. It also keeps the approval step under your control.
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".Notice what this does. It corrects a wrong assumption with a reason, it states a preference tied to an existing project convention, it asks for a revised plan instead of code, and it restates the no-edits rule. The next chapter covers revision in more detail.
When you cannot judge an item, ask a question instead of guessing:
Before I approve: how does step 2 handle requests behind a proxy, where the client IP may be in a header? Show me the code you are relying on.A question like this tests an assumption without committing you to a direction.
Exercises
Exercise
A plan to add rate limiting lists auth/routes.py, auth/limiter.py, and also users/models.py with the note "rename a field while we're here". Your goal never mentioned the user model. Which review check does this fail, and what should your feedback say?
Show answer
It fails the scope check. The users/models.py change is unrequested work. Your feedback should say to remove that step from the plan (or defer it to a separate task), ask for a revised plan, and restate that no files should be edited until you reply "approved".
Exercise
A plan says, under verification: "Test the login flow to make sure it works." Name two things you would ask the agent to add so the verification is concrete.
Show answer
Any two of these: the specific test file and the cases to cover (under the limit, at the limit, after the window expires); the exact command to run the new and existing tests; the expected result that counts as success; a check that the existing error response format is unchanged for blocked requests.
Exercise
A plan states "Assumes a single server process" but your service runs four processes behind a load balancer. What is the consequence if you approve the plan, and how should you respond?
Show answer
An in-memory counter is kept per process, so each process counts separately and an attacker could make about four times the intended number of attempts. Respond by correcting the assumption, asking for a design that uses shared storage such as the existing Redis client, and requesting a revised plan before any edits.