Skip to content
Advanced capstoneVerified 2 Nov 2026

Capstone: ship a reviewed change

One small shop, two issues and an agent pull request that looks finished. Your job is to ship what's right, not what's green.

Tests before code
Turn every test.todo into a real test and commit them first. That commit is your proof that the tests defined the work, not the other way round.
Choose deliberately
Plan with a reasoning-strong model; implement with a fast one once the contract is fixed. Record why.
Review the whole diff
The proposed agent PR says "All tests pass ✅". Check what it changed in the tests, not just whether they pass.
Evidence, then decision
Commands, outputs and reasoning a reviewer can re-run, ending in accept, accept with changes, or reject.

Worked example: Reading the agent's PR hunk by hunk

proposed/agent-patch.diff fixes rounding, adds fixed coupons and "simplifies validation".

Before

before
- if (coupon.expiresAt && now >= new Date(coupon.expiresAt)) {
-   throw new Error(`Coupon ${coupon.code} has expired`);
- }
+ switch (coupon.type) {
…
-test("expired coupon is rejected", () => { … });
+test("fixed coupon", () => { … });

After

after
| Hunk                         | Decision | Evidence                         |
|------------------------------|----------|----------------------------------|
| Math.floor → Math.round      | Accept*  | $1.15 → 115¢ (*per-item cents)   |
| switch without expiry check  | Reject   | check:boundaries: expired passes |
| fixed: return amountCents    | Reject   | 1793¢ off 289¢ → total −1504¢    |
| delete expired-coupon test   | Reject   | removes a passing safety test    |

Why it works: The suite is green only because a safety test was deleted. Reviewing per hunk, with a command as evidence for each decision, turns "looks fine" into a defensible call.

Ready to merge?

The agent's summary is accurate as far as it goes: the tests do pass. The two things it doesn't mention (expiry removed, discount uncapped) are exactly what a customer or finance team would notice first.

Lab setup

Folder: capstone/ in the labs download.

  • Node.js 22+ (tested on 22 and 24), Git and VS Code with GitHub Copilot. No network or accounts.
Terminal
cd capstone && git init -q && git add -A && git commit -qm baseline
npm run verify   # expect 1 PASS, 3 FAIL

When you're done, npm run verify prints:

Expected result
PASS  1. All tests pass
PASS  2. Acceptance tests written (0 todo left, need 0)
PASS  3. Money and coupon boundaries hold
PASS  4. SUBMISSION.md complete with a decision

Review rubric

Score each line 0 (missing), 1 (partly there) or 2 (as described). Passing verify is necessary, not sufficient.

Rubric for capstone
Criterion2 points means
Task correctnessIssues and boundaries pass (npm run check:boundaries)
Acceptance test coverageTests committed before code; negative cases included
Minimal diffOnly the lines the task needs; no weakened tests
Tool and permission disciplineMode, tools and approvals chosen and justified
Source verificationProduct claims link official docs with a checked date
Risk identificationSeeded bad change found, explained and rejected with a test
ReproducibilityNode version, commands and expected output; same result for a reviewer
Clarity of review evidenceAccept/reject reasoning for each part of the agent output

Safety note

Keep terminal approvals manual for the whole capstone and don't paste real customer data into chat.

Pro

Lab repository and walkthrough

The capstone/ practice repository with npm run verify, a reference solution, and a step-by-step walkthrough.

  • Seeded shop repository, issues and the agent's proposed patch
  • Boundary checker and reviewer reference tests
  • Model submission scored against the rubric

One payment, lifetime access. $29 $19 launch price.

Try it yourself· about 150 min

Complete the capstone and score it against the eight-criterion rubric (pass: 12 of 16, no zeros in correctness, permissions or risk).

  1. Write the contract and acceptance tests; commit before any code change.
  2. Plan with Copilot, review the plan, then implement with approvals on.
  3. Apply proposed/agent-patch.diff on a branch and review it hunk by hunk.
  4. Run npm run verify, fill SUBMISSION.md and record your decision.

You should see: Four PASS lines, a completed SUBMISSION.md with a decision, and a rubric score of at least 12 of 16.

Knowledge check

Get every answer right to complete this module. Progress is saved in this browser only.

1. An agent PR says "All tests pass ✅". What do you check first?
2. Part of the agent's patch is good and part removes a safety check. Best decision?