ANTIGRAVITY LABJP
Articles/App Development
App Development/2026-06-30Advanced

Running Xcode 27's Agent and Antigravity Side by Side: Designing the Work Boundary for iOS

With Xcode 27 bringing agentic coding into the IDE itself, iOS development now has two code-writing agents over one repository. Here is a practical design for keeping a single source of truth and splitting work across spec, implementation, and verification.

Antigravity291Xcode3iOS Development2Agent Design5Workflow8

Premium Article

The Xcode 27 developer beta is out, and agentic coding now lives inside Xcode itself. The update pulls strong external models and agents directly into the development flow. It is a welcome change, but if you already run agents through Antigravity, the first problem is not the feature. It is the bookkeeping of a new situation: two agents that can both write code now sit over the same repository.

One of them works inside Xcode, tight against the build and the device debugger. The other works through Antigravity's CLI or IDE, taking on cross-file work and scheduled automation. Run both without drawing a boundary and the same file gets rewritten by two agents, and you lose track of which change is canonical. This article lays out how I design the work boundary when developing iOS across two agentic tools.

Why "who handles it" turns into an accident

With a single agent, the source of truth is never ambiguous. The agent's latest state is canonical. The moment there are two writers, the definition of canonical silently splits in two.

Three accidents are typical. The first is the double edit: Xcode's agent tidies ContentView.swift while Antigravity touches the same file in a refactor, and the save order erases one of the changes. The second is mismatched preconditions: Xcode treats a buildable state as "done" while Antigravity treats a green test suite as "done," producing a half-finished commit that satisfies only one bar. The third is split observability: who changed what scatters across two separate logs, and you can no longer trace the cause of a bug.

None of these is a question of which tool is smarter. They are the cost of not designing a boundary. The first thing to decide is not "who is more capable" but "what counts as the one source of truth, and who is allowed to write to it."

Pin the source of truth to the repository

The first thing I fix is a single principle: the only source of truth is the repository working tree. Both Xcode's agent and Antigravity edit files under the same Git control, and no tool's internal transient state is treated as canonical. It sounds obvious, but agents tend to accumulate context in tool-specific sessions and drafts because it is convenient. Make that canonical and you steadily grow information that the other tool cannot see.

On top of that, I place a shared contract that both agents read on startup, as an AGENTS.md at the repository root. Antigravity picks up this kind of file as context, and having Xcode's agent read it at the start of a session aligns the premises behind both tools' decisions.

# AGENTS.md — rules every agent in this repo follows
 
## source of truth
- Canonical state is this Git working tree only. No tool's draft state is canonical.
- Definition of done: scripts/verify.sh returns exit 0. "Build only" or "tests only" is not done.
 
## ownership boundary
- Preview-linked tweaks and on-device debugging fixes -> Xcode's agent
- Cross-file refactors, scheduled automation, CI wiring -> Antigravity
- Both touching the same file at once is forbidden. Split the branch first.
 
## commit rules
- One commit, one concern. Mark ownership in the subject: [xcode] / [agy]
- Do not push a commit that has not passed verification.

AGENTS.md is not decoration. The shared verification script described below, together with a written ownership boundary, is the spine that places two agents under one discipline.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
How to keep a single source of truth across Xcode's agent and Antigravity using an AGENTS.md and a shared operating contract
A concrete basis for splitting work into spec, implementation, and verification, and deciding which tool owns what
A shared verification gate that any agent's code must pass, plus the practice that prevents double-edit accidents
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

App Dev2026-05-25
One Month Splitting Antigravity's Inline Edit and Agent Mode Across Four Wallpaper Apps
A month of notes from running Antigravity's Inline Edit and Agent Mode across four production wallpaper apps — with real counts, the decision rule I wrote into AGENTS.md, a one-pass dSYM fix, and how credit cost factors in.
App Dev2026-05-16
Surviving New iPhone Resolution Support with Antigravity — 29 Changes in DefineManager.h, One Honest Recap
A real-world account of updating Beautiful HD Wallpapers and three other iOS apps for iPhone Air (420×912) and iPhone 17 Pro (402×874). What Antigravity caught, what it missed, and the two-step prompt pattern that made the 29-edit process manageable.
App Dev2026-06-26
Hand Over Generation and Shipping, but Never the Signing Key — Designing Key Custody and Handover for an AI-Driven Pipeline
Even in an era where AI Studio and Antigravity take over everything from generation to internal-test shipping, the app signing key is in a class of its own. Lose it, and that app can never be updated again. As a solo developer who has run several apps for years, here is how I design key custody — separating the upload key from the app signing key, storing it, and planning the handover for the worst case.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →