binary-agents 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/commands/pr.md CHANGED
@@ -1,79 +1,79 @@
1
1
  ---
2
- description: Analyze branch differences, commits, and changed files to generate a pull request
2
+ description: 브랜치 차이, 커밋, 변경 파일을 분석하여 Pull Request 자동 생성
3
3
  allowed-tools: Bash(git status:*), Bash(git diff:*), Bash(git log:*), Bash(git branch:*), Bash(git rev-parse:*), Bash(gh pr:*), Bash(gh auth:*)
4
4
  ---
5
5
 
6
- # Auto PR Generator
6
+ # 자동 PR 생성기
7
7
 
8
- You are a pull request generator that analyzes the differences between the current branch and the main branch to create an appropriate PR.
8
+ 현재 브랜치와 main 브랜치의 차이를 분석하여 적절한 PR을 생성합니다.
9
9
 
10
- ## Context Information
10
+ ## 컨텍스트 정보
11
11
 
12
- **Current branch:**
12
+ **현재 브랜치:**
13
13
  !`git rev-parse --abbrev-ref HEAD`
14
14
 
15
- **Main branch (target):**
15
+ **Main 브랜치 (타겟):**
16
16
  !`git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "main"`
17
17
 
18
- **Commits in this branch (not in main):**
19
- !`git log --oneline main..HEAD 2>/dev/null || git log --oneline origin/main..HEAD 2>/dev/null || echo "No commits found"`
18
+ **이 브랜치의 커밋 (main에 없는):**
19
+ !`git log --oneline main..HEAD 2>/dev/null || git log --oneline origin/main..HEAD 2>/dev/null || echo "커밋을 찾을 수 없습니다"`
20
20
 
21
- **Changed files summary:**
22
- !`git diff --stat main..HEAD 2>/dev/null || git diff --stat origin/main..HEAD 2>/dev/null || echo "No changes found"`
21
+ **변경 파일 요약:**
22
+ !`git diff --stat main..HEAD 2>/dev/null || git diff --stat origin/main..HEAD 2>/dev/null || echo "변경사항을 찾을 수 없습니다"`
23
23
 
24
- **Detailed changes:**
25
- !`git diff main..HEAD --name-status 2>/dev/null || git diff origin/main..HEAD --name-status 2>/dev/null || echo "No changes found"`
24
+ **상세 변경사항:**
25
+ !`git diff main..HEAD --name-status 2>/dev/null || git diff origin/main..HEAD --name-status 2>/dev/null || echo "변경사항을 찾을 수 없습니다"`
26
26
 
27
- **Current git status:**
27
+ **현재 git 상태:**
28
28
  !`git status --short`
29
29
 
30
- ## Your Task
30
+ ## 작업 순서
31
31
 
32
- 1. **Analyze the branch information**
33
- - Identify the current branch name
34
- - Confirm the target branch (usually main or master)
35
- - Check if there are unpushed commits
32
+ 1. **브랜치 정보 분석**
33
+ - 현재 브랜치 이름 확인
34
+ - 타겟 브랜치 확인 (보통 main 또는 master)
35
+ - push되지 않은 커밋이 있는지 확인
36
36
 
37
- 2. **Analyze the commits**
38
- - Review all commits that will be included in the PR
39
- - Understand the overall purpose of these changes
40
- - Identify if this is a feature, bugfix, refactor, etc.
37
+ 2. **커밋 분석**
38
+ - PR에 포함될 모든 커밋 검토
39
+ - 변경사항의 전체적인 목적 파악
40
+ - feature, bugfix, refactor 등 유형 식별
41
41
 
42
- 3. **Analyze the changed files**
43
- - What files were modified/added/deleted?
44
- - Which areas of the codebase are affected?
45
- - Are there any breaking changes?
42
+ 3. **변경 파일 분석**
43
+ - 어떤 파일이 수정/추가/삭제되었는가?
44
+ - 코드베이스의 어느 영역이 영향받는가?
45
+ - breaking changes가 있는가?
46
46
 
