/multi-expert
Deploy multiple Agent Experts on the same problem or question. Each expert analyzes independently from their domain perspective, then results are synthesized for higher confidence answers.
When to Use
Deploy multiple experts for:
- Complex cross-domain questions - "How does user authentication flow from login to API?"
- Architecture analysis - "What are the security implications of this change?"
- Code review with multiple perspectives - "Review this PR from different angles"
- Debugging hard problems - "Why is this test flaky?"
- Best practice validation - "Is our approach correct for this use case?"
Quick Start
/agileflow:multi-expert "How does user authentication flow from login to API?"How It Works
┌─────────────────────────────────────────────────────────────┐
│ YOUR QUESTION │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ ORCHESTRATOR ANALYZES DOMAINS │
│ 1. Detect relevant expert domains │
│ 2. Select 3-5 experts based on question │
│ 3. Deploy experts IN PARALLEL │
│ 4. Collect independent analyses │
│ 5. Synthesize results │
└─────────────────────────────────────────────────────────────┘
│
┌───────────────┼───────────────┐
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ Security │ │ API Expert │ │ Testing │
│ Expert │ │ │ │ Expert │
│ │ │ │ │ │
│ Analyzes from │ │ Analyzes from │ │ Analyzes from │
│ security │ │ implementation│ │ test coverage │
│ perspective │ │ perspective │ │ perspective │
└───────────────┘ └───────────────┘ └───────────────┘
│ │ │
└───────────────┼───────────────┘
▼
┌─────────────────────────────────────────────────────────────┐
│ SYNTHESIZE RESULTS │
│ • Find agreements (high confidence) │
│ • Identify unique insights │
│ • Flag disagreements (needs review) │
│ • Combine into comprehensive answer │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ FINAL ANSWER │
│ 📊 Confidence: High/Medium/Low │
│ 🎯 Key Findings (agreed by multiple experts) │
│ 💡 Unique Insights (from individual experts) │
│ ⚠️ Disagreements (needs human review) │
└─────────────────────────────────────────────────────────────┘Examples
Authentication Security Review
/agileflow:multi-expert "Is our authentication implementation secure? Review JWT token handling, password storage, session management, and access control."Deploys experts in:
- Security - JWT expiration, token validation, vulnerability analysis
- API - Implementation review, middleware consistency
- Testing - Test coverage analysis
- Database - Credential storage and encryption
Results in high-confidence security assessment with specific fixes.
Complex Feature Architecture
/agileflow:multi-expert "We're building a real-time notification system. What are the architectural and performance implications?"Deploys experts in:
- Architecture - System design patterns
- Performance - Latency and scalability concerns
- Testing - How to test distributed systems
- DevOps - Infrastructure requirements
Results in comprehensive architectural guidance.
Flaky Test Debugging
/agileflow:multi-expert "Our E2E tests are flaky. What's causing the intermittent failures?"Deploys experts in:
- Testing - Test isolation and timing issues
- CI/CD - Build environment consistency
- Performance - Timeouts and resource constraints
- DevOps - Environment setup and variables
Results in multi-angle debugging assessment.
Domains & Experts
Available expert domains and their keywords:
| Domain | Keywords | Expert |
|---|---|---|
| Database | schema, table, query, migration, SQL, model | DB Expert |
| API | endpoint, REST, GraphQL, route, controller, backend | API Expert |
| UI | component, frontend, button, form, style, CSS | UI Expert |
| Testing | test, spec, coverage, mock, assertion | Testing Expert |
| Security | auth, JWT, OAuth, vulnerability, XSS, CSRF | Security Expert |
| Performance | optimize, cache, latency, profiling, slow | Performance Expert |
| CI/CD | workflow, pipeline, build, deploy, GitHub Actions | CI Expert |
| DevOps | infrastructure, Docker, Kubernetes, env | DevOps Expert |
| Accessibility | ARIA, a11y, screen reader, WCAG | A11y Expert |
| Architecture | design, pattern, structure, decision | Architecture Expert |
Output Structure
Confidence Levels
High Confidence
- 3+ experts agree on the finding
- Evidence cited with specific file paths
- No contradicting opinions
Medium Confidence
- 2 experts agree
- Some evidence provided
- Minor disagreements exist
Low Confidence
- Only 1 expert mentions it
- No specific evidence
- Major disagreements between experts
Result Format
## Multi-Expert Analysis Results
**Question**: [original question]
**Experts Consulted**: [list of experts]
**Overall Confidence**: High/Medium/Low
### 🎯 Key Findings (High Confidence)
*Areas where multiple experts agree*
1. Finding 1 - Agreed by: Expert1, Expert2
2. Finding 2 - Agreed by: Expert1, Expert3
### 💡 Unique Insights
*Valuable perspectives from individual experts*
- **Expert1**: [Unique insight from their domain]
- **Expert2**: [Unique insight from their domain]
### ⚠️ Areas of Disagreement
*Requires human review to resolve*
- Expert1 says X, but Expert2 says Y
- Context: [why they might disagree]
- Recommendation: [how to resolve]
### 📋 Recommended Actions
1. [Action] - Priority: High - Source: Expert1
2. [Action] - Priority: Medium - Source: Expert2
### 🔍 Files Referenced
- `path/to/file.ts` - Mentioned by: Expert1, Expert2
- `path/to/other.ts` - Mentioned by: Expert3Best Practices
- Be specific - More detail in your question = better expert analysis
- Include context - Share relevant file names or code snippets
- Ask for multiple perspectives - "What are the [domain] implications?"
- Review disagreements - Where experts disagree requires human judgment
- Follow recommendations - Experts reference specific files and patterns
Workflow
- Analyze question for relevant domains
- Identify keywords and map to experts
- Select 3-5 experts (balance coverage vs. overhead)
- Deploy all experts in parallel
- Collect independent analyses
- Synthesize results
- Report high/medium/low confidence findings
Use Cases
Code Review
Get multiple perspectives on architectural decisions, security implications, and testing coverage before merging.
Technical Decision-Making
Validate major architectural decisions before implementation by getting expert consensus.
Debugging Complex Issues
Deploy testing, performance, and infrastructure experts to identify root cause from multiple angles.
Risk Assessment
Get security, performance, and architecture experts to identify potential risks in new features.
Learning & Knowledge
Understand system components from multiple perspectives to build comprehensive mental models.
Related Commands
/ai-code-review- Single expert code review/adr-new- Document architectural decisions/metrics- Project metrics and analysis/babysit- Suggest expert consultation
On This Page
/multi-expertWhen to UseQuick StartHow It WorksExamplesAuthentication Security ReviewComplex Feature ArchitectureFlaky Test DebuggingDomains & ExpertsOutput StructureConfidence LevelsResult FormatBest PracticesWorkflowUse CasesCode ReviewTechnical Decision-MakingDebugging Complex IssuesRisk AssessmentLearning & KnowledgeRelated Commands