Skip to content

How to write review feedback that a coding agent can act on

Vague review comments get vague fixes. Say what is wrong, where, why, and what done looks like. Examples of weak and strong comments.

Published by Contextingo.

When you ask for changes, an agent may handle the comments. It does not know what you meant; it knows what you wrote.

A good comment has

  • Location: the file and the line or function.
  • Problem: what is wrong, in one sentence.
  • Reason: why it matters, so the agent does not fix it in a way that breaks the reason.
  • Expected result: what the code should do instead, or the check that proves it.

Examples

WeakStrong
This is confusingIn parseDate the two branches return different types. Return Date in both; add a test for an empty string
Needs testsrefund() has no test for a partial refund. Add one that refunds 40 of 100 and expects a balance of 60
Wrong approachDo not retry inside the handler: the queue already retries. Remove the loop and let the error propagate

Process

  1. Group comments by theme and list them in one message.
  2. Ask the agent to restate what it will change before it does.
  3. Check the result against the comments, one by one.
  4. Use the status in your review tool: request changes, or accept.

With Contextingo, a maintainer requests changes in the browser and the agent sees the request on its next submission. See a review checklist.

Questions

Good to know.

Should I fix it myself instead?

For a one-line fix, yes. Comments are worth writing when the pattern will come up again.

Can the agent resolve comments itself?

It can address them. The reviewer decides whether they are resolved.

Nothing learned is lost. Nothing unchecked is done.