| description | Use when a PR number or URL is provided to conduct a comprehensive code review and issue a merge verdict based on blocker severity. |
| name | pr-review |
| trigger | ์ฝ๋ ๋ฆฌ๋ทฐ, PR ๋ฆฌ๋ทฐ, ํ ๋ฆฌํ์คํธ ๊ฒํ , review PR, code review, security review, PR ๊ฒํ , ์ฝ๋ ํ์ธ, ํ๋ฆฌํ์คํธ ๋ฆฌ๋ทฐ, pr check, code audit, security audit, architecture review, devops review, qa review, ux review, PR ์น์ธ, ๋จธ์ง ์น์ธ, PR ๊ฑฐ์ , request changes, approve PR, blocker ํ์ธ, HXSK ๋ฆฌ๋ทฐ, ์คํ ์ค์ ํ์ธ, ์ปจ๋ฒค์
์ฒดํฌ, 6 ํ๋ฅด์๋ ๋ฆฌ๋ทฐ, ์ฝ๋ ํ์ง ํ๊ฐ, ํ
์คํธ ์ปค๋ฒ๋ฆฌ์ง ํ์ธ, ๋ณด์ ์ทจ์ฝ์ ๋ถ์, ์ฑ๋ฅ ์ํฅ๋ ๋ถ์, /pr-review, gh pr review, ์ฝ๋ ์ ๊ฒ, ํ ์์ฒญ ๋ฆฌ๋ทฐ, ๊ฐ๋ฐ์ ๋ฆฌ๋ทฐ, QA ๋ฆฌ๋ทฐ, ์ํคํ
์ฒ ๋ฆฌ๋ทฐ, ๋ฐ๋ธ์ต์ค ๋ฆฌ๋ทฐ, UX ๋ฆฌ๋ทฐ, ๋ณด์ ๊ฐ์ฌ, ์คํ ๊ฒ์ฆ, ADR ๊ฒ์ฆ, ์ปจ๋ฒค์
๊ฒ์ฆ, ๋ ์จ๋ฌ๋๋ ์ ์ฅ, blocker ์๋ณ, severity ๋ถ๋ฅ, ์ฝ๋ ์ค์บ, ์ฝ๋ ๋ถ์, PR ๋ถ์, ๋จธ์ง ๊ฐ๋ฅ ์ฌ๋ถ, ์ฝ๋ smell, ์ค๋ฒํ๋ก์ฐ, ๋ฆฌํฉํ ๋ง ์ ์, ์ด์ ๋ถ๋ฆฌ, SPEC.md, DECISIONS.md, CONVENTIONS.md, HXSK ์ปจ๋ฒค์
, 6์ธ ๋ฆฌ๋ทฐ, ์ฝ๋ ๋ฆฌ๋ทฐ ๋ด, ์๋ํ ๋ฆฌ๋ทฐ |
Quick Reference
- Context: ๋ฐ๋์ PR ์ปจํ
์คํธ ๋ก๋ ํ 6-Persona ํ๊ฐ ์ํ
- Blocker: 1๊ฐ ์ด์ ๋ฐ๊ฒฌ ์ ์ฆ์ REQUEST_CHANGES (๋จธ์ง ๋ถ๊ฐ)
- Scope: ๊ธฐ์กด ์ฝ๋ ๋ฌธ์ ๋ ์ ์ด์๋ก ๋ถ๋ฆฌ, PR ๋ฒ์ ์์
- Alignment: SPEC/DECISIONS ์ค์ ์ฌ๋ถ ํ์ ๊ฒ์ฆ
- Memory: [High] ์ด์ ๋ฐ๊ฒฌ ์ Lessons-Learned ์ ์ฅ ํ์
Usage
/pr-review <PR number or URL>
Review Process
Step 1: Load PR Context
gh pr view <PR> --json title,body,files,additions,deletions,commits
gh pr diff <PR>
Read changed files to understand the full context of modifications.
Step 2: Execute 6-Persona Review
Each persona reviews independently, producing findings with severity classification.
Personas
1. Developer Review
Focus: Code quality, readability, maintainability
- Naming conventions and consistency
- Function/class design (SRP, complexity)
- Error handling completeness
- Type hints and documentation
- Ruff/mypy compliance
- Anti-patterns and code smells
2. QA Engineer Review
Focus: Test coverage, edge cases, regression risk
- Test coverage for new/changed code
- Edge case handling (empty inputs, boundaries, concurrency)
- Regression risk assessment
- Integration test needs
- Mock usage appropriateness (per Test Policy: minimize mocks)
3. Security Review
Focus: Vulnerabilities, data handling, compliance
- OWASP Top 10 checks (injection, XSS, CSRF, etc.)
- Sensitive data exposure (secrets, PII logging)
- Input validation and sanitization
- Authentication/authorization correctness
- Dependency vulnerabilities
4. Architecture Review
Focus: Design decisions, scalability, alignment
- SPEC alignment โ changes match
.hxsk/SPEC.md requirements
- Module boundaries and coupling
- API contract consistency
- Database schema impact
- Breaking changes detection
5. DevOps Review
Focus: Build, deploy, monitoring
- CI/CD pipeline compatibility
- Configuration changes (env vars, secrets)
- Docker/infrastructure impact
- Logging and observability
- Performance impact at scale
6. UX Review (UI ๋ณ๊ฒฝ์ด ์๋ ๊ฒฝ์ฐ๋ง)
Focus: User experience, accessibility
- Visual consistency with design system
- Accessibility (WCAG 2.1 AA)
- Interaction flow and usability
- Responsive design
- Error messaging for users
Severity Classification
๋ชจ๋ ๋ฐ๊ฒฌ ์ฌํญ์ ์ฌ๊ฐ๋ ๋ถ์ฌ:
| Severity | ์๋ฏธ | ์กฐ์น |
|---|
| [Blocker] | PR ๋จธ์ง ๋ถ๊ฐ. ๊ธฐ๋ฅ ์ฅ์ , ๋ณด์ ์ทจ์ฝ์ , ๋ฐ์ดํฐ ์์ค ์ํ | ์ฆ์ ์์ ํ์ |
| [High] | ์ฌ๊ฐํ ํ์ง ๋ฌธ์ . ์ฑ๋ฅ ์ ํ, ํ
์คํธ ๋๋ฝ, ์ค๊ณ ์๋ฐ | ๋จธ์ง ์ ์์ ๊ถ์ฅ |
| [Medium] | ๊ฐ์ ์ฌํญ. ๋ฆฌํฉํ ๋ง, ๋ฌธ์ํ, ๋ ๋์ ํจํด ์ ์ฉ | ํ์ PR์์ ์ฒ๋ฆฌ ๊ฐ๋ฅ |
| [Nitpick] | ์ฌ์ํ ์คํ์ผ/์ทจํฅ. ๋ค์ด๋ฐ ์ ์, ์ฝ๋ ํฌ๋งท | ์ ํ์ ๋ฐ์ |
Output Format
# PR Review: <PR title>
## Summary
<Overall assessment: APPROVE / REQUEST_CHANGES / COMMENT>
<1-2 sentence overview>
## Findings
### [Blocker] <Finding title>
**Persona**: <which reviewer>
**File**: `<path>:<line>`
**Issue**: <description>
**Fix**: <specific recommendation>
### [High] <Finding title>
**Persona**: <which reviewer>
**File**: `<path>:<line>`
**Issue**: <description>
**Fix**: <specific recommendation>
### [Medium] <Finding title>
...
### [Nitpick] <Finding title>
...
## Statistics
| Severity | Count |
|----------|-------|
| Blocker | <N> |
| High | <N> |
| Medium | <N> |
| Nitpick | <N> |
## Verdict
- **Blockers**: <N> (must fix before merge)
- **Recommendation**: <APPROVE | REQUEST_CHANGES>
Convention Compliance Check
PR ๋ฆฌ๋ทฐ ์ .hxsk/docs/CONVENTIONS.md ๊ธฐ๋ฐ์ผ๋ก ์ถ๊ฐ ๊ฒ์ฆ:
PR ๋ฒ์ ๊ฒ์ฆ:
- ๋ณ๊ฒฝ ๋ชฉ์ ์ด 2๊ฐ ์ด์ ํผํฉ๋์ด ์์ง ์์๊ฐ?
- ํ๋ก๋์
์ฝ๋ ๋ณ๊ฒฝ์ด 500์ค์ ๋์ง ์๋๊ฐ?
- ์ด์์ Done Criteria๋ฅผ ๋ชจ๋ ์ถฉ์กฑํ๋๊ฐ?
๋ฆฌ๋ทฐ ์ค ๋ฐ๊ฒฌ๋ ๋ฌธ์ ์ฒ๋ฆฌ:
| ์ ํ | ์ฒ๋ฆฌ |
|---|
| ํ์ฌ PR์ ์ง์ ์ ์ธ ๋ฒ๊ทธ | ํ์ฌ PR์์ ์์ |
| ๊ธฐ์กด ์ฝ๋ ๊ตฌ์กฐ์ ๋ฌธ์ | ์ ์ด์ ๋ฑ๋ก โ ์ฝ๋ฉํธ์ ๋งํฌ |
| "์ด๊ฒ๋ ๊ฐ์ ํ๋ฉด ์ข๊ฒ ๋ค" | ์ ์ด์ ๋ฑ๋ก โ ํ์ฌ PR์์ ํ์ง ์์ |
๋ฒ์ ์ด๊ณผ ๋ฐ๊ฒฌ ์ [High] severity๋ก ๋ณด๊ณ ํ๊ณ ์ด์ ๋ถ๋ฆฌ๋ฅผ ๊ถ์ฅํ๋ค.
HXSK Alignment
- SPEC ๊ฒ์ฆ: ๋ณ๊ฒฝ ์ฌํญ์ด
.hxsk/SPEC.md์ must-haves๋ฅผ ์ถฉ์กฑํ๋์ง ํ์ธ
- DECISIONS ์ฐธ์กฐ: ์ํคํ
์ฒ ๋ณ๊ฒฝ์ด
.hxsk/DECISIONS.md์ ๊ธฐ๋ก๋ ADR๊ณผ ์ผ์นํ๋์ง ํ์ธ
- Impact ๋ถ์:
analyze_code_impact๋ฅผ ์ฌ์ฉํ์ฌ ๋ณ๊ฒฝ ์ํฅ ๋ฒ์ ์ฌ์ ํ์
Post-Review Actions
Review ๊ฒฐ๊ณผ์ ๋ฐ๋ผ:
gh pr review <PR> --comment --body "<review>"
gh pr review <PR> --request-changes --body "<review>"
gh pr review <PR> --approve --body "<review>"
Lessons-Learned ์ ์ฅ (REQUEST_CHANGES ๋๋ [High]/[Blocker] ๋ฐ๊ฒฌ ์)
๋ฆฌ๋ทฐ์์ ๋ฐ๊ฒฌ๋ ํจํด์ A/B/C/D/E๋ก ๋ถ๋ฅํ์ฌ ์ ์ฅํ๋ค.
์นดํ
๊ณ ๋ฆฌ ํ๋จ ๊ธฐ์ค:
- A (doc-drift): docstring/plan ๋ถ์ผ์น, stale ๊ฒฝ๋ก, ์ฃผ์ ์ค๋ฅ
- B (test-quality): mock-only ํ
์คํธ, coverage ๋ถ์กฑ, resource close ๋๋ฝ
- C (state-sync): invariant ์๋ฐ, timing ์ค๋ฅ, semantic ๋ถ์ผ์น
- D (lifecycle): thread safety, cleanup ๋๋ฝ, fixture scope ๋ฌธ์
- E (compat): ๋ฏธ์ฌ์ฉ param, dead weight, forward-compat dead code
์ ์ฅ ๋ช
๋ น (๊ฐ ํจํด๋ณ):
bash .hxsk/hooks/md-store-memory.sh \
"Lesson {์นดํ
๊ณ ๋ฆฌ}: {ํจํด ์ ๋ชฉ}" \
"์ฆ์: {๊ตฌ์ฒด์ ์ฝ๋/์ํฉ}
PR: #{N}
์๋ฐฉ: {๋ค์์ ์ด ์ค์๋ฅผ ๋ฐฉ์งํ๋ ค๋ฉด}" \
"lessons-learned,category-{A|B|C|D|E},pr-{N}" \
"lessons-learned/{์นดํ
๊ณ ๋ฆฌ ๋๋ ํ ๋ฆฌ}"
APPROVE์ธ ๊ฒฝ์ฐ์๋ [High] ์ด์ ๋ฐ๊ฒฌ์ด ์์๋ค๋ฉด ์ ์ฅ.
Scripts
(์์ โ gh pr diff, gh pr view ๋ฑ ์์ด์ ํธ ๋ค์ดํฐ๋ธ ๋๊ตฌ๋ก ์ง์ ์ํ)
Iron Laws
NO REVIEW WITHOUT CONTEXT LOADING FIRST
NO REVIEW WITHOUT 6-PERSONA EVALUATION FIRST
NO FINDING WITHOUT SEVERITY CLASSIFICATION FIRST
NO APPROVAL WITHOUT SPEC_ALIGNMENT CHECK FIRST
NO VERDICT WITHOUT SCOPE_VALIDATION FIRST
NO REQUEST_CHANGES WITHOUT LESSONS_LEARNED STORAGE FIRST
NO FIXING_OUT_OF_SCOPE_ISSUES_WITHOUT_NEW_ISSUE_CREATION FIRST