SI Learning
0% read

MODULE 07 / 18 · PART 3 · PROVE & HARDEN

Code Review & Critique

Make the agent disagree with you — specifically, with evidence, in priority order.

35 min + practice20 copy-ready promptsJump to prompts ↓

THE SHORT ANSWER

What this module changes.

Agents default to agreement. Ask for the worst thing first, force line-level evidence, and separate correctness from maintainability and performance.

Agents default to agreement. These prompts force disagreement, and they force it to be specific enough to act on.

Review capacity is scarce, and contractors, agencies and distributed teams often hand over diffs without context. A risk-first review that names concrete failure scenarios is more valuable than a long list of style preferences.

THE MODULE PROMPT LIBRARY

20 prompts for code review.

Copy any prompt, replace the [bracketed] slots with your own project context, and attach the files the agent needs. Use “Copy all prompts” when you want the full module in one place.

20 copy-ready prompts. Bracket text is a slot for your own context — replace it before you send the prompt.

Prompt 01

Review this as a skeptical senior engineer who wants to find problems: [diff]. Be specific and cite line numbers. Do not compliment.

Why it worksRemoving the social default produces actual findings.

Prompt 02

What is the worst thing about this change? Start there, not with the summary.

Why it worksForces the critique to lead with the highest-severity issue.

Prompt 03

Review this diff for correctness, then for maintainability, then for performance — in that order, and do not mix them.

Why it worksSeparating concerns prevents style nits from drowning real bugs.

Prompt 04

What would break in production if this shipped as-is? Give me the scenario, not the category.

Why it worksConcrete failure scenarios are actionable; "could be risky" is not.

Prompt 05

Assume this code is wrong. Find the input that proves it.

Why it worksAdversarial framing finds the counterexample that review-by-reading misses.

Prompt 06

Review this PR description against the diff: does it claim anything the code does not do?

Why it worksCatches the mismatch between narrative and implementation.

Prompt 07

What is missing from this change? Tests, migration, docs, feature flag, metrics — list what should be here and is not.

Why it worksReviews the change as a complete unit of work, not just as code.

Prompt 08

Rate this code on readability, testability, and changeability, one to five, with the specific line that justifies each score.

Why it worksForces evidence behind each judgment.

Prompt 09

Which parts of this diff would a new team member misunderstand? Rewrite those parts.

Why it worksOptimizes for the reader who has the least context.

Prompt 10

Is this abstraction earning its keep, or is it premature? Argue both sides and give me a verdict.

Why it worksPremature abstraction is the most common senior-engineer mistake.

Prompt 11

Review this for consistency with the rest of the codebase: [context]. Where does it invent a new pattern?

Why it worksConsistency is a real quality attribute, not a style preference.

Prompt 12

What did the author probably not consider? List the edge cases, the failure modes, and the operational realities.

Why it worksFinds the blind spots that the author's context makes invisible.

Prompt 13

Give me the review comments I should post, phrased as questions rather than commands, ordered by importance.

Why it worksQuestion-shaped feedback gets discussed; command-shaped feedback gets resented.

Prompt 14

Is this change too big to review? If so, propose how to split it into reviewable pieces.

Why it worksReviewability is a property of the change, and it can be fixed.

Prompt 15

Review this for hidden coupling: [diff]. What does it now depend on that it did not before?

Why it worksNew dependencies are the most common source of future breakage.

Prompt 16

What is the one change in this diff that, if reverted, would remove the most risk?

Why it worksIdentifies the highest-leverage part of the change.

Prompt 17

Critique this API design from the caller's perspective: [api]. What is awkward, surprising, or easy to misuse?

Why it worksAPIs are judged by their call sites, not their implementations.

Prompt 18

Review this for the things a linter cannot catch: naming, structure, wrong abstraction, missing error handling.

Why it worksFocuses the review where human judgment is actually required.

Prompt 19

If you had to approve or reject this change in thirty seconds, what would you look at first and what would decide it?

Why it worksModels the triage a busy reviewer actually performs.

Prompt 20

Write the review summary I would give in a design review: what is good, what is risky, what must change before merge.

Why it worksProduces a structured verdict rather than a list of nits.

PRACTICE · 20–30 MINUTES

Try it on a project you actually own.

Take a recent diff. Run prompts 1, 3 and 8. Turn the findings into review comments phrased as questions, ordered by severity.

  1. Pick one prompt from this module that matches a real task.
  2. Replace every bracketed slot with context from the feature you are working on now.
  3. Attach only the files the agent needs. Keep secrets, credentials and personal data out of the chat.
  4. Ask for the artifact — a spec, diff, test, runbook or decision note — and the evidence that it works.
  5. Record what changed and what remains unverified in the repository.

Want the same prompts across every module? Search the full prompt library or return to the course overview.