/engineering:ai-agent-multi-agent-coordinationfrom engineering
Designs multi-agent coordination patterns: supervisor/worker, debate, plan-execute, peer handoff. Covers handoff contracts, shared scratchpad, conflict resolution, deadlock detection, and cost/SLA discipline.
Ships in engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Acknowledgement: Shared by Peter Bamuhigire, techguypeter.com, +256 784 464178.
Use the software delivery specialist guide to assign responsibility from discovery to production and agree the evidence due at handoff.
Use a role to answer a specific decision in the plan. Resolve the matching skill in the installed engine and return evidence to the task owner.
| Role | Route and expected handoff |
|---|---|
| Systems analyst | Project requirements for workflow decisions, exceptions and testable examples. |
| Accountant | The applicable accounting authority for worked postings, reversals and reconciled balances. |
| Auditor | Independent review of the named control, its sample, exceptions and evidence. |
| Database administrator | Database reliability for migration, lock, recovery or query-plan evidence. |
| PHP tester | PHP standards and the project's test runner for an executable regression through the affected entry point. |
| Researcher | The research route for a dated technical question, primary sources and applicability to the installed version. |
| Front-end UI/UX specialist | Frontend architecture and the project's design standard for responsive interaction states and observed keyboard and usability checks. |
| Cybersecurity specialist | Web application security review for trust-boundary findings, remediation and defensive checks. |
| Enterprise network specialist (CCNP scope) | Review routing, switching and failover against the supplied topology and telemetry. Use network security for the segmentation portion. Record any platform-specific expertise or evidence still needed. |
ai-agent-runtime-architecture §1 decision.ai-agent-runtime-architecture).ai-agent-tool-catalogue-and-action-gating).ai-agent-cost-and-step-budgets) — multi-agent budgets are an order of magnitude larger.SKILL.md.references/handoff-protocols.md.references/conflict-resolution.md.| Category | Artifact | Format | Example |
|---|---|---|---|
| Correctness | Multi-agent topology spec | Markdown + diagram | docs/ai/multi-agent-topology.md |
| Correctness | Handoff protocol tests | CI report | tests/ai/handoff/ |
| Release evidence | Multi-agent vs single-agent eval | Markdown | docs/ai/eval/multi-vs-single.md |
| Operability | Deadlock incident runbook | Markdown | docs/runbooks/multi-agent-deadlock.md |
references/supervisor-worker.md — supervisor/worker contract.references/handoff-protocols.md — agent-to-agent handoff message schemas.references/conflict-resolution.md — conflict and deadlock resolution.ai-agents-tools, ai-agent-runtime-architecture, ai-agent-tool-catalogue-and-action-gating, ai-agent-cost-and-step-budgets, ai-agent-observability-and-replay, ai-agent-eval, distributed-systems-patterns.Multi-agent is 5-50× the cost of single-agent, 2-10× the latency, and substantially harder to evaluate and debug. Justify before adopting.
Acceptable justifications:
Unacceptable:
The justification doc lives in docs/ai/multi-agent-justification-<feature>.md and includes the eval data.
| Pattern | Topology | When |
|---|---|---|
| Supervisor / Worker | One planner; N specialist workers; supervisor synthesises | Multiple domains, clear partition |
| Plan-Execute | One planner agent emits a structured plan; one executor agent runs it | Separation of concerns; planner can be a stronger model |
| Debate | Two agents propose; a judge picks (or a synthesiser merges) | Quality-critical tasks; eval shows debate improves baseline |
| Peer Handoff | Agents pass control via structured messages; no central supervisor | Conversation-style flows (sales → billing → support) |
See references/supervisor-worker.md for the dominant pattern.
Handoffs are not free-text:
{
"handoff_id": "h_2026_0511_001",
"from_agent": "sales_agent",
"to_agent": "billing_agent",
"task_id": 12345,
"tenant_id": 42,
"reason": "Customer requested an invoice for last month's hours.",
"context_summary": "ACME, May 2026, 32 hours at $400/h, billing contact [email protected].",
"structured_state": {
"customer_id": 88,
"billing_period": {"start": "2026-05-01", "end": "2026-05-31"},
"computed_hours": 32,
"rate_usd_per_hour": 400
},
"expected_outcome": "Invoice created and sent.",
"deadline_iso": "2026-05-12T10:00:00Z",
"trust_level": "structured_only"
}
The receiving agent reads structured_state as ground truth and context_summary as advisory. The receiving agent does not trust the free-text fields to make irreversible decisions; it re-validates via its own tools.
Full protocol in references/handoff-protocols.md.
A versioned key-value store per task:
CREATE TABLE agent_scratchpad (
task_id BIGINT NOT NULL,
key VARCHAR(128) NOT NULL,
value JSON NOT NULL,
version INT NOT NULL DEFAULT 1,
written_by VARCHAR(64) NOT NULL,
written_at DATETIME NOT NULL,
PRIMARY KEY (task_id, key)
);
Writes are optimistic-concurrency: UPDATE ... WHERE version = :expected_version. Mismatch → caller refetches and merges.
Agents read snapshots; writes go through a runtime helper that records the writing agent's identity.
Two agents propose different answers. The deterministic resolver:
def resolve(proposals):
# Group by canonical answer
groups = group_by(proposals, key=canonicalise)
if len(groups) == 1:
return groups[0].representative
# Voting if odd number of judges
if len(proposals) >= 3 and len(proposals) % 2 == 1:
majority = max(groups, key=lambda g: len(g.members))
if len(majority.members) > len(proposals) / 2:
return majority.representative
# Tie-breaker: confidence score
return max(proposals, key=lambda p: p.confidence)
For high-stakes tasks (irreversible actions, money), conflict → human escalation, not another LLM call.
Build a wait-for graph from handoff history:
def detect_deadlock(task_id):
handoffs = db.query("SELECT from_agent, to_agent FROM handoffs WHERE task_id = ?", task_id)
g = build_directed_graph(handoffs)
cycles = find_cycles(g)
if cycles:
abort_task(task_id, reason=f"deadlock_cycle: {cycles[0]}")
page_oncall(...)
A scheduled job runs every 30 seconds. Default deadlock detection threshold: any cycle that has had ≥ 3 traversals in the last 5 minutes.
Aggregate budget: task.cost_budget_usd and task.step_budget cap the sum across all agents in the task, not per-agent. A child agent's costs decrement the parent's budget.
When budget hits 80%, the supervisor's next call is annotated BUDGET_PRESSURE_80 so the supervisor can summarise and exit early.
When budget hits 100%, the task transitions BUDGET_EXCEEDED regardless of which agent is mid-step.
| Artefact | Required? | Purpose |
|---|---|---|
| Decomposable task and dependency graph | yes | Identify safe parallel work |
| Worker scopes, permissions, and output schemas | yes | Prevent overlap |
| Reconciliation owner and conflict policy | yes | Produce one decision |
Delegation is optional and runner-dependent. Workers receive minimum scope. Shared-file edits require ownership or an explicit merge strategy.
Fallback without parallel workers: execute the same bounded workstreams sequentially and preserve separate evidence before synthesis.
| Task relationship | Coordination mode | Failure avoided |
|---|---|---|
| Independent questions or review lenses | Parallel workers | Unnecessary latency |
| Output B depends on decision A | Sequential handoff | Contradictory assumptions |
| Overlapping file mutations | Single owner or explicit merge | Conflicting edits |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub peterbamuhigire/chwezi-dev-engine --plugin engineering169 skills in this plugin
/accounting-engineUse when designing or implementing double-entry accounting policy and an embedded ledger engine for invoices, payments, stock, balanced postings, mapped accounts, idempotency, reversals, period locks, audit trails, and financial statements./accounting-finance-controllerUse when coordinating accounting and finance implementation reviews, doctrine routing, control evidence, remediation priorities, and release decisions across a software system./advanced-testing-strategyUse when designing or reviewing test strategy for production systems, APIs, mobile apps, SaaS platforms, ERP workflows, and AI-enabled systems. Covers unit, integration, contract, end-to-end, regression, release-gate, and risk-based testing decisions.Other plugins' skills for the same job