Skip to the stories
AI & ML

Shopify Rebuilt Its Mobile App in 12 Weeks by Redesigning the Engineering Workflow

  • John Johnson
  • 573 reads

Thirty engineers moved Shopify’s 300-plus-screen app to Swift and Kotlin, using agent-focused tooling and smaller checkpoints to improve speed, size and memory use.

Shopify Rebuilt Its Mobile App in 12 Weeks by Redesigning the Engineering Workflow

Shopify’s mobile rewrite took 30 engineers 12 weeks, but the central change wasn’t simply replacing React Native with Swift and Kotlin. The team redesigned how it builds, tests and reviews mobile software so coding agents could contribute at high speed without leaving people to sort through an unmaintainable codebase.

A Shopify airplane being rebuilt in flight with mobile app screens and robotic tools.

The work covered an app with more than 300 screens, along with home and lockscreen widgets, an Apple Watch app, complications and Siri Shortcuts. Agents wrote most of the implementation. Engineers spent much of their effort shaping the architecture and tools that directed that output, checking behavior, reviewing changes and deciding what was ready to ship.

That distinction matters for teams considering agent-assisted development. Faster code generation doesn’t automatically mean faster delivery. Once implementation sped up, the constraints shifted to test machines, continuous integration, code review, merging and coordination. Shopify’s experience suggests that the useful unit of change is not a huge agent-generated feature, but a small step that can be checked quickly against a working product.

Build the feedback loop before scaling implementation

Before migrating screens, a small group prepared the architecture and development workflow. The goal was to make the app legible to agents and to give them a short route from a code change to evidence about whether it worked.

In the old workflow, an agent had to build the app, start a simulator or emulator, navigate to a screen, capture images, interpret the result, change the code and try again. Each round took several minutes. It also depended on visual navigation and product context that wasn’t available directly in the code, both awkward tasks for an agent to repeat reliably.

The redesigned workflow lets agents exercise much of a screen without booting a device. A command line tool can load a ViewModel, trigger actions and inspect state; deterministic checks can run in milliseconds. That makes each attempt cheaper and lets agents work through more, smaller corrections.

The architecture behind this approach is called Reflex. It exposes screen state and actions through ViewModels and provides a command line interface for loading and exercising them. Business logic can run without a device, while examples and project rules give new work a recognizable shape. Shopify also built Helix, an internal tool that breaks a migration into checkpoints and compares the new implementation with the existing app.

The surrounding system includes shared patterns for iOS and Android, guidance in architecture documents, examples for new screens, lint rules, test fixtures and repository checks. The intended effect is practical: if an agent drifts from the expected structure, a check should identify the problem before a person has to find it during review.

For a human engineer, some architectural expectations can live in experience and team habits. Agents need those expectations made explicit—in file organization, names, state models, method signatures, command line output and test results. The architecture has to guide implementation, and the workflow has to show when the output falls short.

Shopify’s framing is straightforward: speed came from making the work smaller and the feedback faster, rather than asking agents to make larger changes in one attempt.

Small cross-platform teams owned product areas

Around 30 engineers worked in pairs, with each pair responsible for an area of the app on both platforms. The partners usually worked together for much of the day and directed several agents at once. Agents continued working overnight and on weekends, leaving the pair with a queue of changes to inspect each morning.

The team organized around product areas instead of dividing into separate iOS and Android groups. That gave each pair end-to-end ownership of a part of the app and kept product behavior, platform implementation and review decisions close together. Agents supplied much of the implementation capacity; people remained responsible for the architecture, intended behavior and final judgment.

One tradeoff was a deliberate preference for matching architecture over platform-specific idiom. Some code may look less natural to an iOS or Android specialist working only on that platform. In return, screens share a structure, the same product change can be submitted across both platforms, and engineers can review work on the platform they know less well by comparing it with its counterpart.

Shared architecture also makes examples reusable and lets tests exercise the same merchant journey on iOS and Android. Shopify says its continuous integration checks fail when the platforms diverge in ways the architecture doesn’t allow. In this workflow, consistency serves as a control: it helps people compare intent and gives automated checks a clear pattern to enforce.

