# Delegation Best Practices

> Reference for Role to Specialist delegation patterns with MCP architecture, including quality validation, coordination protocols, and proven patterns Use when this capability is needed.

- Skill: `tomevault-io/delegation-best-practices` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/delegation-best-practices`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/delegation-best-practices/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/delegation-best-practices

---


# Delegation Best Practices: Role → Specialist MCP Architecture

**Created**: 2025-10-07
**Source**: Week 3-4 testing validation (4 successful delegation tests)
**Status**: Production-validated patterns

## Overview

This document captures proven delegation patterns from Week 3-4 testing where 4/4 delegation tests achieved 100% production-ready quality with $575K+ annual business value identified.

**Key Finding**: The Role → Specialist delegation pattern delivers **37.5 percentage points higher quality** than estimated direct role work (100% vs 62.5% production-ready).

## Core Delegation Principles

### 1. Documentation-First Research Protocol

**Pattern**: Every specialist consults official documentation BEFORE making recommendations

**Evidence**: 100% adoption across all Week 3-4 tests
- Test 1 (orchestra-expert): WebFetch for Orchestra docs
- Test 2 (dbt-expert, snowflake-expert): Official dbt and Snowflake docs
- Test 3 (tableau-expert): Tableau extract and dashboard design best practices
- Test 4 (aws-expert): AWS Well-Architected Framework

**Why This Works**:
- Prevents guessing and assumptions
- Ensures vendor best practices followed
- Provides authoritative citations for recommendations
- Increases recommendation confidence levels

**Implementation**:
```markdown
# In specialist agent definition

## Documentation Research Protocol

**ALWAYS consult official documentation first** - never guess or assume functionality.

### Documentation Access Protocol
1. **Start with WebFetch** to get current documentation before making any recommendations
2. **Primary Sources**: Use these URLs with WebFetch tool:
   - [Tool] Docs: [URL]
   - API Reference: [URL]
   - Best Practices: [URL]
3. **Verify**: Cross-reference multiple sources when needed
4. **Document**: Include documentation URLs in your findings
```

### 2. Cross-Specialist Coordination via Documentation

**Pattern**: Specialists create written coordination documents instead of attempting direct communication

**Evidence**: Test 2 (dbt-expert → snowflake-expert) - Flawless coordination
- dbt-expert created `snowflake-expert-coordination.md` with delegation context
- snowflake-expert read context, provided validation and enhancements
- No direct communication needed between specialists
- Combined recommendations synthesized without conflicts

**Why This Works**:
- Written context is complete and unambiguous
- Specialists work independently (parallel processing)
- Delegating role can review coordination documents
- Audit trail for decisions and rationale

**Coordination Document Template**:
```markdown
# [Optimization Name] - [Target Specialist] Coordination

**Delegating Specialist**: [specialist-name]
**Target Specialist**: [target-specialist-name]
**Date**: [YYYY-MM-DD]

## Context from Delegating Specialist
[What work has been done so far]

## Analysis Needed from Target Specialist
1. [Specific analysis task 1]
2. [Specific analysis task 2]
3. [Specific analysis task 3]

## Context to Analyze
- [Data/configuration/code to review]
- [Current state information]
- [Constraints and requirements]

## Expected Deliverables
- [Deliverable 1]: [Description]
- [Deliverable 2]: [Description]

## Success Criteria
- [Metric 1]: [Target value]
- [Metric 2]: [Target value]

## Timeline
- Expected completion: [Date/timeframe]
- Blocking next phase: [Yes/No]
```

**Location**: `.claude/tasks/[delegating-specialist]/[target-specialist]-coordination.md`

### 3. Production-Validated Pattern Reuse

**Pattern**: Specialists reference actual production deployments to increase confidence levels

**Evidence**: Test 4 (aws-expert) - Confidence 0.95 based on customer-dashboard and app-portal deployments
- Referenced `knowledge/applications/customer-dashboard/` for ECS + ALB pattern
- Referenced `knowledge/applications/app-portal/` for OIDC authentication
- Avoided trial-and-error by reusing proven patterns
- Identified critical gotchas from production experience

**Why This Works**:
- Confidence levels increase from 0.70-0.80 to 0.90-0.95
- Eliminates trial-and-error and reduces implementation risk
- Critical gotchas documented and avoided
- Faster time-to-production (days vs weeks)

**Implementation**:
```markdown
# In specialist agent definition

