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
- 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
| 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?
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.
cd capstone && git init -q && git add -A && git commit -qm baseline
npm run verify # expect 1 PASS, 3 FAILWhen you're done, npm run verify prints:
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 decisionReview rubric
Score each line 0 (missing), 1 (partly there) or 2 (as described). Passing verify is necessary, not sufficient.
| Criterion | 2 points means |
|---|---|
| Task correctness | Issues and boundaries pass (npm run check:boundaries) |
| Acceptance test coverage | Tests committed before code; negative cases included |
| Minimal diff | Only the lines the task needs; no weakened tests |
| Tool and permission discipline | Mode, tools and approvals chosen and justified |
| Source verification | Product claims link official docs with a checked date |
| Risk identification | Seeded bad change found, explained and rejected with a test |
| Reproducibility | Node version, commands and expected output; same result for a reviewer |
| Clarity of review evidence | Accept/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.
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).
- Write the contract and acceptance tests; commit before any code change.
- Plan with Copilot, review the plan, then implement with approvals on.
- Apply proposed/agent-patch.diff on a branch and review it hunk by hunk.
- 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.