Delegation Skill
Activate this skill when delegating work to subagents during orchestration execution. This skill provides the templates, rules, and patterns for constructing effective delegation prompts that produce consistent, high-quality results.
Protocol Injection
Before constructing any delegation prompt, inject the shared agent base protocol:
Injection Steps
- Load
agent-base-protocolviaget_skill_content - Load
filesystem-safety-protocolviaget_skill_content - Prepend both protocols to the delegation prompt (base protocol first, then filesystem safety) — these appear before the task-specific content
- For each phase listed in the current phase's
blocked_by, readphases[].downstream_contextfrom session state and include it in the prompt - If any required
downstream_contextis missing, include an explicit placeholder noting the missing dependency context (never omit silently)
The injected protocol ensures every agent follows consistent pre-work procedures and output formatting regardless of their specialization.
Context Chain Construction
Every delegation prompt must include a context chain that connects the current phase to prior work:
Phase Context: Include Downstream Context blocks from all completed phases that the current phase depends on (identified via blocked_by relationships in the implementation plan and sourced from session state phases[].downstream_context):
Context from completed phases:
- Phase [N] ([agent]): [Downstream Context summary]
- Interfaces introduced: [list with file locations]
- Patterns established: [list]
- Integration points: [specific files, functions, endpoints]
- Warnings: [list]
Accumulated Patterns: Naming conventions, directory organization patterns, and architectural decisions established by earlier phases. This ensures phase 5 does not contradict patterns set in phase 2.
File Manifest: Complete list of files created or modified in prior phases, so the agent knows what already exists and can import from or extend those files.
Missing Context Fallback: If a blocked dependency has no stored downstream context, include a visible placeholder entry in the prompt:
- Phase [N] ([agent]): Downstream Context missing in session state — verify dependency output before implementation
Downstream Consumer Declaration
Every delegation prompt must declare who will consume the agent's output:
Your output will be consumed by: [downstream agent name(s)] who need [specific information they require]
This primes the agent to structure their Downstream Context section for maximum utility to the next agent in the chain.
Settings Override Application
Before constructing any delegation prompt, resolve configurable parameters:
- Read the agent's base definition frontmatter (
temperature,max_turns,timeout_mins,tools) - Do not invent Maestro-level model, temperature, turn, or timeout overrides. Native delegation uses agent frontmatter defaults plus any runtime-level agent configuration already active in the session.
- Include only task-relevant execution context in the prompt metadata
- If the agent appears in
MAESTRO_DISABLED_AGENTS, do not construct a delegation prompt — report to the orchestrator that the agent is disabled
Delegation Prompt Template
Every delegation to a subagent must follow this structure:
Task: [One-line description of what to accomplish]
Progress: Phase [N] of [M]: [Phase Name]
Files to modify:
- /absolute/path/to/file1.ext: [Specific change required]
- /absolute/path/to/file2.ext: [Specific change required]
Files to create:
- /absolute/path/to/new-file.ext: [Purpose and key contents]
Deliverables:
- [Concrete output 1]
- [Concrete output 2]
Validation: [command to run after completion, e.g., "npm run lint && npm run test"]
Context:
[Relevant information from the design document or previous phases]
Do NOT:
- [Explicit exclusion 1]
- [Explicit exclusion 2]
- Modify any files not listed above
Scope Boundary Rules
Absolute Paths
Always provide absolute file paths in delegation prompts. Never use relative paths or expect agents to search for files.
Specific Deliverables
Define exactly what the agent should produce. Vague instructions like "implement the feature" lead to inconsistent results. Instead: "Create UserService class with createUser(), getUserById(), and deleteUser() methods implementing the IUserService interface."
Validation Criteria
Include the exact command(s) to run after completion. The agent should run these and report results. Examples:
npm run lint && npm run testcargo build && cargo testgo vet ./... && go test ./...python -m pytest tests/
No Interactive Commands in Delegation Prompts
Never include interactive CLI commands in delegation prompts. Subagents run autonomously without user input. Interactive commands will hang indefinitely.
<ANTI-PATTERN> WRONG — Delegation prompt includes interactive scaffolding: "Run `npx create-next-app@latest . --typescript --tailwind`" "Run `npm init` to create package.json"CORRECT — Delegation prompt specifies direct file creation: "Create package.json with the following content: ..." "Create tsconfig.json, tailwind.config.ts, and src/app/layout.tsx directly" </ANTI-PATTERN>
Exclusions
Explicitly state what the agent must NOT do:
- Files it must not modify
- Dependencies it must not add
- Patterns it must not introduce
- Scope it must not exceed
Agent Selection Guide
| Task Domain | Agent | Key Capability |
|---|---|---|
| System architecture, component design | architect | Read-only analysis, architecture patterns |
| Cloud architecture, multi-region topology | cloud-architect | Read-only cloud/IaC architecture |
| Enterprise integration architecture | solutions-architect | Read-only cross-team architecture |
| API contracts, endpoint design | api-designer | Read-only, REST/GraphQL expertise |
| Feature implementation, coding | coder | Full read/write/shell access |
| Code quality assessment | code-reviewer | Read-only, verified findings |
| Database schema, queries, ETL | data-engineer | Full read/write/shell access |
| RDBMS tuning, indexes, migration safety | database-administrator | Read + shell for database analysis |
| DB2 operations and tuning | db2-dba | Read + shell for DB2-specific work |
| Bug investigation, root cause | debugger | Read + shell for investigation |
| CI/CD, infrastructure, deployment | devops-engineer | Full read/write/shell access |
| Internal platforms, paved paths | platform-engineer | Full platform implementation access |
| B2B APIs, ETL, message brokers | integration-engineer | Full integration implementation access |
| SLOs, runbooks, reliability | site-reliability-engineer | Read + shell reliability analysis |
| Metrics, logs, traces, dashboards | observability-engineer | Full observability implementation access |
| Performance analysis, profiling | performance-engineer | Read + shell for profiling |
| Code restructuring, modernization | refactor | Read/write/shell, skill activation |
| Security assessment, vulnerability | security-engineer | Read + shell for scanning |
| Test creation, TDD, coverage | tester | Full read/write/shell access |
| Documentation, READMEs, guides | technical-writer | Read/write, no shell |
| Release notes, changelogs, rollout | release-manager | Read/write for release artifacts |
| Technical SEO auditing | seo-specialist | Read + shell + web search/fetch |
| Marketing copy, content writing | copywriter | Read/write |
| Content planning, strategy | content-strategist | Read + web search/fetch |
| User experience design | ux-designer | Read/write + web search |
| WCAG compliance auditing | accessibility-specialist | Read + shell + web search |
| Requirements, product strategy | product-manager | Read/write + web search |
| T |