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
- Lead creates team and assigns PR context to all teammates
- Each teammate reviews from their perspective (parallel)
- 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?"
- Lead synthesizes consensus findings
- 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
Dependencies
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:
Proposed Solution
Plugin Structure
Team Architecture
Workflow
Key Features
Agent Teams Advantages Over Subagents
Acceptance Criteria
Dependencies