{
 "schema": "aiblocks-page/1",
 "id": "agent-delegation-builder",
 "type": "skill",
 "name": "Agent delegation and dependency planner",
 "summary": "Plan which AI agent owns each task, who may hand work to whom and what must finish first. Get a delegation plan and failure test cases.",
 "headline": "Agent delegation and dependency planner",
 "subhead": "Share your list of agents, who may hand work to whom, the task tree and what each task waits for. This skill plans each handoff: who owns it, what that agent may do and what must finish before it wakes. You get a delegation plan, a failure checklist and test cases.",
 "job": {
  "id": "build-software",
  "name": "Build and ship software"
 },
 "level": "intermediate",
 "thinking": "medium",
 "tested": true,
 "updated": "2026-10-28",
 "first_published": "2026-10-25",
 "inputs": [
  {
   "type": "codebase",
   "required": false,
   "label": "Codebase",
   "what": "a project's code, in a folder or repo the AI can open"
  }
 ],
 "outputs": [
  {
   "type": "plan",
   "required": true,
   "label": "Plan",
   "what": "a dated plan: what to do, in what order, with a decision rule for each step"
  },
  {
   "type": "code_change",
   "required": false,
   "label": "Code change",
   "what": "a change to the code, with what it fixes and how it was checked"
  }
 ],
 "you_give": [
  "Your agents: each name and the topic it is responsible for",
  "Who may hand work to whom, and your depth limit if you have one",
  "The task tree: the parent task and the child tasks you want",
  "What each task waits for before it may start",
  "Which work only a person can do, and who that person is (optional)",
  "Your project's code, so the starter can be adapted to it (optional)"
 ],
 "you_get": [
  "A delegation plan: for each handoff, who gets it, why, what they may do and what it waits for",
  "An authority and depth check, listing any handoff that would be refused",
  "What is logged for each handoff and each refusal",
  "A failure checklist",
  "Test cases using made-up agents and tasks",
  "A list of missing inputs and checks that did not run"
 ],
 "use_when": [
  "You run several AI agents and need to decide who may hand work to whom.",
  "One agent's result feeds another agent, and the second must not start too early.",
  "Work is being handed down chain after chain, and you want a limit on depth.",
  "You want a record of every handoff, including refused ones, to see which agents pass work to which."
 ],
 "skip_when": [
  "You want to plan the whole agent team and how a big task is split. Use the Multi-agent workflow planner or the Multi-agent system planner.",
  "You want the rules for how an agent claims a task so two agents do not do it twice. Use the Agent task ownership workflow builder.",
  "You want agents to alert each other and recover lost claims. Use the Agent wakeup and claim recovery builder.",
  "You want it to create tasks or wake agents in a live system. This skill plans only. You review it and run any change yourself."
 ],
 "output_sample": {
  "input": [
   "Your agents and the topic each one covers",
   "Who may hand work to whom, and your depth limit",
   "The task tree and what each task waits for",
   "Your project's code (optional)"
  ],
  "prerequisites": [
   "An AI that can read your files, or the files pasted in"
  ],
  "output": [
   {
    "name": "SCOPE and AGENTS",
    "contains": "Whose work this is, and for each agent its topic and who it may hand work to."
   },
   {
    "name": "HANDOFFS",
    "contains": "Each handoff with sender, receiver, reason, depth and whether it is allowed or refused."
   },
   {
    "name": "BLOCKED WORK",
    "contains": "Each waiting task, what it waits for and the rule for waking it."
   },
   {
    "name": "WORK FOR A PERSON",
    "contains": "Tasks no agent may do, and who receives them."
   },
   {
    "name": "WHAT IS LOGGED",
    "contains": "The events recorded for handoffs and refusals, and the fields kept."
   },
   {
    "name": "FAILURE CHECKLIST",
    "contains": "Each way it can fail, what should happen and how to check it."
   },
   {
    "name": "TEST CASES",
    "contains": "Made-up cases with setup and expected result, to run in a test copy."
   },
   {
    "name": "MISSING and CHECKS MISSED",
    "contains": "Inputs it lacked and checks it could not run."
   }
  ]
 },
 "output_shape": "DELEGATION PLAN FOR <client or project>\nSCOPE: <whose work this is, what is out of scope>\n\nAGENTS\n<agent> | topic: <...> | may hand work to: <...> | may not: <...>\n\nHANDOFFS\n<task> | from: <agent> | to: <agent> | why this agent: <...> | depth: <n of limit> | result: <allowed | refused, why>\n\nBLOCKED WORK\n<task> | waits for: <tasks> | wakes when: <rule>\n\nWORK FOR A PERSON\n<task> | why an agent cannot do it | goes to: <who>\n\nWHAT IS LOGGED\n<event> | recorded: <fields>\n\nFAILURE CHECKLIST\n<failure> | what should happen | how to check\n\nTEST CASES (made-up agents and tasks)\n<case> | setup | expected result\n\nCODE CHANGES (only if code was given)\n<file> | change | status: <proposed | done>\n\nMISSING\n<inputs that would change the plan>\n\nCHECKS MISSED\n<one line per check not done, or none>",
 "how_to_use": [
  "Know first: the starter's blocker and log code are placeholders. Replace them before you run anything; the plan says what to add.",
  "Add the skill to your AI, or open the pack and give your AI SKILL.md and the files in its references folder. An AI that can read your project folder, such as Claude Code, works best. A chat AI works if you paste them.",
  "Paste your agent list, who may hand work to whom and the task tree. Say which tasks wait for which.",
  "Add your code only if you want the starter adapted to it. Never paste keys or passwords.",
  "Read the refused handoffs and the failure checklist first. Check that nothing wakes before its blockers are done.",
  "Treat the test cases as a checklist to run yourself in a test copy. The skill does not run them."
 ],
 "checks": [],
 "next": [
  {
   "name": "Agent wakeup and claim recovery builder",
   "url": "https://useaiblocks.com/skills/wakeups-how-agents-alert-each-other-implementation-planner",
   "why": "Build it"
  },
  {
   "name": "Agent task ownership workflow builder",
   "url": "https://useaiblocks.com/skills/issues-how-agents-track-work-implementation-planner",
   "why": "Build it"
  },
  {
   "name": "Multi-agent workflow planner",
   "url": "https://useaiblocks.com/skills/multi-agent-workflow-planner",
   "why": "Set up AI to work for you"
  }
 ],
 "source": null,
 "credits": [],
 "files": [
  "references/delegation-audit-log-schema.sql",
  "references/delegation-manager-starter.ts",
  "references/method-notes.md"
 ],
 "links": {
  "page": "https://useaiblocks.com/skills/agent-delegation-builder",
  "markdown": "https://useaiblocks.com/skills/agent-delegation-builder.md",
  "json": "https://useaiblocks.com/skills/agent-delegation-builder.json",
  "instructions": "https://useaiblocks.com/skills/agent-delegation-builder/SKILL.md",
  "download": "https://useaiblocks.com/skills/agent-delegation-builder.zip",
  "api_item": "https://useaiblocks.com/api/v1/items/agent-delegation-builder",
  "api_document": "https://useaiblocks.com/api/v1/documents/skill/agent-delegation-builder",
  "mcp": "https://useaiblocks.com/mcp"
 }
}
