← ClaudeAtlas

multi-agent-coordinationlisted

Use when two or more agent sessions may work on the same repository concurrently — covers the per-feature lock-file protocol, stale-lock detection, worktree isolation rules, and what to do when a feature is already locked.
andr-ca/agentharness · ★ 1 · AI & Automation · score 70
Install: claude install-skill andr-ca/agentharness
# Multi-Agent Coordination Use this skill when you start work on a feature and another agent session might be working on the same repository, or when you detect that a lock exists for the feature you want to work on. **`tools/agent-lock.sh` is agentharness's own dogfooding tool — it is not currently installed into consumer projects by `harness-link.sh`.** If this skill file is symlinked/copied into a consumer repo (the normal case for every install mode) and `tools/agent-lock.sh` doesn't exist there, every command below will fail with "No such file or directory". Check `[ -x tools/agent-lock.sh ]` before relying on this skill's commands; if it's missing, this protocol doesn't apply to this repo yet — fall back to plain git branch discipline (check `git branch -a` / `git log` for other in-progress work before starting) rather than assuming the lock file exists. Deeper reference: `patterns/multi-agent-coordination/COORDINATION.md` (full protocol, lock format, stale detection, worktree rules). --- ## Before starting work: check for a lock ```bash tools/agent-lock.sh check "add-user-auth" ``` - **FREE** — no lock exists. Proceed normally. - **LOCKED** — another agent is working on this feature. --- ## Acquiring a lock ```bash AGENT_LOCK_PID=<stable-session-pid> tools/agent-lock.sh acquire "add-user-auth" "feat/user-auth" # ACQUIRED: locked 'add-user-auth' (agent_id=3f2a1c8d-..., owner_pid=12345) # 3f2a1c8d-... export AGENTHARNESS_AGENT_ID=3f2a1c8d-... # the id from th