Library › Coding AI › Software developers
Review an Express handler as 4 labeled line comments
Practice: Asking for a format you can use. About 5 minutes.
About this exercise
A teammate opened a pull request with the handler below. Your team's review format is exactly 4 numbered comments, each written as 'L<line> [blocker]: ...' or 'L<line> [nit]: ...', under 25 words each, with all blockers listed first. Security problems and wrong results are blockers; everything else is a nit. No code blocks, no praise, no summary.
Common mistakes when you ask AI for this
- Getting a wall of feedback. Asked to review, the AI lists every possible improvement plus praise and a summary. Try: Say: "Exactly 4 numbered comments, under 25 words each. No praise, no summary."
- No line numbers or severity. Without your format, comments aren't tied to lines and nothing says what blocks the merge. Try: Show the shape: "Format each like: 1. L14 [blocker]: ..." and "blockers first".
- Missing the paging bug. The AI focuses on style and can miss that page 1 skips the first 20 rows. Try: Add: "Pages start at 1; check the OFFSET math."
- Rewriting the file. The AI often pastes a corrected version of the whole handler, which the PR author didn't ask for. Try: Add: "No code blocks; describe the fix in words."
What a strong prompt includes
- Sets the number of comments
- Shows the comment shape
- Defines blocker vs nit
- Caps each comment
- Rules out rewrites and praise
Related exercises
- Add a cron line that matches the others in a crontab (Coding AI · Product managers)
- Add dark mode by overriding your existing CSS variables (Coding AI · Software developers)
- Add input checks to your number guessing game (Coding AI · High school students)
- Add input validation to a Java method with exact messages (Coding AI · Software developers)
- Add labels to a signup form without rewriting the page (Coding AI · High school students)