## Production-Validated Patterns

### Pattern 1: [Pattern Name] (Confidence: 0.XX)
**Source**: [Project name or test reference]

**Problem**: [What issue this pattern solves]

**Solution**: [Specific implementation with code]

**When to Apply**: [Conditions where pattern is applicable]

**Validation**: [How to verify pattern works]

**Production References**:
- `knowledge/applications/[app-name]/[relevant-doc].md`
```

**Pattern Library Locations**:
- `knowledge/applications/` - Application-specific patterns
- `.claude/agents/specialists/[specialist].md` - Production-Validated Patterns section
- `.claude/rules/` and `.claude/skills/reference-knowledge/` - Cross-cutting patterns

### 4. Specialist Boundary Recognition

**Pattern**: Specialists explicitly identify when other specialists are needed

**Evidence**: All 4 tests demonstrated boundary recognition
- Test 1 (orchestra-expert): Identified 4 specialists needed (prefect, dbt, snowflake, tableau)
- Test 2 (dbt-expert): Delegated to snowflake-expert appropriately
- Test 3 (tableau-expert): Identified 3 specialists (dbt, snowflake, business-analyst)
- Test 4 (aws-expert): Identified prerequisites and cross-specialist needs

**Why This Works**:
- Prevents overconfidence and guessing outside domain
- Enables proper multi-specialist coordination
- Ensures comprehensive solutions (no gaps)
- Demonstrates professional judgment

**Implementation**:
```markdown
# In specialist findings document

## Cross-Specialist Coordination Needs

**[specialist-1]** ([timeframe]):
- Task: [What specialist needs to analyze]
- Deliverable: [Expected output]
- Priority: [High/Medium/Low]

**[specialist-2]** ([timeframe]):
- Task: [What specialist needs to analyze]
- Deliverable: [Expected output]
- Priority: [High/Medium/Low]
```

**Delegation Triggers** (When to involve other specialists):
- Confidence <0.60 on specific task component
- Work extends beyond domain boundaries
- Performance/cost/security trade-offs require domain expertise
- Validation needed for high-risk decisions

### 5. Cost-Benefit Analysis Standard

**Pattern**: All optimization recommendations include ROI calculations

**Evidence**: Test 3 (tableau-expert) - $384K/year savings with detailed ROI
- Current state baseline: $384,000/year (with evidence)
- Future state projection: $193/year (with calculation)
- Savings: 99.95% reduction
- Conservative estimate: $191,807/year (50% attribution)
- Payback period: <1 month

**Why This Works**:
- Quantifies business value of technical recommendations
- Enables prioritization (highest ROI first)
- Provides CFO-ready talking points
- Justifies implementation effort and token costs

**ROI Calculation Template**:
```markdown
## Cost-Benefit Analysis

**Current State**:
- Cost: $[X]/month ($[Y]/year)
- Calculation: [Show math]
- Evidence: [Bills, usage reports, metrics]

**Future State**:
- Cost: $[A]/month ($[B]/year)
- Calculation: [Show math]
- Assumptions: [List assumptions]

**Savings**:
- Absolute: $[Z]/month ($[Annual]/year)
- Percentage: [%] reduction
- Conservative estimate: $[Conservative]/year ([% attribution])

**Implementation Costs**:
- Labor: [Hours] × [Rate] = $[Cost]
- Infrastructure: $[One-time] + $[Monthly ongoing]
- Total: $[Total implementation cost]

