Capstone — Ship a Real Refactor
Multi-step quest. Pick a repo you own. Use Claude Code to ship a non-trivial, reviewable refactor end-to-end. Mark it complete when the PR is merged.
This is the test. Pick a repository you actually maintain — work, side project, anything you have commit rights to. The refactor must be real (not a tutorial), small enough to ship in one session, and large enough that you wouldn't have bothered to do it by hand. A few candidates: extract a hook, rename a confusing module, replace deprecated imports across the repo, consolidate duplicate type definitions.
Use the full loop from Quests 1–3. Write or update CLAUDE.md before starting. Use plan mode to scope the change. Watch every diff. Add a hook if anything dangerous comes up. Commit and open a PR. When the PR is merged, mark this capstone complete.
What you're proving: that the agentic loop translates from sandbox replays to real work. Most learners stop one lesson short of this and never build the habit. Don't be most learners.
1. Pick the repo and the refactor
Pick a real repo you maintain. Write down the refactor in one sentence: 'Extract X into Y so Z.' If you can't say it in one sentence, it's too big — pick a smaller one.
VerifyYou have a one-sentence description of the refactor.2. Update CLAUDE.md
Open or create CLAUDE.md in the repo. Make sure it has stack, conventions, commands, never, and gotchas sections. Add anything specific to this refactor that the agent needs to know.
VerifyCLAUDE.md is committed with all five sections present.3. Plan the refactor
Use plan mode. Ask the agent for a multi-file plan before any edits. Read the plan, push back where it's wrong, approve when it's right.
VerifyYou have an approved plan listing the exact files to touch.4. Execute in small turns
Run the plan one file group at a time. Read every diff. Commit at logical points so reverting is cheap.
VerifyThe refactor is implemented across the files listed in the plan.5. Tests, lint, PR
Run the test suite. Run the linter. Open a PR with a clear description of what changed and why. Get it reviewed and merged.
VerifyThe PR is merged into main.