fitme·story
v5.2 · 5 min read
Summary card · 60-second read

From "Zero Conflicts by Luck" to "Zero Conflicts by Design"

Version
v5.2
Date
2026-04-15
Tier
light

v5.1 stress test had 0 file conflicts across 15 same-file edits — by luck, not by design. v5.2 Parallel Write Safety (snapshot/rollback + region-based mirror pattern + 3-tier region detection that warms toward Tier 1 over time) makes the zero-conflict guarantee structural.

Honest disclosures
  • v5.1 zero-conflict outcome was probabilistic — agents happened to edit non-overlapping sections. Different features could have produced silent overwrites or corrupt build files.
  • Tier 1 region detection is instant only after a Tier 3 dispatch has tagged the file. First-time files always start at Tier 3 (full snapshot).
  • The system is a framework protocol enforced by the dispatch controller — not compiled application code. Ships as configuration and documentation, not as a library.
How to read this case studyT1/T2/T3 · ledger · kill criterion
T1Instrumented
Numbers come from a machine-generated ledger or commit. Reproducible. Highest reader trust.
T2Declared
Numbers stated by a structured declaration (PRD, plan, frontmatter) but not directly measured.
T3Narrative
Estimates and observations from session memory. Useful for context; not citable as evidence.
Ledger
Where to verify the claim — a file path, GitHub issue, or backlog entry. Anything labelled ledger: is the audit trail.
Kill criterion
The pre-registered threshold under which this work would have been killed mid-flight. Not fired = work shipped without hitting the threshold.
Deferred
Items intentionally not closed in this version. Each cites the ledger that tracks remaining work.
v5.1 (stress test)
0 by luck
15 same-file edits across 3 files happened to land on non-overlapping regions
v5.2 (write safety)
0 by design
snapshot/rollback + region mirror + 3-tier region detection (Tier 1 instant after first run)

From "Zero Conflicts by Luck" to "Zero Conflicts by Design"

The v5.1 stress test had 0 file conflicts across 15 same-file edits. But luck isn't a safety guarantee.

Context

During the v5.1 parallel stress test, 3 agents edited the same files simultaneously — analytics providers, service files, and the project build file — 15 times total. The result: zero conflicts. But that outcome was probabilistic, not deterministic. The agents happened to edit non-overlapping sections. With different features or different file structures, the result could have been catastrophic — silent overwrites, lost work, or corrupted build files.

Parallel Write Safety (v5.2, Sub-Project B) was designed to make the zero-conflict guarantee structural rather than lucky.


The Problem

When multiple AI agents edit the same file simultaneously, three things can go wrong:

  1. Overwrite: Agent B reads the file before Agent A's write lands. B's write overwrites A's changes.
  2. Interleave: Both agents edit adjacent lines. The merge produces syntactically valid but semantically broken code.
  3. Corruption: Both agents edit the same region. The result is neither agent's intended output.

The v5.1 stress test avoided all three by accident. The safety system needed to prevent all three by design.


The Design: 2-Layer Safety

Layer 1 — Snapshot/Rollback. Before dispatching agents to a shared file, snapshot the original. After agents return, reconstruct the full file from their region edits. If the build fails, rollback to the snapshot. If it passes, commit.

Layer 2 — Region-Based Mirror Pattern. Instead of giving each agent the full file, extract only the region they need to edit. Agents work on isolated sections, and the controller reconstructs the full file from their outputs.

3-Tier Region Detection

TierMethodSpeedWhen Used
Tier 1Explicit region markers in the fileInstantFiles with existing markers
Tier 2Structural analysis (functions, classes, sections)FastFiles with clear boundaries
Tier 3Full-file snapshotBaselineFirst-time files

Progressive Learning

The key insight: Tier 3 dispatches automatically add region markers to the file. The next dispatch targeting the same file uses Tier 1 (instant). Over N dispatch cycles, the framework converges toward Tier 1 for all frequently-edited files — an analog of branch prediction warming up a CPU's cache.


Implementation

MetricValue
Wall time~20 minutes (design through deployment)
Tasks6
Files created1 (task breakdown)
Files modified3 (dispatch config, workflow protocol, research doc)
New Swift code0 — pure framework infrastructure
Validation checks3 (all passing)
Velocity9.26 min/CU (+39% vs baseline)

The entire safety system is a framework protocol enforced by the dispatch controller — not compiled application code. It ships as configuration and documentation, not as a library.


How It Complements Dispatch Intelligence

Sub-Project A (Dispatch Intelligence) decides who works on what: complexity scoring routes tasks to the right agent tier.

Sub-Project B (Parallel Write Safety) ensures they can do so safely in parallel: region isolation prevents conflicts, and snapshot/rollback provides a safety net when isolation isn't possible.

Together they form the complete v5.2 dispatch system. A without B risks conflicts. B without A wastes expensive agents on simple tasks. Both are needed.


What Worked

  1. All 6 tasks completed in a single session with zero failures. The design was clean enough to implement without iteration.

  2. The progressive learning property is self-improving. Every Tier 3 dispatch upgrades the file for all future dispatches. The cost of the safety system decreases over time.

  3. Reuse of the v5.2 discovery. The finding from Sub-Project A (subagents can't write to framework paths) was immediately applied — all tasks executed inline by the controller, avoiding wasted dispatches.

What Remains Unvalidated

  1. No runtime stress test yet. The mirror pattern configuration is deployed but hasn't been tested with actual parallel agents editing the same marked file simultaneously. The design guarantees are sound, but empirical validation under real contention is the next step.

Key Takeaways

  • "It worked" is not the same as "it's safe." Zero conflicts in a stress test proved the framework can handle parallel writes — but the absence of failure doesn't prove the presence of safety. Structural guarantees do.
  • The safety system is lighter than expected. 20 minutes of design and configuration work, zero new compiled code. The complexity lives in the protocol (how the controller manages regions), not in the infrastructure.
  • Self-improving systems compound. Progressive marker learning means the safety overhead decreases with every use — the opposite of most safety mechanisms, which add fixed cost per operation.