47
- 4. **Generate PR title and description**
48
- - **Title**: Concise summary in Korean (following commit convention if exists)
49
- - **Description**: Include the following sections:
50
- - `## 변경 사항` (Summary of changes)
51
- - `## 변경된 파일` (List of key changed files)
52
- - `## 테스트` (How to test, if applicable)
53
- - **Do NOT add "🤖 Generated with Claude Code" or any AI attribution footer**
47
+ 4. **PR 제목 설명 생성**
48
+ - **제목**: 한국어로 간결한 요약 (커밋 컨벤션이 있으면 따르기)
49
+ - **설명**: 다음 섹션 포함:
50
+ - `## 변경 사항` (변경사항 요약)
51
+ - `## 변경된 파일` (주요 변경 파일 목록)
52
+ - `## 테스트` (해당되는 경우 테스트 방법)
53
+ - **"Generated with Claude Code" 또는 AI attribution footer 추가 금지**
54
54
 
55
- 5. **Create the PR**
56
- - First, ensure the branch is pushed to remote
57
- - Use `gh pr create` with the generated title and body
58
- - If PR already exists, inform the user
55
+ 5. **PR 생성**
56
+ - 먼저 브랜치가 remote에 push되었는지 확인
57
+ - 생성된 title과 body로 `gh pr create` 사용
58
+ - PR 이미 존재하면 사용자에게 알림
59
59
 
60
- ## Output Format
60
+ ## 출력 형식
61
61
 
62
- First, briefly explain:
63
- - Current branch and target branch
64
- - Number of commits to be included
65
- - Summary of changes
62
+ 먼저 간략히 설명:
63
+ - 현재 브랜치와 타겟 브랜치
64
+ - 포함될 커밋
65
+ - 변경사항 요약
66
66
 
67
- Then ask for confirmation before creating the PR, showing the proposed title and description.
67
+ 다음 PR 생성 확인 요청, 제안된 title description 표시.
68
68
 
69
- After confirmation, execute:
69
+ 확인 실행:
70
70
  ```bash
71
71
  gh pr create --title "title" --body "body"
72
72
  ```
73
73
 
74
- ## Error Handling
74
+ ## 에러 처리
75
75
 
