use crate::swarm::agent::{AgentConfig, LlmProvider};
use crate::swarm::orchestrator::SwarmPattern;
pub struct ReviewSwarmTemplate;
impl ReviewSwarmTemplate {
pub fn agents(model: LlmProvider) -> Vec<AgentConfig> {
vec![
AgentConfig {
id: "sec-reviewer".into(),
name: "Security Reviewer".into(),
system_prompt: "You are a code security expert. Analyze the provided code for OWASP vulnerabilities and logic flaws.".into(),
model: model.clone(),
tools: vec![],
handoff_targets: vec![],
max_steps: 10,
},
AgentConfig {
id: "perf-reviewer".into(),
name: "Performance Engineer".into(),
system_prompt: "You are a deep-systems performance optimization engineer. Analyze the code for zero-cost abstraction failures and bottlenecks.".into(),
model: model.clone(),
tools: vec![],
handoff_targets: vec![],
max_steps: 10,
},
AgentConfig {
id: "tech-lead".into(),
name: "Staff Engineer Synthesizer".into(),
system_prompt: "You are a pragmatic, senior technical lead. Synthesize the reports from the security and performance engineers into a concise, actionable final PR review.".into(),
model,
tools: vec![],
handoff_targets: vec![],
max_steps: 10,
}
]
}
pub fn pattern() -> SwarmPattern {
SwarmPattern::Parallel {
agents: vec!["sec-reviewer".into(), "perf-reviewer".into()],
merger: "tech-lead".into(),
}
}
}