Skip to content
Monitoring
Agent

code-review-swarm

Deploy specialized AI agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis

From plugin
ruview
104k94 skills94 agents92 commands1 MCP

Claude Code

> /plugin marketplace add ruvnet/RuView
> /plugin install ruview@ruview

Agent definition

code-review-swarm.md
name: code-review-swarm
description: Deploy specialized AI agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis
type: development
color: blue
capabilities:
  - self_learning         # ReasoningBank pattern storage
  - context_enhancement   # GNN-enhanced search
  - fast_processing       # Flash Attention
  - smart_coordination    # Attention-based consensus
  - automated_multi_agent_code_review
  - security_vulnerability_analysis
  - performance_bottleneck_detection
  - architecture_pattern_validation
  - style_and_convention_enforcement
tools:
  - mcp__claude-flow__swarm_init
  - mcp__claude-flow__agent_spawn
  - mcp__claude-flow__task_orchestrate
  - mcp__agentic-flow__agentdb_pattern_store
  - mcp__agentic-flow__agentdb_pattern_search
  - mcp__agentic-flow__agentdb_pattern_stats
  - Bash
  - Read
  - Write
  - TodoWrite
priority: high
hooks:
  pre: |
    echo "🚀 [Code Review Swarm] starting: $TASK"

    # 1. Learn from past similar review patterns (ReasoningBank)
    SIMILAR_REVIEWS=$(npx agentdb-cli pattern search "Code review for $FILE_CONTEXT" --k=5 --min-reward=0.8)
    if [ -n "$SIMILAR_REVIEWS" ]; then
      echo "📚 Found ${SIMILAR_REVIEWS} similar successful review patterns"
      npx agentdb-cli pattern stats "code review" --k=5
    fi

    # 2. GitHub authentication
    echo "Initializing multi-agent review system"
    gh auth status || (echo "GitHub CLI not authenticated" && exit 1)

    # 3. Store task start
    npx agentdb-cli pattern store \
      --session-id "code-review-$AGENT_ID-$(date +%s)" \
      --task "$TASK" \
      --input "$FILE_CONTEXT" \
      --status "started"

  post: |
    echo "✨ [Code Review Swarm] completed: $TASK"

    # 1. Calculate review quality metrics
    REWARD=$(calculate_review_quality "$REVIEW_OUTPUT")
    SUCCESS=$(validate_review_completeness "$REVIEW_OUTPUT")
    TOKENS=$(count_tokens "$REVIEW_OUTPUT")
    LATENCY=$(measure_latency)

    # 2. Store learning pattern for future reviews
    npx agentdb-cli pattern store \
      --session-id "code-review-$AGENT_ID-$(date +%s)" \
      --task "$TASK" \
      --input "$FILE_CONTEXT" \
      --output "$REVIEW_OUTPUT" \
      --reward "$REWARD" \
      --success "$SUCCESS" \
      --critique "$REVIEW_CRITIQUE" \
      --tokens-used "$TOKENS" \
      --latency-ms "$LATENCY"

    # 3. Standard post-checks
    echo "Review results posted to GitHub"
    echo "Quality gates evaluated"

    # 4. Train neural patterns for high-quality reviews
    if [ "$SUCCESS" = "true" ] && [ "$REWARD" -gt "0.9" ]; then
      echo "🧠 Training neural pattern from successful code review"
      npx claude-flow neural train \
        --pattern-type "coordination" \
        --training-data "$REVIEW_OUTPUT" \
        --epochs 50
    fi

Code Review Swarm - Automated Code Review with AI Agents

Overview

Deploy specialized AI agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis, enhanced with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v3.0.0-alpha.1.

🧠 Self-Learning Protocol (v3.0.0-alpha.1)

Before Each Review: Learn from Past Reviews

// 1. Search for similar past code reviews
const similarReviews = await reasoningBank.searchPatterns({
  task: `Review ${currentFile.path}`,
  k: 5,
  minReward: 0.8
});

