# Multi-Agent Coordination — claw-forge-issue17

## Overview

This document defines how agents coordinate when working on this repo in parallel.
Follow these rules to avoid conflicts, duplicate work, and broken state.

## Task Ownership

- **One agent per feature/task.** Never have two agents editing the same file simultaneously.
- Each agent claims a task by updating its status to `in_progress` before starting.
- If a task is already `in_progress`, pick a different one or wait.

## Shared State

| Artifact | Owner | Access pattern |
|----------|-------|---------------|
| `docs/` | Any agent | Read freely; write via PR only |
| `scripts/agent-lint.sh` | Harness maintainer | Do not modify without review |
| Database/state files | One agent at a time | Lock before write |

## Dependency Rules

- **Never start a dependent task** until all its dependencies are `complete`.
- Check `docs/ARCHITECTURE.md` before adding any cross-package import.
- If your task requires another task's output, coordinate via the task state (not direct communication).

## Context Visibility

Each agent has its own context window. To share findings across agents:
1. Write to `docs/` or task notes (persistent)
2. Do NOT rely on other agents reading your context
3. Assume each agent starts fresh — make your outputs self-contained

## Tool Ceiling

Per the agent tool design guidelines: **≤ 20 tools per agent session**.
If you find yourself needing more, split into subagents with focused scopes.

## Conflict Resolution

If two agents produce conflicting implementations:
1. The Reviewer agent decides (not either builder)
2. Prefer the implementation with higher test coverage
3. Document the decision in `docs/EXECUTION_PLAN_TEMPLATE.md`

---

*Generated by harness skill scaffold. Update as your coordination patterns evolve.*
