Shopify App Rebuild
- Source
- shopify.engineering
- Author
- Shopify Engineering
- Date
Thirty Shopify engineers moved the company's mobile app from React Native to native Swift and Kotlin in 12 weeks. The app has more than 300 screens plus widgets, an Apple Watch app and Siri Shortcuts. Before migrating screens, a small group rebuilt the architecture so business logic runs without a device, and a CLI can load any screen, trigger actions and inspect state in milliseconds. Before that work, an agent's feedback loop matched a human's: build, start an emulator, navigate and screenshot, at several minutes per iteration. The team chose one architecture for both platforms, accepting less idiomatic code so that each migrated screen became an example for the next and one pull request could carry both platforms. Engineers worked in pairs that each owned a product area across iOS and Android and steered several agents at once, with agents running overnight and leaving a queue of pull requests each morning. Shopify's summary is that it got faster by making the work smaller and the feedback loop tighter, not by asking agents to take bigger swings. Humans kept ownership of architecture, product behavior and the final call on what shipped.

Context
Shopify says about 30 engineers rebuilt its merchant app, Shopify Mobile, from React Native to native Swift and Kotlin in 12 weeks, with agents writing most of the code. The app has more than 300 screens plus widgets, an Apple Watch app and Siri Shortcuts. The post, by Remi Vanhee, ties together a series of Shopify engineering posts that began with Shopify's decision to leave React Native, and its argument is that the speed came from the system built around the agents. In its words, agents "amplify the environment you put them in."
Before any screens were migrated, a small group of engineers built a fast way for agents to check their own work. Previously an had to build the app, start an emulator, navigate to the screen and read screenshots, which took several minutes per attempt. With the Reflex architecture, an agent can load a screen's ViewModel (the object that holds the screen's state and the actions it accepts) from the terminal, trigger actions and inspect the result in milliseconds without a device. iOS and Android share one architecture, so a single pull request changes both platforms and continuous integration fails when they diverge in ways the architecture does not allow. Shopify first tried writing a spec for each screen, but the specs went out of date, so the existing React Native app became the spec: an internal tool called Helix splits each screen into small checkpoints and checks each one against the original app. The post says new features, which have no existing screen to copy, are the next challenge.
Once code was cheap, the slow parts moved elsewhere. One engineer running three agents could saturate a laptop, so Shopify built a remote development environment for them. Every pull request still gets human review, but agents review first against the architecture guidelines, changes arrive as small checkpoints a person can read, and at the end of each day an agent turned that day's review comments into updated rules for the agents. Agents also rebase branches, fix merge conflicts and chase flaky tests. To keep engineers and their agents from fixing the same bug twice, the team split into pairs that each own a product area. A loop now checks for new crashes every 15 minutes, and Shopify's Slack agent, River, reproduces each one and opens a pull request with a fix.
Shopify reports median launch time falling from 1.71 to 0.87 seconds on Android and from 0.70 to 0.60 seconds on iOS, the Android app binary shrinking from 80.4MB to 47.6MB, median memory use dropping from 470MB to 200MB on Android and median peak memory from 730MB to 190MB on iOS, and Android crash-free sessions rising from 99.66% to 99.98%. These are Shopify's own figures, given without methodology. They compare the old React Native app with the new native one, so they describe the result of going native and do not measure what the agents contributed. The post gives no data on review time or defect rates for the agent workflow itself.
- Shopify reports the native rewrite cut Android P50 launch time from 1.71s to 0.87s and Android P50 memory from 470MB to 200MB, and raised Android crash-free sessions from 99.66% to 99.98%.
- The main speedup was a device-free feedback loop: with the Reflex architecture and a CLI, an agent loads a ViewModel in the terminal, triggers actions and checks state in milliseconds, instead of a minutes-long build, emulator and screenshot cycle.
- failed because written specs went stale within a few checkpoints. Shopify used the legacy React Native app as the spec instead, with its Helix tool splitting each screen into small checkpoints verified against the original.
- Shopify kept iOS and Android code deliberately identical in shape, accepting less idiomatic code, so one PR covers both platforms, an engineer can review either, and CI fails when the two diverge beyond what the architecture allows.
- To keep human review feasible, agents review every PR first against the architecture rules, diffs are kept to one small checkpoint, and at the end of each day an agent turned that day's review comments into updated skills and Architecture.md rules.
- AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
- spec-driven development — Writing and agreeing the specification first, then having an agent implement against it — the spec, not the code, becomes the artifact you maintain.
Checking sign-in…
Loading comments…