**ROI**:
- Payback period: [Months]
- First-year ROI: [%]
- 3-year NPV: $[Net present value]
- Risk-adjusted return: [Probability] × [Return] = [Expected value]
```

## Delegation Testing Patterns

### Single-Domain Delegation Test

**Pattern**: Role agent → Single specialist (Test 1, Test 3, Test 4)

**Test Structure**:
1. **Define scenario**: Realistic problem from delegating role's domain
2. **Provide context**: Current state, requirements, constraints (complete delegation context)
3. **Specialist analyzes**: Uses MCP tools + expertise
4. **Validate output**: Check for production-readiness criteria

**Success Criteria**:
- ✅ Specialist produces production-ready output
- ✅ Implementation plan included with phases
- ✅ Risk assessment and rollback plan documented
- ✅ Cross-specialist needs identified (if applicable)
- ✅ Official documentation cited

**Example (Test 1: data-engineer → orchestra-expert)**:
- Scenario: Daily sales pipeline taking 3 hours, failing 2-3x/week
- Specialist output: 3-phase optimization plan, 63% faster, 99% reliability
- Quality: 10/10 - Production-ready
- Cross-specialist coordination: Identified 4 specialists needed

### Cross-Specialist Delegation Test

**Pattern**: Role agent → Specialist A → Specialist B (Test 2)

**Test Structure**:
1. **Specialist A analyzes**: Provides domain expertise, identifies need for Specialist B
2. **Specialist A creates coordination doc**: Context for Specialist B delegation
3. **Specialist B analyzes**: Reads coordination doc, provides validation/enhancement
4. **Validate synthesis**: Check that combined recommendations are coherent

**Success Criteria**:
- ✅ Specialist A recognizes boundary and delegates appropriately
- ✅ Coordination document provides complete context
- ✅ Specialist B enhances (not replaces) Specialist A recommendations
- ✅ Combined output is production-ready
- ✅ No conflicts or inconsistencies between specialists

**Example (Test 2: analytics-engineer → dbt-expert → snowflake-expert)**:
- dbt-expert: Designed incremental materialization strategy
- dbt-expert: Created snowflake-expert coordination document
- snowflake-expert: Enhanced with dual-warehouse, multi-column clustering, deterministic MERGE fix
- Combined quality: 10/10 - Production-ready, critical bug prevented

### Multi-Specialist Coordination Test

**Pattern**: Role agent → Multiple specialists in parallel/sequence

**Test Structure**:
1. **Identify coordination needs**: Which specialists required
2. **Parallel delegation**: Independent specialist work (when no dependencies)
3. **Sequential delegation**: Dependent specialist work (when needed)
4. **Synthesis**: Role agent combines recommendations into unified plan

**Success Criteria**:
- ✅ Correct specialists identified for each domain
- ✅ Parallel work executed independently (no conflicts)
- ✅ Sequential dependencies respected (proper ordering)
- ✅ Synthesis produces coherent implementation plan

**Example (Test 3: bi-developer → tableau-expert)**:
- tableau-expert identified 3 specialists needed:
  - dbt-expert (Week 2): Design mart models for extract consumption
  - snowflake-expert (Week 2): Warehouse optimization, cost baseline
  - business-analyst (Week 3): Validate 30-min refresh acceptable, UAT
- Coordination: Sequential (dbt → snowflake in Week 2, business-analyst in Week 3)
- Result: Comprehensive 3-phase implementation plan

## Quality Validation Criteria

### Production-Ready Output Checklist

Every specialist recommendation must include:

**1. Root Cause Analysis**
- [ ] Specific issues identified with evidence
- [ ] Prioritized by impact (most critical first)
- [ ] Quantified where possible (time, cost, incident frequency)

**2. Solution Design**
- [ ] Specific technical recommendations (with code/configuration)
- [ ] Phased approach (quick wins → medium complexity → architectural changes)
- [ ] Expected impact quantified (performance %, cost $, reliability %)

**3. Implementation Plan**
- [ ] Step-by-step execution with phases
- [ ] Effort estimates (hours/days per phase)
- [ ] Success criteria for each phase
- [ ] Validation checkpoints

**4. Risk Assessment**
- [ ] What could go wrong (specific risks)
- [ ] Likelihood and impact (High/Medium/Low)
- [ ] Mitigation strategies for each risk
- [ ] Rollback procedures documented

**5. Cross-Specialist Coordination**
- [ ] Other specialists identified (if needed)
- [ ] Delegation context prepared (if coordinating)
- [ ] Timeline for specialist work
- [ ] Dependencies documented

**6. Quality Validation**
- [ ] Meets requirements (performance, cost, reliability)
- [ ] Follows best practices (official docs cited)
- [ ] Production-ready (no guessing, no TODOs)
- [ ] Rollback tested (recovery procedures work)

### Quality Scoring Rubric

**10/10 (Excellent - Production-Ready)**:
- All 6 criteria met completely
- Official documentation cited
- Production-validated patterns used
- Cross-specialist coordination flawless
- Example: All 4 Week 3-4 tests

**7-9/10 (Good - Minor Enhancements Needed)**:
- 5 of 6 criteria met completely
- 1 criterion partially met (e.g., incomplete rollback plan)
- Minor refinements needed before production
- Example: Not seen in Week 3-4 (all tests scored 10/10)

**4-6/10 (Acceptable - Significant Work Needed)**:
- 3-4 of 6 criteria met
- Implementation plan incomplete
- Requires another iteration with specialist
- Example: Not acceptable for production deployment

**<4/10 (Poor - Redo Required)**:
- <3 criteria met
- Guessing or assumptions without evidence
- Missing critical components
- Requires complete rework
- Example: Would trigger immediate re-delegation

## Specialist Output Standards

### Documentation Format

**Executive Summary** (Always first):
```markdown
## Executive Summary

