1.8 KiB
1.8 KiB
Parallel Review Workflow
Implements the Parallelization pattern from Anthropic research.
Overview
Run security and performance reviews in parallel to reduce latency by ~50%.
Pattern
async def parallel_review(code_context):
"""
Parallel execution of independent review agents.
From Anthropic: "Parallelization is effective when divided
subtasks can be parallelized for speed."
"""
tasks = [
Task(subagent_type="security-auditor", prompt=code_context),
Task(subagent_type="performance-engineer", prompt=code_context)
]
results = await asyncio.gather(*tasks)
return aggregate_results(results)
Execution Flow
[Code Complete]
↓
┌─────────────────────────────┐
│ Parallel Execution │
│ ┌───────────┐ ┌──────────┐ │
│ │ Security │ │ Perform- │ │
│ │ Auditor │ │ ance │ │
│ └───────────┘ └──────────┘ │
└─────────────────────────────┘
↓
[Aggregate Results]
↓
[Issues Found?] ──Yes──→ [The Fixer]
↓ No
[Proceed to Release]
Benefits
- Latency Reduction: Reviews run simultaneously
- Independent Analysis: No bias between reviewers
- Faster Feedback: Combined results in one pass
Usage
/workflow parallel-review --issue 42
Configuration
# .kilo/config/parallel-review.yaml
parallel_review:
agents:
- security-auditor
- performance-engineer
timeout_minutes: 15
aggregate_strategy: merge_issues
proceed_on_partial_failure: false
Implementation
See .kilo/commands/workflow.md Step 6 for code.