# Rebuilding the Shopify Mobile App with AI Agents in 12 Weeks

How Shopify transitioned to native Swift and Kotlin using agentic workflows and automated guardrails.

- **Source:** [Shopify Engineering](https://shopify.engineering)
- **Published:** 2026-11-10
- **Topic:** [technology](https://brifing.si/c/technology)
- **Original article:** <https://shopify.engineering/shopify-app-rebuild>
- **On Brifing:** https://brifing.si/s/d62c5b66-3d4b-4b79-a670-69775e84e8da

## Massive Migration Project

Shopify successfully migrated its entire mobile application from React Native to native Swift and Kotlin in just 12 weeks. The project involved 30 engineers and covered over 300 screens, including complex features like home screen widgets, Apple Watch complications, and Siri Shortcuts, all while maintaining a seamless experience for existing merchants.

## Agent-Centric Development

The core of this migration relied on AI agents writing the majority of the codebase. Engineers shifted their focus from manual coding to designing the architecture, tooling, and feedback loops that guide these agents. This transition required rethinking how mobile apps are built to ensure agents produce clean, consistent, and performant code.

## Architectural Guardrails

To prevent agents from generating unmaintainable code, Shopify implemented strict architectural guardrails. These include visible file structures, clear naming conventions, and automated lint rules. By embedding these constraints directly into the workflow, the team ensured that agent-generated output remained consistent across both iOS and Android platforms throughout the entire migration process.

## Fast Feedback Loops

The team replaced slow, visual-based testing with a rapid feedback loop. Agents can now load ViewModels from the terminal, trigger actions, and run deterministic checks in milliseconds without starting an emulator. This efficiency allowed the team to iterate quickly, making the rapid migration possible by catching errors before they reached human reviewers.

## Pod-Based Organization

Thirty engineers were organized into small pods of two, each owning a specific product area end-to-end. This structure provided clear ownership and shared context, which was essential for managing multiple agents simultaneously. By pairing humans with agents, the team maintained high-quality standards while significantly increasing the overall implementation capacity per product area.

## Consistency as Infrastructure

Shopify prioritized cross-platform consistency over platform-specific idioms. By ensuring that iOS and Android ViewModels share the same shape, the team enabled agents to reuse examples and CI systems to detect drift automatically. This approach treats consistency as critical infrastructure, allowing humans to compare intent across platforms and maintain a unified codebase.

## Legacy as Specification

Instead of relying on outdated written specifications, the team used the existing React Native app as the primary reference. A tool named Helix split the migration into small, verifiable checkpoints, comparing new code against the legacy app's behavior. This live reference approach proved far more effective than maintaining parallel documentation for developers.

## Shifting Bottlenecks

As code generation became faster, the bottleneck shifted from writing code to reviewing, testing, and merging it. This phenomenon mirrors Jevons paradox, where increased efficiency leads to higher consumption. Shopify responded by using agents to handle merge conflicts, rebase branches, and investigate CI failures, ensuring that the integration process kept pace with implementation.

## Remote Development Scaling

Running multiple agents and emulators simultaneously saturated local hardware, necessitating a remote development environment. This infrastructure allows agents to perform heavy tasks like compiling and testing without competing for CPU or memory on engineer laptops. This shift was vital to prevent the hardware from becoming a bottleneck in the agentic workflow.

## Automated Review Evolution

To handle the massive increase in PR volume, the team updated their review process. Agents now incorporate feedback from human reviewers into architecture guidelines and skills documentation daily. This creates a self-improving system where the number of requested changes per PR decreases over time, allowing small teams to manage significantly larger workloads.

## Self-Healing Systems

Shopify introduced a self-healing loop that monitors for crashes every 15 minutes. When a crash is detected, an agent reproduces it in the remote environment and opens a PR with a fix. This proactive approach ensures that stability issues are addressed immediately, often before a human engineer is even aware of the problem.

## Performance and Stability Gains

The migration resulted in a fully native app with improved stability and performance. Android crash-free sessions increased to 99.98%, while iOS maintained high stability standards. Merchants benefited from smoother animations and native transitions, all while the app became fully agent-ready, with every screen exposing state and actions through an introspectable interface.

## Sources covering this story

- https://shopify.engineering/shopify-app-rebuild — 

---

_Summary written by Brifing from the original reporting. Copyright in the original article belongs to its publisher; read the full piece at the link above._
