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
| Record | What it binds |
|---|---|
| Repository registration | Stable repository identity, selected root, and observed Git metadata. |
| Agent workspace | Logical agent and attempt to a bounded execution target and worktree identity. |
| Write Intent | Planned paths and optional advisory symbols before mutation. |
| ChangeSet | Base revision, actual patch/hunks, repository identity, verification evidence, and submitting attempt. |
| Integration claim | Exclusive, fenced authority for one integration operation. |
| Integration attempt | Checkpoints, 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 reconciliationWrite 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.
| Condition | Default interpretation |
|---|---|
| Different repositories | No repository-level collision. |
| Same repository, different paths | Can proceed independently unless a protected resource policy applies. |
| Same path, disjoint actual hunks | Potentially compatible; still revalidated against the current integration base. |
| Same path, overlapping hunks | Re-read and explicit reconciliation required. |
| Base revision drift | Rebase or regenerate evidence before integration. |
Integration sequence
- 01Validate identity
Confirm repository, workspace, agent attempt, and ChangeSet bindings.
- 02Acquire claim
Reserve exclusive integration authority with a lease and fencing token.
- 03Refresh base
Observe the current target revision and reject or reconcile drift.
- 04Compare changes
Evaluate actual paths and hunks, including affected-agent overlap.
- 05Apply and verify
Perform the contained Git operation and run the required checks.
- 06Record 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.