AgileFlow

/multi-expert

PreviousNext

Deploy multiple domain experts on the same problem for higher confidence

/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:

DomainKeywordsExpert
Databaseschema, table, query, migration, SQL, modelDB Expert
APIendpoint, REST, GraphQL, route, controller, backendAPI Expert
UIcomponent, frontend, button, form, style, CSSUI Expert
Testingtest, spec, coverage, mock, assertionTesting Expert
Securityauth, JWT, OAuth, vulnerability, XSS, CSRFSecurity Expert
Performanceoptimize, cache, latency, profiling, slowPerformance Expert
CI/CDworkflow, pipeline, build, deploy, GitHub ActionsCI Expert
DevOpsinfrastructure, Docker, Kubernetes, envDevOps Expert
AccessibilityARIA, a11y, screen reader, WCAGA11y Expert
Architecturedesign, pattern, structure, decisionArchitecture 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: Expert3

Best Practices

  1. Be specific - More detail in your question = better expert analysis
  2. Include context - Share relevant file names or code snippets
  3. Ask for multiple perspectives - "What are the [domain] implications?"
  4. Review disagreements - Where experts disagree requires human judgment
  5. Follow recommendations - Experts reference specific files and patterns

Workflow

  1. Analyze question for relevant domains
  2. Identify keywords and map to experts
  3. Select 3-5 experts (balance coverage vs. overhead)
  4. Deploy all experts in parallel
  5. Collect independent analyses
  6. Synthesize results
  7. 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.