--- model: claude-sonnet-4-0 allowed-tools: Task, Read, Write, Glob, Grep argument-hint: [specialists...] [--mode=] description: Dynamic multi-agent team assembly with adaptive collaboration protocols --- # Multi-Agent Orchestration Engine Assemble and coordinate specialized expert teams with dynamic collaboration patterns optimized for specific problem complexity and user sophistication levels. Create seamless multi-agent workflows that adapt to problem evolution and maximize collective intelligence. ## Team Assembly Architecture ### Complexity Scaling Framework **Simple (3-4 agents)** - Core domain specialist with primary expertise - Practical implementer with hands-on experience - Integration coordinator for synthesis and decision-making - Single-phase analysis with straightforward coordination **Moderate (5-6 agents)** - Primary domain specialist with deep technical knowledge - Secondary domain specialist covering adjacent areas - Practical implementer with implementation reality-testing - Constructive challenger with alternative perspective generation - Integration lead with cross-domain synthesis capability - Two-phase analysis with structured disagreement **Complex (7-9 agents)** - Multiple domain specialists with comprehensive coverage - Technical implementation specialists with practical constraints - Strategic analyst with long-term perspective evaluation - Risk assessor with failure mode analysis capability - Innovation catalyst with creative approach generation - Constructive challenger with systematic assumption testing - Integration coordinator with hierarchical synthesis management - Multi-phase analysis with structured collaboration protocols **Enterprise (10+ agents)** - Comprehensive specialist coverage across all relevant domains - Teams-of-teams structure with hierarchical coordination - Meta-integration roles with cross-team synthesis capability - Multiple challenging perspectives with diverse analytical approaches - Specialized coordination roles for complex workflow management ### Orchestration Pattern Framework #### Sequential Pattern [Extended thinking: Step-by-step expert consultation where each specialist builds on previous analysis. Optimal for problems requiring layered understanding or when expert insights create natural dependency chains.] **Coordination Protocol:** - Expert consultation order optimization based on dependency analysis - Context preservation between specialist transitions with insight accumulation - Progressive complexity building with each expert adding sophistication - Quality gates between specialists with validation checkpoints - Synthesis integration at each phase with incremental understanding building #### Parallel Pattern [Extended thinking: Simultaneous multi-expert analysis for comprehensive perspective generation. Optimal for problems requiring diverse viewpoints or when time constraints demand efficiency.] **Coordination Protocol:** - Simultaneous expert activation with shared context distribution - Independent analysis execution with voice differentiation maintenance - Cross-perspective insight recognition with pattern identification - Conflict identification with structured disagreement preparation - Synchronized synthesis with multi-stream integration #### Dialectical Pattern [Extended thinking: Structured disagreement between opposing perspectives to strengthen solutions through constructive tension. Optimal for decision-making or when multiple valid approaches exist.] **Coordination Protocol:** - Opposing perspective identification with balanced representation - Structured debate facilitation with evidence-based argumentation - Alternative approach generation with feasibility assessment - Creative tension resolution with innovative synthesis - Consensus building with compromise optimization #### Hierarchical Pattern [Extended thinking: Multi-tier expert coordination with specialized integration roles. Optimal for complex problems requiring both tactical and strategic perspectives.] **Coordination Protocol:** - Strategic tier with high-level vision and direction setting - Tactical tier with implementation planning and constraint analysis - Operational tier with detailed execution and technical specifics - Cross-tier communication with context translation capabilities - Meta-integration with multi-level synthesis coordination #### Adaptive Pattern [Extended thinking: Dynamic pattern switching based on problem evolution and discovery progression. Optimal for exploratory problems or when optimal approach emerges during analysis.] **Coordination Protocol:** - Real-time pattern assessment with effectiveness monitoring - Dynamic reconfiguration based on progress indicators - Expert role evolution with capability reallocation - Pattern transition management with continuity preservation - Learning optimization with approach refinement ## Specialist Selection Engine ### Domain Coverage Matrix **Technical Domains** - **Architecture**: System design, scalability patterns, technology selection - **Security**: Threat modeling, vulnerability assessment, defensive strategies - **Performance**: Optimization strategies, bottleneck analysis, scaling solutions - **Data**: Storage design, pipeline architecture, analytics optimization - **Frontend**: User interface design, client-side optimization, accessibility - **Backend**: Service design, API architecture, business logic optimization - **DevOps**: Deployment strategies, infrastructure automation, monitoring systems **Strategic Domains** - **Business**: Value proposition, market positioning, competitive analysis - **Product**: User needs analysis, feature prioritization, roadmap planning - **Financial**: Cost analysis, ROI evaluation, resource optimization - **Risk**: Threat assessment, mitigation strategies, contingency planning - **Innovation**: Creative approaches, emerging technologies, breakthrough thinking **Operational Domains** - **Process**: Workflow optimization, efficiency analysis, automation opportunities - **Quality**: Testing strategies, validation methods, quality assurance - **Support**: Maintenance considerations, user support implications - **Compliance**: Regulatory requirements, audit preparation, governance ### Dynamic Expert Allocation [Extended thinking: Intelligently select and configure expert teams based on problem characteristics, user needs, and resource constraints. Optimize for both coverage and efficiency.] **Selection Criteria:** - Problem domain mapping with expertise requirement identification - Complexity assessment with appropriate specialist depth selection - User sophistication detection with communication style optimization - Resource constraint accommodation with team size optimization - Outcome objective alignment with specialist capability matching ## Collaboration Protocol Engine ### Communication Orchestration **Context Sharing Framework** - Unified problem context with shared understanding establishment - Specialist-specific context tailoring with relevant detail emphasis - Cross-expert information flow with insight propagation - Progress tracking with milestone achievement monitoring - Decision point identification with consensus building triggers **Voice Differentiation Protocols** - Unique vocabulary maintenance with domain-specific terminology - Analytical approach consistency with methodology preservation - Question pattern establishment with inquiry style differentiation - Perspective authenticity with expert personality maintenance ### Integration Methodology **Synthesis Coordination** - Multi-perspective insight collection with comprehensive coverage - Common ground identification with shared principle extraction - Disagreement analysis with productive tension recognition - Creative solution generation through perspective combination - Recommendation formation with actionable output creation **Quality Assurance Framework** - Coverage validation ensuring comprehensive perspective representation - Insight novelty assessment identifying breakthrough vs. incremental thinking - Integration coherence evaluation measuring synthesis effectiveness - Actionability verification confirming implementation feasibility ## Execution Examples ### Example 1: Complex Feature Development ```bash orchestrate "implement real-time collaborative editing" complex backend,frontend,performance,security --mode=hierarchical ``` **Team Assembly:** - **Strategic Tier**: Product Architect defining overall approach and success criteria - **Tactical Tier**: Backend Lead, Frontend Lead, Performance Engineer planning implementation - **Operational Tier**: Database Specialist, WebSocket Expert, Security Analyst handling specifics - **Integration**: Technical Coordinator synthesizing multi-tier insights **Orchestration Flow:** 1. **Strategic Planning**: Product Architect defines collaborative editing requirements and constraints 2. **Tactical Design**: Backend/Frontend Leads create architecture with Performance Engineer optimization 3. **Operational Implementation**: Specialists detail WebSocket protocols, database synchronization, security measures 4. **Integration Synthesis**: Technical Coordinator creates unified implementation roadmap ### Example 2: Security Assessment ```bash orchestrate "evaluate API security posture" moderate security,backend,compliance --mode=dialectical ``` **Team Assembly:** - **Security Architect**: Defensive design perspective with comprehensive protection strategies - **Penetration Tester**: Offensive perspective with vulnerability identification and exploitation - **Compliance Expert**: Regulatory perspective with audit and governance requirements - **Backend Specialist**: Implementation reality with practical constraint assessment - **Integration Lead**: Synthesis coordinator balancing security, compliance, and practicality **Orchestration Flow:** 1. **Parallel Analysis**: Each expert examines API security from their specialized perspective 2. **Structured Disagreement**: Security Architect vs. Penetration Tester on defense vs. offense priorities 3. **Compliance Integration**: Compliance Expert adds regulatory requirements to security strategies 4. **Practical Reality Check**: Backend Specialist evaluates implementation feasibility 5. **Synthesis**: Integration Lead creates balanced security enhancement roadmap ### Example 3: Performance Optimization ```bash orchestrate "optimize database query performance" simple --mode=adaptive ``` **Team Assembly (starts minimal, expands as needed):** - **Database Expert**: Primary specialist with query optimization expertise - **Performance Engineer**: Added if system-wide performance issues discovered - **Frontend Developer**: Added if client-side implications identified - **Integration Coordinator**: Synthesis role adapting to discoveries **Orchestration Flow:** 1. **Initial Analysis**: Database Expert examines query performance issues 2. **Adaptive Expansion**: Performance Engineer added when systemic bottlenecks discovered 3. **Scope Evolution**: Frontend Developer included when client-side caching opportunities identified 4. **Dynamic Synthesis**: Integration Coordinator creates comprehensive optimization strategy ## Advanced Features ### User Sophistication Detection **Novice Indicators** - Basic terminology usage with limited technical vocabulary - Sequential question patterns with step-by-step information needs - Concrete example preferences with minimal abstraction comfort - Implementation focus with limited strategic perspective **Advanced Indicators** - Technical fluency with domain-specific terminology usage - Systematic thinking with structured problem decomposition - Trade-off awareness with constraint acknowledgment - Strategic perspective with long-term implication consideration **Expert Indicators** - Cross-domain knowledge with interdisciplinary thinking - Paradigm-level thinking with fundamental assumption questioning - Innovation capability with creative solution generation - Meta-cognitive awareness with process optimization thinking ### Adaptive Communication Protocols **Novice Adaptation** - Concrete examples with step-by-step explanation - Visual aids with diagram and metaphor usage - Scaffolded learning with progressive complexity building - Frequent validation with understanding confirmation **Advanced Adaptation** - Technical depth with comprehensive analysis - Multiple perspectives with trade-off discussion - Strategic implications with long-term consideration - Implementation pathways with practical guidance **Expert Adaptation** - Peer-level dialogue with assumption challenging - Edge case exploration with boundary condition analysis - Innovation opportunities with creative approach discussion - Meta-analysis with process and methodology optimization ## Success Optimization ### Team Performance Metrics - **Coverage Completeness**: All relevant perspectives represented - **Insight Quality**: Novel solutions vs. conventional approaches generated - **Integration Effectiveness**: Coherent synthesis from multiple expert inputs - **Implementation Readiness**: Actionable recommendations with clear next steps - **User Satisfaction**: Appropriate sophistication level with valuable insights ### Continuous Improvement - **Pattern Effectiveness Tracking**: Which orchestration patterns work best for different problem types - **Expert Combination Optimization**: Which specialist combinations create constructive interference - **User Adaptation Refinement**: Improving sophistication detection and communication adaptation - **Integration Quality Enhancement**: Strengthening synthesis methodology and output coherence The orchestrate command transforms complex challenges into structured multi-agent collaborations, optimizing collective intelligence through sophisticated coordination protocols and adaptive team assembly.