The approach has limits. Platform consistency doesn’t make iOS and Android identical, and the team accepts some departures from each platform’s most idiomatic style. The payoff depends on product behavior being shared and on both implementations continuing to follow the common structure.

The existing app became the behavioral reference

Shopify first tried writing a specification for each screen and asking agents to implement it. The documents quickly lagged behind the work: by the third checkpoint, details written for the first could already be incomplete or incorrect. Maintaining a second description of behavior that was already present in the app added overhead.

For this rewrite, the React Native app served as the reference. It already contained the screens’ states, actions, navigation, empty views, loading behavior and edge cases. Helix used that working implementation to divide migrations into small checkpoints and check each new step against the product people already used.

That changes the agent’s task from inventing a screen based on a document to converging on observed behavior. A live reference can reveal details that are easy to omit from a written specification, particularly as a screen moves through different states. The team’s conclusion is specific to migration work: when an existing product defines the target, a working example can be more useful than a separate document that has to stay synchronized.

New features are a harder case because there is no existing screen to match. Shopify identifies that as an unresolved challenge. Teams building something genuinely new still need a way to express intended behavior and judge whether an implementation is correct.

Guardrails made agent output reviewable

Shopify describes its approach as a rejection of “vibe coding”: giving an agent a broad request and hoping the resulting code is good enough. The team’s workflow instead asks three questions of each change: does it follow the architecture, does it behave like the current app, and can a person understand its intent without inspecting a huge diff line by line?

Different checks serve different purposes. Architecture guidance, examples, lint rules and platform divergence checks shape the code. Helix and the existing app provide a behavioral reference. Small checkpoints and changes that include both platforms help people assess intent.

The distinction between written guidance and an enforced rule is central. A document can explain why a pattern matters; a repository check can determine whether a change follows it. Agents need both directions and a way to discover when they’ve gone wrong.

Before a human reviewer sees a change, an agent performs an adversarial review against the architecture guidelines. That pass is meant to catch clear problems early. The human reviewer still assesses intent, architectural fit, product behavior and whether the change belongs in software used by millions of merchants.

People can’t inspect every line of vastly more code at the same rate it is generated. Shopify’s response was to constrain the size and shape of the work: each pull request handles a small checkpoint, not an entire screen, and changes for iOS and Android arrive together. A reviewer can compare the two implementations side by side instead of reconstructing the same behavior from separate changes.

Review comments also became input to the system. At the end of each day, an agent collected that day’s feedback and used it to update the team’s skills and architecture guidance. A correction made once could then guide later work across the migration. Shopify says the number of requested changes per pull request fell over time as those patterns accumulated.

Faster coding exposed new constraints

Once agents could write code quickly, implementation stopped setting the pace. The team encountered several downstream limits, each capable of turning faster coding into a longer wait elsewhere.

Machines and emulators

Agents still need computing capacity for compilers, build caches, emulators, user interface tests and visual checks. A laptop running several agents and emulators can run short of processor time, memory and disk space. Shopify found that one engineer managing three agents could saturate a laptop, so it built a remote development environment for agent work.

The practical lesson is that development infrastructure must match the number of parallel tasks. Without enough machines, faster agents simply queue behind local builds and emulators.

Review and integration

Code written in minutes can take days to merge if people can’t review it responsibly. Shopify still requires human review for every pull request, with an agent review first and small checkpoints to keep each change readable.

Merging also became active engineering work. Agents now rebase branches, resolve conflicts, investigate continuous integration failures and help repair flaky tests. With more checkpoints in flight, the merge queue is part of the development system. Increasing pull request volume without improving the process that moves changes through the queue would shift the waiting time from implementation to integration.

Coordination and ownership

Work can move faster than the team’s tracking system. A bug might appear in a Slack discussion, get assigned to an agent and produce a pull request before anyone creates a ticket. Shopify also built a crash-repair loop that runs every 15 minutes. When it finds a new crash, the Slack agent River reproduces it in the remote environment and opens a pull request. A person may first hear about the issue when there’s already a proposed fix to assess.

