ANTIGRAVITY LABJP
Articles/Antigravity Basics
Antigravity Basics/2026-06-24Advanced

Before Your Antigravity Agents Fight Over the Same File — Ownership Manifests and Conflict Detection

Multi-agent workflows do not break at the design stage. They break at runtime. Here are the field notes: an ownership manifest that pins each agent's editable region, a git-only conflict detector, and a three-part handoff contract.

Antigravity268multi-agent47conflict detectionproduction67design8

Premium Article

Most articles on multi-agent boundaries end at "separate the responsibilities." I believed that too, at first. The problem is that separating responsibilities on paper gives you no guarantee the separation holds at runtime.

Running two or three Antigravity agents in parallel as an indie developer on my own projects, I would split the regions cleanly in the design, and still wake up to find the same file under src/lib/ rewritten by both agents, with one set of changes quietly swallowed by the other. The design was correct. There was simply nothing forcing the agents to obey it.

This is a field guide to boundaries that bite at runtime, built from that mistake. Not concepts, but three things you can use immediately: pinning ownership in one file, finding conflicts with git alone, and passing work as a contract.

Why a "design-time boundary" dissolves at runtime

On a human team, you say something before touching a file you do not own. Agents do not. A boundary you have not made explicit does not exist for them. Worse, an agent will infer its own scope from the task context.

Tell it "implement the auth flow" and it will happily reach into shared utilities that feel auth-adjacent. From its point of view that is reasonable. But if another agent is editing those same utilities at the same time for a different reason, that is where the boundary dissolves.

So a boundary written only inside a natural-language prompt will not be respected. It has to live somewhere a machine can read it and a machine can reject violations of it. What I landed on was a single file: an ownership manifest.

The ownership manifest — pinning regions in one file

The idea is simple. Declare which agent may touch which paths in one file at the repository root. Put it there as a fact about the repo, not as an instruction buried in a prompt.

// agents.ownership.json
{
  "agents": {
    "auth-agent":    { "owns": ["src/features/auth/**"],    "deny": ["src/lib/**"] },
    "billing-agent": { "owns": ["src/features/billing/**"], "deny": ["src/lib/**"] },
    "shared-agent":  { "owns": ["src/lib/**", "src/hooks/**"] }
  },
  "rule": "Shared code (src/lib, src/hooks) is owned only by shared-agent. Cross a path boundary and stop."
}

The key move is carving the shared directories out to a dedicated third owner (shared-agent). My first painful lesson came from treating shared code as an implicit "anyone may edit" zone. Shared code is where conflicts breed, so I force it onto a single owner; if another agent needs a change there, it files a request to shared-agent instead of editing directly. One-way traffic.

When I launch each agent, I feed only the paths from its owns list as task context: "The only thing you may touch is src/features/auth/. If you need to change anything else, do not change it — report the reason and stop." The instruction is natural language, but its authority points at one fact, the manifest, so agents never disagree about who owns what.

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 pin each agent's editable region in a single ownership manifest and reject out-of-region changes mechanically before commit
A lightweight conflict detector built on nothing but git diff, plus the recovery procedure when two agents touch the same file
A three-part handoff contract (decided / requested / undefined) and a clear rule for when a supervising agent is worth its cost
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

Antigravity2026-04-25
Designing Antigravity Retry for Production — Idempotency, Backoff, Cost Ceilings, and Failure Triage
A production blueprint for Antigravity agent retry: idempotency, exponential backoff, token-budget ceilings, failure triage, and resumable checkpoints.
Antigravity2026-04-23
Antigravity × Local LLM (Ollama / LM Studio / LM Link): A Production Connection Playbook
Getting Antigravity to connect to Ollama, LM Studio, or LM Link is the easy part. Running on that setup for eight hours a day, week after week, surfaces disconnects, model-swap hangs, stale sessions after lunch, and VRAM pressure from other processes. This playbook covers hardening the connection layer, picking the right backend for the task, and designing the fallback path for when local goes silent.
Tips2026-03-20
Antigravity Practical Techniques [Part 2] — Multi-Agent, Production Development & Monetization
Advanced techniques from Antigravity Lab premium articles. Part 2 covers multi-agent orchestration, production app development, custom MCP servers, and SaaS monetization.
📚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 →