A step-by-step plan for a major framework upgrade with Claude
The struggle: A major framework upgrade is overdue, the migration guide is endless, and nobody knows what will break until it does.
What you end up with: An ordered upgrade plan with each breaking change mapped to your files, and each step small enough to merge alone.
Give Claude Code the official migration guide and your repo in plan mode. It maps each breaking change to the files you actually use, then splits the upgrade into steps that each keep the tests green.
Tools: Claude. Level: Pro. Time: 2 hours for the plan.
Use it if
- You are one or more major versions behind
- The migration guide lists dozens of changes and you use few
- You want to upgrade in small merges, not one huge branch
Skip it if
- You have almost no tests and no time to add them first
- The upgrade needs a rewrite, not a version bump
What you need first
- Claude Pro or higher
- Claude Code installed and the repo cloned on a branch
- The vendor's migration guide saved as a file
The method
Start in plan mode on a branch (Claude: Claude Code)
Create a branch, run claude --permission-mode plan in the repo, or press Shift+Tab until plan mode on shows. Save the official migration guide for your target version as a text or markdown file in a folder inside the clone that you will not commit.
Prompt to copy:
Open the repo and check the branch with git status. Then list the package or build files that pin the framework version, the current version and the target version, and the folders that use the framework most. Make no edits.
You get: A read-only session with the guide next to your code.
Tip: Use the vendor's own guide and release notes, not a blog summary.
Map breaking changes to your code (Claude: Claude Code)
Reference the saved guide with @ and ask for a table of each breaking change against your files.
Prompt to copy:
Read @[path to migration guide]. For every breaking change or removed API, search this repo and report: change, used or not used, files and line counts affected. Mark anything you cannot tell as UNCLEAR. Quote the guide's wording for each change. Do not edit files.
You get: A table of changes: used, not used, or unclear, with file names.
Tip: Ask it to say not used when it finds no match. If the guide is long, split it into one file per section so each @ reference loads whole.
Check what protects you (Claude: Claude Code)
Ask which of the affected areas have tests and which do not. The unprotected areas get tests first.
Prompt to copy:
For each affected area, list the existing tests and say which behaviours are untested. Propose the smallest tests to add on the current version before upgrading. Keep it to a prioritised list.
You get: A list of tests that exist and gaps to fill before the upgrade.
Tip: Run the test suite on the old version first so you know the starting state.
Write the stepwise plan (Claude: Claude Code)
Ask for a plan where each step can be merged and released alone, including intermediate versions if the guide recommends them.
Prompt to copy:
Write an upgrade plan from the current to the target version. Each step must leave the app working and tests green. For each step give: what changes, files, how to verify, how to roll back. Put dependency bumps, deprecated warnings and big API moves in separate steps.
You get: A numbered plan with a test and a rollback note for each step.
Tip: Ask for a stop point after every step where you run tests and read the diff.
Do step one and review it (Claude: Claude Code)
Exit plan mode, ask Claude to do only step one, then run the tests yourself and read the whole diff before committing.
Prompt to copy:
Do step 1 of the plan only. Make the smallest change, run the tests, and show me the diff and the test output. Stop and wait for my review before anything else.
You get: One merged step and proof the method works.
Tip: Roll out to staging before production, and ship after each step.
Where this goes wrong
- Claude can misread a guide. Verify each breaking change against the vendor's own page.
- Never let one step change versions and refactor code together.
- Review every change before it is committed and keep .env files and credentials out of the session.
- Deploy to staging first and keep a rollback ready.
Sources
- Claude Code docs: Common workflows (plan mode, refactoring)
- Claude Code overview
- Claude pricing (Claude Code from Pro)
More like this
- An incident timeline rebuilt from your git history
- Agent pull requests checked before a human merges
- A tracking plan that cleans up your event names
Updated . Written with AI help and checked by an independent review step, as described in our editorial standards.