| name | subagent-rules |
| description | Proper delegation patterns for Task() invocations with governance context injection |
| allowed-tools | ["Task","Read","Bash"] |
| triggers | ["subagent","oa-router","Task delegation","anchor ceremony","subagent rules","delegate task","spawn agent","tier selection"] |
===SKILL:SUBAGENT_RULES===
META:
TYPE::SKILL
VERSION::"2.5.0"
STATUS::ACTIVE
PURPOSE::"Enforce oa-router delegation with anchor ceremony for all subagent Task() calls"
§1::ROUTING_RULE
SCOPE::"Task()/Agent tool delegations only. External CLI dispatch (pal clink→goose/gemini/codex) is a separate mechanism — see /review §4."
RULE::"ALL Task() agent delegation MUST use subagent_type:'oa-router'. NEVER call role agents directly."
RATIONALE::"oa-router runs anchor ceremony providing identity, governance, context, enforcement (I5)"
§2::TEMPLATE
INVOCATION::Task({
subagent_type: "oa-router",
description: "{brief description}",
prompt: role: {role} tier: {tier|default} topic: {context for ARM computation} BEFORE ANY WORK: Load deferred MCP tool schemas via ToolSearch if needed (see §4d), then complete the anchor ceremony. Do not read or act on the task below until you have a valid PERMIT_SID. YOUR TASK {detailed task description} SUCCESS CRITERIA {what done looks like}
})
§3::TIER_SELECTION
TIERS::[
micro::trivial_read_only_tasks[0_tensions,tension_bypass],
quick::fast_iteration_single_constraint[1_tension],
default::standard_work[2_tensions],
deep::critical_decisions_production_impact[3_tensions]
]
§4::CALLER_RULES
MUST::["Include anchor-first instruction in every prompt (baked into §2 template)", "Include role field (oa-router cannot bind without it)", "Store agent_id from Task() result for same-role reuse", "Use resume parameter with stored agent_id for subsequent calls to same role"]
NEVER::["Skip/bypass anchor ceremony", "Pre-assign identity (e.g., 'You are an implementation-lead')", "Omit role from prompt", "Include pre-ceremony instructions that bypass binding", "Launch fresh Task() for same role when previous agent_id exists in session", "Use run_in_background:true for oa-router delegations"]
BACKGROUND_RULE::[
PROHIBITION::"oa-router Task() calls MUST run in foreground (run_in_background MUST be false or omitted)",
RATIONALE::"Background execution hides the anchor ceremony — multi-stage identity proofs (I5) become unauditable. Foreground shows every sub-agent action (anchor_request, file reads, anchor_lock, anchor_commit) enabling real-time verification.",
PARALLEL_ALTERNATIVE::"For throughput, use multiple foreground Task() calls in a single message — Claude Code executes independent calls concurrently while preserving visibility.",
DETECTION::"IF oa-router output contains 'Async agent launched successfully' THEN ceremony auditability is lost → treat as governance concern"
]
INVALID_WORK::"IF subagent produces output without valid PERMIT_SID THEN work is INVALID per I5 → discard and re-delegate"