Before you start
A coding agent, a small repository and version control. Work on a branch or disposable practice copy.
Why this lesson exists
The code-review posts treat prompts, project rules and tests as part of the product. A coding agent’s confidence is not a substitute for inspecting the change.
Do the exercise
State the behavior
Describe a concrete before-and-after case. Identify the user action, expected response and boundaries. Ask the agent to inspect existing conventions before editing.
Review the proposed change
Request a file-level explanation and the reason for each change. Watch for unrelated rewrites, new dependencies and credentials in client code.
Test the failure that matters
Choose a test that would fail on the original bug or missing behavior. Include one ordinary case and one boundary. Run the project’s required checks.
Inspect and checkpoint
Read the diff, use the interface and record what was verified. Commit the scoped change so you can revert it. Keep untested behavior explicit.
A prompt to adapt
Replace the bracketed parts with your own practice details.
Implement [specific behavior] in this repository. Inspect existing instructions and conventions first. Keep the change focused. Explain the diff, add or run a test that demonstrates the behavior, and report actual command results plus unverified limits. Never put secrets in browser code.
What this looks like
A test that merely checks a button exists does not prove that saving survives reload. Test the user-visible outcome rather than mirroring the implementation.
Check your result
Use evidence from your output. A confident explanation from the AI is not enough.
- The diff matches the requested scope.
- A meaningful behavior check passed.
- A known checkpoint can restore the prior version.
If it isn’t working
If a test passes without exercising the changed behavior, strengthen the assertion. If the agent reports tests it did not run, request actual output and inspect it.
Optional. Progress stays in this browser.
Where this came from
Adapted from the archived LinkedIn theme “Give Your AI a Code-Review Conscience.” See the post coverage and editorial method.
Prepared September 2026. Tools and interfaces change; use current official setup instructions. Session lengths are estimates.