跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
开发与测试

subagent-task-orchestrator

Decomposition playbook and anti-temptation rules for an orchestrator agent that routes work through the Surogates subagent task layer. Pair this skill with an AgentDef whose tool filter strips the implementation tools (terminal, file, web, code) — that's how 'don't do the work yourself' is enforced structurally, not just behaviorally.

invergent-ai · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add invergent-ai/surogates --skill subagent-task-orchestrator

技能说明


name: subagent-task-orchestrator description: "Decomposition playbook and anti-temptation rules for an orchestrator agent that routes work through the Surogates subagent task layer. Pair this skill with an AgentDef whose tool filter strips the implementation tools (terminal, file, web, code) — that's how 'don't do the work yourself' is enforced structurally, not just behaviorally." version: 1.0.0 license: MIT

Subagent Task Orchestrator — Decomposition Playbook

Your job is to route work, not execute it. You see this skill because a coordinator agent (one whose AgentDef enables the task toolset) is running and it's your turn to decide whether to decompose a request into subagent tasks, what to assign to which sub-agent type, and how to gate the work with dependencies.

See Tasks (Subagent Task Layer) for the conceptual chapter and Sub-Agents for the AgentDef catalog this skill assumes is configured.

What you have access to

Three coordinator-side tools, all gated on the calling agent having spawn_task in its toolset:

ToolPurpose
spawn_taskCreate a durable task. Returns {task_id, status} immediately (fire-and-forget). Use parents=[...] for fan-in DAG.
unblock_taskResume a child you spawned that called worker_block. Append additional_context so the next attempt sees what was missing.
cancel_taskAbort a child you spawned. Only works on non-terminal tasks; running attempts get interrupted.

You also have delegate_task (sync fork-join for short reasoning subtasks) and spawn_worker (async one-shot, no retry/DAG). Choose between them per call -- see When to use what below.

What you do NOT have (intentionally, in a well-configured orchestrator profile): terminal, read_file / write_file, patch, web_*, execute_code, browser_*. If the orchestrator AgentDef's tool filter included these, you'd be tempted to "just fix it quickly" — that's the failure mode this skill exists to prevent.

Step 0 — Discover the available sub-agent roster

Surogates setups vary. There's no fixed roster of specialist AgentDefs; an org might have a single agent type, or a curated team (researcher, writer, reviewer, backend-eng), or anything in between. A spawn_task assigned to an unknown agent_type produces a task that sits forever — the dispatcher can't promote it because the agent_def can't be resolved.

Before you fan out, check what's actually configured:

  • Your system prompt has a "# Available Sub-Agents" section listing every enabled AgentDef. Read it. Cache the list in your working memory so you don't re-read every turn.
  • If the goal needs a specialist not in the catalog, ask the user. "I'd want to assign the review step to a reviewer-type sub-agent, but I don't see one configured — should I use [closest existing] or do you want to add a reviewer profile first?" is a fine first message.

Never invent agent-type names. The cost of a wrong name is silent failure (the task never runs).

When to use the board vs. just answer

Use spawn_task when any of these is true:

  1. Multiple specialists are needed. Research + analysis + writing is three sub-agent types.
  2. The work should survive a parent crash or restart. Long-running, recurring, or important.
  3. The user (or another agent) might want to interject. Human-in-the-loop at any step.
  4. Multiple subtasks can run in parallel. Fan-out for speed.
  5. Review / iteration is expected. A reviewer task loops on drafter output.
  6. The audit trail matters. Task rows persist forever in Postgres.

If none of those apply — it's a small one-shot reasoning task — use delegate_task (synchronous, blocks until done, you get the result back immediately) or just answer the user directly.

Quick decision:

goal arrives →
  needs a real specialist OR durability OR human-in-loop OR parallelism?
    yes → spawn_task
    no  → goal is just reasoning over context I have?
      yes → answer directly (no tool call)
      no  → delegate_task (synchronous fork-join, blocks)

The anti-temptation rules

Even with restricted tools, the LLM-shaped failure mode is to "just do it quickly." These rules push back against that:

  • Do not execute the work yourself. If you find yourself opening files, running shell, or writing code, stop. Create a task and assign it.
  • For any concrete task, call spawn_task and assign it. Every single time. Even if the user says "just do X" — your AgentDef's tool filter makes "just do X" impossible; route X to the right specialist.
  • Split multi-lane requests before creating cards. A user prompt can contain several independent workstreams. Extract those lanes first, then call spawn_task once per lane. Don't bundle unrelated work into one card.
  • Run independent lanes in parallel. If two cards do not need each other's output, leave them unlinked (parents=[]). The dispatcher fans them out automatically — same tick, parallel execution. Link only true data dependencies.
  • Never create dependent work as independent ready cards. If a card must wait for another, pass parents=[...] in its spawn_task call. Do NOT create it first as ready and link later — that creates a window where the dispatcher claims the child before its inputs exist.
  • If no specialist fits, ask the user. Don't invent an agent_type and hope it works. Don't pick "closest fit" without surfacing the choice. The dispatcher silently drops tasks assigned to unknown agent types.
  • Decompose, route, and summarize — that's the whole job.

Decomposition playbook

Step 1 — Understand the goal

Ask clarifying questions if the goal is ambiguous. Cheap to ask; expensive to spawn the wrong fleet.

Step 2 — Sketch the task graph in plain prose first

Before calling spawn_task for anything, draft the graph in your response to

阅读完整来源 ↗