Skip to content
mentoor

Topic 1 of 5 · 4 min read

Writing clear, actionable review comments

Goal: Rewrite vague review comments into specific, severity-labelled comments that a person or an agent can act on.

A good review comment names the problem, says why it matters, labels how serious it is and, when possible, shows a fix. The reader should know what to do without a follow-up question.

Check yourself · 1 of 3

Which comment can an author, or an agent, act on without asking a question?

Choose one answer

Why it matters

Half the readers of your comments are now agents. When you leave a comment on an agent's pull request, the author often pastes it straight into Claude Code, Codex or Cursor and says "address this". A person can guess what "this feels off" means. An agent will guess too, and may rewrite the wrong part. A vague comment costs a full round trip; a precise one is fixed in a single pass.

The four parts

  1. Location and problem. Point at the line and say what is wrong, not that it is "bad". Say "this query runs once per order" rather than "slow".
  2. Reason. One sentence: what breaks, for whom, and when. The reason lets the author find other places with the same flaw.
  3. Severity label. Conventional Comments uses short labels such as issue:, suggestion:, question:, nitpick: and praise:, and a (blocking) or (non-blocking) tag. The label tells the author whether the merge waits on it.
  4. A way forward. A code suggestion, a pointer to an existing helper, or the test that should exist. Keep the decision with the author when several fixes are fine.

Comment on the code, never the person. Ask a question when you are not sure; it is allowed to be wrong.

Before and after

Weak:

This is confusing, please clean up.

Fixed:

issue (blocking): retry() catches every exception and returns None, so a failed payment looks like a success to checkout(). Please catch PaymentError only and re-raise the rest. A test that makes the gateway time out would pin this down.

The second comment can be acted on by a person or an agent with no extra context. It also tells the author the merge is waiting.

What goes wrong

  • Everything sounds equally urgent. If a naming preference and a data-loss bug arrive in the same tone, the author cannot sort them. Label them.
  • Comments that only point. "Why is this here?" without a view leaves the author guessing whether you want it removed.
  • Rewriting the author's design in comments. Ten style opinions on a change that should have been rejected at the design level waste everyone's time. Say the big thing first.
  • Missing the good. A short praise: on a clean test costs nothing and tells the author, and the agent, what to repeat.

Examples

Vague to precise

Vague: "Handle errors better."

Precise: issue (blocking): load_config() returns an empty dict when the file is missing, so the service starts with no database URL and fails later with a confusing error. Raise ConfigError with the file path instead.

Labelling the same pull request

One review, three weights: issue (blocking): the new endpoint has no auth check; suggestion (non-blocking): reuse paginate() instead of the hand-written loop; nitpick (non-blocking): rename d to delta. The author knows the order of work.

Key points

  • A useful comment states the problem, the reason, how serious it is and a way forward.
  • Severity labels such as blocking and non-blocking tell the author whether the merge waits.
  • Write each comment so it can be pasted to an agent with no other context and still be acted on.
  • Comment on the code and its effect, never on the person.
  • Raise design problems first; do not bury them under style notes.

Common mistakes

  • Writing "this is wrong" or "clean this up" with no reason or fix.
  • Leaving every comment unlabelled so the author cannot tell a blocker from a preference.
  • Attacking the author or the agent instead of describing the code.
  • Pointing out ten small style issues while missing the one design flaw.

Check yourself · 2 of 3

What does the label nitpick (non-blocking): tell the author?

Choose one answer

Check yourself · 3 of 3

An agent opened the pull request and you will paste your comments back to it. How should you write them?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic