Run the official upgrade script, then fix what it missed
The official upgrade script applied in one commit, then the cases it cannot handle fixed by hand in another.
The ticket
Apply the vendor's codemod, then fix by hand every case it could not transform.
Acceptance criteria
- The codemod runs in its own commit with no manual edits mixed in
- Cases the codemod skipped are fixed in a following commit
- The suite passes after both commits
- Anything the codemod changed incorrectly is called out in the description
What lands as proof
Two commits a reviewer can read separately: the mechanical transform, then the judgement calls.
Why teams defer it
- Mixing the codemod output with hand edits produces a diff nobody can review, so reviewers wave it through and defects land.
- The codemod covers most cases and leaves the interesting ones, which is exactly the part that needs a person and a plan.
Questions
- What does the agent actually change?
- The ticket is scoped to one outcome: apply the vendor's codemod, then fix by hand every case it could not transform. Work that serves that outcome is in scope, and anything outside it is left for a separate ticket, so the pull request stays reviewable.
- How do I know the work is done?
- The pull request carries the evidence, not only the diff. Here that means codemod commit kept separate from the manual commit, so a reviewer can confirm the result without reproducing the work locally.
- How much oversight does this need?
- The run stops once the plan is written. Somebody reads the approach and approves it before any code exists, which is the cheapest moment to redirect the work.