That flow can reduce the delay between a crash and a repair attempt, but it creates a coordination problem: several engineers and their agents might start fixing the same issue at once. Shopify has not found a tool that fully replaces its ticket board. For now, assigning ownership by app area gives teams a straightforward way to route issues and limit duplicate work.

This is the pattern the rewrite exposed. More generated code meant more checkpoints, fixes, parallel work, review, integration and decisions. The scarce resource shifted from producing code to deciding which changes should exist and getting them safely into the app.

Engineers spent more time shaping the system

Agents took over more of the mechanical work of turning an instruction into code, but they didn’t remove engineering responsibility. Engineers spent more time designing architecture, writing examples agents could follow, building feedback loops, reviewing intent and debugging the systems around implementation.

Reflex, Helix, remote development, cross-platform ownership and the review process work as parts of the same system. The aim is to give agents useful tasks while keeping the resulting code understandable and maintainable. An engineer managing several agents may be solving more problems at once, but many of those problems concern how work gets checked, coordinated and shipped.

What changed for merchants

The rewrite moved Shopify Mobile from React Native, running on the New Architecture, to native Swift and Kotlin apps. Users weren’t asked to take action; they stayed logged in and retained their preferences. From their perspective, the app updated and continued working.

The performance figures Shopify reports show improvements across launch time, download size and memory use. On Android, median launch time fell about 50%, from 1.71 seconds to 0.87 seconds. On iOS, it fell 14%, from 0.70 seconds to 0.60 seconds.

The Android app’s binary shrank 40%, from 80.4 MB to 47.6 MB. Median Android memory use fell from 470 MB to 200 MB—roughly half its previous level. On iOS, median peak memory dropped by more than 70%, from 730 MB to 190 MB.

Android app download size drops from about 80 MB to about 48 MB.
Android memory usage falls over time, shown at P50 and P75.
iOS peak memory drops from about 730 MB to about 190 MB across app versions.

The native implementation also gives the team direct access to platform transitions, animation behavior and page conventions without working around a cross-platform abstraction. Shopify says that let it support iPhone Duo on its first day of availability.

Stability improved on Android: crash-free sessions rose from 99.66% on React Native to 99.98% on the native app. Shopify says iOS remained above its 99.95% target. The automated crash loop adds another route from detection to a proposed code change, though a human still has to assess the change before it ships.

There’s also an internal development benefit. Because screens expose their state and actions through inspectable ViewModels, agents and engineers can validate much of the app without launching a simulator. Shopify says anyone there can use River to build and check a mobile change. That capability supports ongoing development; it isn’t a substitute for human judgment about product behavior and release quality.

What other teams can take from the rewrite

Shopify’s experience points to a few practical choices for teams preparing to use agents on an existing app. First, build a fast way to exercise business logic without a device. A short feedback loop makes small corrections cheap and keeps agents from relying on brittle visual navigation for every attempt.

Second, turn important architecture rules into examples, tests, lint checks or continuous integration failures. Guidance that exists only in a document is easy to miss and hard to enforce consistently.

Third, break work into checkpoints small enough for a person to understand. An agent doesn’t need to produce a flawless first pass if it has a clear reference, a manageable next step and a quick way to tell whether that step improved the result.

Where product behavior is shared across platforms, a common architecture can make code easier to compare and review. That choice brings a style tradeoff: some implementation details may be less idiomatic to platform specialists. Teams need to weigh that against the value of shared patterns and cross-platform review.

Finally, plan for the bottleneck to move. More code generation increases demand for compute, continuous integration capacity, review time, merge support and clear ownership. If tickets can lag behind work, teams need another reliable way to decide who handles an issue. Agent review can catch problems early, but people still need to judge whether a change is correct and belongs in the product.

Shopify’s rewrite shows what changed when agents became a major source of implementation: the engineering system around the code became a larger part of the work. The app’s reported performance gains are concrete, but sustaining them will depend on keeping architecture, validation and coordination in step as tools and workflows change.

Source: John Johnson · shopify.engineering

From the same set