--- id: quality-code-review-modern title: Code Review Modern β€” AI-assisted / async / culture category: Coding status: draft source_trust_level: B verification_status: conceptual created_at: 2026-05-09 updated_at: 2026-05-09 tags: [quality, review, vibe-coding] tech_stack: { language: "process", applicable_to: ["Engineering"] } applied_in: [] aliases: [code review, AI review, CodeRabbit, Greptile, async review, review culture, small PR] --- # Code Review Modern > AI-assisted + culture-aware. **CodeRabbit / Greptile (AI), small PR, async-first, blameless**. ## πŸ“– 핡심 κ°œλ… - AI κ°€ first-pass. - Human = critical 만. - Small PR culture. - Async + thread-based. ## πŸ’» μ½”λ“œ νŒ¨ν„΄ ### AI review (CodeRabbit) ```yaml # .coderabbit.yaml language: en reviews: profile: chill # or 'assertive' request_changes_workflow: false high_level_summary: true poem: false ``` ``` PR open β†’ CodeRabbit κ°€ review. - Bug detect. - Style suggestion. - Test coverage. - Documentation. β†’ Human κ°€ critical 만 review. ``` ### Greptile / Sourcery ``` - Greptile: codebase-aware (큰 PR μΉœν™”). - Sourcery: λ§€ commit refactor. - Cursor / Copilot: inline. β†’ λ§€ tool 의 different focus. ``` ### Self-review (λ¨Όμ €) ``` PR open μ „: 1. Diff κ²€ν† . 2. Test μ‹€ν–‰. 3. Self-comment ("이 κ°€ μ˜λ„?"). 4. Description μž‘μ„±. β†’ λ§€ reviewer 의 μ‹œκ°„ 절감. ``` ### PR description ```markdown ## Why [motivation] ## What [change list] ## Testing - [x] Unit test added. - [x] Manual test. ## Screenshot / Loom [image] ## Out of scope [what NOT done] ``` ### Small PR culture ``` < 100 LOC: ideal. 100-400: OK. 400+: split. β†’ μž‘μ€ PR = λΉ λ₯Έ review = λΉ λ₯Έ feedback. ``` ### PR size μΈ‘μ • ```yaml # GitHub - name: PR size check run: | LOC=$(gh pr diff ${{ github.event.pull_request.number }} | wc -l) if [[ $LOC -gt 1000 ]]; then gh pr comment --body 'Large PR β€” consider split.' fi ``` ### Review SLA ``` Target: - First review: < 4 hour. - Approve / changes: < 1 day. - Merge: < 2 day. β†’ Long PR = lead time ↑. ``` ### Blameless culture ``` "이 code κ°€ 잘λͺ»" β€” focus on code. "You wrote bad code" β€” personal. β†’ "이 κ°€ μ˜λ„?" 보닀 "μ™œ 이 approach?" κ°€ μ’‹μŒ. ``` ### Comment 의 levels ``` Nit: trivial (skippable). Suggestion: optional improvement. Question: clarify. Required: must fix. β†’ λͺ…μ‹œμ  prefix. ``` ```markdown nit: extra space here. suggestion: consider extracting. question: why this approach? required: race condition here. ``` ### Conventional Comments ``` @: praise: nice abstraction! nitpick: extra newline. suggestion: extract to helper. issue: null pointer possible. question: why X? todo: handle error case. chore: rebase main. ``` β†’ λͺ…μ‹œμ  + structured. ### Approval criteria ``` Don't block on: - Subjective style. - Out of scope. - Future improvement (별 PR). - Opinion (vs author). Block on: - Bug. - Security. - Test missing. - Performance regression. ``` ### "Approve with comments" ``` Critical κ°€ μ—† κ°€, suggestion 만: - Approve (merge OK). - Comments κ°€ author 의 discretion. β†’ Author κ°€ ignore OK. Reviewer κ°€ trust. ``` ### Pair review (paired) ``` 2 reviewer κ°€ 같은 PR. - Different perspective. - 1 κ°€ OK, 1 κ°€ changes. - Critical PR. ``` ### Review rotation ``` Team 의 round-robin: - Avoid 1 μ‚¬λžŒ burnout. - λ§€ μ‚¬λžŒ 의 codebase μ΅μˆ™. - Knowledge spread. ``` β†’ GitHub team review (auto round-robin). ### Stale PR ``` - 7 day no activity = warning. - 14 day = bot reminder. - 30 day = auto-close. β†’ Backlog hygiene. ``` ### Pre-commit (catch first) ```bash # .husky/pre-commit npm run lint npm run typecheck npm test ``` β†’ Local catch = review μ „. ### Conventional commit ``` feat: add OAuth login fix: resolve race condition in cart chore: update dependencies refactor: extract user service test: add integration tests for checkout docs: update README perf: optimize search query ``` β†’ Auto changelog + semantic versioning. ### Review templates ```markdown ### Functional review - [ ] Code does what it claims. - [ ] Edge cases. - [ ] Error handling. - [ ] Performance. - [ ] Security. ### Code quality - [ ] Readable. - [ ] DRY (no duplicate). - [ ] Tests. - [ ] Comments where needed. ``` ### Type of review ``` Architectural: design, structure. Functional: behavior, correctness. Style: format, naming. Performance: complexity. Security: vuln. β†’ λ§€ PR 의 focus 따라. ``` ### Reviewer fatigue ``` 1 일 5+ PR = quality ↓. β†’ Limit. Pair. ``` ### LLM-assisted human review ``` Cursor / Copilot κ°€: - Diff summary. - Specific concern (security, perf). - Refactor suggestion. β†’ Human κ°€ critical 만 + LLM κ°€ noise. ``` ### Code review 의 ROI ``` Pros: - Bug catch. - Knowledge transfer. - Code quality. - Mentor. Cons: - Time (1 hour / day / dev). - Bottleneck. - Conflict. β†’ Process 의 efficiency κ°€ key. ``` ### Pair programming (review alternative) ``` 2 μ‚¬λžŒ κ°€ real-time: - λ§€ commit κ°€ already reviewed. - λΉ λ₯Έ feedback. - μž‘μ€ work 의 sweet. β†’ Critical / μ–΄λ €μš΄ task 만. ``` ### Review metric ``` - Time to first review. - Iterations per PR. - LOC per PR. - Approval rate. - Bug rate (post-merge). β†’ DORA-style metric. ``` β†’ [[Quality_Engineering_Excellence]]. ### Tools (modern) ``` - GitHub PR (default). - Reviewable / Pull Reviewers (3rd party). - CodeRabbit / Greptile (AI). - Graphite (stack-based PR). - Sapling (Meta). ``` ### Stack-based PR (Graphite) ``` 1 feature = 5 μž‘μ€ PR (stack). - λ§€ PR = μž‘μ€. - Sequential merge. - Big feature = manageable. ``` β†’ 큰 feature 의 λ‹΅. ### Best practice ``` 1. Self-review λ¨Όμ €. 2. Small PR (<400 LOC). 3. PR description 의 why. 4. AI assist (CodeRabbit). 5. Async + threaded comment. 6. Conventional comments. 7. Approve with comments OK. 8. Don't block on opinion. ``` ## πŸ€” μ˜μ‚¬κ²°μ • κΈ°μ€€ | μž‘μ—… | μΆ”μ²œ | |---|---| | AI first-pass | CodeRabbit / Greptile | | Small PR | < 400 LOC | | Big feature | Stack (Graphite) | | Critical | Pair review | | Fast feedback | Pair programming | | Async team | Threaded comment | ## ❌ μ•ˆν‹°νŒ¨ν„΄ - **Big PR (1000+)**: slow review. - **No description**: μ‹œκ°„ λ‚­λΉ„. - **Block on opinion**: morale. - **Personal attack**: blameless. - **No SLA**: lead time ↑. - **Manual everything**: AI 의 κ°€μΉ˜. ## πŸ€– LLM ν™œμš© 힌트 - AI review (CodeRabbit) κ°€ first-pass. - Small PR + async + blameless. - Conventional comments κ°€ structured. - DORA metric 의 lead time. ## πŸ”— κ΄€λ ¨ λ¬Έμ„œ - [[Productivity_Code_Review]] - [[Productivity_PR_Template]] - [[Quality_Code_Ownership_CODEOWNERS]]