Skip to content
View original post on X: meng shao
Published
Pick75/100

Shopify rebuilt its merchant app natively in 12 weeks using agents and verification

AIShopify rebuilt its merchant app from React Native into native iOS (Swift) and Android (Kotlin) apps across more than 300 screens, with 30 engineers over 12 weeks. Agents wrote most of the code, but the team redesigned its architecture, tools, and review process around checking code quickly and reliably.

AIWhy it matters.

The source explains how Shopify rebuilt a 300-plus-screen app with agents, detailing its verification architecture, workflow, and before-and-after performance figures.

meng shaoVerified on X
@shao__meng
View on X

30 名工程师 12 周重建 Shopify 商家 App:Agent 写了大部分代码,团队把功夫花在验证上

来自 @ShopifyEng 分享,团队把面向商家的 Shopify App 从 React Native 重建为 iOS(Swift)和 Android(Kotlin)原生应用,覆盖 300 多个页面。Agent 写了大部分代码,但这不是让模型一次性写完。真正费功夫的,是围绕“怎样快速、可靠地检查代码对不对”,重新设计了架构、工具和流程。
https://shopify.engineering/shopify-app-rebuild

为什么重建,以及动手前先准备什么

Shopify 在系列前文里说,回到原生开发不是因为 React Native 不够快,是 Coding Agent 降低了同一功能做 iOS、Android 两套代码的成本,平台原生能力和第一方工具的价值重新变得更重要。

动手前,一小批工程师先为 Agent 准备了开发环境:一套让两端结构保持一致的内部架构 Reflex;一个不用开手机或模拟器、就能运行业务逻辑的命令行工具;以及偏离规范就会报错的仓库规则。过去 Agent 每改一次,都要编译、开模拟器、看截图,一轮要几分钟;现在多数页面能在终端里直接做确定性检查,几乎立刻得到反馈。为了让两端保持一致,团队接受了一部分代码不那么符合各平台的惯用写法。

他们也试过先写详细规格再交给 Agent,但规格很快就过时了。最后的做法是把正在运行的旧版 App 当作参照:内部工具 Helix 读取旧实现,把迁移拆成一个个便于审查的小步骤,再拿新页面和原应用对照验收。

人怎么把关,结果怎样

约 30 人按两人一组负责不同产品区域,每人同时指挥多个 Agent,Agent 晚上和周末也继续工作。每个 PR 都必须由人审查,但工程师不用逐行读完整个页面的大改动:Agent 先按架构规范互相挑错,工作也拆成双端同时修改的小步骤,人最后判断意图、行为和是否合入。每天结束时,Agent 会把当天的审查意见写回团队的技能说明和架构文档。崩溃监测每 15 分钟运行一次,Slack 里的内部 Agent 可以复现问题并直接提交修复 PR。

按 Shopify 自己公布的数据,用户升级时登录状态和偏好设置都会保留。Android 启动时间中位数从 1.71 秒降到 0.87 秒,安装包从 80.4MB 减到 47.6MB,内存中位数从 470MB 降到 200MB;iOS 峰值内存中位数从 730MB 降到 190MB。Android 无崩溃会话比例从 99.66% 升到 99.98%。

Original, in Chinese
Shopify Engineering@ShopifyEng
What becomes the bottleneck when agents write most of your code? Thirty engineers rebuilt Shopify’s 300+ screen app in Swift and Kotlin in 12 weeks. This meant changing the way we review, compute, merge, and coordinate. Here’s what it took to keep shipping: https://shopify.engineering/shopify-app-rebuild
View quoted post on X
Source details

meng shao · x.comPublished

Original title: 30 名工程师 12 周重建 Shopify 商家 App:Agent 写了大部分代码,团队把功夫花在验证上