*takes a deep breath*
y'all know that if someone shows you a demo comparison of an app but they don't own the source code of that app...
...the demo is just faking the app?
feels like some folks need to hear this said clearly 🙃
We've rebuilt the @Shopify app in Kotlin and Swift in 12 weeks.
∙2x faster cold start on Android
∙40% smaller Android binary
∙57% less memory on Android
∙74% lower peak memory on iOS
https://t.co/yhhUDjcCY3
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://t.co/DKfIOKznQL
Following Shopify's post on Reflex, I built a small native weather app from scratch in Swift and Kotlin to try the architecture.
All the logic lives in a UI-free Core, so one CLI drives both the SwiftUI and Jetpack Compose apps with the same commands. No taps.
This has been the most ambitious architecture I've had the pleasure to work on, and the benefits are huge.
Having agents follow strict patterns that would be tiresome for human developers, was the biggest contributor to its success. Software engineering is back baby!
We rebuilt our mobile apps in Swift and Kotlin with agents. To keep pace and hold our quality bar, we built Reflex: an agentic-first architecture that lets agents build and verify app behavior across iOS and Android without needing devices or simulators.
Here's how it works, piece by piece:
https://t.co/Eaxae98QXS
When we decided to rebuild one of our biggest apps natively, we went back to the drawing board with a basic question: how should a mobile app be built when agents write most of the code?An agent can write code in seconds, but it takes several minutes to test whether it works.
So we built Reflex: an agentic-first architecture that lets agents build and verify app behavior across iOS and Android without needing devices or simulators.
https://t.co/IL6suWAQkK
@ephemeralapps@Mpapous@mustafa01ali Because this is not connected to the UI in any way. What you see on the simulator is the UI reacting to state, not UI driving state.
@Mpapous@mustafa01ali You're correct in that it won't validate a button action is connected to a navigation action, but there are separate tests for that. We can cover 99% of edge cases, even performance (FPS, ui jitters, scrolling, tti). We also still interact with our app daily for "feels" testing.
@janicduplessis@mustafa01ali No taps. It has access to the state and available actions encoded in the architecture. By reading internal state and executing actions you can validate business logic. The CLI acts a an alternative UI component.
@janicduplessis@mustafa01ali No taps. It has access to the state and available actions encoded in the architecture. By reading internal state and executing actions you can validate business logic. The CLI acts a an alternative UI component.
It doesn’t matter how good an AI model is if it can’t test its work quickly and reliably. That’s especially hard on mobile.
Traditional approaches rely on screenshots or the accessibility tree, making feedback slow and brittle. Agents can change code in seconds, then spend minutes trying to test it.
In our new mobile apps, business logic runs headlessly. Agents can inspect state, navigate, and act through a CLI in milliseconds, without a simulator. When they need to test the app, the same CLI drives the simulator directly.
The video is real time.
@grabbou We built the CLI described in this post for this exact reason. We share the tests, not the code. You literally cannot ship code that only works in one platform in this model.
Yep. Except:
1. This was about important internal tools. The team was stuck in some architecture nightmare of their own doing (writing it in rails but headless, with graphql api, and a SPA react app, constantly needing frontend engineers for changes). I call this kind of thing 'cosplaying an enterprise production app'. All that complexity was in the way and using straight rails was perfect in that case.
2. I make calls like this all the time. Usually someone on the team asks me to. They see what needs to happen but don’t want to be the bad guy. I’m happy to just make the call if I agree with the premise. Saves enormous amounts of meetings and change management etc. Sometimes this is jokingly referred to as Founder-mode-as-a-service here.
3. For ten years I’ve also run an internal podcast called Context, where I revisit decisions like these and explain the reasoning so everyone can learn from them. This is helpful to give people all the variables that were considered and why this was the choice made given the information available at the time. I want to teach how to make such decisions effectively without needing me. Sunk cost fallacy is a problem.
4. Any notions that Shopify is succcessful despite of me doing this, instead of because of it, will have a hard time making their argument come together I think 😄
the part of 'two weeks later tobi learns about...' is nonsese and the pivot of that project up there happens one of the more successful examples of interventions. But getting the company to work effectively with great architecture and low technical debt baggage into the right direction is literally the job, so guilty as charged I suppose.
But there are always cope stories floating around like this because they are more fun, than saying 'somehow we needed tobi to stop doing silly architecture astronautics'. I can totally see that.
Hot reload was great when you actually had to analyze every code change you make. With agents in parallel, it loses a lot of its appeal.
That's why we built a CLI.
Hot Reload is great. But this isn’t a return to five-minute waits for every change. As described in the post, most business logic can run headlessly through the CLI on desktop with fast feedback loops. For UI work that still requires app builds, agents can run those workflows in parallel instead of blocking a developer on each iteration.
We’ve never relied on OTA updates at Shopify, so this isn’t a capability we’re giving up. They’re useful, but we can get critical fixes out pretty quickly.
Another reminder that we’re at the early stages of AI. I expect many more optimizations like that in the very near future. That’s how LLMs can scale at a sustainable rate.
Gisting is how we reap the behavioral advantages of a long prompt at the cost of a short one.
We outline our implementation on Eng Blog: https://t.co/Wt2cwAoEmZ