AgenZync DocumentationTechnical referenceDevelopment branch · v0.1
Docs/Code collaboration

Workspaces, Write Intents, and integration

Parallel coding is isolated at execution time and reconciled from observed Git state. AgenZync does not treat a worker message or an intended filename as proof of the change that was produced.

Domain records

RecordWhat it binds
Repository registrationStable repository identity, selected root, and observed Git metadata.
Agent workspaceLogical agent and attempt to a bounded execution target and worktree identity.
Write IntentPlanned paths and optional advisory symbols before mutation.
ChangeSetBase revision, actual patch/hunks, repository identity, verification evidence, and submitting attempt.
Integration claimExclusive, fenced authority for one integration operation.
Integration attemptCheckpoints, outcome, receipts, and recovery state for reconciliation and Git mutation.

Worktree isolation

Coding agents can receive isolated Git worktrees derived from one registered repository and base revision. Sibling workers do not share a writable working directory. The runtime binds each workspace to its agent attempt and verifies that repository and worktree identities match before accepting collaboration operations.

registered repository
├── root workspace
├── worktrees/agent-a   # isolated execution target
├── worktrees/agent-b   # isolated execution target
└── integration target # controlled reconciliation

Write Intents

A Write Intent announces planned mutation before the authoritative patch exists. Ordinary paths use optimistic coordination: two agents can declare the same path, and the overlap remains visible instead of locking the complete file.

Protected resources can require exclusive intent. Symbol or function names may enrich the overlap report, but they are advisory evidence; they do not override path, repository, base revision, or actual-hunk checks.

ChangeSets and overlap

A ChangeSet is constructed from the worktree's observed difference against its bound base revision. It carries the actual changed paths and hunks. When multiple ChangeSets touch one path, the runtime compares their line ranges and requires explicit reconciliation when hunks overlap.

ConditionDefault interpretation
Different repositoriesNo repository-level collision.
Same repository, different pathsCan proceed independently unless a protected resource policy applies.
Same path, disjoint actual hunksPotentially compatible; still revalidated against the current integration base.
Same path, overlapping hunksRe-read and explicit reconciliation required.
Base revision driftRebase or regenerate evidence before integration.

Integration sequence

  1. 01
    Validate identity

    Confirm repository, workspace, agent attempt, and ChangeSet bindings.

  2. 02
    Acquire claim

    Reserve exclusive integration authority with a lease and fencing token.

  3. 03
    Refresh base

    Observe the current target revision and reject or reconcile drift.

  4. 04
    Compare changes

    Evaluate actual paths and hunks, including affected-agent overlap.

  5. 05
    Apply and verify

    Perform the contained Git operation and run the required checks.

  6. 06
    Record receipt

    Persist checkpoints, resulting revision, verification outcome, and terminal state.

Limits

  • Worktree isolation reduces accidental filesystem collision; it does not prove that two changes are logically compatible.
  • Hunk comparison detects textual overlap, not every behavioral dependency.
  • Verification quality depends on the repository's tests, configured checks, model behavior, and human review.
  • External changes made outside the registered workflow can create drift and force revalidation.