Delegate commands to agents for structured execution
Delegation allows commands to hand off work to specialized agents with constrained tools, preloaded skills, and custom models. This is the most powerful pattern in Pro Workflow.
---description: Build a feature using multi-phase developmentargument-hint: <feature description>---# Develop FeatureFeature: $ARGUMENTSDelegate to the **orchestrator agent** to build this feature using the Research > Plan > Implement workflow.The orchestrator will:1. Research the codebase (confidence scoring)2. Present a plan for approval3. Implement step-by-step4. Run quality gates
---description: Review code before commitargument-hint: [files...]---# Code ReviewFiles: $ARGUMENTS or all modified files if not specifiedDelegate to the **reviewer agent**:- Review these files: $ARGUMENTS- Check for: logic errors, security issues, edge cases- Present findings with severity levels- Approve or block commit
The agent receives the full command body as context, including expanded $ARGUMENTS.
---description: Full feature workflowargument-hint: <feature>---# Feature WorkflowFeature: $ARGUMENTS## Step 1: ExplorationDelegate to the **scout agent** (background, worktree isolation):- Assess confidence for: $ARGUMENTS- Return GO/HOLD verdict**Wait for scout to complete.**## Step 2: PlanningIf scout gives GO: Delegate to the **planner agent**: - Create implementation plan for: $ARGUMENTS - List all files to change - Present for approval**Wait for approval.**## Step 3: ImplementationDelegate to the **orchestrator agent**:- Execute the approved plan- Quality gates every 5 edits- Run full test suite at end## Step 4: ReviewDelegate to the **reviewer agent**:- Review all changes- Security audit- Performance check- Approve for commit
---description: Parallel code reviewargument-hint: <files...>---# Parallel ReviewFiles: $ARGUMENTSDelegate to multiple reviewer agents in parallel:- **Reviewer 1**: Security audit of $ARGUMENTS[0:2]- **Reviewer 2**: Performance check of $ARGUMENTS[2:4]- **Reviewer 3**: Logic review of $ARGUMENTS[4:]Wait for all reviewers to complete, then synthesize findings.
---description: Smart task routingargument-hint: <task>---# Smart RouterTask: $ARGUMENTSAnalyze complexity:- If task is a bug fix: - Delegate to **debugger agent** for systematic investigation- If task touches >5 files: - Delegate to **orchestrator agent** for multi-phase development- If task is unclear: - Delegate to **scout agent** for exploration (background) - Wait for confidence score - If score >= 70, delegate to **planner agent** - If score < 70, ask user for clarification- Otherwise: - Execute directly without delegation
Delegate to the **scout agent** with worktree isolation:- Create isolated git worktree- Explore safely without interfering with main branch- Return findings
The scout agent has isolation: worktree in frontmatter.
---description: Get confidence score---# Confidence CheckDelegate to **scout agent**:- Assess confidence for this task- Return score (0-100)If score >= 70: Proceed with implementationElse: Ask user for more context
---description: Safe delegation with fallback---# Safe TaskTry: Delegate to **orchestrator agent**: - Execute task: $ARGUMENTS - If agent fails, report errorCatch: If orchestrator fails: Delegate to **planner agent**: - Create manual plan - User executes plan step-by-step
---description: Build feature with multi-phase workflowargument-hint: <feature>---# Develop FeatureFeature: $ARGUMENTSDelegate to **orchestrator agent**:## Research Phase- Explore codebase- Find patterns- Score confidence- Decision: GO/HOLD## Plan Phase- Design solution- List files to change- Identify risks- **Wait for approval**## Implement Phase- Execute plan- Quality gates every 5 edits- Full test suite at end## Review PhaseDelegate to **reviewer agent**:- Security audit- Logic review- Approve for commit
/review with Reviewer
---description: Code review before commitargument-hint: [files...]---# Code ReviewFiles: $ARGUMENTS or all modified filesModified files: !`git diff --name-only`Delegate to **reviewer agent**:## Review Checklist1. Logic - Does it do what's intended?2. Edge Cases - Null, empty, bounds?3. Errors - Proper handling?4. Security - Injection, auth, secrets?5. Performance - O(n^2) loops, memory?6. Tests - Coverage adequate?## Output- Critical issues (must fix)- High priority (should fix)- Medium (nice to fix)- Low (suggestions)## Decision- Approve or block commit