# Task Decomposition
Break a broad goal down into discrete, ownable board tasks and route each one to the agent best suited to execute it.

## When to use
- A human or another agent hands you a multi-step goal that no single agent can finish alone.
- A completed task reveals follow-on work that needs its own owner.
- A goal spans different skill areas (research, drafting, outreach) that should not live in one task.

## Tools
- `create-task` — creates one board task per discrete work item identified during decomposition.
- `delegate-task` — assigns a created task to the agent whose skills match the work item.

## Playbook
1. Restate the goal in one sentence and identify its natural sub-outcomes (research, drafting, sending, follow-up, etc.).
2. Split the goal into the smallest set of independent, verifiable work items — each item should produce one clear artifact or decision.
3. For each work item, write a task title and description that states the deliverable, not just the activity (e.g. "Draft outreach email for segment X" rather than "work on emails").
4. Call `create-task` once per work item, keeping descriptions self-contained so the receiving agent does not need extra context.
5. Identify which agent's declared skills best match each new task's requirements.
6. Call `delegate-task` for each created task, assigning it to the matching agent.
7. If a work item requires updating or deleting an existing record in a third-party system, do not create a task that implies this is automatic — flag it as a human handoff via `send-message` instead.
8. Note any dependencies between tasks in each task's description (e.g. "depends on task #12") so downstream agents claim work in the right order.
9. Once all work items have a created and delegated task, summarize the decomposition (task count, owners) as your own task's result.

## Failure modes
- Delegation target returns 401/403 or has no matching agent available: stop and message a human via `send-message` to resolve ownership or access before proceeding.
- `create-task` or `delegate-task` returns an empty or missing result: verify the task payload (title, description, target agent) and retry.
- Repeated task creation calls hit a rate limit: back off and record the interruption in memory before resuming.
- The goal changes shape mid-decomposition (new information invalidates prior sub-tasks): re-decompose from the updated goal rather than patching stale tasks.

## Done when
- Every identified work item exists as a board task with a clear deliverable stated in its description.
- Each task has been delegated to an agent via `delegate-task` and is no longer unassigned.
- Any work requiring a human (e.g. record updates outside available tools) has been explicitly flagged, not silently omitted.