Pr multi perspective review

From drvoss/everything-copilot-cli · View interactive version

Pr multi perspective review is an AI agent skill from the GitHub repository drvoss/everything-copilot-cli. Review a pull request from 6 perspectives (PM, Dev, QA, Security, DevOps, UX) for comprehensive, bias-free feedback

How to use this skill

Skill file

PR Multi-Perspective Review

When to Use

Differentiation from code-review: code-review is a single technical pass.

This skill runs 6 distinct lenses simultaneously, surfacing business, quality, and

operational issues that a developer reviewer alone would not flag.

Prerequisites

Workflow

Option A โ€” Single Session (Sequential, Lower Token Cost)

Suitable for smaller PRs or when fleet is not available.

# Fetch the PR diff
$pr = 123
gh pr diff $pr

# Fetch PR description and metadata
gh pr view $pr --json title,body,labels,additions,deletions,changedFiles

Then work through each perspective in the same session using the prompts below.

Option B โ€” Fleet Parallel (6 Concurrent Agents, Faster)

Use fleet mode to run all 6 perspectives simultaneously:

> /fleet Run a 6-perspective review of PR #123 in owner/repo.
> Launch 6 parallel agents, each with a different lens:
>   1. PM lens: business value, scope, requirements alignment
>   2. Dev lens: code quality, architecture, maintainability
>   3. QA lens: test coverage, edge cases, regression risk
>   4. Security lens: vulnerabilities, secrets, auth, input validation
>   5. DevOps lens: CI/CD impact, performance, observability, rollback
>   6. UX lens: user-facing changes, error messages, accessibility
>   7. Optional Staff lens: system-level risk, rollout readiness, ownership burden
> Each agent should output: [PASS/CONCERN/BLOCK] + findings as bullet list.
> Final agent: synthesize all active lens outputs into a single review comment.

The 6 Perspectives

For architecture-heavy, rollout-sensitive, or cross-team changes, add the optional

Staff Engineer lens below instead of assuming the regular Dev lens covers

system-level risk.

1. ๐Ÿ“‹ PM Lens โ€” Business & Requirements

Questions to answer:

# Check linked issues
gh pr view $pr --json body | Select-String "closes|fixes|resolves" -i
gh pr view $pr --json labels

Output format:

[PM] STATUS: PASS / CONCERN / BLOCK
- Finding 1
- Finding 2
2. ๐Ÿ› ๏ธ Dev Lens โ€” Code Quality & Architecture

Questions to answer:

# Review the diff
gh pr diff $pr | Select-String "^\+" | Select-Object -First 100

# Check complexity hotspots
gh pr view $pr --json files | ConvertFrom-Json | Select-Object -ExpandProperty files |
  Sort-Object additions -Descending | Select-Object -First 5

Output format:

[DEV] STATUS: PASS / CONCERN / BLOCK
- Finding 1
- Finding 2
3. ๐Ÿงช QA Lens โ€” Test Coverage & Edge Cases

Questions to answer:

# Check test files in the diff
gh pr view $pr --json files | ConvertFrom-Json | Select-Object -ExpandProperty files |
  Where-Object { $_.path -match 'test|spec|__tests__' }

# Count test additions vs source additions
$files = gh pr view $pr --json files | ConvertFrom-Json | Select-Object -ExpandProperty files
$testLines = ($files | Where-Object { $_.path -match 'test|spec' } | Measure-Object additions -Sum).Sum
$srcLines  = ($files | Where-Object { $_.path -notmatch 'test|spec' } | Measure-Object additions -Sum).Sum
Write-Host "Test:Source ratio = $testLines : $srcLines"

Output format:

[QA] STATUS: PASS / CONCERN / BLOCK
- Finding 1
- Finding 2
4. ๐Ÿ”’ Security Lens โ€” Vulnerabilities & Trust Boundaries

Questions to answer:

# Scan diff for security patterns
gh pr diff $pr | Select-String "password|secret|token|api.key|eval\(|exec\(" -i

# Check new dependencies
gh pr view $pr --json files | ConvertFrom-Json | Select-Object -ExpandProperty files |
  Where-Object { $_.path -match 'package.json|requirements|go.mod|Cargo.toml' }

Output format:

[SECURITY] STATUS: PASS / CONCERN / BLOCK
- Finding 1
- Finding 2
5. ๐Ÿš€ DevOps Lens โ€” Operations & Reliability

Questions to answer:

# Check CI status on the PR -- default with gh on PATH (Copilot CLI omits pull_request_read):
gh pr checks $pr
# When the MCP tools are exposed (no gh on PATH, or --add-github-mcp-tool=<name> for every GitHub MCP
# tool you need -- it replaces the default set -- or --enable-all-github-mcp-tools, which also enables write tools):
# Tool: github-mcp-server-pull_request_read
#   method: "get_check_runs"
#   owner: "my-org"  repo: "my-app"  pullNumber: 123

# Look for migration files
gh pr view $pr --json files | ConvertFrom-Json | Select-Object -ExpandProperty files |
  Where-Object { $_.path -match 'migration|migrate|schema' }

Output format:

[DEVOPS] STATUS: PASS / CONCERN / BLOCK
- Finding 1
- Finding 2
6. ๐ŸŽจ UX Lens โ€” User-Facing Impact

Only relevant when the PR touches UI, API responses, error messages, or CLI output.

Questions to answer:

# Check for user-facing files
gh pr view $pr --json files | ConvertFrom-Json | Select-Object -ExpandProperty files |
  Where-Object { $_.path -match '\.tsx?$|\.vue$|\.svelte$|\.css$|messages\.|i18n\.' }

Output format:

[UX] STATUS: PASS / CONCERN / BLOCK
- Finding 1 (or "N/A โ€” no user-facing changes")
7. ๐Ÿงญ Staff Engineer Lens โ€” Systemic Risk & Change Readiness *(Optional)*

*Use this lens for high-blast-radius PRs: migrations, platform changes, major rollout

plans, reliability work, or changes that alter long-term ownership burden.*

Questions to answer:

[STAFF] STATUS: PASS / CONCERN / BLOCK
- Finding 1
- Finding 2

Final Synthesis

After all active lenses complete, compile the summary:

## Multi-Perspective Review: PR #123

| Lens | Status | Key Finding |
|------|--------|-------------|
| PM | โœ… PASS | Scope matches issue #89 |
| Dev | โš ๏ธ CONCERN | null check missing in getUserById |
| QA | โœ… PASS | Test added for 404 case |
| Security | ๐Ÿšซ BLOCK | User ID not validated before DB query |
| DevOps | โœ… PASS | No migration required |
| UX | โœ… PASS | 404 error message is user-friendly |

**Overall: ๐Ÿšซ BLOCK โ€” Security issue must be resolved before merge.**

### Required Before Merge
- [ ] Add input validation for userId parameter (Security)

### Suggested Improvements
- [ ] Add null check in getUserById helper (Dev)

Tips

multi-service changes benefit from a system-level lens

See Also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.