# DELEGATION.md

> Define when work may be delegated, which specialized agents exist, what context and authority each receives, how handoffs are structured, and who verifies and synthesizes the returned work.

**Decision rule:** Delegate only when a subtask has a bounded input and independently verifiable output or requires a distinct trust boundary. Keep tightly coupled reasoning in one context.

## How to use this template

- Replace every angle-bracket placeholder with project-specific evidence.
- Remove sections that do not apply instead of leaving ambiguous boilerplate.
- Link decisions to their specifications, tasks, tests, traces, and owners.
- Re-review this file when the workflow, authority boundary, or primary source changes.

## Delegation policy

> Prevent multi-agent coordination cost and fragmented context from becoming the default architecture.

- **Delegate when:** <List clean partitions, expertise needs, isolation, or parallelism that justify delegation>
- **Do not delegate when:** <List shared-state, tightly coupled, high-context, or authority-sensitive work>
- **Budget:** <Define maximum agents, turns, time, tokens, cost, and retry limits>

## Agent roster

> Describe specialization without granting unnecessary tools or context.

- **Role:** <Name each agent's bounded responsibility and expected output>
- **Context:** <List instructions, files, data, and history the agent receives>
- **Authority:** <List tools, resources, writes, approvals, and prohibited actions>

## Handoff contract

> Make delegated work reviewable without replaying hidden reasoning.

- **Input contract:** <Define objective, scope, dependencies, constraints, and acceptance evidence>
- **Return contract:** <Define artifacts, findings, uncertainties, checks, and unresolved blockers>
- **Failure contract:** <Define timeout, partial return, escalation, cancellation, and cleanup>

## Synthesis and verification

> Assign responsibility for overlap, contradictions, integration, and whole-system quality.

- **Synthesizer:** <Name the agent or person that owns the combined result>
- **Conflict resolution:** <Define authority order and evidence required when outputs disagree>
- **Final verification:** <Test the integrated outcome, permissions, traceability, and acceptance checks>

## Related AgentAtlas field guides

- [Multi-agent systems](https://agentatlas.dev/topics/multi-agent)
- [Tasks](https://agentatlas.dev/topics/tasks)
- [Agents](https://agentatlas.dev/topics/agents)

## Primary references

- [Codex subagents](https://learn.chatgpt.com/docs/agent-configuration/subagents) — Subagent configuration, scoped roles, delegation behavior, and parallel work inside Codex.
- [Create custom subagents](https://code.claude.com/docs/en/sub-agents) — Specialized subagent configuration, context isolation, tools, permissions, and delegation patterns.
- [Agentic SDD workflow](https://github.github.com/spec-kit/reference/agentic-sdd.html) — Generating and analyzing implementation tasks after specification and planning quality gates.
- [A2A protocol specification](https://a2a-protocol.org/latest/specification/) — Task identity, lifecycle, messages, status, artifacts, cancellation, and communication across agent boundaries.
- [Building effective agents](https://www.anthropic.com/engineering/building-effective-agents) — The distinction between fixed workflows and model-directed agents, plus the recommendation to add complexity only when measured outcomes justify it.
- [Running agents](https://openai.github.io/openai-agents-python/running_agents/) — Agent run loops, state management, continuation strategies, and the operational boundary between the SDK and application-owned state.

---

- Template version: 1.0.0
- Reviewed: 2026-07-26

Generated deterministically from reviewed AgentAtlas records.
