// Full integration of 5 agent patterns (Router, Sequential, Parallel, Orchestrator, Evaluator) into automated workflow pipelines. Analyzes tasks, selects optimal pattern combinations, and executes end-to-end with quality validation. Use for complex projects requiring intelligent pattern selection and automatic execution flow.
| name | agent-workflow-orchestrator |
| description | Full integration of 5 agent patterns (Router, Sequential, Parallel, Orchestrator, Evaluator) into automated workflow pipelines. Analyzes tasks, selects optimal pattern combinations, and executes end-to-end with quality validation. Use for complex projects requiring intelligent pattern selection and automatic execution flow. |
This skill represents Phase 4: Full Integration - the complete orchestration layer that combines all 5 agent patterns into intelligent, automated workflows. It builds upon:
Reference: https://www.anthropic.com/engineering/building-effective-agents
"Start with the simplest solution possible, adding complexity only when demonstrably improving outcomes."
This orchestrator adds automation only where it provides clear value, maintaining user control and transparency throughout.
Ideal Scenarios:
Complex Projects - Multi-step workflows requiring multiple patterns
Automated Quality Enforcement - Projects requiring consistent quality gates
Dynamic Pattern Selection - When optimal pattern isn't obvious
Large-scale Features - Multiple independent components
Concrete Use Cases:
Avoid when:
Simple Tasks - Single-step operations
Single Pattern Suffices - Clearly defined pattern needed
Exploratory Work - Requirements still unclear
Tight Deadlines - No time for orchestration overhead
Learning/Teaching - Understanding individual patterns
Automated Pattern Selection
Quality Enforcement
Coordination Handling
Parallel Efficiency
Overhead
Complexity
Loss of Control
Resource Usage
โ Good:
โ Not Worth It:
Request: "Add shopping cart with persistence"
Orchestrator Analysis:
Complexity: 0.65
Structure: Fixed (clear requirements)
Pattern: SEQUENTIAL โ EVALUATOR
Execution:
Stage 1: SEQUENTIAL
Step 1: Cart data model โ
Step 2: Add to cart API โ
Step 3: Cart persistence (Redis) โ
Step 4: Cart sync across devices โ
Step 5: Frontend cart UI โ
Stage 2: EVALUATOR
Functionality: 9.2/10 โ
Performance: 8.8/10 โ
Result: SUCCESS (1h 15m)
Request: "Convert REST API to GraphQL"
Orchestrator Analysis:
Complexity: 0.78
Discovery Likelihood: HIGH
Pattern: ORCHESTRATOR (nested patterns)
Execution:
Stage 1: ORCHESTRATOR
Discovered: 15 endpoints to convert
Phase 1: [PARALLEL] Convert 5 simple endpoints
Phase 2: [SEQUENTIAL] Convert complex query endpoints
Phase 3: [PARALLEL] Update client code
Stage 2: EVALUATOR
API Compatibility: 9.5/10 โ
Performance: 9.0/10 โ
Result: SUCCESS (3h 45m)
[User Request]
โ
[Task Analysis Engine] โโ Complexity, Structure, Dependencies
โ
[Pattern Selection] โโ Choose optimal pattern or combination
โ
[Pipeline Construction] โโ Build execution plan
โ
[Execution Engine] โโ Run patterns with coordination
โ
[Quality Gate] โโ Evaluator validates output
โ
[Final Output + Report]
[Request] โ [SEQUENTIAL] โ [EVALUATOR] โ [Output]
Use when: Well-defined feature with clear steps Example: "Add password reset to auth system"
## Pipeline Execution: Simple Feature
### Stage 1: SEQUENTIAL (5 steps)
1. Requirements analysis โ Gate: Complete?
2. Design specification โ Gate: Feasible?
3. Implementation โ Gate: Compiles?
4. Testing โ Gate: Tests pass?
5. Documentation โ Gate: Complete?
### Stage 2: EVALUATOR (Quality Check)
- Functionality: 9.5/10 โ
- Code Quality: 9.2/10 โ
- Security: 9.8/10 โ
- Documentation: 8.7/10 โ
**Pipeline Result**: SUCCESS
**Total Time**: 45 minutes
[Request] โ [ROUTER] โ [PARALLEL (Sectioning)] โ [EVALUATOR] โ [Output]
Use when: Independent components that can be built concurrently Example: "Build frontend, backend, and mobile app"
## Pipeline Execution: Multi-Component
### Stage 1: ROUTER
- Task Type: feature_development
- Components: 3 (independent)
- Route to: PARALLEL (Sectioning)
### Stage 2: PARALLEL (Sectioning)
Worker 1: Frontend โ Complete
Worker 2: Backend โ Complete
Worker 3: Mobile โ Complete
[Merge Results]
### Stage 3: EVALUATOR
- Integration Quality: 9.0/10 โ
- Consistency: 8.8/10 โ
**Pipeline Result**: SUCCESS
**Speedup**: 2.8x vs sequential
[Request] โ [ROUTER] โ [ORCHESTRATOR] โ [EVALUATOR] โ [Output]
Use when: Open-ended project with discovery needs Example: "Build e-commerce platform from scratch"
## Pipeline Execution: Complex Project
### Stage 1: ROUTER
- Complexity: 0.85
- Discovery Needed: High
- Route to: ORCHESTRATOR
### Stage 2: ORCHESTRATOR
- Initial Subtasks: 5
- Final Subtasks: 12 (7 discovered)
- Workers Used: 6
- Replanning Cycles: 4
### Stage 3: EVALUATOR
- Overall Quality: 9.3/10 โ
- Completeness: 100% โ
**Pipeline Result**: SUCCESS
**Adaptive Value**: Discovered 7 critical subtasks
[Request] โ [EVALUATOR (iterative)] โ [Output]
Use when: Improving existing code quality Example: "Optimize API performance and security"
## Pipeline Execution: Optimization
### EVALUATOR (3 iterations)
Iteration 1: 5.6/10 โ 7.2/10 (Security fixes)
Iteration 2: 7.2/10 โ 8.5/10 (Performance)
Iteration 3: 8.5/10 โ 9.3/10 (Documentation)
**Final Score**: 9.3/10 โ
**Improvement**: +66% quality
[Request] โ [PARALLEL (Voting)] โ [SEQUENTIAL (Implementation)] โ [Output]
Use when: Multiple approaches need evaluation before implementation Example: "Choose best algorithm then implement"
## Pipeline Execution: Decision + Implementation
### Stage 1: PARALLEL (Voting)
- Approach A: Score 7.9/10
- Approach B: Score 7.7/10
- Approach C: Score 8.7/10 โ Winner
### Stage 2: SEQUENTIAL (Implement Winner)
1. Design โ Gate โ
2. Implement โ Gate โ
3. Test โ Gate โ
4. Document โ Gate โ
**Pipeline Result**: SUCCESS
**Best approach selected and implemented**
When you provide a task, the orchestrator automatically:
## Dynamic Pattern Selection
### Input: Task Description
"Build user authentication with OAuth, JWT, and 2FA support"
### Analysis
- Complexity: 0.78 (High)
- Structure: Multiple known components + likely discoveries
- Dependencies: Some sequential, some parallel
- Quality Critical: Yes (security)
### Pattern Selection
1. Initial: ORCHESTRATOR (high complexity, discovery likely)
2. Within Orchestrator:
- JWT + OAuth + 2FA: PARALLEL (Sectioning) - independent
- Each implementation: SEQUENTIAL (gates needed)
3. Final: EVALUATOR (security critical)
### Constructed Pipeline
ORCHESTRATOR { Phase 1: Design all components Phase 2: PARALLEL { Worker A: JWT (SEQUENTIAL internally) Worker B: OAuth (SEQUENTIAL internally) Worker C: 2FA (SEQUENTIAL internally) } Phase 3: Integration Phase 4: EVALUATOR (security focus) }
### Execution Coordination
```markdown
## Orchestrated Execution
### Phase 1: Dynamic Analysis
Orchestrator discovers:
- Need shared auth middleware
- Need token refresh logic
- Need rate limiting
**Subtasks**: 3 โ 6
### Phase 2: Parallel Implementation
[JWT Branch] โโ Step 1: Token generation โโ Step 2: Verification middleware โโ Step 3: Refresh logic
[OAuth Branch] (parallel) โโ Step 1: Provider configuration โโ Step 2: Callback handling โโ Step 3: Token mapping
[2FA Branch] (parallel) โโ Step 1: TOTP implementation โโ Step 2: Recovery codes โโ Step 3: Device management
### Phase 3: Integration
- Merge branches
- Resolve conflicts (shared middleware)
- Integration testing
### Phase 4: Quality Validation
EVALUATOR scores:
- Security: 9.8/10 โ
- Functionality: 9.5/10 โ
- Code Quality: 9.2/10 โ
## Full Integration Mode
### User Request
"์ฌ์ฉ์ ๋์๋ณด๋ ์์คํ
๊ตฌ์ถ - ์ค์๊ฐ ๋ถ์, ๋ง์ถค ์์ ฏ, ๋ฐ์ดํฐ ์๊ฐํ"
### Automatic Orchestration
#### Step 1: Deep Analysis
- **Primary Task**: Dashboard system
- **Sub-components**:
- Real-time analytics (complex, discovery likely)
- Custom widgets (modular, parallel possible)
- Data visualization (multiple approaches viable)
- **Overall Complexity**: 0.82
- **Discovery Likelihood**: High (65% known)
- **Quality Requirements**: Performance critical
#### Step 2: Pipeline Construction
[ORCHESTRATOR] as main coordinator โโ Phase 1: Requirements & Architecture (SEQUENTIAL) โ โโ Gates: Requirements complete? Architecture valid? โ โโ Phase 2: Core Implementation โ โโ Real-time Engine (ORCHESTRATOR - sub-discovery) โ โโ Widget System (PARALLEL - Sectioning) โ โโ Visualization (PARALLEL - Voting then implement) โ โโ Phase 3: Integration โ โโ Merge all components (conflict resolution) โ โโ Phase 4: Quality Assurance โโ EVALUATOR (performance focus, 3 iterations max)
#### Step 3: Execution with Monitoring
```markdown
## Execution Log
[00:00] ORCHESTRATOR: Starting dashboard project
[00:05] SEQUENTIAL: Requirements analysis
Gate 1: โ Requirements complete
[00:15] SEQUENTIAL: Architecture design
Gate 2: โ Architecture valid
[00:30] PARALLEL: Starting 3 component branches
[Branch A: Real-time Engine]
[00:30] ORCHESTRATOR (nested): Analyzing real-time requirements
[00:35] Discovery: Need WebSocket server
[00:40] Discovery: Need event queue system
[00:50] Implementation: WebSocket + Event Queue
[01:10] Complete: Real-time engine ready
[Branch B: Widget System]
[00:30] PARALLEL: 4 widget types simultaneously
[00:45] Worker 1: Chart widget โ
[00:48] Worker 2: Table widget โ
[00:42] Worker 3: Metric widget โ
[00:50] Worker 4: Custom widget โ
[00:55] Merge: Widget registry complete
[Branch C: Data Visualization]
[00:30] PARALLEL (Voting): Comparing libraries
[00:35] D3.js: 7.8/10
[00:35] Chart.js: 8.2/10
[00:35] Recharts: 8.7/10 โ Winner
[00:40] SEQUENTIAL: Implement with Recharts
[01:00] Complete: Visualization layer ready
[01:15] Integration: Merging all branches
[01:20] Conflict: Real-time + Widgets state management
[01:25] Resolution: Shared Redux store pattern
[01:30] Integration tests: 98% passing
[01:35] EVALUATOR: Quality assessment
Iteration 1:
- Performance: 7.2/10 (needs optimization)
- Functionality: 9.5/10 โ
- Code Quality: 8.8/10 โ
Feedback: Optimize real-time data batching
[01:45] Applying optimizations...
Iteration 2:
- Performance: 9.1/10 โ
- Functionality: 9.5/10 โ
- Code Quality: 9.0/10 โ
[01:50] Final validation: All thresholds met
[01:55] PROJECT COMPLETE
## Project Completion Report
### Summary
- **Task**: User Dashboard System
- **Duration**: 1 hour 55 minutes
- **Status**: SUCCESS โ
### Patterns Used
- ORCHESTRATOR: Main coordination (1x)
- ORCHESTRATOR: Nested for real-time (1x)
- SEQUENTIAL: Requirements/Architecture (2 executions)
- PARALLEL (Sectioning): Widgets (1x)
- PARALLEL (Voting): Library selection (1x)
- EVALUATOR: Quality optimization (2 iterations)
### Metrics
- Initial Subtasks: 8
- Final Subtasks: 14 (6 discovered)
- Parallel Speedup: 2.4x
- Quality Improvement: 7.2 โ 9.1 (26% gain)
- Test Coverage: 98%
### Deliverables
1. Real-time analytics engine (WebSocket + Event Queue)
2. Widget system (4 types + registry)
3. Data visualization (Recharts integration)
4. Shared state management (Redux)
5. Performance-optimized codebase
6. Complete documentation
### Key Decisions Made
- **Library**: Recharts (voted, 8.7/10)
- **State**: Redux (conflict resolution)
- **Real-time**: WebSocket + Event batching (discovery)
- **Architecture**: Modular widgets with registry pattern
### Recommendations
- Monitor WebSocket connections in production
- Consider lazy loading for widget types
- Set up performance monitoring dashboard
Even in full automation, user maintains control:
## User Checkpoints
### Pre-Execution Approval
"I've constructed this pipeline for your task:
[Pipeline visualization]
Proceed? [Yes/Modify/Cancel]"
### Mid-Execution Review (for long tasks)
"Progress Report:
- Phase 1: Complete โ
- Phase 2: 60% (ongoing)
- Discoveries: 3 new subtasks
Continue as planned? [Yes/Adjust/Pause]"
### Post-Discovery Notification
"Discovered significant new requirement:
[Description]
This will extend timeline by ~20 minutes.
Proceed? [Yes/Defer/Cancel]"
### Final Approval
"Project complete. Quality score: 9.1/10
Review results? [Accept/Request Revisions/Reject]"
## Override Commands
### Force Pattern
User: "Use SEQUENTIAL for this, not ORCHESTRATOR"
Orchestrator: "Acknowledged. Proceeding with SEQUENTIAL.
Note: May miss discoveries. Acceptable?"
### Skip Phase
User: "Skip the Evaluator phase"
Orchestrator: "Warning: Skipping quality validation.
Final output may not meet optimal standards. Proceed?"
### Inject Custom Step
User: "Add security audit before integration"
Orchestrator: "Adding security audit step:
[Updated pipeline visualization]
New timeline: +15 minutes"
### Pause & Resume
User: "Pause after Phase 2"
Orchestrator: "Checkpoint set. Will pause for your review."
## Failure Scenarios
### Worker Failure
**Scenario**: Developer worker fails on JWT implementation
**Recovery**:
1. Retry with different approach (3 max)
2. If persistent, decompose task further
3. If still failing, escalate to user
4. Optional: Switch to alternative pattern
**Orchestrator Response**:
"JWT implementation failed after 2 retries.
Options:
1. Decompose into smaller tasks
2. Use simpler auth method
3. Manual intervention
Choose: [1/2/3]"
### Evaluator Loop Stuck
**Scenario**: Quality threshold not met after 5 iterations
**Recovery**:
1. Analyze diminishing returns
2. Report best achieved score
3. Suggest acceptance or manual optimization
**Orchestrator Response**:
"Quality plateau reached:
- Current: 8.7/10
- Target: 9.5/10
- Iterations: 5/5
Recommend accepting current quality or manual optimization.
[Accept 8.7/10 / Manual Optimization / Lower Target]"
### Pipeline Conflict
**Scenario**: Parallel branches have incompatible outputs
**Recovery**:
1. Identify conflict source
2. Apply conflict resolution strategy
3. If unresolvable, sequentialize conflicting parts
**Orchestrator Response**:
"Merge conflict detected:
- Branch A uses PostgreSQL
- Branch B uses MongoDB
Resolution options:
1. Standardize on PostgreSQL (rework Branch B)
2. Standardize on MongoDB (rework Branch A)
3. Multi-database architecture (complex)
Choose: [1/2/3]"
{
"orchestration": {
"mode": "full_auto", // "advisor", "pipeline", "dynamic", "full_auto"
"user_checkpoints": true,
"approval_required": ["pipeline_construction", "major_discovery"],
"max_iterations": {
"evaluator": 5,
"orchestrator_replan": 10
}
},
"execution": {
"parallel_workers": 5,
"timeout_minutes": 120,
"checkpoint_frequency": "on_phase_complete"
},
"quality": {
"auto_evaluator": true,
"min_threshold": 0.85,
"target_threshold": 0.90
},
"safety": {
"max_depth": 3, // nested orchestrator limit
"prevent_circular": true,
"resource_limits": {
"max_subtasks": 50,
"max_workers": 10
}
}
}
Before full automation, use advisor to understand pattern selection.
Enable user checkpoints for critical projects.
High discovery rate may indicate under-specified requirements.
Evaluator insights often reveal architectural issues.
Don't let complexity grow unbounded.
Automation helps but final judgment is yours.
# Advisor only (Phase 1)
/workflow-advisor "Build payment system"
# Pipeline mode (Phase 2)
/workflow-pipeline simple "Add user profile feature"
# Dynamic composition (Phase 3)
/workflow-dynamic "Create real-time chat application"
# Full integration (Phase 4)
/workflow-full "Build complete e-commerce platform"
# Check status
/workflow-status
# View current phase
/workflow-phase
# See pattern usage
/workflow-patterns
# Get quality metrics
/workflow-quality
The Agent Workflow Orchestrator provides layered automation:
Each phase adds capability while maintaining:
The goal is not to replace human judgment, but to augment it with intelligent automation that handles complexity while keeping you in control.
Remember: This orchestrator is a tool. Like all tools, it's most effective when you understand its capabilities and limitations. Start with simpler modes, graduate to full automation as you gain confidence.
Complexity should be added only when it demonstrably improves outcomes.