Agent Coordination Protocol
Core Principle
Build on existing work. Never recreate.
Two Registries
The system maintains two distinct registries:
| Registry |
Purpose |
Updated When |
_registry.md |
Index of completed work (reports) |
After each agent produces a report |
_tech-debt.md |
Tracked improvements to address later |
When issues are deferred, incidents occur |
Decision rule:
- Registry → "What work has been done?" (past/present state)
- Tech Debt → "What do we need to fix later?" (future work)
4-Step Workflow
Step 1: Check Prior Work
Before invoking any agent, check what already exists:
# Check registry for recent reports
cat .claude/reports/_registry.md | head -50
# Check if archiving needed (>50 entries)
ENTRIES=$(grep -c "^- .*|.*|" .claude/reports/_registry.md 2>/dev/null || echo 0)
[ "$ENTRIES" -gt 50 ] && echo "⚠️ Registry has $ENTRIES entries - suggest /archive"
# Check relevant tech debt (if working on that area)
grep -i "[area-keyword]" .claude/reports/_tech-debt.md
Read relevant reports before proceeding to understand current state.
Step 2: Context Injection
Subagents NEVER read registry or reports directly. Main agent provides ALL context:
Task(agent-name, "
[Objective]
Context from prior work:
- [Report X]: [key decisions/findings]
- [Tech debt TD-NNN]: [relevant constraint]
- Current state: [what exists now]
Requirements:
- [Specific deliverables]
Output location:
- Report: .claude/reports/[category]/[name]-YYYYMMDD.md
")
Step 3: Sequencing
Rule: Will Agent B need Agent A's output?
- YES → Sequential (verify between each)
- NO → Parallel
Step 4: Verify and Update
After each agent completes:
# Verify deliverables exist
.claude/skills/agent-coordination/scripts/verify.sh "[category]" "[name]" "[date]"
Then update registries:
Always: Add report to _registry.md
- [report-name] | [Status] | [1-line summary]
If issues deferred: Add to _tech-debt.md
- [ ] **TD-NNN**: [Description]
- **Impact:** [Critical|High|Medium|Low]
- **Source:** [report-name or postmortem-name]
Report Categories
All reports go to .claude/reports/[category]/:
| Category |
Folder |
Use For |
Typical Agents |
| analysis |
analysis/ |
Research, EDA, data exploration |
data-engineer, data-viz |
| arch |
arch/ |
Architecture decisions, ADRs, system design |
architect, rfc |
| bugs |
bugs/ |
Bug reports, root cause analysis |
code-quality (debug) |
| commits |
commits/ |
Commit summaries, changelog entries |
devops (git) |
| design |
design/ |
UI/UX reviews, design specs |
ux-designer |
| exec |
exec/ |
Execution logs, command outputs |
devops |
| handoff |
handoff/ |
Agent coordination, context transfers |
(main agent) |
| implementation |
implementation/ |
Implementation plans, code specs |
backend, frontend |
| review |
review/ |
Code reviews, PR reviews |
code-quality (review) |
| tests |
tests/ |
Test plans, test results, coverage |
test-engineer, qa |
| security |
security/ |
Security scans, threat models, compliance |
security-engineer |
| sre |
sre/ |
SLOs, postmortems, capacity plans |
sre |
| rfc |
rfc/ |
Design proposals, RFCs |
rfc |
| ci |
ci/ |
CI pipeline results |
(bash/devops) |
| archive |
archive/ |
Old reports (moved, not deleted) |
(archive script) |
Naming convention: [category]-[topic]-YYYYMMDD.md
Agent Reference
| Agent |
Modes |
Primary Output Category |
| code-quality |
review, debug, qa-strategy |
review/, bugs/, tests/ |
| test-engineer |
- |
tests/ |
| architect |
system, pipeline |
arch/ |
| security-engineer |
scan, threat-model, compliance |
security/ |
| sre |
reliability-review, incident, capacity |
sre/ |
| rfc |
author, review, decision |
rfc/ |
| data-engineer |
collect, analyze, preprocess |
analysis/ |
| data-viz-specialist |
- |
analysis/, design/ |
| devops |
infra, git |
exec/, commits/, ci/ |
| docs |
general, webdev |
(documentation files) |
| frontend |
- |
implementation/ |
| backend |
- |
implementation/ |
| ml-engineer |
train, evaluate, deploy |
analysis/, implementation/ |
| lrl-nlp-expert |
- |
analysis/ |
| ux-designer |
design, copy |
design/ |
When to Update Tech Debt
Tech debt entries are created when:
| Situation |
Action |
| Code review finds issue, won't fix now |
Add as Medium/Low priority |
| Postmortem identifies prevention action |
Add as Critical/High priority |
| RFC defers a requirement |
Add as Medium priority |
| Security scan finds non-blocking issue |
Add as High priority |
| Manual identification |
Use /debt add |
Format in _tech-debt.md:
- [ ] **TD-NNN**: Brief description
- **Impact:** Critical | High | Medium | Low
- **Source:** [link to originating report]
- **Created:** YYYY-MM-DD
Commands
| Command |
Purpose |
| /review-full |
Multi-level review (L1: peer → L2: arch → L3: security → L4: reliability) |
| /ci |
Local CI pipeline (lint → build → test → security) |
| /security |
Security vulnerability scan |
| /rfc |
Create/review design documents |
| /slo |
Define service level objectives |
| /postmortem |
Incident analysis and learning |
| /debt |
View and manage tech debt |
| /archive |
Move old registry entries to archive |
Skill Resources
skills/agent-coordination/
├── SKILL.md # This file
├── templates.md # Report templates
├── reference.md # Verification details, retry logic
└── scripts/
├── verify.sh # Deliverable verification
└── archive_reports.py # Registry archiving (dated snapshots)
Version: 5.1.0
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: agent-coordination-63description: Coordination protocol for main Claude Code agent. Explicit user invocation required ("mobilize agents", "coordinate", "check registry"). Provides agent orchestration, registry management, and handoff protocols. Subagents never access this - main agent provides context in task prompts. Use when this capability is needed.4---56# Agent Coordination Protocol78## Core Principle910**Build on existing work. Never recreate.**1112---1314## Two Registries1516The system maintains two distinct registries:1718| Registry | Purpose | Updated When |19|----------|---------|--------------|20| `_registry.md` | Index of completed work (reports) | After each agent produces a report |21| `_tech-debt.md` | Tracked improvements to address later | When issues are deferred, incidents occur |2223**Decision rule:**24- **Registry** → "What work has been done?" (past/present state)25- **Tech Debt** → "What do we need to fix later?" (future work)2627---2829## 4-Step Workflow3031### Step 1: Check Prior Work3233Before invoking any agent, check what already exists:3435```bash36# Check registry for recent reports37cat .claude/reports/_registry.md | head -503839# Check if archiving needed (>50 entries)40ENTRIES=$(grep -c "^- .*|.*|" .claude/reports/_registry.md 2>/dev/null || echo 0)41[ "$ENTRIES" -gt 50 ] && echo "⚠️ Registry has $ENTRIES entries - suggest /archive"4243# Check relevant tech debt (if working on that area)44grep -i "[area-keyword]" .claude/reports/_tech-debt.md45```4647**Read relevant reports** before proceeding to understand current state.4849### Step 2: Context Injection5051Subagents NEVER read registry or reports directly. Main agent provides ALL context:5253```54Task(agent-name, "55[Objective]5657Context from prior work:58- [Report X]: [key decisions/findings]59- [Tech debt TD-NNN]: [relevant constraint]60- Current state: [what exists now]6162Requirements:63- [Specific deliverables]6465Output location:66- Report: .claude/reports/[category]/[name]-YYYYMMDD.md67")68```6970### Step 3: Sequencing7172**Rule:** Will Agent B need Agent A's output?73- YES → Sequential (verify between each)74- NO → Parallel7576### Step 4: Verify and Update7778After each agent completes:7980```bash81# Verify deliverables exist82.claude/skills/agent-coordination/scripts/verify.sh "[category]" "[name]" "[date]"83```8485**Then update registries:**86871. **Always:** Add report to `_registry.md`88 ```89 - [report-name] | [Status] | [1-line summary]90 ```91922. **If issues deferred:** Add to `_tech-debt.md`93 ```94 - [ ] **TD-NNN**: [Description]95 - **Impact:** [Critical|High|Medium|Low]96 - **Source:** [report-name or postmortem-name]97 ```9899---100101## Report Categories102103All reports go to `.claude/reports/[category]/`:104105| Category | Folder | Use For | Typical Agents |106|----------|--------|---------|----------------|107| analysis | `analysis/` | Research, EDA, data exploration | data-engineer, data-viz |108| arch | `arch/` | Architecture decisions, ADRs, system design | architect, rfc |109| bugs | `bugs/` | Bug reports, root cause analysis | code-quality (debug) |110| commits | `commits/` | Commit summaries, changelog entries | devops (git) |111| design | `design/` | UI/UX reviews, design specs | ux-designer |112| exec | `exec/` | Execution logs, command outputs | devops |113| handoff | `handoff/` | Agent coordination, context transfers | (main agent) |114| implementation | `implementation/` | Implementation plans, code specs | backend, frontend |115| review | `review/` | Code reviews, PR reviews | code-quality (review) |116| tests | `tests/` | Test plans, test results, coverage | test-engineer, qa |117| security | `security/` | Security scans, threat models, compliance | security-engineer |118| sre | `sre/` | SLOs, postmortems, capacity plans | sre |119| rfc | `rfc/` | Design proposals, RFCs | rfc |120| ci | `ci/` | CI pipeline results | (bash/devops) |121| archive | `archive/` | Old reports (moved, not deleted) | (archive script) |122123**Naming convention:** `[category]-[topic]-YYYYMMDD.md`124125---126127## Agent Reference128129| Agent | Modes | Primary Output Category |130|-------|-------|------------------------|131| code-quality | review, debug, qa-strategy | review/, bugs/, tests/ |132| test-engineer | - | tests/ |133| architect | system, pipeline | arch/ |134| security-engineer | scan, threat-model, compliance | security/ |135| sre | reliability-review, incident, capacity | sre/ |136| rfc | author, review, decision | rfc/ |137| data-engineer | collect, analyze, preprocess | analysis/ |138| data-viz-specialist | - | analysis/, design/ |139| devops | infra, git | exec/, commits/, ci/ |140| docs | general, webdev | (documentation files) |141| frontend | - | implementation/ |142| backend | - | implementation/ |143| ml-engineer | train, evaluate, deploy | analysis/, implementation/ |144| lrl-nlp-expert | - | analysis/ |145| ux-designer | design, copy | design/ |146147---148149## When to Update Tech Debt150151Tech debt entries are created when:152153| Situation | Action |154|-----------|--------|155| Code review finds issue, won't fix now | Add as Medium/Low priority |156| Postmortem identifies prevention action | Add as Critical/High priority |157| RFC defers a requirement | Add as Medium priority |158| Security scan finds non-blocking issue | Add as High priority |159| Manual identification | Use `/debt add` |160161**Format in `_tech-debt.md`:**162```markdown163- [ ] **TD-NNN**: Brief description164 - **Impact:** Critical | High | Medium | Low165 - **Source:** [link to originating report]166 - **Created:** YYYY-MM-DD167```168169---170171## Commands172173| Command | Purpose |174|---------|---------|175| /review-full | Multi-level review (L1: peer → L2: arch → L3: security → L4: reliability) |176| /ci | Local CI pipeline (lint → build → test → security) |177| /security | Security vulnerability scan |178| /rfc | Create/review design documents |179| /slo | Define service level objectives |180| /postmortem | Incident analysis and learning |181| /debt | View and manage tech debt |182| /archive | Move old registry entries to archive |183184---185186## Skill Resources187188```189skills/agent-coordination/190├── SKILL.md # This file191├── templates.md # Report templates192├── reference.md # Verification details, retry logic193└── scripts/194 ├── verify.sh # Deliverable verification195 └── archive_reports.py # Registry archiving (dated snapshots)196```197198---199200**Version:** 5.1.0201202---203> Converted and distributed by [TomeVault](https://tomevault.io/claim/ilyasibrahim) — claim your Tome and manage your conversions.204<!-- tomevault:4.0:skill_md:2026-04-11 -->