delegation-protocol
Skill11 starsChanged 49 days agoApache-2.0View on GitHub
Use when spawning any subagent, deciding which agent should handle a piece of work, coordinating parallel or sequential agent execution, or handing off artifacts between agents. Defines the mandatory 8-field delegation prompt format, agent registry, and handoff patterns.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- bakhod1r/awesome-agentstheir own version, first seen Oct 15, 2026
- jeroromano/claude-code-orchestration-templatetheir own version, first seen Oct 14, 2026
- gootf/software-agent-soptheir own version, first seen Aug 30, 2026
- megandmartin/agent-skills-repotheir own version, first seen Jul 24, 2026
- zebbern/termstacktheir own version, first seen Apr 16, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- zebbern/termstack★ 4same name
- megandmartin/agent-skills-repo★ 3same name
- gootf/software-agent-sop★ 2same name
- jeroromano/claude-code-orchestration-template★ 1same name
- bakhod1r/awesome-agents★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository83 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- about-konductorSkill
- adr-generatorSkill
- adversarial-code-review-pass-integritySkill
- adversarial-code-review-pass-schemaSkill
- adversarial-code-review-pass-securitySkill
- adversarial-code-reviewSkill
- adversarial-design-reviewSkill
- agents-md-authoringSkill
- app-discoverySkill
- architecture-advisorSkill
- architecture-diagram-generationSkill
- argumentation-referenceSkill
- asana-sprint-planningSkill
- asdlc-aspect-reviewSkill
- asdlc-code-simplifierSkill
- aws-service-validatorSkill
- backend-developmentSkill
- backend-reviewSkill
- claude-teams-behaviorSkill
- cmux-dispatchSkill
- code-reviewSkill
- constraintsSkill
- cost-estimationSkill
- cypress-test-implementationSkill
- decision-researchSkill
- decision-writingSkill
- deliberation-panelSkill
- design-doc-guidelinesSkill
- design-evaluationSkill
- design-impact-reviewSkill
- design-quality-checkSkill
- doc-accuracy-analyzerSkill
- document-formatsSkill
- dom-inspectionSkill
- dynamodb-designSkill
- dynamodb-validationSkill
- e2e-test-strategySkill
- external-researchSkill
- find-aws-skillsSkill
- frontend-developmentSkill
- frontend-reviewSkill
- git-mergeSkill
- git-workflowSkill
- historical-issues-registrySkill
- humanize-writingSkill
- iam-policy-designSkill
- infra-validationSkill
- kiro-design-generationSkill
- kiro-requirements-generationSkill
- kiro-task-generationSkill
- legacy-to-agentic-estimateSkill
- mux-dispatchSkill
- non-functional-requirementsSkill
- persistent-memorySkill
- plan-reviewSkill
- playwright-test-implementationSkill
- policy-validationSkill
- pre-planning-analysisSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 6 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Use this skill when:
- Very specific: line 25
Every delegation MUST include all 8 fields — the 7 sections below, plus an explicit TARGET AGENT preamble line:
- Very specific: line 53
If a section is not applicable, write N/A — never omit the section.
- Very specific: line 61
Claude Code: use the agent name exactly as it appears in your own tool definitions / available-agent list for this session (e.g.
- Very specific: line 62
Kiro CLI: use the bare name from toolsSettings.subagent.availableAgents (e.g.
- Very specific: line 93
When uncertain which agent to use, check the agent's skill list in the README or invoke sdlc-navigator.
- Distinctive: line 121
When a SOP is registered on more than one agent, the caller MUST pick the target based on what else the delegating step needs rather than …
- Distinctive: line 129
Never block on one subagent when another independent task can start
- Distinctive: line 134
Before spawning any write agent, explicitly name its exact target in the dispatch prompt — a new dedicated worktree, an existing worktree …
- Distinctive: line 178
After code changes, run the maker-checker cycle:
- Distinctive: line 190
If the retry fails, escalate to the user with: what was attempted, what failed, and the root cause
- Very specific: line 191
If a subagent times out, check .konductor/handoff/ for partial output.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Delegation Protocol
Overview
Defines how the orchestrator delegates work to specialist agents. Every subagent spawn MUST use the 8-field prompt format — an explicit target agent plus the 7 sections — and MUST NOT omit the target agent. This ensures tasks are atomic, outcomes are verifiable, agents stay within scope, and spawns never fail outright from a missing subagent_type.
Usage
Use this skill when:
- Spawning any subagent for a delegated task
- Deciding which agent handles a piece of work
- Coordinating parallel or sequential agent execution
- Handing off artifacts between agents
Delegation Prompt Format
Every delegation MUST include all 8 fields — the 7 sections below, plus an explicit TARGET AGENT preamble line:
TARGET AGENT: <Exact subagent_type value — see "Never Omit the Target Agent" below. Never leave blank.>
TASK: <Atomic, specific goal — one verb, one outcome>
EXPECTED OUTCOME: <Concrete deliverables with success criteria>
REQUIRED SKILLS: <Relevant expertise the subagent needs>
REQUIRED TOOLS: <Explicit tool allowlist — only these tools may be used>
MUST DO:
- <Exhaustive requirements list>
- Preserve existing comments and JSDoc blocks
- Preserve existing logging statements
- Add inline comments for complex logic
MUST NOT DO:
- <Forbidden actions list>
- Do NOT remove comments or documentation
- Do NOT strip logging statements
- Do NOT silently reduce scope
CONTEXT: <File paths, patterns, constraints, handoff file references>If a section is not applicable, write N/A — never omit the section. TARGET AGENT is the one exception: it is never N/A — every delegation targets exactly one agent.
Never Omit the Target Agent
Every subagent spawn — every Agent() call (Claude Code), every subagent tool invocation (Kiro CLI), and every agent() call inside a Workflow tool script (.claude/workflows/*.js) — MUST include an explicit target agent drawn from the Agent Registry below. Never omit it. For Agent() and subagent, the tool's own default when the target is omitted is general-purpose — this fleet registers no agent by that name, and the spawn fails outright ("Agent type 'general-purpose' not found"). For agent() inside a Workflow script, the equivalent field is the agentType option in the call's options object (the second argument) — set it explicitly on every call; never leave it to default.
Resolve the exact identifier from the runtime's own available-agents list for the current session — do not guess or hardcode a single form, since the correct literal string is install-dependent:
- Claude Code: use the agent name exactly as it appears in your own tool definitions / available-agent list for this session (e.g.
konductor:k-architectfor a Claude Code plugin install,k-architectfor akonductor installinto.claude/agents/). - Kiro CLI: use the bare name from
toolsSettings.subagent.availableAgents(e.g.k-architect). Workflowagent()calls: set theagentTypeoption using the same Claude Code naming form as above (e.g.agentType: "konductor:k-researcher"). TheWorkflowtool is Claude Code only, so there is no Kiro CLI equivalent to resolve.
This is distinct from spawning the wrong agent for the task (an IMPORTANT-tier Quality Gate issue below) — this rule guards against spawning no agent at all.
Deliberate exception for Workflow agent() calls: a call may omit agentType only when the step is pure reasoning over data already inlined into the prompt (decomposition, classification, or synthesis with no need to read files, run commands, or use any other tool) — in that case the session's default reasoning agent is a legitimate choice, not an oversight. Every such omission MUST carry an inline comment immediately above the call explaining why no specialist is needed, so the omission is never mistaken for the bug this rule exists to prevent. A call that needs file/tool access (reading a file, listing a directory, running a command, web search, etc.) always needs an explicit agentType — omitting it there is the CRITICAL defect below, not a deliberate exception.
Format ownership rule: MUST DO / MUST NOT DO sections should not contradict the receiving agent's skills or system prompt. If a specialist agent has a skill that defines how output is produced (e.g.,
cloudscape-mock-uiuses a CDN bundle), do not add constraints that override that skill's behavior. Format guidance from the user's request (e.g., "output as a single file") is acceptable to pass through.
Agent Registry
SDLC Specialists
| Agent | Purpose | When to Spawn |
k-product-manager | Requirements & planning | User stories, requirements extraction, document formatting, sprint planning, deliberation on PM-domain tradeoffs (deliberation-panel) |
k-architect | Design & architecture | System design, threat modeling, design documentation, requirements extraction, decision research, multi-option deliberation (deliberation-panel) |
k-developer | Implementation | Backend/frontend code, code review, infra validation, git workflow, Kiro spec generation (requirements.md, design.md, tasks.md) |
k-quality-assurance | Testing | Test coverage analysis, E2E test strategy, Cypress test implementation, DOM inspection for functional test generation, security test generation |
k-researcher | Research | External docs, web research, deliberation on research-options/feasibility (deliberation-panel) |
k-tpm | Program management | Program plans, status reports, risk tracking, decision docs, plan review, sprint planning |
k-browser | Browser automation | Web scraping, E2E test execution via Playwright, form automation, screenshots |
konductor-mux-orchestrator | Parallel orchestration (tmux/zellij) | Use when running on a platform with tmux or zellij active. Dispatches specialist agents to visible, interactive tmux/zellij panes for parallel execution. Auto-detects multiplexer from $TMUX / $ZELLIJ. Requires tmux or zellij; errors if neither is detected and directs the user to konductor instead. |
konductor-cmux-orchestrator | Parallel orchestration (cmux, macOS) | Use on macOS with cmux available. Dispatches specialist agents to cmux surfaces (tabs, splits, or workspaces) for parallel execution with human interaction. Errors when cmux is not available and directs the user to konductor instead. |
Meta-Agents (Quality & Planning)
| Agent | Purpose | When to Spawn |
k-media-analyzer | Media analysis | PDFs, images, diagrams that need interpretation beyond raw text; web content requiring visual or structural interpretation |
When uncertain which agent to use, check the agent's skill list in the README or invoke sdlc-navigator.
Tool-to-Agent Routing
Authoritative source: This table is the detailed routing reference.
context/k-orchestrator-routing-rules.mdis a quick-reference summary loaded at startup — when the two conflict, this file wins. Update both when adding new tool domains.
| Tool Domain | Primary Agent | Other Agents with Access |
| Web (external pages) | k-researcher | k-browser (automation/scraping); k-media-analyzer (extract/interpret content from a specific URL) |
For web content, prefer k-researcher for information retrieval. Delegate to k-browser for interactive automation or scraping, and to k-media-analyzer when the page content requires visual or structural interpretation.
Per-Agent SOP Registrations
Which SOPs each agent declares in its own dependencies.agentSops.agentSopNames, read directly from agents/*.agent-spec.json. This is the authoritative source for which agent a SOP dispatches to when it names another SOP by identifier — a referencing SOP should look up the owning agent here rather than stating or assuming one independently.
| Agent | Registered SOPs (own agentSopNames) |
k-architect | k-design-doc-creation, k-existing-design-review, k-principal-engineer-design-review, k-adversarial-pull-request-review |
k-developer | k-code-cleanup, k-pre-cr-critique, k-codebase-analysis, k-code-review-workflow |
k-quality-assurance | k-test-coverage-review |
konductor | kiro-spec-workflow, k-delegate, k-plan, k-context-gathering, k-verify, k-light-ui-testing, k-comprehensive-search, k-full-sdlc, k-e2e-test-generation, about-konductor |
konductor-mux-orchestrator | kiro-spec-workflow, k-plan, k-context-gathering, k-verify, k-comprehensive-search, k-full-sdlc, k-e2e-test-generation, k-light-ui-testing, about-konductor |
konductor-cmux-orchestrator | kiro-spec-workflow, k-plan, k-context-gathering, k-verify, k-comprehensive-search, k-full-sdlc, k-e2e-test-generation, k-light-ui-testing, about-konductor |
k-product-manager, k-researcher, k-tpm, k-browser, k-media-analyzer | None declared — these agents execute delegated tasks; they do not select their own SOPs |
konductor additionally registers k-delegate; konductor-mux-orchestrator and konductor-cmux-orchestrator do not.
When a SOP is registered on more than one agent, the caller MUST pick the target based on what else the delegating step needs rather than treat the lookup as single-valued.
A SOP registered directly on an orchestrator's own agentSopNames, such as kiro-spec-workflow on konductor above, MUST be invoked directly rather than routed through a specialist-agent lookup, since it delegates to its own agents internally.
Parallel Execution
- Independent tasks ALWAYS run in parallel (max 4 concurrent subagents)
- Typical pattern:
research + explore→synthesize→plan→implement - Never block on one subagent when another independent task can start
- Dependent tasks run sequentially — wait for the upstream handoff file before spawning
Both runtimes support spawning the same agent multiple times in parallel with different tasks (e.g., two k-developer instances — one for backend, one for frontend, each in its own worktree), via their native delegation tool: the subagent tool (Kiro CLI) or Agent() (Claude Code). Each instance runs independently with its own context; the orchestrator waits for all spawned instances to complete before proceeding.
Before spawning any write agent, explicitly name its exact target in the dispatch prompt — a new dedicated worktree, an existing worktree to reuse, or (solo sequential dispatch only) the shared working tree. Never let an agent infer or default to a location: a silent default is what causes two agents, from the same task or different tasks, to collide in the same tree. The write agent itself provisions or reuses the named target using its own shell/file tools — not the orchestrator — on either runtime.
Parallel write agents MUST own disjoint files. Before spawning two or
more write agents at once, list the files each one will edit. If a
file appears in more than one list (a shared router, an index.ts, a
registry), give that file to one agent, or run the parts that touch it
in sequence. Separate worktrees do not prevent this: both edits
conflict at merge, or one is lost.
For dispatch into a separate, visible pane or surface rather than an
in-session subagent call, see claude-teams-behavior (Claude Code Agent
Teams), mux-dispatch (tmux/zellij), or cmux-dispatch (cmux) for the
dispatch-method-specific steps. mux-dispatch and cmux-dispatch each
detect and drive Kiro CLI the same as Claude Code, so Kiro CLI is already
covered there; for a plain in-session subagent/Agent() call with no
multiplexer, the three paragraphs above are the complete procedure on either
runtime and no separate skill is needed.
Examples of parallelizable work:
- Two
k-developerinstances: one for backend handler, one for frontend component - Running code review + test coverage analysis on separate modules
- Generating threat model + cost estimation from the same design doc
Handoff Pattern
Large outputs between agents go through handoff files:
- Subagent writes output to
.konductor/handoff/<agent>-<task>.md - Subagent returns only the file path to the orchestrator
- Next subagent reads the handoff file directly as CONTEXT
- Max ~300 lines per handoff file — split into multiple files if larger
File naming: <source-agent>-<descriptive-task>.md
Example: architect-system-design.md, developer-task-breakdown.md
Post-Implementation Review
After code changes, run the maker-checker cycle:
- Get the git diff of all changes
- Spawn the appropriate reviewer agent (e.g.,
k-developerwithbackend-revieworfrontend-review) - Address all CRITICAL findings
- Re-review. If the fix fails, follow rule 5 under Orchestration Rules in your orchestrator prompt.
Failure Recovery
This section covers failed spawns: the spawn errors, times out, or the subagent returns nothing. For output that fails verification, follow rule 5 under Orchestration Rules instead.
- If a spawn fails, retry once with additional CONTEXT explaining the failure. If it failed because a permission was denied (a declined prompt, a permission rule or hook, or a sandbox or OS refusal such as EPERM, EACCES or a read-only filesystem), do not retry or re-route it; ask the user.
- If the retry fails, escalate to the user with: what was attempted, what failed, and the root cause
- If a subagent times out, check
.konductor/handoff/for partial output. Verify any partial output under rule 5; retry the spawn only if there is none.
Quality Gate
CRITICAL (block delegation):
- Subagent spawned with no explicit target agent (
subagent_typeomitted) — the tool defaults togeneral-purpose, which is not registered in this fleet, and the spawn fails outright Workflowagent()call withagentTypeomitted and no inline comment justifying the omission (see "Deliberate exception" above) — treat as an unreviewed omission, not a deliberate one- Delegation prompt missing any of the 7 required sections (or the
TARGET AGENTpreamble line) - Subagent spawned without explicit MUST NOT DO constraints
- Dependent task spawned before upstream handoff file exists
- More than 4 concurrent subagents
- Any write agent spawned without an explicitly named target (new worktree / existing worktree to reuse / shared tree) in its dispatch prompt
IMPORTANT (fix before proceeding):
- Wrong agent selected for the task domain
- Handoff file exceeds 300 lines without splitting
- Post-implementation review skipped after code changes
SUGGESTION:
- Could parallelize independent tasks that are running sequentially
- Could add more specific success criteria to EXPECTED OUTCOME
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

