PR Reviews
Run comprehensive pull request reviews using specialized agents, each analyzing a different aspect of code quality.
Review Aspects
| Aspect | Agent | Focus |
|--------|-------|-------|
| code | code-reviewer | Project guidelines, bugs, code quality |
| tests | test-analyzer | Test coverage quality and completeness |
| errors | silent-failure-hunter | Silent failures, error handling |
| types | type-design-analyzer | Type encapsulation and invariants |
| comments | comment-analyzer | Comment accuracy and maintainability |
| simplify | code-simplifier | Clarity and maintainability |
| all | All applicable | Full review (default) |
Workflow
- Determine scope - Check
git diff --name-onlyfor changed files - Select aspects - Parse user request or default to all applicable
- Launch agents - Sequential (default) or parallel (if requested)
- Aggregate results - Combine findings by severity
- Provide action plan - Prioritized fixes
Usage
Full review:
/pr-reviews
Targeted reviews:
/pr-reviews tests errors # Test coverage and error handling only
/pr-reviews comments # Comment accuracy only
/pr-reviews simplify # Code simplification only
Parallel execution:
/pr-reviews all parallel # Launch all agents simultaneously
Applicability by Change Type
| Change Type | Applicable Agents | |-------------|-------------------| | Any code | code-reviewer (always) | | Test files | test-analyzer | | Comments/docs | comment-analyzer | | Error handling | silent-failure-hunter | | New/modified types | type-design-analyzer | | After passing review | code-simplifier |
Output Format
# PR Review Summary
## Critical Issues (X found)
- [agent-name]: Issue description [file:line]
## Important Issues (X found)
- [agent-name]: Issue description [file:line]
## Suggestions (X found)
- [agent-name]: Suggestion [file:line]
## Strengths
- What's well-done in this PR
## Recommended Action
1. Fix critical issues first
2. Address important issues
3. Consider suggestions
4. Re-run review after fixes
Agent Details
See references for detailed agent specifications:
- code-reviewer.md - Guidelines compliance and bug detection
- test-analyzer.md - Behavioral coverage analysis
- silent-failure-hunter.md - Error handling audit
- type-design-analyzer.md - Type invariant analysis
- comment-analyzer.md - Comment accuracy verification
- code-simplifier.md - Code clarity refinement
Workflow Integration
Before committing:
- Write code
- Run:
/pr-reviews code errors - Fix critical issues
- Commit
Before creating PR:
- Stage changes
- Run:
/pr-reviews all - Address critical and important issues
- Re-run targeted reviews
- Create PR
After PR feedback:
- Make requested changes
- Run targeted reviews based on feedback
- Verify issues resolved
- Push updates
Tips
- Run early - Review before creating PR, not after
- Focus on changes - Agents analyze git diff by default
- Address critical first - Fix high-priority issues before lower priority
- Re-run after fixes - Verify issues are resolved
- Use targeted reviews - Focus on specific aspects when you know the concern
微信扫一扫