prr-kit 1.1.0 → 1.1.1
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/README.md +235 -235
- package/package.json +60 -60
- package/src/prr/workflows/2-analyze/describe-pr/templates/pr-description.template.md +51 -51
- package/src/prr/workflows/3-review/architecture-review/workflow.yaml +18 -18
- package/src/prr/workflows/3-review/general-review/workflow.yaml +18 -18
- package/src/prr/workflows/3-review/performance-review/workflow.yaml +18 -18
- package/src/prr/workflows/3-review/security-review/workflow.yaml +19 -19
- package/src/prr/workflows/4-improve/improve-code/workflow.yaml +18 -18
- package/src/prr/workflows/6-report/generate-report/templates/review-report.template.md +78 -78
- package/tools/cli/installers/lib/core/installer.js +162 -162
- package/tools/cli/installers/lib/ide/github-copilot.js +262 -262
- package/tools/cli/prr-cli.js +36 -36
package/README.md
CHANGED
|
@@ -1,235 +1,235 @@
|
|
|
1
|
-
# PR Review
|
|
2
|
-
|
|
3
|
-
<p align="center">
|
|
4
|
-
<img src="docs/assets/banner.svg" alt="PR Review
|
|
5
|
-
</p>
|
|
6
|
-
|
|
7
|
-
> AI-driven Pull Request code review — structured, multi-perspective, actionable.
|
|
8
|
-
|
|
9
|
-
Module system, agent YAML, step-file workflows, CLI installer with full IDE integration.
|
|
10
|
-
|
|
11
|
-
## Quick Start
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
# Install into your repo (interactive — recommended)
|
|
15
|
-
npx prr-kit install
|
|
16
|
-
|
|
17
|
-
# Or use the alias
|
|
18
|
-
npx pr-review install
|
|
19
|
-
|
|
20
|
-
# Silent install with defaults (edit config.yaml afterward)
|
|
21
|
-
npx prr-kit install --directory /path/to/repo --modules prr --tools claude-code --yes
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Then open your IDE in the installed project and use `/prr-master` to start.
|
|
25
|
-
|
|
26
|
-
## How It Works
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
Your IDE (Claude Code / Cursor / Windsurf / ...)
|
|
30
|
-
│
|
|
31
|
-
│ /prr-master or /prr-quick
|
|
32
|
-
▼
|
|
33
|
-
┌─────────────────────────────────────────────────┐
|
|
34
|
-
│ PRR Master Agent │
|
|
35
|
-
│ reads _prr/ · routes to workflows │
|
|
36
|
-
└────────────┬────────────────────────────────────┘
|
|
37
|
-
│
|
|
38
|
-
┌───────▼────────┐
|
|
39
|
-
│ select-pr │ git fetch · list PRs via platform CLI
|
|
40
|
-
│ (Step-file) │ user selects PR/MR by number or branch
|
|
41
|
-
└───────┬────────┘
|
|
42
|
-
│ diff loaded into AI context
|
|
43
|
-
┌───────▼────────┐
|
|
44
|
-
│ describe-pr │ classify type · file-by-file walkthrough
|
|
45
|
-
└───────┬────────┘
|
|
46
|
-
│
|
|
47
|
-
┌───────▼────────────────────────────────┐
|
|
48
|
-
│ Review agents (parallel or sequential) │
|
|
49
|
-
│ GR · SR · PR · AR │
|
|
50
|
-
│ each reads instructions.xml │
|
|
51
|
-
│ outputs structured findings │
|
|
52
|
-
└───────┬────────────────────────────────┘
|
|
53
|
-
│
|
|
54
|
-
┌───────▼────────┐
|
|
55
|
-
│ generate-report│ compile findings · sort by severity
|
|
56
|
-
│ │ write .md to _prr-output/reviews/
|
|
57
|
-
└───────┬────────┘
|
|
58
|
-
│
|
|
59
|
-
┌───────▼────────┐
|
|
60
|
-
│ post-comments │ post inline comments via platform CLI
|
|
61
|
-
│ (optional) │ GitHub · GitLab · Azure · Bitbucket
|
|
62
|
-
└────────────────┘
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
The framework installs into your project as a `_prr/` folder. Agents and workflows are Markdown/YAML files that your AI IDE reads and executes — no server, no background process, no API keys required beyond your IDE's AI.
|
|
66
|
-
|
|
67
|
-
## Configuration
|
|
68
|
-
|
|
69
|
-
After install, edit `_prr/prr/config.yaml` in your project:
|
|
70
|
-
|
|
71
|
-
```yaml
|
|
72
|
-
user_name: YourName
|
|
73
|
-
communication_language: English
|
|
74
|
-
target_repo: . # path to the git repo to review (. = current dir)
|
|
75
|
-
platform: auto # auto-detect from git remote, or: github / gitlab / azure / bitbucket
|
|
76
|
-
platform_repo: "owner/repo" # required for PR listing and posting inline comments
|
|
77
|
-
output_folder: _prr-output
|
|
78
|
-
review_output: /abs/path/_prr-output/reviews
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
> `platform` defaults to `auto` — detects GitHub/GitLab/Azure/Bitbucket from the git remote URL.
|
|
82
|
-
> `platform_repo` is required for PR listing (`gh pr list`, `glab mr list`, etc.) and posting inline comments.
|
|
83
|
-
> Leave `platform_repo` empty to use local branch selection only.
|
|
84
|
-
|
|
85
|
-
## Platform Support
|
|
86
|
-
|
|
87
|
-
| Feature | None / Local | GitHub | GitLab | Azure DevOps | Bitbucket |
|
|
88
|
-
|---------|:---:|:---:|:---:|:---:|:---:|
|
|
89
|
-
| Core review (diff analysis) | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
90
|
-
| Auto-detect platform from remote URL | — | ✅ | ✅ | ✅ | ✅ |
|
|
91
|
-
| List open PRs/MRs | ❌ | ✅ `gh` | ✅ `glab` | ✅ `az` | ✅ `bb` |
|
|
92
|
-
| Select PR by number (auto base/head) | ❌ | ✅ | ✅ | ✅ | ✅ |
|
|
93
|
-
| Load diff via platform CLI | ❌ | ✅ `gh pr diff` | ✅ `glab mr diff` | ⚠️ git fallback | ⚠️ git fallback |
|
|
94
|
-
| Post inline code comments | ❌ | ✅ Reviews API | ✅ MR discussions | ✅ PR threads | ✅ REST API |
|
|
95
|
-
| Post summary review | ❌ | ✅ | ✅ | ✅ | ✅ |
|
|
96
|
-
| Review verdict (approve / request changes) | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
97
|
-
| Required CLI | — | `gh` | `glab` | `az` + extension | `bb` / curl |
|
|
98
|
-
|
|
99
|
-
> **None / Local mode**: all review analysis runs locally via `git diff` — no platform CLI required. Findings are saved to `_prr-output/reviews/` only.
|
|
100
|
-
|
|
101
|
-
## Review Workflow
|
|
102
|
-
|
|
103
|
-
### Quick mode — one command, full pipeline
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
/prr-quick or /prr-master → QR
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Runs automatically: **select PR → describe → all 4 reviews → generate report**
|
|
110
|
-
Only pauses once to ask which PR/branch to review.
|
|
111
|
-
|
|
112
|
-
### Manual mode — step by step
|
|
113
|
-
|
|
114
|
-
| Code | Command | Description |
|
|
115
|
-
|------|---------|-------------|
|
|
116
|
-
| `CP` | Collect Project Context | Scan ESLint/tsconfig/docs, extract coding rules, capture domain knowledge — **run once per project** |
|
|
117
|
-
| `SP` | Select PR | Fetch latest → list open PRs (via `gh`) or branches → select head + base → load diff |
|
|
118
|
-
| `DP` | Describe PR | Classify PR type, generate summary, file-by-file walkthrough |
|
|
119
|
-
| `GR` | General Review | Logic, naming, readability, DRY, best practices |
|
|
120
|
-
| `SR` | Security Review | OWASP Top 10, secrets, auth, rate limits, injection |
|
|
121
|
-
| `PR` | Performance Review | N+1 queries, memory leaks, async patterns, caching |
|
|
122
|
-
| `AR` | Architecture Review | SOLID, layers, coupling, consistency with codebase |
|
|
123
|
-
| `IC` | Improve Code | Concrete BEFORE/AFTER code suggestions |
|
|
124
|
-
| `AK` | Ask Code | Q&A about specific changes in this PR |
|
|
125
|
-
| `RR` | Generate Report | Compile all findings → Markdown report in `_prr-output/reviews/` |
|
|
126
|
-
| `PC` | Post Comments | Post inline code comments to GitHub PR via `gh` Reviews API |
|
|
127
|
-
| `PM` | Party Mode 🎉 | All 4 reviewers in one collaborative session |
|
|
128
|
-
| `HH` | Help | Show this guide |
|
|
129
|
-
|
|
130
|
-
### Selecting a PR (SP step)
|
|
131
|
-
|
|
132
|
-
**With `platform_repo` configured** — lists open PRs/MRs via platform CLI:
|
|
133
|
-
```
|
|
134
|
-
#45 "Add OAuth2 login" feature/oauth → main @alice 3h ago
|
|
135
|
-
#44 "Fix memory leak" fix/memory → main @bob 1d ago
|
|
136
|
-
```
|
|
137
|
-
Enter PR number → base and head resolved automatically.
|
|
138
|
-
|
|
139
|
-
**Without `platform_repo`** — asks explicitly for both branches:
|
|
140
|
-
```
|
|
141
|
-
🎯 Head branch (the branch to review)?
|
|
142
|
-
• Enter a number from the list (e.g., 1)
|
|
143
|
-
• Type the branch name directly (e.g., feature/my-feature)
|
|
144
|
-
|
|
145
|
-
🎯 Base branch (what to diff against)?
|
|
146
|
-
• Press Enter for default [main]
|
|
147
|
-
• Type the branch name directly (e.g., develop)
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
## Review Agents
|
|
151
|
-
|
|
152
|
-
| Agent | Slash Command | Speciality |
|
|
153
|
-
|-------|--------------|------------|
|
|
154
|
-
| PRR Master | `/prr-master` | Orchestrator — routes all workflows, full menu |
|
|
155
|
-
| PRR Quick | `/prr-quick` | One-command full pipeline (select → review → report) |
|
|
156
|
-
|
|
157
|
-
Specialist reviewer agents (Alex, Sam, Petra, Arch) are orchestrated internally by the master agent and party-mode workflow. Use `[PM] Party Mode` from the master menu to run all 4 reviewers in a collaborative session.
|
|
158
|
-
|
|
159
|
-
## Severity Levels
|
|
160
|
-
|
|
161
|
-
All findings use a standard format:
|
|
162
|
-
|
|
163
|
-
- 🔴 **[BLOCKER]** — Must fix before merge
|
|
164
|
-
- 🟡 **[WARNING]** — Should fix (with explanation)
|
|
165
|
-
- 🟢 **[SUGGESTION]** — Nice-to-have improvement
|
|
166
|
-
- 📌 **[QUESTION]** — Needs clarification from author
|
|
167
|
-
|
|
168
|
-
## Inline Code Comments
|
|
169
|
-
|
|
170
|
-
When `[PC] Post Comments` is run with `platform_repo` configured, it posts findings as **inline code comments** on the exact file and line — the same experience as a human reviewer.
|
|
171
|
-
|
|
172
|
-
| Platform | Method | Required CLI |
|
|
173
|
-
|----------|--------|-------------|
|
|
174
|
-
| GitHub | Reviews API | `gh auth login` |
|
|
175
|
-
| GitLab | MR Discussions API | `glab auth login` |
|
|
176
|
-
| Azure DevOps | PR Threads API | `az login` |
|
|
177
|
-
| Bitbucket | Inline Comments REST API | `bb` / `curl` |
|
|
178
|
-
|
|
179
|
-
## Supported IDEs
|
|
180
|
-
|
|
181
|
-
**Preferred:**
|
|
182
|
-
- **Claude Code**, **Cursor**, **Windsurf**
|
|
183
|
-
|
|
184
|
-
**Also supported:**
|
|
185
|
-
- Antigravity, Auggie, Cline, Codex, Crush, Gemini CLI, GitHub Copilot, iFlow, Kilo, Kiro, OpenCode, QwenCoder, Roo Cline, Rovo Dev, Trae
|
|
186
|
-
|
|
187
|
-
## Requirements
|
|
188
|
-
|
|
189
|
-
- Node.js 20+
|
|
190
|
-
- Git
|
|
191
|
-
- Platform CLI (optional — only needed for PR listing and inline comments):
|
|
192
|
-
- GitHub: [`gh`](https://cli.github.com/)
|
|
193
|
-
- GitLab: [`glab`](https://gitlab.com/gitlab-org/cli)
|
|
194
|
-
- Azure DevOps: [`az`](https://learn.microsoft.com/en-us/cli/azure/) + Azure DevOps extension
|
|
195
|
-
- Bitbucket: [`bb`](https://bitbucket.org/atlassian/bitbucket-cli) or `curl`
|
|
196
|
-
|
|
197
|
-
## Development
|
|
198
|
-
|
|
199
|
-
```bash
|
|
200
|
-
npm install
|
|
201
|
-
npm test
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
## Project Structure
|
|
205
|
-
|
|
206
|
-
```
|
|
207
|
-
main-project/
|
|
208
|
-
├── src/
|
|
209
|
-
│ ├── core/ # Master agent, tasks, party-mode workflow
|
|
210
|
-
│ └── prr/
|
|
211
|
-
│ ├── agents/ # 4 specialist reviewer agents
|
|
212
|
-
│ └── workflows/
|
|
213
|
-
│ ├── 0-setup/ # [CP] Collect Project Context
|
|
214
|
-
│ ├── 1-discover/ # [SP] Select PR
|
|
215
|
-
│ ├── 2-analyze/ # [DP] Describe PR
|
|
216
|
-
│ ├── 3-review/ # [GR] [SR] [PR] [AR] Reviews
|
|
217
|
-
│ ├── 4-improve/ # [IC] Improve Code
|
|
218
|
-
│ ├── 5-ask/ # [AK] Ask Code
|
|
219
|
-
│ ├── 6-report/ # [RR] Generate Report, [PC] Post Comments
|
|
220
|
-
│ └── quick/ # [QR] Full pipeline in one command
|
|
221
|
-
├── tools/
|
|
222
|
-
│ └── cli/ # CLI installer + IDE handlers
|
|
223
|
-
├── test/ # Schema + component tests
|
|
224
|
-
└── docs/ # Documentation
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
---
|
|
228
|
-
|
|
229
|
-
## Contributing
|
|
230
|
-
|
|
231
|
-
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on adding workflows, reviewer agents, IDE integrations, and more.
|
|
232
|
-
|
|
233
|
-
## License
|
|
234
|
-
|
|
235
|
-
[MIT](LICENSE) © mrquangthai278
|
|
1
|
+
# PR Review Kit
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="docs/assets/banner.svg" alt="PR Review Kit" width="100%"/>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
> AI-driven Pull Request code review — structured, multi-perspective, actionable.
|
|
8
|
+
|
|
9
|
+
Module system, agent YAML, step-file workflows, CLI installer with full IDE integration.
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Install into your repo (interactive — recommended)
|
|
15
|
+
npx prr-kit install
|
|
16
|
+
|
|
17
|
+
# Or use the alias
|
|
18
|
+
npx pr-review install
|
|
19
|
+
|
|
20
|
+
# Silent install with defaults (edit config.yaml afterward)
|
|
21
|
+
npx prr-kit install --directory /path/to/repo --modules prr --tools claude-code --yes
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Then open your IDE in the installed project and use `/prr-master` to start.
|
|
25
|
+
|
|
26
|
+
## How It Works
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Your IDE (Claude Code / Cursor / Windsurf / ...)
|
|
30
|
+
│
|
|
31
|
+
│ /prr-master or /prr-quick
|
|
32
|
+
▼
|
|
33
|
+
┌─────────────────────────────────────────────────┐
|
|
34
|
+
│ PRR Master Agent │
|
|
35
|
+
│ reads _prr/ · routes to workflows │
|
|
36
|
+
└────────────┬────────────────────────────────────┘
|
|
37
|
+
│
|
|
38
|
+
┌───────▼────────┐
|
|
39
|
+
│ select-pr │ git fetch · list PRs via platform CLI
|
|
40
|
+
│ (Step-file) │ user selects PR/MR by number or branch
|
|
41
|
+
└───────┬────────┘
|
|
42
|
+
│ diff loaded into AI context
|
|
43
|
+
┌───────▼────────┐
|
|
44
|
+
│ describe-pr │ classify type · file-by-file walkthrough
|
|
45
|
+
└───────┬────────┘
|
|
46
|
+
│
|
|
47
|
+
┌───────▼────────────────────────────────┐
|
|
48
|
+
│ Review agents (parallel or sequential) │
|
|
49
|
+
│ GR · SR · PR · AR │
|
|
50
|
+
│ each reads instructions.xml │
|
|
51
|
+
│ outputs structured findings │
|
|
52
|
+
└───────┬────────────────────────────────┘
|
|
53
|
+
│
|
|
54
|
+
┌───────▼────────┐
|
|
55
|
+
│ generate-report│ compile findings · sort by severity
|
|
56
|
+
│ │ write .md to _prr-output/reviews/
|
|
57
|
+
└───────┬────────┘
|
|
58
|
+
│
|
|
59
|
+
┌───────▼────────┐
|
|
60
|
+
│ post-comments │ post inline comments via platform CLI
|
|
61
|
+
│ (optional) │ GitHub · GitLab · Azure · Bitbucket
|
|
62
|
+
└────────────────┘
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The framework installs into your project as a `_prr/` folder. Agents and workflows are Markdown/YAML files that your AI IDE reads and executes — no server, no background process, no API keys required beyond your IDE's AI.
|
|
66
|
+
|
|
67
|
+
## Configuration
|
|
68
|
+
|
|
69
|
+
After install, edit `_prr/prr/config.yaml` in your project:
|
|
70
|
+
|
|
71
|
+
```yaml
|
|
72
|
+
user_name: YourName
|
|
73
|
+
communication_language: English
|
|
74
|
+
target_repo: . # path to the git repo to review (. = current dir)
|
|
75
|
+
platform: auto # auto-detect from git remote, or: github / gitlab / azure / bitbucket
|
|
76
|
+
platform_repo: "owner/repo" # required for PR listing and posting inline comments
|
|
77
|
+
output_folder: _prr-output
|
|
78
|
+
review_output: /abs/path/_prr-output/reviews
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
> `platform` defaults to `auto` — detects GitHub/GitLab/Azure/Bitbucket from the git remote URL.
|
|
82
|
+
> `platform_repo` is required for PR listing (`gh pr list`, `glab mr list`, etc.) and posting inline comments.
|
|
83
|
+
> Leave `platform_repo` empty to use local branch selection only.
|
|
84
|
+
|
|
85
|
+
## Platform Support
|
|
86
|
+
|
|
87
|
+
| Feature | None / Local | GitHub | GitLab | Azure DevOps | Bitbucket |
|
|
88
|
+
|---------|:---:|:---:|:---:|:---:|:---:|
|
|
89
|
+
| Core review (diff analysis) | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
90
|
+
| Auto-detect platform from remote URL | — | ✅ | ✅ | ✅ | ✅ |
|
|
91
|
+
| List open PRs/MRs | ❌ | ✅ `gh` | ✅ `glab` | ✅ `az` | ✅ `bb` |
|
|
92
|
+
| Select PR by number (auto base/head) | ❌ | ✅ | ✅ | ✅ | ✅ |
|
|
93
|
+
| Load diff via platform CLI | ❌ | ✅ `gh pr diff` | ✅ `glab mr diff` | ⚠️ git fallback | ⚠️ git fallback |
|
|
94
|
+
| Post inline code comments | ❌ | ✅ Reviews API | ✅ MR discussions | ✅ PR threads | ✅ REST API |
|
|
95
|
+
| Post summary review | ❌ | ✅ | ✅ | ✅ | ✅ |
|
|
96
|
+
| Review verdict (approve / request changes) | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
97
|
+
| Required CLI | — | `gh` | `glab` | `az` + extension | `bb` / curl |
|
|
98
|
+
|
|
99
|
+
> **None / Local mode**: all review analysis runs locally via `git diff` — no platform CLI required. Findings are saved to `_prr-output/reviews/` only.
|
|
100
|
+
|
|
101
|
+
## Review Workflow
|
|
102
|
+
|
|
103
|
+
### Quick mode — one command, full pipeline
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
/prr-quick or /prr-master → QR
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Runs automatically: **select PR → describe → all 4 reviews → generate report**
|
|
110
|
+
Only pauses once to ask which PR/branch to review.
|
|
111
|
+
|
|
112
|
+
### Manual mode — step by step
|
|
113
|
+
|
|
114
|
+
| Code | Command | Description |
|
|
115
|
+
|------|---------|-------------|
|
|
116
|
+
| `CP` | Collect Project Context | Scan ESLint/tsconfig/docs, extract coding rules, capture domain knowledge — **run once per project** |
|
|
117
|
+
| `SP` | Select PR | Fetch latest → list open PRs (via `gh`) or branches → select head + base → load diff |
|
|
118
|
+
| `DP` | Describe PR | Classify PR type, generate summary, file-by-file walkthrough |
|
|
119
|
+
| `GR` | General Review | Logic, naming, readability, DRY, best practices |
|
|
120
|
+
| `SR` | Security Review | OWASP Top 10, secrets, auth, rate limits, injection |
|
|
121
|
+
| `PR` | Performance Review | N+1 queries, memory leaks, async patterns, caching |
|
|
122
|
+
| `AR` | Architecture Review | SOLID, layers, coupling, consistency with codebase |
|
|
123
|
+
| `IC` | Improve Code | Concrete BEFORE/AFTER code suggestions |
|
|
124
|
+
| `AK` | Ask Code | Q&A about specific changes in this PR |
|
|
125
|
+
| `RR` | Generate Report | Compile all findings → Markdown report in `_prr-output/reviews/` |
|
|
126
|
+
| `PC` | Post Comments | Post inline code comments to GitHub PR via `gh` Reviews API |
|
|
127
|
+
| `PM` | Party Mode 🎉 | All 4 reviewers in one collaborative session |
|
|
128
|
+
| `HH` | Help | Show this guide |
|
|
129
|
+
|
|
130
|
+
### Selecting a PR (SP step)
|
|
131
|
+
|
|
132
|
+
**With `platform_repo` configured** — lists open PRs/MRs via platform CLI:
|
|
133
|
+
```
|
|
134
|
+
#45 "Add OAuth2 login" feature/oauth → main @alice 3h ago
|
|
135
|
+
#44 "Fix memory leak" fix/memory → main @bob 1d ago
|
|
136
|
+
```
|
|
137
|
+
Enter PR number → base and head resolved automatically.
|
|
138
|
+
|
|
139
|
+
**Without `platform_repo`** — asks explicitly for both branches:
|
|
140
|
+
```
|
|
141
|
+
🎯 Head branch (the branch to review)?
|
|
142
|
+
• Enter a number from the list (e.g., 1)
|
|
143
|
+
• Type the branch name directly (e.g., feature/my-feature)
|
|
144
|
+
|
|
145
|
+
🎯 Base branch (what to diff against)?
|
|
146
|
+
• Press Enter for default [main]
|
|
147
|
+
• Type the branch name directly (e.g., develop)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Review Agents
|
|
151
|
+
|
|
152
|
+
| Agent | Slash Command | Speciality |
|
|
153
|
+
|-------|--------------|------------|
|
|
154
|
+
| PRR Master | `/prr-master` | Orchestrator — routes all workflows, full menu |
|
|
155
|
+
| PRR Quick | `/prr-quick` | One-command full pipeline (select → review → report) |
|
|
156
|
+
|
|
157
|
+
Specialist reviewer agents (Alex, Sam, Petra, Arch) are orchestrated internally by the master agent and party-mode workflow. Use `[PM] Party Mode` from the master menu to run all 4 reviewers in a collaborative session.
|
|
158
|
+
|
|
159
|
+
## Severity Levels
|
|
160
|
+
|
|
161
|
+
All findings use a standard format:
|
|
162
|
+
|
|
163
|
+
- 🔴 **[BLOCKER]** — Must fix before merge
|
|
164
|
+
- 🟡 **[WARNING]** — Should fix (with explanation)
|
|
165
|
+
- 🟢 **[SUGGESTION]** — Nice-to-have improvement
|
|
166
|
+
- 📌 **[QUESTION]** — Needs clarification from author
|
|
167
|
+
|
|
168
|
+
## Inline Code Comments
|
|
169
|
+
|
|
170
|
+
When `[PC] Post Comments` is run with `platform_repo` configured, it posts findings as **inline code comments** on the exact file and line — the same experience as a human reviewer.
|
|
171
|
+
|
|
172
|
+
| Platform | Method | Required CLI |
|
|
173
|
+
|----------|--------|-------------|
|
|
174
|
+
| GitHub | Reviews API | `gh auth login` |
|
|
175
|
+
| GitLab | MR Discussions API | `glab auth login` |
|
|
176
|
+
| Azure DevOps | PR Threads API | `az login` |
|
|
177
|
+
| Bitbucket | Inline Comments REST API | `bb` / `curl` |
|
|
178
|
+
|
|
179
|
+
## Supported IDEs
|
|
180
|
+
|
|
181
|
+
**Preferred:**
|
|
182
|
+
- **Claude Code**, **Cursor**, **Windsurf**
|
|
183
|
+
|
|
184
|
+
**Also supported:**
|
|
185
|
+
- Antigravity, Auggie, Cline, Codex, Crush, Gemini CLI, GitHub Copilot, iFlow, Kilo, Kiro, OpenCode, QwenCoder, Roo Cline, Rovo Dev, Trae
|
|
186
|
+
|
|
187
|
+
## Requirements
|
|
188
|
+
|
|
189
|
+
- Node.js 20+
|
|
190
|
+
- Git
|
|
191
|
+
- Platform CLI (optional — only needed for PR listing and inline comments):
|
|
192
|
+
- GitHub: [`gh`](https://cli.github.com/)
|
|
193
|
+
- GitLab: [`glab`](https://gitlab.com/gitlab-org/cli)
|
|
194
|
+
- Azure DevOps: [`az`](https://learn.microsoft.com/en-us/cli/azure/) + Azure DevOps extension
|
|
195
|
+
- Bitbucket: [`bb`](https://bitbucket.org/atlassian/bitbucket-cli) or `curl`
|
|
196
|
+
|
|
197
|
+
## Development
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
npm install
|
|
201
|
+
npm test
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Project Structure
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
main-project/
|
|
208
|
+
├── src/
|
|
209
|
+
│ ├── core/ # Master agent, tasks, party-mode workflow
|
|
210
|
+
│ └── prr/
|
|
211
|
+
│ ├── agents/ # 4 specialist reviewer agents
|
|
212
|
+
│ └── workflows/
|
|
213
|
+
│ ├── 0-setup/ # [CP] Collect Project Context
|
|
214
|
+
│ ├── 1-discover/ # [SP] Select PR
|
|
215
|
+
│ ├── 2-analyze/ # [DP] Describe PR
|
|
216
|
+
│ ├── 3-review/ # [GR] [SR] [PR] [AR] Reviews
|
|
217
|
+
│ ├── 4-improve/ # [IC] Improve Code
|
|
218
|
+
│ ├── 5-ask/ # [AK] Ask Code
|
|
219
|
+
│ ├── 6-report/ # [RR] Generate Report, [PC] Post Comments
|
|
220
|
+
│ └── quick/ # [QR] Full pipeline in one command
|
|
221
|
+
├── tools/
|
|
222
|
+
│ └── cli/ # CLI installer + IDE handlers
|
|
223
|
+
├── test/ # Schema + component tests
|
|
224
|
+
└── docs/ # Documentation
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Contributing
|
|
230
|
+
|
|
231
|
+
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on adding workflows, reviewer agents, IDE integrations, and more.
|
|
232
|
+
|
|
233
|
+
## License
|
|
234
|
+
|
|
235
|
+
[MIT](LICENSE) © mrquangthai278
|
package/package.json
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "prr-kit",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "AI-driven Pull Request Review
|
|
5
|
-
"main": "tools/cli/prr-cli.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"prr-kit": "tools/prr-npx-wrapper.js",
|
|
8
|
-
"pr-review": "tools/prr-npx-wrapper.js"
|
|
9
|
-
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"prr:install": "node tools/cli/prr-cli.js install",
|
|
12
|
-
"prr:uninstall": "node tools/cli/prr-cli.js uninstall",
|
|
13
|
-
"prr:status": "node tools/cli/prr-cli.js status",
|
|
14
|
-
"test": "node test/test-agent-schema.js && node test/test-installation-components.js",
|
|
15
|
-
"test:schemas": "node test/test-agent-schema.js",
|
|
16
|
-
"test:install": "node test/test-installation-components.js",
|
|
17
|
-
"lint": "eslint . --ext .js,.cjs,.mjs --max-warnings=0"
|
|
18
|
-
},
|
|
19
|
-
"engines": {
|
|
20
|
-
"node": ">=20.0.0"
|
|
21
|
-
},
|
|
22
|
-
"files": [
|
|
23
|
-
"src/",
|
|
24
|
-
"tools/",
|
|
25
|
-
"docs/assets/"
|
|
26
|
-
],
|
|
27
|
-
"keywords": [
|
|
28
|
-
"code-review",
|
|
29
|
-
"pull-request",
|
|
30
|
-
"ai",
|
|
31
|
-
"agent",
|
|
32
|
-
"workflow",
|
|
33
|
-
"claude",
|
|
34
|
-
"cursor",
|
|
35
|
-
"windsurf",
|
|
36
|
-
"github",
|
|
37
|
-
"gitlab"
|
|
38
|
-
],
|
|
39
|
-
"repository": {
|
|
40
|
-
"type": "git",
|
|
41
|
-
"url": "git+https://github.com/mrquangthai278/prr-kit.git"
|
|
42
|
-
},
|
|
43
|
-
"homepage": "https://github.com/mrquangthai278/prr-kit#readme",
|
|
44
|
-
"bugs": {
|
|
45
|
-
"url": "https://github.com/mrquangthai278/prr-kit/issues"
|
|
46
|
-
},
|
|
47
|
-
"license": "MIT",
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"@clack/prompts": "^0.10.0",
|
|
50
|
-
"chalk": "^4.1.2",
|
|
51
|
-
"commander": "^14.0.0",
|
|
52
|
-
"csv-parse": "^6.1.0",
|
|
53
|
-
"fs-extra": "^11.3.0",
|
|
54
|
-
"glob": "^11.0.3",
|
|
55
|
-
"yaml": "^2.7.0"
|
|
56
|
-
},
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"eslint": "^9.0.0"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "prr-kit",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "AI-driven Pull Request Review Kit — structured agent workflows for thorough, consistent code review",
|
|
5
|
+
"main": "tools/cli/prr-cli.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"prr-kit": "tools/prr-npx-wrapper.js",
|
|
8
|
+
"pr-review": "tools/prr-npx-wrapper.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"prr:install": "node tools/cli/prr-cli.js install",
|
|
12
|
+
"prr:uninstall": "node tools/cli/prr-cli.js uninstall",
|
|
13
|
+
"prr:status": "node tools/cli/prr-cli.js status",
|
|
14
|
+
"test": "node test/test-agent-schema.js && node test/test-installation-components.js",
|
|
15
|
+
"test:schemas": "node test/test-agent-schema.js",
|
|
16
|
+
"test:install": "node test/test-installation-components.js",
|
|
17
|
+
"lint": "eslint . --ext .js,.cjs,.mjs --max-warnings=0"
|
|
18
|
+
},
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=20.0.0"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"src/",
|
|
24
|
+
"tools/",
|
|
25
|
+
"docs/assets/"
|
|
26
|
+
],
|
|
27
|
+
"keywords": [
|
|
28
|
+
"code-review",
|
|
29
|
+
"pull-request",
|
|
30
|
+
"ai",
|
|
31
|
+
"agent",
|
|
32
|
+
"workflow",
|
|
33
|
+
"claude",
|
|
34
|
+
"cursor",
|
|
35
|
+
"windsurf",
|
|
36
|
+
"github",
|
|
37
|
+
"gitlab"
|
|
38
|
+
],
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "git+https://github.com/mrquangthai278/prr-kit.git"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/mrquangthai278/prr-kit#readme",
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://github.com/mrquangthai278/prr-kit/issues"
|
|
46
|
+
},
|
|
47
|
+
"license": "MIT",
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@clack/prompts": "^0.10.0",
|
|
50
|
+
"chalk": "^4.1.2",
|
|
51
|
+
"commander": "^14.0.0",
|
|
52
|
+
"csv-parse": "^6.1.0",
|
|
53
|
+
"fs-extra": "^11.3.0",
|
|
54
|
+
"glob": "^11.0.3",
|
|
55
|
+
"yaml": "^2.7.0"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"eslint": "^9.0.0"
|
|
59
|
+
}
|
|
60
|
+
}
|