"Agent workflow: file-ownership and plan-review-delegate"
Parallel coding agents thrash the same files, ship half-merged features, or "fix" each other's transient compile errors — while the running editor serves a stale assembly.
Agents are fast at editing and bad at coordination unless you impose ownership. Most multi-agent pain is contested files + false verification (dotnet build without whitelist, chasing symptoms during a failed compile).
Ownership contract
- Every agent spec lists Files you own and Do NOT touch.
- Parallel agents get disjoint file sets.
- Contested / hot files → one owner at a time, serialized.
- After ~3 stacked patches on one hot file, the next change consolidates into a single ordered pipeline (one owner per state variable) with unconditional invariants — don't add a sixth interacting patch.
Contract-first parallelism
Agree path/tag/static-class shapes up front (materials/…/road.vmat, a gameplay tag name, a nav API signature). Agents land independently against the contract. Transient cross-agent build errors are expected — report, don't fix foreign errors.
Git / liveness
- Explicit paths only — never
git add -Aduring multi-agent waves (captures other tabs' half-writes). - Liveness = owned-file mtimes, not the task panel. Quiet 30+ min on owned files → assume dead.
- User interrupt kills in-flight work: prefer resume with partial-write mtime context over fresh relaunch when context is expensive; revert partial single-file wreckage if restarting.
Handoffs
- Need a line in a file you don't own → emit a HANDOFF for the coordinator/owner; never reflection hacks across files (also whitelist-banned).
- Mid-flight scope adds: message the owning agent rather than spawning a colliding session on the same file.
Verification (every spec)
dotnet build Code\<proj>.csproj # necessary
whitelist sweep # Environment / IO / Process / reflection
stale-assembly check if "all broken" # see stale-assembly-hotloadForeign compile errors while a teammate is mid-write are not your bug.
Broader day-build narrative: ai-agents-build-game-in-a-day.
Disjoint ownership removes write conflicts; serialization on hot files prevents stacked-interaction regressions; report-don't-fix stops thrashing mid-wave state; resume preserves expensive context. The rules are social, not magical — but without them parallel agents optimize for local green and global chaos.