Why platform engineering matters more when AI writes the code
Not long ago, a pull request on my team usually meant a person had spent a day or two on it. Now it often means an assistant spent a few minutes, and a person spent a few more checking. For most of my career, the scarce thing on a mobile team was someone to write the code. That's no longer true, and most of our habits haven't caught up. So the question I keep coming back to is this: if code is cheap, what is expensive?
My answer is everything the code gets written inside. The module boundaries, the shared core, the build, the checks, the examples worth copying. That is platform engineering, and I think it matters more now than it did when people typed every line.
Volume went up. Review didn't.
A team that used to open ten pull requests a day can open thirty. The number of people who can review them carefully is the same as last year. Something has to absorb the difference, and it can't be attention, because attention doesn't scale.
What scales is a rule the build enforces. A dependency check doesn't get tired at 4 p.m. A structure test gives a generated diff the same answer it gives a hand-written one. Every rule you move out of a reviewer's head and into the platform is review capacity you get back.
Agents copy what they find
A model writes new code by imitating the code around it. Give it a clean, modern feature to look at and you get more of that. Give it a codebase where three patterns coexist and it will pick one, often the oldest.
That makes the quality of your reference code a multiplier in a way it never quite was with people. A new hire asks which pattern is current. An agent doesn't ask. So someone has to decide what the golden path is, keep one example of it spotless, and say plainly which code is legacy. That someone is doing platform work.
The feedback loop is the new speed limit
When a person writes the code, a four-minute build is annoying. When an agent writes it, a four-minute build is the whole cycle time, repeated on every attempt. An agent that gets an answer in seconds corrects itself several times before you've finished your coffee. One that waits minutes guesses, and the guesses pile up.
The things that make the loop fast are old platform concerns: small modules, a build that caches properly, tests that run on the JVM, screenshots that don't need an emulator. Modularization used to be sold on team ownership. It now has a second return, and it's a large one.
Duplication got cheaper to create and no cheaper to own
Ask an assistant for a validation rule and it will write you one, on Android and again on iOS, a little differently each time. Writing it twice costs nothing now. Keeping the two copies in agreement costs exactly what it always did, and you only find out they disagree when a customer does.
A shared core is the answer to that. If the rule lives in one Kotlin module and both apps call it, there's nothing to keep in agreement. The cheaper code gets, the more a single source of truth is worth.
Make every rule teach
A check that only says "no" slows everyone down. A check that says what broke, why the rule exists and how to fix it is different. An engineer reads it once and learns the architecture. An agent reads it and usually fixes the problem on the next attempt, without anyone stepping in.
> Task :feature-checkout-ui:checkModuleGraph FAILED[ARCHITECTURE] :feature-checkout-ui cannot depend on :feature-cart-data.Why: other features see only cart's contracts, so its internals can change without breaking checkout.Fix: depend on :feature-cart-domain and use the CartRepository interface instead.I hold every guardrail to that standard. If the failure message wouldn't make sense to someone on their first week, it isn't finished. The message is the documentation that actually gets read, because it shows up at the exact moment someone needs it.
What the work looks like now
None of this is glamorous, and most of it isn't new. The emphasis has shifted.
- Writing down how the codebase works, in a file short enough that an agent and a new engineer will both read it.
- Turning the rules that matter into build failures with messages that say how to fix them.
- Packaging the jobs people repeat, like adding a feature module, so they come out the same every time.
- Guarding the loop: build time, test time, and the single command that verifies a change.
- Owning the shared layers that every feature and every generated change will sit on.
How to tell it's working
Platform work is easy to do forever and hard to judge. These are the signals I watch, and none of them need a dashboard project to start:
- Where problems get caught. Count convention and boundary issues found by the build versus found in review. The first number should grow while the second shrinks toward zero.
- Time to a verdict. How long it takes from a change to a trustworthy pass or fail, for one module. That is the loop agents and engineers both live in.
- First-attempt pass rate. How often a generated change passes verification without a human stepping in. If it's low, the context or the error messages need work, not the model.
- What reviewers talk about. If review comments are still about imports and naming, the platform hasn't absorbed them yet. Reviews should be about design, product and risk.
Where not to over-invest
This can go too far. A platform that encodes every preference becomes its own bureaucracy, and people route around it. A few rules I keep for myself:
- Encode boundaries, not taste. Dependency direction and visibility deserve a build failure. Naming style and formatting belong to a formatter, not a debate.
- Wait for the second consumer. A shared component used by one feature is just indirection. Share it when a second team needs it.
- Keep the rule list short. A handful of rules people understand beats fifty they resent. Every rule should map to a real incident or a real cost.
What I'd tell a team starting today
Don't start with the model or the prompt. Start with one boundary that hurts when it's broken, and make the build enforce it. Then make the check fast. Then write down the pattern you want copied. Each of those helps the engineers on the team this week, with or without an assistant.
The decisions about where the boundaries go still belong to people. So does the threat model, and so does knowing whether the product feels right. Those were always the hard parts. What has changed is that a good platform now reaches every line of code that gets written, including the ones nobody typed.