**Problem**: [2-3 sentence problem statement]
**Solution**: [2-3 sentence solution overview]
**Impact**: [Quantified business value - time, cost, reliability]
**Timeline**: [Implementation duration]
**Risk**: [Overall risk level - Low/Medium/High]
```

**Detailed Analysis Sections**:
1. Root Cause Analysis
2. Solution Design
3. Implementation Plan (phased)
4. Cost-Benefit Analysis (with ROI)
5. Risk Assessment (with mitigation)
6. Rollback Plan
7. Cross-Specialist Coordination (if needed)
8. Validation & Monitoring

**File Naming Convention**:
- `.claude/tasks/[specialist-name]/findings.md` - Main analysis
- `.claude/tasks/[specialist-name]/[specific-topic]-analysis.md` - Detailed deep-dives
- `.claude/tasks/[specialist-name]/[target-specialist]-coordination.md` - Delegation context

### Response Length Guidelines

**Concise Responses** (500-1000 words):
- Simple questions ("What warehouse size for this model?")
- Single-domain optimization ("Reduce Snowflake costs")
- Quick validation ("Is this configuration correct?")

**Comprehensive Responses** (2000-5000 words):
- Complex multi-phase projects (Test 1: Orchestra optimization)
- Cross-specialist coordination (Test 2: dbt + snowflake)
- Platform-wide analysis (Test 5: cost-optimization-specialist)

**Deep Dive Responses** (5000-15000 words):
- Critical production deployment decisions
- Platform architecture changes
- Regulatory compliance validation
- Comprehensive quality strategies (Test 6: data-quality-specialist)

**Rule of Thumb**: Match detail level to decision impact and implementation complexity

## Proven Patterns from Week 3-4 Testing

### Pattern 1: Phased Implementation Approach

**Source**: Test 1 (orchestra-expert) - 3-phase optimization

**Structure**:
- **Phase 1 (Week 1)**: Quick wins (low effort, high impact, low risk)
- **Phase 2 (Weeks 2-3)**: Medium complexity (moderate effort, high impact, medium risk)
- **Phase 3 (Weeks 4-5)**: Architectural changes (high effort, highest impact, higher risk)

**Benefits**:
- Early value delivery (Phase 1 delivers results in Week 1)
- Risk mitigation (validate pattern works before big investments)
- Learning loops (refine approach based on Phase 1/2 results)
- Stakeholder confidence (show progress, build trust)

**When to Apply**: Any optimization requiring >2 weeks implementation

### Pattern 2: Dual-Warehouse Sizing

**Source**: Test 2 (snowflake-expert) - 77% cost savings

**Problem**: Single warehouse sized for full-refresh wastes credits on incremental runs

**Solution**:
```sql
-- Incremental runs: Smaller warehouse (MEDIUM = 4 credits/hour)
CREATE WAREHOUSE INCREMENTAL_WH WITH WAREHOUSE_SIZE = 'MEDIUM';

