binary-agents 1.0.5 → 1.0.7
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/commit.md +4 -4
- package/commands/pr.md +78 -0
- package/package.json +1 -1
package/commands/commit.md
CHANGED
|
@@ -34,10 +34,10 @@ You are a commit message generator that analyzes the project's commit convention
|
|
|
34
34
|
- Are there multiple logical changes that should be separate commits?
|
|
35
35
|
|
|
36
36
|
3. **Generate the commit message**
|
|
37
|
-
- Follow the detected convention
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
37
|
+
- Follow the detected convention pattern (type prefix, scope, etc.)
|
|
38
|
+
- **Always write in Korean** (even if existing history is in English)
|
|
39
|
+
- **Keep it concise, preferably 1 line** (50 chars recommended, 72 max)
|
|
40
|
+
- Add body only when truly necessary
|
|
41
41
|
|
|
42
42
|
4. **Execute the commit**
|
|
43
43
|
- Run `git commit -m "message"` with the generated message
|
package/commands/pr.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Analyze branch differences, commits, and changed files to generate a pull request
|
|
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
|
+
---
|
|
5
|
+
|
|
6
|
+
# Auto PR Generator
|
|
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.
|
|
9
|
+
|
|
10
|
+
## Context Information
|
|
11
|
+
|
|
12
|
+
**Current branch:**
|
|
13
|
+
!`git rev-parse --abbrev-ref HEAD`
|
|
14
|
+
|
|
15
|
+
**Main branch (target):**
|
|
16
|
+
!`git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "main"`
|
|
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"`
|
|
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"`
|
|
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"`
|
|
26
|
+
|
|
27
|
+
**Current git status:**
|
|
28
|
+
!`git status --short`
|
|
29
|
+
|
|
30
|
+
## Your Task
|
|
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
|
|
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.
|
|
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?
|
|
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
|
+
|
|
54
|
+
5. **Create the PR**
|
|
55
|
+
- First, ensure the branch is pushed to remote
|
|
56
|
+
- Use `gh pr create` with the generated title and body
|
|
57
|
+
- If PR already exists, inform the user
|
|
58
|
+
|
|
59
|
+
## Output Format
|
|
60
|
+
|
|
61
|
+
First, briefly explain:
|
|
62
|
+
- Current branch and target branch
|
|
63
|
+
- Number of commits to be included
|
|
64
|
+
- Summary of changes
|
|
65
|
+
|
|
66
|
+
Then ask for confirmation before creating the PR, showing the proposed title and description.
|
|
67
|
+
|
|
68
|
+
After confirmation, execute:
|
|
69
|
+
```bash
|
|
70
|
+
gh pr create --title "title" --body "body"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Error Handling
|
|
74
|
+
|
|
75
|
+
- If not logged into GitHub CLI: Guide user to run `gh auth login`
|
|
76
|
+
- If branch not pushed: Offer to push with `git push -u origin <branch>`
|
|
77
|
+
- If PR already exists: Show the existing PR URL
|
|
78
|
+
- If on main branch: Inform user to create a feature branch first
|