6 Software Migration Lessons from Shopify's 12-Week AI-Assisted Rewrite
Description and use
Shopify migrated a mobile app to a new stack in 12 weeks using AI agents, showing that AI can shorten migration timelines when disciplined: treat legacy as spec, verify behavioral parity, gate plans, and keep humans in review.
Problem
Legacy systems often remain unmodernized due to perceived high cost and complexity, delaying necessary upgrades.
Outcome
Shopify completed a major app rewrite in 12 weeks, achieving behavioral parity, reducing duplication, and simplifying the codebase, all while maintaining human oversight.
Workflow
- Revisit shelved migrations to reassess cost
- Document legacy behavior as the spec
- Build parity checks between old and new systems
- Obtain human approvals tied to content hashes
- Run AI agents in parallel lanes with fast feedback loops
- Simplify and retire unused features during migration
- Plan gradual rollout with feature flags and rollback
Evidence
A team of six at Shopify moved a major production app to a new stack in 12 weeks, with AI coding agents doing most of the porting.
Shopify found that agents work best when there's an existing implementation to use as a reference.
Shopify built an internal tool that captured outputs from both the old and new systems at named checkpoints.
Engineers reviewed requirements and plans before any code was written, and each approval was tied to a content hash.
Shopify ran many agent sessions at once, each in its own git worktree, instead of making one change at a time.
- Record date: 2026-11-03T13:14:07.820Z