| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| Model | sonnet |
/pr-review-processor โ AI ์ฝ๋ ๋ฆฌ๋ทฐ ์๋ ๋ฐ์ ๋์ฐ๋ฏธ#
ํ๋ง๋๋ก#
PR(์ฝ๋ ๋ณ๊ฒฝ ์ ์์)์ AI ๋ฆฌ๋ทฐ์ด(Gemini, Claude, Copilot ๋ฑ)๊ฐ ๋จ๊ธด ์ง์ ์ฌํญ์ ์ฌ๋ ๋์ ์ฝ๊ณ , ๋ง๋ ์ง์ ์ ์ฝ๋์ ๋ฐ๋ก ๊ณ ์ณ ๋ฐ์ํ๊ณ , ํ๋ฆฐ ์ง์ ์ ๊ฑธ๋ฌ์ ๊ท์น์ผ๋ก ์ ๋ฆฌํด ๋๋ ์๋ ๋น์์ ๋๋ค. ๋ง์น ์ฌ๋ฌ ๊ฒํ ์๊ฒฌ์ ๋ฐ์ "์ด๊ฑด ๋ฐ์, ์ ๊ฑด ๋ฐ๋ ค"๋ฅผ ์์์ ์ฒ๋ฆฌํด ์ฃผ๋ ํธ์ง ๋ด๋น์์ ๊ฐ์์.
๋๊ฐยท์ธ์ ์ฐ๋์#
- PR์ AI ๋ฆฌ๋ทฐ ์ฝ๋ฉํธ๊ฐ ์๋ฉ ๋ฌ๋ ค์ ํ๋ํ๋ ์ง์ ํ์ธํ๊ณ ๊ณ ์น๊ธฐ ๋ฒ๊ฑฐ๋ก์ธ ๋
- ์ ์ฝ๋ ๋ณ๊ฒฝ์ ์ฌ๋ฆฐ ๋ค, AI ๋ฆฌ๋ทฐ ์ง์ ๋ค์ ๋น ๋ฅด๊ฒ ์ ๋ฆฌํ๊ณ ๋ฐ์ํ๊ณ ์ถ์ ๋
๋ฌด์์ ํด์ฃผ๋์#
- AI ๋ฆฌ๋ทฐ์ด๋ค์ด ๋จ๊ธด ์ฝ๋ฉํธ๋ฅผ ๋ชจ์ ํ๋นํ ์ง์ ์ ์ฝ๋์ ์ง์ ๋ฐ์ํ๊ณ , ๋ณ๊ฒฝ์ ์ปค๋ฐยทํธ์๊น์ง ์ฒ๋ฆฌํฉ๋๋ค.
-
ํ๋นํ์ง ์์ ์ง์ (ํ๋ก์ ํธ ๊ท์นยท์ํคํ
์ฒ์ ์ถฉ๋ํ๋ ๊ฒฝ์ฐ)์ ๋ฐ๋ คํ๊ณ , ๊ทธ ํจํด์
CLAUDE.md๊ท์น ํ์ผ์ ์ถ๊ฐํด ๊ฐ์ ์ง์ ์ด ๋ฐ๋ณต๋์ง ์๋๋ก ํฉ๋๋ค. - ๋ง์ง๋ง์ ๋ฐ์๋ ๋ฆฌ๋ทฐ / ๋ฐ๋ ค๋ ๋ฆฌ๋ทฐ / CLAUDE.md ์ ๋ฐ์ดํธ ๋ด์ญ์ ํ๋ก ์ ๋ฆฌํด ๋ณด์ฌ ์ค๋๋ค.
์ด๋ป๊ฒ ์ฐ๋์#
# ํน์ PR(์: 1639๋ฒ)์ ๋ฆฌ๋ทฐ๋ฅผ ์ฒ๋ฆฌ
/pr-review-processor 1639
# ํ์ฌ ๋ธ๋์น์ ์ด๋ ค ์๋ PR์ ๋ฆฌ๋ทฐ๋ฅผ ์ฒ๋ฆฌ
/pr-review-processor
PR ๋ฒํธ๋ฅผ ์ ์ผ๋ฉด ๊ทธ PR์, ์๋ตํ๋ฉด ์ง๊ธ ์์ ์ค์ธ ๋ธ๋์น์ ์ด๋ฆฐ PR์ ์๋์ผ๋ก ์ฐพ์ ์ฒ๋ฆฌํฉ๋๋ค.
์์์ ๋ฌด์จ ์ผ์ด ๋ฒ์ด์ง๋์#
- ๋ฆฌ๋ทฐ ์์ง โ GitHub์์ ํด๋น PR์ ๋ฌ๋ฆฐ ๋ฆฌ๋ทฐ ์ฝ๋ฉํธ๋ฅผ ๊ฐ์ ธ์ต๋๋ค.
- AI ๋ฆฌ๋ทฐ์ด๋ง ์ถ๋ฆฌ๊ธฐ โ Gemini, Claude, Copilot ๋ฑ AI๊ฐ ๋จ๊ธด ๋ฆฌ๋ทฐ๋ง ๊ณจ๋ผ๋ ๋๋ค.
-
ํ๋์ฉ ํ๋จ โ ํ๋นํ ์ง์ ์ด๋ฉด ์ฝ๋๋ฅผ ๊ณ ์น๊ณ , ํ๋นํ์ง ์์ผ๋ฉด
CLAUDE.md์ ๊ท์น์ ์ถ๊ฐํฉ๋๋ค.- ๋ฐ์ํ๋ ๊ฒฝ์ฐ: ์ค๋ณต ์ ๊ฑฐ, ๊ฒ์ฆ(null/๋น ๊ฐ) ์ถ๊ฐ, ์ฑ๋ฅ ์ต์ ํ, ๋ณด์ ์ทจ์ฝ์ ์์ , ์ ๊ทผ์ฑยท์ฌ์ฉ์ฑ ๊ฐ์ , ํ์ ์์ ์ฑ ๊ฐํ ๋ฑ
- ๋ฐ๋ คํ๋ ๊ฒฝ์ฐ: ํ๋ก์ ํธ lint ๊ท์นยท์ํคํ
์ฒ ํจํดยท์ต์ Dart/Flutter ๊ด๋กยท
CLAUDE.md๊ท์น๊ณผ ์ถฉ๋ํ๋ ์ง์
- ๋ณ๊ฒฝ ์ ์ฅ โ ๊ณ ์น ๋ด์ฉ์ด ํ์ง ๊ฒ์ฌ(ํฌ๋งทยท๋ฆฐํธยทDCM 0๊ฑด)๋ฅผ ํต๊ณผํ ๋ค์๋ง ์ปค๋ฐํ๊ณ ํธ์ํฉ๋๋ค.
- ๊ฒฐ๊ณผ ์์ฝ ์ถ๋ ฅ โ ์ฒ๋ฆฌ ๊ฒฐ๊ณผ๋ฅผ ํ๋์ ๋ณผ ์ ์๊ฒ ์ ๋ฆฌํด ๋ณด์ฌ ์ค๋๋ค.
โ๏ธ ์์ธ ์ต์ ยท์คํ ๋ช ์ธ (๊ฐ๋ฐ์ / AI ์์ด์ ํธ์ฉ)
Role#
- Review Collection: Query PR comments via GitHub API
- Review Analysis: Determine validity and classify priorities
- Code Modification: Apply valid reviews
- Rule Update: Add invalid review patterns to CLAUDE.md
Execution Flow#
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PR Review Processor Flow โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 1. Query PR review comments via gh api โ
โ 2. Filter AI reviewers (gemini, claude, copilot) โ
โ 3. Analyze each review: โ
โ - Valid โ modify code โ
โ - Invalid โ add rule to CLAUDE.md โ
โ 4. Per-Push Verification Gate (required before push): โ
โ melos run format โ dart fix --apply โ โ
โ melos run analyze (0 issues) โ โ
โ melos run dcm:analyze (0 error issues) โ
โ โ gate failure = push blocked (fix first) โ
โ 5. Commit and push changes โ
โ 6. Output processing result summary โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโReview Validity Criteria#
โ Valid Reviews (Apply)#
- Code duplication removal (DRY principle)
- Adding validation checks (null/empty checks)
- Performance optimization (removing unnecessary computation)
- Security vulnerability fixes
- Accessibility improvements
- UX improvements (user experience)
- Type safety enhancement
โ Invalid Reviews (Reject + Add Rule)#
- Conflicts with project lint rules
- Inconsistent with existing architecture patterns
- Conflicts with latest Dart/Flutter conventions
- Violates rules specified in CLAUDE.md
Usage Examples#
# Process specific PR review
/pr-review-processor 1639
# Process review for current branch ' s open PR
/pr-review-processorOutput Format#
## PR #1639 Code Review Processing Result
### โ
Applied Reviews (3 items)
| File | Line | Content | Action |
|------|------|---------|--------|
| file.dart | 45 | Add validation | Code modified |
### โ Rejected Reviews (1 item)
| File | Line | Content | Reason |
|------|------|---------|--------|
| file.dart | 10 | ... | Project convention conflict |
### ๐ CLAUDE.md Updated
- Added rule: ...MCP Tool Usage#
gh api- Query GitHub PR commentsRead- Read filesEdit- Modify codeBash- Git operations