76
- - If not logged into GitHub CLI: Guide user to run `gh auth login`
77
- - If branch not pushed: Offer to push with `git push -u origin <branch>`
78
- - If PR already exists: Show the existing PR URL
79
- - If on main branch: Inform user to create a feature branch first
76
+ - GitHub CLI 로그인 안됨: `gh auth login` 실행 안내
77
+ - 브랜치 미푸시: `git push -u origin <branch>`로 push 제안
78
+ - PR 이미 존재: 기존 PR URL 표시
79
+ - main 브랜치에서 실행: feature 브랜치 먼저 생성하라고 안내
@@ -0,0 +1,231 @@
1
+ ---
2
+ description: PR 링크를 받아 변경사항을 분석하고 GitHub 스타일로 라인별 코드 리뷰 제공
3
+ allowed-tools: Task, Skill, Bash(gh pr:*), Bash(gh api:*), Read, Glob, Grep
4
+ ---
5
+
6
+ # PR 코드 리뷰어
7
+
8
+ GitHub PR 링크를 받아 변경된 파일들을 분석하고, 실제 GitHub 리뷰처럼 라인별 코멘트를 제공합니다.
9
+
10
+ ## 컨텍스트 정보
11
+
12
+ **PR 링크 또는 번호:**
13
+ !`echo "${1:-}"`
14
+
15
+ ## 사용 가능한 리뷰 에이전트
16
+
17
+ Task 도구를 통해 다음 전문 에이전트를 사용할 수 있습니다:
18
+
19
+ | Agent | 초점 영역 |
20
+ |-------|----------|
21
+ | `code-reviewer` | 아키텍처, 타입 안전성, 에러 처리, 테스트, 접근성, 보안 |
22
+ | `fundamentals-code` | Toss Frontend Fundamentals 기반 (가독성, 예측 가능성, 응집도, 결합도) |
23
+ | `refactor-analyzer` | 코드 중복, 복잡성, 추상화 기회, 코드 스멜 |
24
+ | `junior-checker` | 주니어 개발자 관점 가독성, 네이밍, 복잡도 |
25
+ | `react-performance-optimizer` | React 리렌더, 메모이제이션, 훅 최적화 |
26
+
27
+ ## 사용 가능한 Skill
28
+
29
+ Skill은 사용자 설치에 따라 다르며 추가 리뷰 가이드라인/컨텍스트를 제공합니다:
30
+ - `vercel-react-best-practices` - Vercel의 React/Next.js 최적화 가이드라인
31
+ - 커스텀 팀 코딩 표준
32
+ - 프레임워크별 best practices
33
+
34
+ **참고:** Skill은 Skill 도구로 로드되며 직접 분석이 아닌 리뷰 컨텍스트를 제공합니다.
35
+
36
+ ## 작업 순서
37
+
38
+ 1. **PR 정보 가져오기**
39
+
40
+ ```bash
41
+ # PR 정보
42
+ gh pr view <PR번호> --json title,body,author,baseRefName,headRefName,changedFiles,additions,deletions
43
+
44
+ # 변경된 파일 목록
45
+ gh pr diff <PR번호> --name-only
46
+
47
+ # 변경 내용 (diff)
48
+ gh pr diff <PR번호>
49
+ ```
50
+
51
+ 2. **사용자에게 리뷰 유형 질문** (AskUserQuestion 사용)
52
+
53
+ 옵션 제시:
54
+
55
+ | 옵션 | 이름 | 사용 에이전트 | 적합한 상황 |
56
+ |------|------|--------------|-------------|
57
+ | 1 | **전체 리뷰** | 모든 5개 에이전트 병렬 실행 | 종합 코드 리뷰 (권장) |
58
+ | 2 | **커스텀** | 사용자가 직접 선택 | 특정 관점만 리뷰하고 싶을 때 |
59
+
60
+ 3. **Skill 포함 여부 질문** (AskUserQuestion 사용)
61
+
62
+ 리뷰 유형 선택 후:
63
+ > "포함할 skill이 있나요? (예: `vercel-react-best-practices`, 팀 코딩 가이드 등)"
64
+
65
+ 옵션:
66
+ - **없음** - skill 없이 에이전트만 실행
67
+ - **있음** - skill 이름 입력받아서 로드
68
+
69
+ 사용자가 skill 이름 제공 시:
70
+ - 에이전트 실행 전 `Skill(<skill-name>)`으로 각 skill 로드
71
+ - Skill은 리뷰를 위한 추가 컨텍스트/가이드라인 제공
72
+
73
+ 4. **선택된 에이전트 병렬 실행**
74
+
75
+ Task 도구로 에이전트를 **동시에** 실행. 각 에이전트에게 PR diff를 전달:
76
+
77
+ ```
78
+ Task(code-reviewer): "다음 PR의 변경사항을 리뷰해주세요.
79
+
80
+ [PR 정보]
81
+ - 제목: xxx
82
+ - 변경 파일: [파일 목록]
83
+
84
+ [Diff 내용]
85
+ (gh pr diff 결과)
86
+
87
+ GitHub 리뷰 스타일로 file:line 참조와 함께 발견사항을 반환하세요.
88
+ 심각도를 Must Fix / Should Fix / Consider / Suggestion으로 구분하세요."
89
+
90
+ Task(fundamentals-code): "다음 PR의 변경사항을 Toss Frontend Fundamentals 원칙으로 분석해주세요.
91
+ [같은 PR 정보와 diff]
92
+ 가독성, 예측 가능성, 응집도, 결합도 관점에서 리뷰하세요."
93
+
94
+ Task(refactor-analyzer): "다음 PR의 변경사항에서 리팩토링 기회를 찾아주세요.
95
+ [같은 PR 정보와 diff]
96
+ 코드 중복, 복잡성, 추상화 기회를 확인하세요."
97
+
98
+ Task(junior-checker): "다음 PR의 변경사항이 주니어 개발자에게 이해하기 쉬운지 분석해주세요.
99
+ [같은 PR 정보와 diff]
100
+ 네이밍, 복잡도, 가독성을 확인하세요."
101
+
102
+ Task(react-performance-optimizer): "다음 PR의 변경사항에서 React 성능 이슈를 찾아주세요.
103
+ [같은 PR 정보와 diff]
104
+ 리렌더, 메모이제이션, 훅 최적화 관점에서 리뷰하세요."
105
+ ```
106
+
107
+ 5. **결과 종합**
108
+ - 모든 에이전트 결과 수집
109
+ - 중복 발견사항 제거
110
+ - 심각도별 정렬
111
+ - GitHub 리뷰 스타일로 포맷팅
112
+
113
+ ## Output Format
114
+
115
+ ```markdown
116
+ # PR 코드 리뷰
117
+
118
+ ## PR 정보
119
+ - **제목:** [PR 제목]
120
+ - **작성자:** @[author]
121
+ - **브랜치:** [head] → [base]
122
+ - **변경:** +[additions] -[deletions] in [files] files
123
+
124
+ ---
125
+
126
+ ## 리뷰 요약
127
+
128
+ | 심각도 | 개수 |
129
+ |--------|------|
130
+ | 🔴 Must Fix | X |
131
+ | 🟡 Should Fix | Y |
132
+ | 🟢 Consider | Z |
133
+ | 💡 Suggestion | W |
134
+
135
+ ---
136
+
137
+ ## 🔴 Must Fix (반드시 수정)
138
+
139
+ ### `src/components/UserProfile.tsx:42`
140
+ **[카테고리]** 타입 안전성
141
+ **[발견 에이전트]** code-reviewer
142
+
143
+ 현재 코드:
144
+ ```tsx
145
+ const user: any = response.data
146
+ ```
147
+
148
+ 문제:
149
+ - `any` 타입 사용으로 타입 안전성 상실
150
+
151
+ 제안:
152
+ ```tsx
153
+ const user: User = response.data
154
+ ```
155
+
156
+ ---
157
+
158
+ ## 🟡 Should Fix (권장 수정)
159
+
160
+ ### `src/hooks/useAuth.ts:15-20`
161
+ **[카테고리]** 에러 처리
162
+ **[발견 에이전트]** code-reviewer
163
+
164
+ [같은 형식...]
165
+
166
+ ---
167
+
168
+ ## 🟢 Consider (고려 사항)
169
+
170
+ [같은 형식...]
171
+
172
+ ---
173
+
174
+ ## 💡 Suggestions (제안)
175
+
176
+ [같은 형식...]
177
+
178
+ ---
179
+
180
+ ## ✅ 잘한 점
181
+
182
+ - `src/hooks/useUser.ts` - 훅 분리가 잘 되어 있음 (fundamentals-code)
183
+ - `src/types/index.ts` - 타입 정의가 명확함 (code-reviewer)
184
+
185
+ ---
186
+
187
+ ## 에이전트별 요약
188
+
189
+ ### Code Reviewer
190
+ [주요 발견사항]
191
+
192
+ ### Fundamentals Code
193
+ [주요 발견사항]
194
+
195
+ ### Refactor Analyzer
196
+ [주요 발견사항]
197
+
198
+ ### Junior Checker
199
+ [주요 발견사항]
200
+
201
+ ### React Performance Optimizer
202
+ [주요 발견사항]
203
+
204
+ ---
205
+
206
+ ## 다음 단계
207
+
208
+ 1. **즉시:** 🔴 Must Fix 항목 수정
209
+ 2. **이번 PR:** 🟡 Should Fix 항목 검토
210
+ 3. **추후:** 🟢 Consider 항목 백로그에 추가
211
+ ```
212
+
213
+ ## 사용 예시
214
+
215
+ ```bash
216
+ # PR 번호로
217
+ /review-pr 123
218
+
219
+ # PR URL로
220
+ /review-pr https://github.com/owner/repo/pull/123
221
+ ```
222
+
223
+ ## 중요 사항
224
+
225
+ - **병렬 실행** - 에이전트를 동시에 실행하여 효율적으로 리뷰
226
+ - **변경된 파일만 분석** - 전체 코드베이스가 아닌 PR diff만 리뷰
227
+ - **라인 번호 정확히** - diff에서 실제 라인 번호 추출하여 GitHub에서 바로 찾을 수 있도록
228
+ - **구체적 제안** - 문제만 지적하지 말고 해결책 제시
229
+ - **한국어 출력** - 최종 리포트는 한국어로
230
+ - **심각도 구분** - Must/Should/Consider/Suggestion으로 우선순위화
231
+ - **발견 에이전트 표시** - 어떤 에이전트가 발견했는지 명시