-- Full-refresh runs: Larger warehouse (LARGE = 8 credits/hour)
CREATE WAREHOUSE FULL_REFRESH_WH WITH WAREHOUSE_SIZE = 'LARGE';
```

**Cost Impact**: 90 credits/month → 20 credits/month (77% reduction)

**When to Apply**:
- Large models (50M+ rows) with daily incremental processing
- Significant difference between incremental and full-refresh runtimes
- Weekly/monthly full-refresh schedules

**Validation**: Measure credit consumption before/after, ensure SLAs met

### Pattern 3: Extract vs Live Connection Analysis

**Source**: Test 3 (tableau-expert) - $384K/year savings

**Decision Framework**:

**Use Live Connections When**:
- Real-time data absolutely required (<5 minute freshness)
- Low concurrent user load (<10 users)
- Simple dashboards (1-3 worksheets, <5 data sources)

**Use Extracts When**:
- Data freshness acceptable (30-60 minute latency)
- High concurrent user load (50+ users)
- Complex dashboards (12+ worksheets, 8+ data sources)
- **Cost Driver**: Live connections cause concurrent query spikes (400+ queries for 50 users × 8 sources)

**Impact**: XLARGE warehouse (128 credits/hour) → SMALL warehouse (2 credits/hour) = 99.95% reduction

**When to Apply**: High-concurrency BI scenarios with acceptable data freshness latency

### Pattern 4: Deterministic MERGE Operations

**Source**: Test 2 (snowflake-expert) - Critical bug prevention

**Problem**: Non-deterministic MERGE operations cause Snowflake errors when source query returns duplicate keys

**Solution**:
```sql
{% if is_incremental() %}
    WITH source_data AS (
        SELECT
            unique_key_column,
            -- ... other columns ...
            MAX(updated_at) as updated_at  -- Deterministic aggregation
        FROM {{ ref('source_model') }}
        WHERE filter_column >= DATEADD(day, -3, CURRENT_DATE())
        GROUP BY unique_key_column  -- CRITICAL: Prevents duplicate keys
    )
{% endif %}
```

**Why Critical**: Without GROUP BY, MERGE can receive duplicate keys and fail non-deterministically

**When to Apply**:
- ALL incremental models using `incremental_strategy='merge'`
- Any Snowflake MERGE operations
- Window functions that could produce duplicates

**Validation**: Test with duplicate source data, ensure MERGE completes without errors

### Pattern 5: Incremental Test Optimization

**Source**: Test 2 (dbt-expert) - 80% test time reduction

**Problem**: Full test suite on 50M+ row tables takes 10-15 minutes

**Solution**:
```yaml
data_tests:
  - unique:
      column_name: primary_key
      config:
        where: "updated_at >= DATEADD(day, -7, current_date())"  # Only test recent data

  - not_null:
      column_name: critical_column
      config:
        where: "updated_at >= DATEADD(day, -7, current_date())"