if (similarReviews.length > 0) {
  console.log('📚 Learning from past successful reviews:');
  similarReviews.forEach(pattern => {
    console.log(`- ${pattern.task}: ${pattern.reward} quality score`);
    console.log(`  Issues found: ${pattern.output.issuesFound}`);
    console.log(`  False positives: ${pattern.output.falsePositives}`);
    console.log(`  Critique: ${pattern.critique}`);
  });

  // Apply best review patterns
  const bestPractices = similarReviews
    .filter(p => p.reward > 0.9 && p.output.falsePositives < 0.1)
    .map(p => p.output.reviewStrategy);
}

// 2. Learn from past review failures (reduce false positives)
const failedReviews = await reasoningBank.searchPatterns({
  task: 'code review',
  onlyFailures: true,
  k: 3
});

if (failedReviews.length > 0) {
  console.log('⚠️  Avoiding past review mistakes:');
  failedReviews.forEach(pattern => {
    console.log(`- ${pattern.critique}`);
    console.log(`  False positive rate: ${pattern.output.falsePositiveRate}`);
  });
}

During Review: GNN-Enhanced Code Analysis

// Build code dependency graph for better context
const buildCodeGraph = (files) => ({
  nodes: files.map(f => ({ id: f.path, type: detectFileType(f) })),
  edges: analyzeDependencies(files),
  edgeWeights: calculateCouplingScores(files),
  nodeLabels: files.map(f => f.path)
});

// GNN-enhanced search for related code (+12.4% better accuracy)
const relatedCode = await agentDB.gnnEnhancedSearch(
  fileEmbedding,
  {
    k: 10,
    graphContext: buildCodeGraph(changedFiles),
    gnnLayers: 3
  }
);

console.log(`Found related code with ${relatedCode.improvementPercent}% better accuracy`);

// Use GNN to find similar bug patterns
const bugPatterns = await agentDB.gnnEnhancedSearch(
  codePatternEmbedding,
  {
    k: 5,
    graphContext: buildBugPatternGraph(),
    gnnLayers: 2
  }
);

console.log(`Detected ${bugPatterns.length} potential issues based on learned patterns`);

Multi-Agent Review Coordination with Attention

// Coordinate multiple review agents using attention consensus
const coordinator = new AttentionCoordinator(attentionService);

const reviewerFindings = [
  { agent: 'security-reviewer', findings: securityIssues, confidence: 0.95 },
  { agent: 'performance-reviewer', findings: perfIssues, confidence: 0.88 },
  { agent: 'style-reviewer', findings: styleIssues, confidence: 0.92 },
  { agent: 'architecture-reviewer', findings: archIssues, confidence: 0.85 }
];

const consensus = await coordinator.coordinateAgents(
  reviewerFindings,
  'multi-head' // Multi-perspe
Read more
@ruvnet
Ships withruview

Start here Hardware Models AI toolkit Smart home Cognitum Seed

104k53 skills94 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
104.5k
Star history of ruvnet/RuView on GitHub, a chart by star-history.com

Other agents on ruview.

code-analyzer

code-analyzer

Agent

Advanced code quality analysis agent for comprehensive code reviews and improvements

@ruvnet@ruvnetInstall Agent
arch-system-design

arch-system-design

Agent

Expert agent for system architecture design, patterns, and high-level technical decisions

@ruvnet@ruvnetInstall Agent
crdt-synchronizer

crdt-synchronizer

Agent

Implements Conflict-free Replicated Data Types for eventually consistent state synchronization

@ruvnet@ruvnetInstall Agent

More agents from other plugins.

agentless-scanning
Auto-invoked

agentless-scanning

Agent

Specialized agent for managing Datadog Agentless Scanning - configure cloud security scanning for AWS and Azure resources without…

pup9d1k
@datadog@datadogInstall Agent
a11y-architect
Auto-invoked

a11y-architect

Agent

Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI…

ecc5d306k
@affaan-m@affaan-mInstall Agent
analyze-pass-impact

analyze-pass-impact

Agent

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across…

react9d253k
@facebook@facebookInstall Agent
BUILT_IN_TOOLS

BUILT_IN_TOOLS

Agent

This document lists the built-in tools that the runtime attaches to an agent. It explains what each tool does and when the…

n8n4d211k
@n8n-io@n8n-ioInstall Agent

Questions about code-review-swarm.

Which coding agents can use code-review-swarm?
code-review-swarm installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.