Build & submit taskBetaintermediate

Plan It, Fix It, Get It Reviewed: Plan Mode, Red Tests, and a Second Claude Instance

Take a small fare calculator with two red tests and a subtle one-cent rounding bug and drive the full professional loop in your own Claude Code: explore read-only in plan mode until you approve a written plan, land a minimal fix, then hand the change to a second Claude instance that verifies it against the spec. A local self-check proves the tests really pass, proves the spec and tests were never edited, and captures the real diff of your fix as evidence.

1.3 hrs

Est. time

4

Outcomes

5

Rubric criteria

65%

Pass score

What you'll learn

Skills you'll have real reps in after shipping this.

The scenario

You inherit faretab, a transit fare calculator, and finance reports that some daily totals drift by exactly one cent. The good news: the pricing rules are written down in a spec, and two failing acceptance tests already pin the correct cent-level behavior. On a real team, typing the fix is the easy part. The discipline around it is what gets fixes merged: scope the change before touching code, keep the spec and tests untouched (they are the contract), and get a review from someone who did not write the change.

This task makes you run that discipline with Claude Code as the implementer. You explore the failure read-only in plan mode until you approve a plan and capture it as plan.md. You let Claude land the fix in faretab/fares.py and run the suite to 8/8. Then you bring in a second Claude instance (a fresh session or a one-shot claude -p call) to verify the change against spec.md, and you capture its verdict as review.md. The kit's self-check verifies the contract files byte-for-byte, runs the real test suite, and embeds the actual unified diff of your fix in machine-generated evidence.

Your role

You are the engineer on rotation for the fares service. Your deliverable is the complete paper trail of one professional bug fix: the plan you approved before any code was written, a minimal diff that turns the red tests green without touching the contract files, an independent review from a second Claude instance, and machine-generated evidence of the passing run.

Start the task to unlock the full brief

You'll get the step-by-step requirements, setup commands, the 5-criterion grading rubric, tips, and the ability to submit your solution for instant AI grading.

Free to start · submit when you're ready

Learning resources

Practice the plan-first, test-driven Claude Code workflow on a real bug

Plan mode, red tests, and an independent second review turn Claude Code from a fast code generator into a supervised engineering workflow, and this task makes you run the whole loop on a real repo. You start from a small fare calculator with two failing tests and a subtle one-cent rounding bug, explore it read-only in plan mode until you approve a written plan, land a minimal fix, and then hand the change to a second Claude instance that verifies it against the spec and renders a verdict. A local self-check proves the tests pass, proves the spec and tests were never edited, and captures the real diff of your fix as evidence. What you submit is the paper trail of a professional fix: the plan, the diff, the passing run, and the review.

Frequently asked questions