```

**Impact**: 80% reduction in test execution time for daily runs

**When to Apply**:
- Large fact tables (10M+ rows) with incremental processing
- Daily test execution in CI/CD pipelines
- SLA-constrained test windows (<5 minutes)

**Validation**: Weekly full-refresh runs execute tests WITHOUT where clauses (validate complete dataset)

## Cross-Specialist Coordination Patterns

### Pattern A: Sequential Delegation (Dependent Work)

**When to Use**: Specialist B needs Specialist A's output as input

**Example**: Test 2 (dbt-expert → snowflake-expert)
1. analytics-engineer delegates to dbt-expert
2. dbt-expert analyzes, creates snowflake-expert coordination doc
3. dbt-expert completes initial recommendations
4. snowflake-expert reads coordination doc, validates and enhances
5. analytics-engineer synthesizes combined recommendations

**Timeline**: Sequential (dbt analysis + snowflake analysis time)
**Benefit**: Higher quality through specialist validation and enhancement

### Pattern B: Parallel Delegation (Independent Work)

**When to Use**: Multiple specialists can work independently, no dependencies

**Example**: Test 3 (tableau-expert identifying 3 specialists)
- dbt-expert: Mart model design (independent)
- snowflake-expert: Warehouse sizing (independent)
- business-analyst: UAT facilitation (independent)
- All three can work in parallel

**Timeline**: Parallel (max of individual specialist times, not sum)
**Benefit**: Faster overall delivery, no waiting on sequential dependencies

### Pattern C: Hub-and-Spoke (Role agent coordinates multiple specialists)

**When to Use**: Complex multi-domain problem requiring synthesis

**Example**: Test 1 (orchestra-expert identified 4 specialists, role would coordinate)
- Role agent (data-engineer): Central coordinator
- Specialist 1 (prefect-expert): Salesforce optimization → Returns findings
- Specialist 2 (dbt-expert): Model dependencies → Returns findings
- Specialist 3 (snowflake-expert): Warehouse sizing → Returns findings
- Specialist 4 (tableau-expert): Extract dependencies → Returns findings
- Role agent: Synthesizes all findings into unified implementation plan

**Timeline**: Can be parallel (if independent) or sequential (if dependent)
**Benefit**: Comprehensive solution covering all platform layers

## Role Agent Responsibilities in Delegation

### Before Delegation (Context Gathering)

**Role agent must provide**:
1. **Complete task description**: What needs to be accomplished (not just "optimize this")
2. **Current state**: Existing configs, performance metrics, cost data, incident history
3. **Requirements**: Performance targets, cost constraints, SLA requirements, quality standards
4. **Constraints**: Timeline, budget, deployment windows, stakeholder dependencies

**Example (Good delegation context from Test 2)**:
```
{
  "task": "Optimize the fct_sales_daily model which is running too slowly",
  "current_state": "Full table refresh takes 45 minutes, materializes as table, has 15 tests, used by 8 Tableau dashboards",
  "requirements": "Reduce runtime to <10 minutes, maintain data quality, keep all tests passing",
  "constraints": "Can't change source data, must maintain historical data back to 2020, SLA is 7am completion",
  "model_info": "Aggregates 50M+ transaction rows daily, joins 6 dimension tables, includes 12 calculated metrics"
}
```

**Bad delegation context** (Insufficient):
```
{
  "task": "Make fct_sales_daily faster"
}
```

### During Delegation (Validation)

**Role agent should**:
1. **Read specialist findings**: Understand recommendations, not just implement blindly
2. **Ask clarifying questions**: If recommendations unclear, ask specialist to elaborate
3. **Validate against requirements**: Ensure specialist addressed all requirements
4. **Check cross-specialist coordination**: If specialist identified other experts, coordinate appropriately

### After Delegation (Synthesis & Execution)

**Role agent must**:
1. **Synthesize recommendations**: Combine multiple specialist inputs into unified plan
2. **Make final decisions**: Choose between alternative recommendations if provided
3. **Execute implementation**: Follow specialist plan, document deviations
4. **Validate outcomes**: Measure actual vs predicted results
5. **Update confidence levels**: Track specialist success rate, adjust delegation thresholds

## Token Cost vs Quality Trade-offs

### Observed Metrics (Week 3-4)

**Token Costs**:
- Specialist delegation: 67,000 tokens (4 tests)
- Direct role work estimate: 20,000 tokens
- **Cost multiplier**: 3.35x more tokens

**Quality Delivered**:
- Specialist: 100% production-ready (4/4 tests)
- Direct role estimate: 62.5% production-ready
- **Quality improvement**: 37.5 percentage points

**Business Value**:
- Specialist: $575K+ annual savings identified
- Direct role estimate: ~$0 (likely to miss optimization opportunities)
- **Value multiplier**: Infinite ROI vs baseline

**Net ROI**: 100-500x (conservative estimate)

### When Delegation is Worth the Token Cost

**HIGH ROI scenarios** (Always delegate):
- Production-critical decisions (downtime prevention, incident avoidance)
- High-value optimizations (>$10K/year savings potential)
- Complex multi-system problems (require deep expertise)
- Compliance and security (correctness essential)

**MEDIUM ROI scenarios** (Delegate if confidence <0.60):
- Performance optimizations ($1K-10K/year value)
- Quality improvements (moderate incident risk)
- Integration work (some cross-system complexity)

**LOW ROI scenarios** (Consider direct role work):
- Simple configuration changes (high confidence, low risk)
- Repetitive tasks (role has pattern memorized)
- Low-value optimizations (<$1K/year savings)
- Experimental/prototype work (correctness less critical)

### Token Budget Management

**Guideline**: Reserve 20-30% of project token budget for specialist delegation

**Example (1M token project budget)**:
- Direct work: 700K-800K tokens (70-80%)
- Specialist delegation: 200K-300K tokens (20-30%)
- Benefits: Higher quality, faster delivery, massive ROI

**When to Increase delegation budget**:
- Production-critical work (up to 40-50% specialist delegation)
- Complex multi-system integration (up to 50-60% specialist delegation)
- High-value optimization opportunities (justify higher token cost)

## Continuous Improvement Patterns

### Pattern Extraction (During /complete)

**What to Capture**:
1. **Production-validated patterns**: Solutions that worked in production
2. **Specialist confidence updates**: Update confidence levels based on actual outcomes
3. **Cross-specialist coordination success**: Document what worked well
4. **Bug prevention patterns**: Document critical issues prevented (like Test 2 deterministic MERGE)

**Where to Capture**:
- **Specialist agent files**: Production-Validated Patterns section
- **Knowledge base**: `knowledge/applications/[app]/` for application-specific patterns
- **Pattern library**: `.claude/rules/` and `.claude/skills/reference-knowledge/` for reusable cross-system patterns

**Update Frequency**: After every project completion (via /complete command integration)

### Delegation Success Tracking

**Metrics to Track** (Future measurement framework):
1. **Delegation success rate**: % of delegations producing production-ready output
2. **Time-to-recommendation**: Specialist response time (target: <30 minutes)
3. **Implementation success rate**: % of specialist recommendations that work in production
4. **Cost savings identified**: $ value per specialist consultation
5. **Bug prevention rate**: Critical issues caught before production

**Implementation**: Week 6+ measurement framework (automated tracking)

## Common Pitfalls & Solutions

### Pitfall 1: Incomplete Delegation Context

**Problem**: Role agent provides insufficient context, specialist makes assumptions

**Example (Bad)**:
```
"Optimize the database"
```

**Solution**: Use structured delegation context template
```
{
  "task": "Reduce Snowflake warehouse costs by 40%",
  "current_state": "5 warehouses (2 XLARGE, 2 LARGE, 1 MEDIUM), $45K/month spend, 70% idle time",
  "requirements": "Maintain query performance <30s, support 200 concurrent users, 99.5% uptime SLA",
  "constraints": "8-week implementation, no user downtime, must maintain audit compliance"
}
```

**Prevention**: Role agent delegation protocols include context checklist

### Pitfall 2: Specialist Overreach

**Problem**: Specialist makes recommendations outside domain expertise

**Solution**: Specialist explicitly identifies "needs other expert" areas

**Example (Good - from Test 1)**:
```markdown
## Cross-Specialist Coordination Needs

