Reviewing Pull Requests
Review pull requests against issue requirements and good coding practices.
Workflow
- Auto-detect tracking system -- GitHub PR (gh CLI) or Linear-linked PR (linear-cli)
- Read the pull request -- changes, scope, implementation approach
- Find related issue/ticket for acceptance criteria and original requirements
- Ensure latest code context -- pull changes and verify working directory state
- Review project documentation -- check
docs/, spec.md, requirements.md, CLAUDE.md
- Analyze implementation quality -- code structure, patterns, maintainability
- Verify test coverage -- ensure complete testing of new functionality
- Check style compliance -- validate against project guidelines
- Assess scope adherence -- confirm changes are minimal and focused
- Determine review action -- self-authored (comment) vs external (formal review)
- Submit structured feedback
Review Framework
Requirements Alignment
- All acceptance criteria met
- No scope creep beyond original ticket
- Edge cases and error handling covered
Code Quality
- Follows established patterns from codebase
- Single Responsibility, DRY compliance
- Adequate comments for complex logic
- No obvious performance bottlenecks
Test Coverage
- All new functionality has corresponding tests
- Error scenarios and edge cases tested
- Integration with existing system validated
Implementation Standards
- Clean commit history
- Smallest necessary changes
- No breaking changes without justification
- Input validation, no credentials exposure
Review Output
Requirements Coverage
- What criteria are met, partially met, or missing
Code Quality
- Architecture adherence, pattern consistency, docs, performance
Test Assessment
- Coverage verification, edge case testing, integration validation
Final Recommendation
- Approve: Ready for merge
- Request Changes: Specific issues listed
- Comment: Self-authored PR feedback
Command Reference
# View PR with full details
gh pr view <number> --json title,body,author,commits,files,comments,reviews
# Get diff
gh pr diff <number>
# View related issue
gh issue view <number> --json title,body,labels,assignees
# Submit review
gh pr review <number> --approve|--request-changes|--comment
# Linear integration
linear-cli issues
linear-cli issue <team-id>
1---2name: reviewing-pull-requests-23description: Review a pull request against issue requirements and coding best practices, then submit structured feedback. Use when reviewing a PR, checking a pull request, doing code review, or providing PR feedback.4---5
6# Reviewing Pull Requests
7
8Review pull requests against issue requirements and good coding practices.
9
10## Workflow
11
121. **Auto-detect tracking system** -- GitHub PR (gh CLI) or Linear-linked PR (linear-cli)
132. **Read the pull request** -- changes, scope, implementation approach
143. **Find related issue/ticket** for acceptance criteria and original requirements
154. **Ensure latest code context** -- pull changes and verify working directory state
165. **Review project documentation** -- check `docs/`, `spec.md`, `requirements.md`, `CLAUDE.md`
176. **Analyze implementation quality** -- code structure, patterns, maintainability
187. **Verify test coverage** -- ensure complete testing of new functionality
198. **Check style compliance** -- validate against project guidelines
209. **Assess scope adherence** -- confirm changes are minimal and focused
2110. **Determine review action** -- self-authored (comment) vs external (formal review)
2211. **Submit structured feedback**
23
24## Review Framework
25
26### Requirements Alignment
27
28- All acceptance criteria met
29- No scope creep beyond original ticket
30- Edge cases and error handling covered
31
32### Code Quality
33
34- Follows established patterns from codebase
35- Single Responsibility, DRY compliance
36- Adequate comments for complex logic
37- No obvious performance bottlenecks
38
39### Test Coverage
40
41- All new functionality has corresponding tests
42- Error scenarios and edge cases tested
43- Integration with existing system validated
44
45### Implementation Standards
46
47- Clean commit history
48- Smallest necessary changes
49- No breaking changes without justification
50- Input validation, no credentials exposure
51
52## Review Output
53
54### Requirements Coverage
55
56- What criteria are met, partially met, or missing
57
58### Code Quality
59
60- Architecture adherence, pattern consistency, docs, performance
61
62### Test Assessment
63
64- Coverage verification, edge case testing, integration validation
65
66### Final Recommendation
67
68- **Approve**: Ready for merge
69- **Request Changes**: Specific issues listed
70- **Comment**: Self-authored PR feedback
71
72## Command Reference
73
74```bash
75# View PR with full details
76gh pr view <number> --json title,body,author,commits,files,comments,reviews
77
78# Get diff
79gh pr diff <number>
80
81# View related issue
82gh issue view <number> --json title,body,labels,assignees
83
84# Submit review
85gh pr review <number> --approve|--request-changes|--comment
86
87# Linear integration
88linear-cli issues
89linear-cli issue <team-id>
90```