Conduct a multi-phase code review with blast radius analysis
Performs comprehensive multi-phase code review with blast radius analysis and impact scoring
/plugin marketplace add ojowwalker77/Claude-Matrix/plugin install matrix@matrix-marketplacePerform a comprehensive, context-aware code review using Matrix's 5-phase review pipeline.
Parse arguments: $ARGUMENTS
Expected format: <target> [depth]
quick | standard | thorough (default: standard)Calculate the impact scope of changes:
Identify changed files/functions
Read tool to examine the filegit diff --cached --name-onlygh pr diff <number>Find all callers using matrix_find_callers
Calculate impact score
Output format:
Blast Radius Analysis
=====================
Direct changes: 3 files
- src/utils/auth.ts (modified)
- src/utils/session.ts (modified)
- src/api/login.ts (modified)
First-degree impact: 8 files
- src/middleware/authenticate.ts (imports auth)
- src/handlers/user.ts (imports session)
...
Impact Score: 7/10 (medium-high)
Analyze what the change is trying to accomplish:
Gather context
Classify change type
Summarize intent
Generate probing questions about the changes:
Edge cases
Error handling
Testing coverage
Security considerations
For each concern from Phase 3:
Check existing patterns
matrix_find_definition to see how similar code handles thismatrix_recall to find related solutionsVerify assumptions
Research if needed
matrix_recall for past issues with similar codeGenerate final review output in Greptile-style format:
Calculate Confidence Score (1-5)
Format review output
# Matrix Review
## Summary
[2-3 sentence overview of what this PR/change does and its purpose]
## Key Changes
- [Change 1]: Brief description
- [Change 2]: Brief description
- [Change 3]: Brief description
## Critical Issues Found
### 1. [Issue Title]
[Detailed explanation of the issue, why it's critical, and what behavior it will cause]
### 2. [Issue Title]
[Detailed explanation]
## Additional Issues
- [Minor issue 1]
- [Minor issue 2]
## Positive Aspects
- [Good practice observed]
- [Well-implemented pattern]
## Confidence Score: [N]/5
[Explanation of why this score was given, referencing the critical issues]
**Files requiring attention:** [file1.ts] (critical issue #1), [file2.ts] (critical issue #2)
---
## Important Files Changed
| Filename | Score | Overview |
|----------|-------|----------|
| path/to/file1.ts | 2/5 | Brief description of issues in this file |
| path/to/file2.ts | 1/5 | Brief description of critical issues |
| path/to/file3.ts | 5/5 | No issues found, clean implementation |
### File Analysis
#### `path/to/file1.ts` — Score: 2/5
[Detailed analysis of this file's changes, issues found, and suggestions]
#### `path/to/file2.ts` — Score: 1/5
[Detailed analysis of this file's changes, issues found, and suggestions]
Scoring Guidelines per File
Learning loop
matrix_store to save for future reviewsmatrix_reward to improve future recommendations/matrix:review src/utils/auth.ts standard
/matrix:review staged thorough
/matrix:review 123 quick
Review results are displayed inline. For thorough reviews, consider saving to a file:
/matrix:review src/auth.ts thorough > ~/Downloads/review-auth.md