**dbt-expert**: Model dependency analysis, incremental materialization strategy
**snowflake-expert**: Warehouse sizing for threads=8, cost optimization
**tableau-expert**: Extract dependency mapping, incremental refresh
```

**Prevention**: Specialist agent definitions include clear domain boundaries

### Pitfall 3: Missing Rollback Plans

**Problem**: Optimization fails in production, no quick recovery procedure

**Solution**: Every specialist recommendation includes rollback plan

**Example (from Test 2)**:
```markdown
## Rollback Plan

If incremental materialization causes issues:
1. Revert dbt model config to `materialized='table'` (5 minutes)
2. Run `dbt run --select fct_sales_daily --full-refresh` (45 minutes)
3. Validate row counts match previous version
4. Monitor for 24 hours before re-attempting optimization

Total rollback time: <90 minutes
```

**Prevention**: Rollback plan is required element in production-ready output checklist

### Pitfall 4: Ignoring Cross-Specialist Dependencies

**Problem**: Implement Specialist A recommendations without consulting Specialist B (dependencies missed)

**Solution**: Follow cross-specialist coordination identified by specialists

**Example (from Test 3)**:
- tableau-expert identified dbt-expert needed for mart models
- Implementing extract conversion WITHOUT dbt mart models would fail
- Role agent must coordinate both specialists before implementation

**Prevention**: Role agent delegation validation includes cross-specialist dependency check

## Summary: Keys to Delegation Success

**The 5 Commandments of Delegation** (From Doc Brown's Playbook):

1. **Documentation First**: Consult official docs before making recommendations (prevents guessing)
2. **Complete Context**: Provide current state, requirements, constraints (enables quality analysis)
3. **Recognize Boundaries**: Delegate when confidence <0.60 or expertise beneficial (prevents overconfidence)
4. **Coordinate Specialists**: Use written coordination docs for cross-specialist work (enables synthesis)
5. **Validate Before Executing**: Check production-readiness criteria before implementation (prevents incidents)

**The ROI Promise**:
- 3.35x token cost
- 37.5 percentage point quality improvement
- 100-500x business value return
- Critical bug prevention

**The MCP Architecture Guarantee**:
When role agents follow these delegation best practices and specialists follow their output standards, the result is **production-ready solutions that deliver massive business value**.

---

**Like Doc Brown would say: "If you're gonna build a time machine into a car, why not do it with some style?" Same with delegation - if you're gonna use specialists, do it right and reap the 500x ROI.**

🚀 **Now go forth and delegate with confidence.**

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/dylpickledev) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-12 -->

