---
name: parallel-contract
description: >
  Defines the contract for fan-out parallel workers: isolation
  boundaries, result schema, and merge conflict resolution rules.
  Use when running parallel sub-agents on independent work units.
---

## :shield: Isolation Rules

Each worker MUST:

1. Only modify files within its assigned scope
2. Not read or modify files in another worker's scope
3. Return results in the standard schema

## :page_facing_up: Result Schema

Workers return:

- `scope`: string — the module or file path
- `status`: `done` | `partial` | `failed`
- `files_changed`: list of paths
- `issues`: list of strings
- `output`: free-form data

## :twisted_rightwards_arrows: Merge Rules

The merge agent resolves conflicts by:

1. Checking for overlapping file modifications
2. Preferring the worker with narrower scope
3. Flagging unresolvable conflicts for human review