Skip to content

feat: create team-based parallel PR review plugin #17

@JacobPEvans-personal

Description

@JacobPEvans-personal

Parent

Part of #14 (epic: migrate workaround orchestration patterns to native Claude Agent Teams)

Summary

Create a new team-review plugin that uses Agent Teams to run multi-perspective PR reviews in parallel - security, performance, test coverage, and code quality each owned by a dedicated teammate.

Problem

Current PR review in the ecosystem (from parent CLAUDE.md commands like /review-pr, /review-code) uses:

  • Sequential subagent dispatch (one perspective at a time)
  • Each reviewer reports back independently to main context
  • No debate or cross-checking between reviewers
  • Main agent must synthesize all findings alone

Proposed Solution

Plugin Structure

team-review/
├── .claude-plugin/plugin.json
├── commands/
│   └── team-review.md           # /team-review command
├── skills/
│   └── review-perspectives.md   # Review criteria per perspective
└── README.md

Team Architecture

/team-review PR#123 (team lead - delegate mode)
├── security-reviewer (teammate)
│   ├── Focus: OWASP, auth, secrets, injection
│   └── Model: sonnet
├── performance-reviewer (teammate)
│   ├── Focus: N+1 queries, caching, algorithmic complexity
│   └── Model: sonnet
├── test-reviewer (teammate)
│   ├── Focus: Coverage gaps, edge cases, test quality
│   └── Model: sonnet
└── quality-reviewer (teammate)
    ├── Focus: Code style, patterns, maintainability
    └── Model: haiku

Workflow

  1. Lead creates team and assigns PR context to all teammates
  2. Each teammate reviews from their perspective (parallel)
  3. Teammates debate findings via peer-to-peer messaging
    • "I found a SQL injection in auth.py:42, @performance-reviewer is this also a query perf issue?"
    • "The test for this function is missing the error path, @security-reviewer should we flag this as a security gap too?"
  4. Lead synthesizes consensus findings
  5. Lead posts structured review comment on PR

Key Features

  • Competing hypotheses: Teammates can challenge each other's findings
  • Cross-domain insights: Security + performance reviewer can identify issues neither would find alone
  • Severity consensus: Multiple reviewers agree on severity ratings
  • Structured output: Unified review with findings organized by severity

Agent Teams Advantages Over Subagents

Feature Subagent Review Team Review
Communication One-way (back to main) Peer-to-peer debate
Cross-checking Manual by main agent Automatic between teammates
Finding quality Individual perspectives Cross-pollinated insights
Token cost Lower ~4x higher
Review depth Shallow (focused) Deep (collaborative)

Acceptance Criteria

  • /team-review accepts PR number argument
  • Spawns appropriate team for PR size/complexity
  • Teammates review in parallel from different perspectives
  • Inter-agent debate produces cross-domain findings
  • Lead synthesizes into structured review format
  • Posts review as PR comment (with user confirmation)
  • Graceful fallback to sequential subagent review when teams disabled

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions