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.

Plan mode makes exploration safe: Claude reads and reasons with editing off until you approve a plan, so scoping happens before the first line of code changes.
Red tests plus a written spec are the cheapest contract enforcement there is: the fix is done exactly when the suite is green and the contract files are byte-identical.
An independent review by a second instance catches what the implementer's context cannot: the reviewer reads the spec fresh instead of inheriting the assumptions that produced the bug.
Machine-generated evidence (a real test run and a real diff) is what makes a fix claim credible; prose that says the tests pass proves nothing.

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

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

Do I need two Claude Code sessions to finish this?

Yes, and that is the point of the exercise. The implementer session explores in plan mode and lands the fix. The reviewer is a fresh instance (a new session or a one-shot `claude -p` call) that reads the spec and the change without the implementer's context. The kit's plan_review_guide.md includes a ready-made reviewer prompt.

What exactly gets graded?

Five things: machine-generated evidence that all 8 tests pass against your fix, checksum proof that the tests and spec were never edited, your approved plan.md, the size and focus of the diff embedded in the evidence, and the quality of the independent review.md. The rubric on this page lists the weights and pass hints.

Can I just fix the bug and skip the plan and the review?

The fix alone tops out around 55 of the 100 rubric points, below the 65 pass threshold. plan.md and review.md are graded deliverables with their own criteria, and check.py stays red until both exist with real content, so the CLI will tell you before you submit.