prr-kit 1.1.2 → 1.2.0
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/LICENSE +1 -1
- package/README.md +260 -235
- package/docs/assets/banner.svg +33 -165
- package/docs/assets/how-it-works.svg +87 -0
- package/package.json +60 -60
- package/src/core/agents/prr-master.agent.yaml +18 -7
- package/src/core/tasks/clear.md +140 -0
- package/src/core/tasks/help.md +15 -13
- package/src/core/workflows/clear/workflow.md +6 -0
- package/src/core/workflows/help/workflow.md +6 -0
- package/src/core/workflows/party-mode/steps/step-01-load-reviewers.md +35 -24
- package/src/core/workflows/party-mode/steps/step-02-discussion.md +45 -25
- package/src/core/workflows/party-mode/workflow.md +2 -2
- package/src/prr/agents/architecture-reviewer.agent.yaml +65 -45
- package/src/prr/agents/business-reviewer.agent.yaml +66 -0
- package/src/prr/agents/general-reviewer.agent.yaml +64 -48
- package/src/prr/agents/performance-reviewer.agent.yaml +65 -45
- package/src/prr/agents/security-reviewer.agent.yaml +67 -43
- package/src/prr/config-template.yaml +97 -0
- package/src/prr/data/stacks/actix.md +55 -0
- package/src/prr/data/stacks/alpine.md +47 -0
- package/src/prr/data/stacks/android.md +53 -0
- package/src/prr/data/stacks/angular.md +96 -0
- package/src/prr/data/stacks/ansible.md +55 -0
- package/src/prr/data/stacks/apollo.md +54 -0
- package/src/prr/data/stacks/astro.md +48 -0
- package/src/prr/data/stacks/aws-cdk.md +55 -0
- package/src/prr/data/stacks/axum.md +56 -0
- package/src/prr/data/stacks/babylonjs.md +55 -0
- package/src/prr/data/stacks/bash.md +53 -0
- package/src/prr/data/stacks/bevy.md +53 -0
- package/src/prr/data/stacks/bootstrap.md +52 -0
- package/src/prr/data/stacks/bun.md +55 -0
- package/src/prr/data/stacks/cpp.md +57 -0
- package/src/prr/data/stacks/csharp.md +95 -0
- package/src/prr/data/stacks/css.md +55 -0
- package/src/prr/data/stacks/cypress.md +53 -0
- package/src/prr/data/stacks/d3.md +53 -0
- package/src/prr/data/stacks/deno.md +49 -0
- package/src/prr/data/stacks/django.md +92 -0
- package/src/prr/data/stacks/docker.md +79 -0
- package/src/prr/data/stacks/drizzle.md +54 -0
- package/src/prr/data/stacks/dynamodb.md +55 -0
- package/src/prr/data/stacks/electron.md +44 -0
- package/src/prr/data/stacks/elixir.md +53 -0
- package/src/prr/data/stacks/expo.md +53 -0
- package/src/prr/data/stacks/expressjs.md +82 -0
- package/src/prr/data/stacks/fastapi.md +88 -0
- package/src/prr/data/stacks/fastify.md +60 -0
- package/src/prr/data/stacks/fiber.md +55 -0
- package/src/prr/data/stacks/firebase.md +43 -0
- package/src/prr/data/stacks/flask.md +46 -0
- package/src/prr/data/stacks/flutter.md +75 -0
- package/src/prr/data/stacks/gin.md +57 -0
- package/src/prr/data/stacks/github-actions.md +71 -0
- package/src/prr/data/stacks/go.md +88 -0
- package/src/prr/data/stacks/godot.md +56 -0
- package/src/prr/data/stacks/graphql.md +76 -0
- package/src/prr/data/stacks/grpc.md +56 -0
- package/src/prr/data/stacks/haskell.md +48 -0
- package/src/prr/data/stacks/helm.md +54 -0
- package/src/prr/data/stacks/hono.md +54 -0
- package/src/prr/data/stacks/htmx.md +38 -0
- package/src/prr/data/stacks/java.md +87 -0
- package/src/prr/data/stacks/jest-vitest.md +87 -0
- package/src/prr/data/stacks/jquery.md +50 -0
- package/src/prr/data/stacks/junit.md +53 -0
- package/src/prr/data/stacks/kotlin.md +89 -0
- package/src/prr/data/stacks/kubernetes.md +148 -0
- package/src/prr/data/stacks/langchain.md +56 -0
- package/src/prr/data/stacks/laravel.md +56 -0
- package/src/prr/data/stacks/libgdx.md +46 -0
- package/src/prr/data/stacks/lit.md +49 -0
- package/src/prr/data/stacks/love2d.md +51 -0
- package/src/prr/data/stacks/lua.md +51 -0
- package/src/prr/data/stacks/mobx.md +54 -0
- package/src/prr/data/stacks/mongodb.md +85 -0
- package/src/prr/data/stacks/monogame.md +51 -0
- package/src/prr/data/stacks/mysql.md +57 -0
- package/src/prr/data/stacks/nestjs.md +95 -0
- package/src/prr/data/stacks/nextjs.md +88 -0
- package/src/prr/data/stacks/nginx.md +55 -0
- package/src/prr/data/stacks/node.md +56 -0
- package/src/prr/data/stacks/nuxtjs.md +91 -0
- package/src/prr/data/stacks/openai-api.md +54 -0
- package/src/prr/data/stacks/opengl.md +54 -0
- package/src/prr/data/stacks/phaser.md +54 -0
- package/src/prr/data/stacks/phoenix.md +55 -0
- package/src/prr/data/stacks/php.md +56 -0
- package/src/prr/data/stacks/playwright.md +86 -0
- package/src/prr/data/stacks/postgresql.md +60 -0
- package/src/prr/data/stacks/prisma.md +81 -0
- package/src/prr/data/stacks/pygame.md +52 -0
- package/src/prr/data/stacks/pytest.md +53 -0
- package/src/prr/data/stacks/python.md +94 -0
- package/src/prr/data/stacks/pytorch.md +54 -0
- package/src/prr/data/stacks/qwik.md +50 -0
- package/src/prr/data/stacks/rails.md +48 -0
- package/src/prr/data/stacks/react-native.md +77 -0
- package/src/prr/data/stacks/react.md +104 -0
- package/src/prr/data/stacks/redis.md +76 -0
- package/src/prr/data/stacks/redux.md +107 -0
- package/src/prr/data/stacks/remix.md +51 -0
- package/src/prr/data/stacks/rust.md +88 -0
- package/src/prr/data/stacks/sass.md +51 -0
- package/src/prr/data/stacks/scala.md +50 -0
- package/src/prr/data/stacks/scikit-learn.md +53 -0
- package/src/prr/data/stacks/sequelize.md +54 -0
- package/src/prr/data/stacks/socket-io.md +54 -0
- package/src/prr/data/stacks/solidity.md +53 -0
- package/src/prr/data/stacks/solidjs.md +45 -0
- package/src/prr/data/stacks/spring-boot.md +92 -0
- package/src/prr/data/stacks/sql.md +85 -0
- package/src/prr/data/stacks/sqlite.md +55 -0
- package/src/prr/data/stacks/styled-components.md +51 -0
- package/src/prr/data/stacks/supabase.md +57 -0
- package/src/prr/data/stacks/svelte.md +77 -0
- package/src/prr/data/stacks/sveltekit.md +54 -0
- package/src/prr/data/stacks/swift.md +61 -0
- package/src/prr/data/stacks/tailwindcss.md +10 -0
- package/src/prr/data/stacks/tanstack-query.md +48 -0
- package/src/prr/data/stacks/tauri.md +52 -0
- package/src/prr/data/stacks/terraform.md +53 -0
- package/src/prr/data/stacks/three.md +53 -0
- package/src/prr/data/stacks/trpc.md +49 -0
- package/src/prr/data/stacks/typeorm.md +40 -0
- package/src/prr/data/stacks/typescript.md +83 -0
- package/src/prr/data/stacks/unity.md +61 -0
- package/src/prr/data/stacks/unreal.md +58 -0
- package/src/prr/data/stacks/vite.md +48 -0
- package/src/prr/data/stacks/vue3.md +95 -0
- package/src/prr/data/stacks/vulkan.md +53 -0
- package/src/prr/data/stacks/wasm.md +49 -0
- package/src/prr/data/stacks/webpack.md +48 -0
- package/src/prr/data/stacks/zig.md +51 -0
- package/src/prr/data/stacks/zustand.md +56 -0
- package/src/prr/workflows/1-discover/select-pr/steps/step-05-confirm.md +1 -0
- package/src/prr/workflows/1-discover/select-pr/workflow.md +1 -1
- package/src/prr/workflows/2-analyze/collect-pr-context/steps/step-01-analyze-files.md +334 -0
- package/src/prr/workflows/2-analyze/collect-pr-context/steps/step-02-collect-sources.md +451 -0
- package/src/prr/workflows/2-analyze/collect-pr-context/steps/step-03-build-knowledge-base.md +337 -0
- package/src/prr/workflows/2-analyze/collect-pr-context/workflow.md +123 -0
- package/src/prr/workflows/2-analyze/describe-pr/steps/step-02-classify.md +12 -6
- package/src/prr/workflows/2-analyze/describe-pr/steps/step-03-walkthrough.md +59 -1
- package/src/prr/workflows/3-review/architecture-review/checklist.md +4 -0
- package/src/prr/workflows/3-review/architecture-review/instructions.xml +32 -4
- package/src/prr/workflows/3-review/architecture-review/workflow.yaml +17 -18
- package/src/prr/workflows/3-review/business-review/checklist.md +27 -0
- package/src/prr/workflows/3-review/business-review/instructions.xml +153 -0
- package/src/prr/workflows/3-review/business-review/workflow.yaml +17 -0
- package/src/prr/workflows/3-review/general-review/checklist.md +5 -1
- package/src/prr/workflows/3-review/general-review/instructions.xml +39 -8
- package/src/prr/workflows/3-review/general-review/workflow.yaml +17 -18
- package/src/prr/workflows/3-review/performance-review/checklist.md +3 -1
- package/src/prr/workflows/3-review/performance-review/instructions.xml +10 -3
- package/src/prr/workflows/3-review/performance-review/workflow.yaml +17 -18
- package/src/prr/workflows/3-review/security-review/checklist.md +2 -1
- package/src/prr/workflows/3-review/security-review/instructions.xml +8 -3
- package/src/prr/workflows/3-review/security-review/workflow.yaml +18 -19
- package/src/prr/workflows/4-improve/improve-code/workflow.yaml +17 -18
- package/src/prr/workflows/6-report/generate-report/steps/step-01-collect.md +9 -2
- package/src/prr/workflows/6-report/generate-report/steps/step-02-organize.md +28 -7
- package/src/prr/workflows/6-report/generate-report/steps/step-03-write.md +6 -4
- package/src/prr/workflows/6-report/generate-report/templates/review-report.template.md +124 -78
- package/src/prr/workflows/6-report/post-comments/steps/step-01-format.md +104 -13
- package/src/prr/workflows/6-report/post-comments/steps/step-02-post.md +92 -21
- package/src/prr/workflows/6-report/post-comments/workflow.md +6 -0
- package/src/prr/workflows/quick/workflow.md +138 -32
- package/src/prr/workflows/0-setup/collect-project-context/steps/step-01-scan-configs.md +0 -106
- package/src/prr/workflows/0-setup/collect-project-context/steps/step-02-extract-rules.md +0 -131
- package/src/prr/workflows/0-setup/collect-project-context/steps/step-03-ask-context.md +0 -194
- package/src/prr/workflows/0-setup/collect-project-context/steps/step-04-save-context.md +0 -161
- package/src/prr/workflows/0-setup/collect-project-context/workflow.md +0 -58
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,235 +1,260 @@
|
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
|
93
|
-
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
/
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
##
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
##
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
|
176
|
-
|
|
177
|
-
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
-
|
|
190
|
-
-
|
|
191
|
-
-
|
|
192
|
-
-
|
|
193
|
-
-
|
|
194
|
-
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
npm
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
├──
|
|
209
|
-
│ ├──
|
|
210
|
-
│ └── prr
|
|
211
|
-
│
|
|
212
|
-
│
|
|
213
|
-
│
|
|
214
|
-
│
|
|
215
|
-
│
|
|
216
|
-
│
|
|
217
|
-
│
|
|
218
|
-
│
|
|
219
|
-
│ ├──
|
|
220
|
-
│
|
|
221
|
-
├──
|
|
222
|
-
│ └──
|
|
223
|
-
├──
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
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
|
+
[](https://www.npmjs.com/package/prr-kit)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[](https://nodejs.org)
|
|
10
|
+
[](https://www.npmjs.com/package/prr-kit)
|
|
11
|
+
|
|
12
|
+
> AI-driven Pull Request code review — structured, multi-perspective, actionable.
|
|
13
|
+
|
|
14
|
+
Module system, agent YAML, step-file workflows, CLI installer with full IDE integration.
|
|
15
|
+
|
|
16
|
+
## Quick Start
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Install into your repo (interactive — recommended)
|
|
20
|
+
npx prr-kit install
|
|
21
|
+
|
|
22
|
+
# Or use the alias
|
|
23
|
+
npx pr-review install
|
|
24
|
+
|
|
25
|
+
# Silent install with all defaults
|
|
26
|
+
npx prr-kit install --directory /path/to/repo --modules prr --tools claude-code --yes
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Then open your IDE in the installed project and use `/prr-master` to start.
|
|
30
|
+
|
|
31
|
+
## How It Works
|
|
32
|
+
|
|
33
|
+
<p align="center">
|
|
34
|
+
<img src="docs/assets/how-it-works.svg" alt="How It Works" width="100%"/>
|
|
35
|
+
</p>
|
|
36
|
+
|
|
37
|
+
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.
|
|
38
|
+
|
|
39
|
+
## Configuration
|
|
40
|
+
|
|
41
|
+
The installer handles configuration interactively — no manual file editing required. During `npx prr-kit install`, you'll be prompted for your name, language, output folder, target repo, and platform.
|
|
42
|
+
|
|
43
|
+
All values are written automatically to `_prr/prr/config.yaml`:
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
user_name: YourName
|
|
47
|
+
communication_language: English
|
|
48
|
+
target_repo: .
|
|
49
|
+
platform: auto # auto-detect from git remote
|
|
50
|
+
platform_repo: "owner/repo" # optional — needed for PR listing and inline comments
|
|
51
|
+
review_output: /abs/path/_prr-output/reviews
|
|
52
|
+
|
|
53
|
+
context_collection:
|
|
54
|
+
enabled: true
|
|
55
|
+
mode: pr-specific # always fresh, never cached
|
|
56
|
+
|
|
57
|
+
external_sources:
|
|
58
|
+
enabled: false # set true to activate MCP + RAG enrichment
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
> See **[CONFIGURATION.md](CONFIGURATION.md)** for the full schema reference — including MCP tool intents, RAG systems, inline annotations, and URL sources.
|
|
62
|
+
|
|
63
|
+
## Platform Support
|
|
64
|
+
|
|
65
|
+
| Feature | None / Local | GitHub | GitLab | Azure DevOps | Bitbucket |
|
|
66
|
+
|---------|:---:|:---:|:---:|:---:|:---:|
|
|
67
|
+
| Core review (diff analysis) | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
68
|
+
| Auto-detect platform from remote URL | — | ✅ | ✅ | ✅ | ✅ |
|
|
69
|
+
| List open PRs/MRs | ❌ | ✅ `gh` | ✅ `glab` | ✅ `az` | ✅ `bb` |
|
|
70
|
+
| Select PR by number (auto base/head) | ❌ | ✅ | ✅ | ✅ | ✅ |
|
|
71
|
+
| Load diff via platform CLI | ❌ | ✅ `gh pr diff` | ✅ `glab mr diff` | ⚠️ git fallback | ⚠️ git fallback |
|
|
72
|
+
| Post inline code comments | ❌ | ✅ Reviews API | ✅ MR discussions | ✅ PR threads | ✅ REST API |
|
|
73
|
+
| Post summary review | ❌ | ✅ | ✅ | ✅ | ✅ |
|
|
74
|
+
| Review verdict (approve / request changes) | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
75
|
+
| Required CLI | — | `gh` | `glab` | `az` + extension | `bb` / curl |
|
|
76
|
+
|
|
77
|
+
> **None / Local mode**: all review analysis runs locally via `git diff` — no platform CLI required. Findings are saved to `_prr-output/reviews/` only.
|
|
78
|
+
|
|
79
|
+
## Review Workflow
|
|
80
|
+
|
|
81
|
+
### Quick mode — one command, full pipeline
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
/prr-quick or /prr-master → QR
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Runs automatically: **select PR → describe → collect context → 5 reviews → generate report**
|
|
88
|
+
Only pauses once to ask which PR/branch to review.
|
|
89
|
+
|
|
90
|
+
### Manual mode — step by step
|
|
91
|
+
|
|
92
|
+
| Code | Command | Description |
|
|
93
|
+
|------|---------|-------------|
|
|
94
|
+
| `SP` | Select PR | Fetch latest → list open PRs (via `gh`) or branches → select head + base → load diff |
|
|
95
|
+
| `DP` | Describe PR | Classify PR type, generate summary, file-by-file walkthrough |
|
|
96
|
+
| `GR` | General Review | Logic, naming, readability, DRY, best practices |
|
|
97
|
+
| `SR` | Security Review | OWASP Top 10, secrets, auth, rate limits, injection |
|
|
98
|
+
| `PR` | Performance Review | N+1 queries, memory leaks, async patterns, caching |
|
|
99
|
+
| `AR` | Architecture Review | SOLID, layers, coupling, consistency with codebase |
|
|
100
|
+
| `BR` | Business Review | User impact, business risk, feature completeness, data safety, observability |
|
|
101
|
+
| `IC` | Improve Code | Concrete BEFORE/AFTER code suggestions |
|
|
102
|
+
| `AK` | Ask Code | Q&A about specific changes in this PR |
|
|
103
|
+
| `RR` | Generate Report | Compile all findings → Markdown report in `_prr-output/reviews/` |
|
|
104
|
+
| `PC` | Post Comments | Post inline code comments to GitHub PR via `gh` Reviews API |
|
|
105
|
+
| `PM` | Party Mode 🎉 | All reviewers in one collaborative session |
|
|
106
|
+
| `CL` | Clear | Remove context files and/or review reports from output folder |
|
|
107
|
+
| `HH` | Help | Show this guide |
|
|
108
|
+
|
|
109
|
+
### Selecting a PR (SP step)
|
|
110
|
+
|
|
111
|
+
**With `platform_repo` configured** — lists open PRs/MRs via platform CLI:
|
|
112
|
+
```
|
|
113
|
+
#45 "Add OAuth2 login" feature/oauth → main @alice 3h ago
|
|
114
|
+
#44 "Fix memory leak" fix/memory → main @bob 1d ago
|
|
115
|
+
```
|
|
116
|
+
Enter PR number → base and head resolved automatically.
|
|
117
|
+
|
|
118
|
+
**Without `platform_repo`** — asks explicitly for both branches:
|
|
119
|
+
```
|
|
120
|
+
🎯 Head branch (the branch to review)?
|
|
121
|
+
• Enter a number from the list (e.g., 1)
|
|
122
|
+
• Type the branch name directly (e.g., feature/my-feature)
|
|
123
|
+
|
|
124
|
+
🎯 Base branch (what to diff against)?
|
|
125
|
+
• Press Enter for default [main]
|
|
126
|
+
• Type the branch name directly (e.g., develop)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Review Agents
|
|
130
|
+
|
|
131
|
+
| Agent | Slash Command | Speciality |
|
|
132
|
+
|-------|--------------|------------|
|
|
133
|
+
| PRR Master | `/prr-master` | Orchestrator — routes all workflows, full menu |
|
|
134
|
+
| PRR Quick | `/prr-quick` | One-command full pipeline (select → review → report) |
|
|
135
|
+
|
|
136
|
+
Specialist reviewer agents are orchestrated internally by the master agent and party-mode workflow. Use `[PM] Party Mode` from the master menu to run all reviewers in a collaborative session.
|
|
137
|
+
|
|
138
|
+
## Reviewers at a Glance
|
|
139
|
+
|
|
140
|
+
| Reviewer | Focus | Key questions |
|
|
141
|
+
|---|---|---|
|
|
142
|
+
| 👁️ General (GR) | Code quality | Is the logic correct? Naming clear? DRY? Tests present? |
|
|
143
|
+
| 🔒 Security (SR) | OWASP Top 10 | XSS? Injection? Secrets exposed? Auth correct? |
|
|
144
|
+
| ⚡ Performance (PR) | Efficiency | N+1 queries? Memory leaks? Missing await? |
|
|
145
|
+
| 🏗️ Architecture (AR) | Structure | Layer violations? Coupling? Consistent with codebase? |
|
|
146
|
+
| 💼 Business (BR) | Real-world impact | User impact? Business risk? Feature completeness? Data safe? Observability? |
|
|
147
|
+
|
|
148
|
+
**Business Review (BR)** runs last and translates technical findings into business language — user impact, GDPR risk, migration safety, deployment recommendations, and post-ship monitoring checklist.
|
|
149
|
+
|
|
150
|
+
## Severity Levels
|
|
151
|
+
|
|
152
|
+
All findings use a standard format:
|
|
153
|
+
|
|
154
|
+
- 🔴 **[BLOCKER]** — Must fix before merge
|
|
155
|
+
- 🟡 **[WARNING]** — Should fix (with explanation)
|
|
156
|
+
- 🟢 **[SUGGESTION]** — Nice-to-have improvement
|
|
157
|
+
- 📌 **[QUESTION]** — Needs clarification from author
|
|
158
|
+
|
|
159
|
+
## Context Collection
|
|
160
|
+
|
|
161
|
+
After [DP] Describe PR, context is collected **automatically** — no manual step needed:
|
|
162
|
+
|
|
163
|
+
1. Analyzes changed files to detect domains (`authentication`, `state-management`, etc.)
|
|
164
|
+
2. Reads relevant config files (`.eslintrc`, `.prettierrc`, `tsconfig.json`) and standards docs (`CONTRIBUTING.md`, `ARCHITECTURE.md`)
|
|
165
|
+
3. Extracts inline `@context:` / `@security:` / `@pattern:` annotations from the diff
|
|
166
|
+
4. Optionally queries **MCP tools** (Confluence, Jira, Figma) and **RAG systems** if configured
|
|
167
|
+
5. Writes `pr-{branch}-context.yaml` — loaded by all reviewers
|
|
168
|
+
|
|
169
|
+
> See [CONFIGURATION.md](CONFIGURATION.md) for MCP intents, RAG setup, and URL sources.
|
|
170
|
+
|
|
171
|
+
## Inline Code Comments
|
|
172
|
+
|
|
173
|
+
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.
|
|
174
|
+
|
|
175
|
+
| Platform | Method | Required CLI |
|
|
176
|
+
|----------|--------|-------------|
|
|
177
|
+
| GitHub | Reviews API | `gh auth login` |
|
|
178
|
+
| GitLab | MR Discussions API | `glab auth login` |
|
|
179
|
+
| Azure DevOps | PR Threads API | `az login` |
|
|
180
|
+
| Bitbucket | Inline Comments REST API | `bb` / `curl` |
|
|
181
|
+
|
|
182
|
+
## Supported IDEs
|
|
183
|
+
|
|
184
|
+
Antigravity, Auggie, Claude Code, Cline, Codex, Crush, Cursor, Gemini CLI, GitHub Copilot, iFlow, Kilo, Kiro, OpenCode, QwenCoder, Roo Cline, Rovo Dev, Trae, Windsurf
|
|
185
|
+
|
|
186
|
+
## Requirements
|
|
187
|
+
|
|
188
|
+
- Node.js 20+
|
|
189
|
+
- Git
|
|
190
|
+
- Platform CLI (optional — only needed for PR listing and inline comments):
|
|
191
|
+
- GitHub: [`gh`](https://cli.github.com/)
|
|
192
|
+
- GitLab: [`glab`](https://gitlab.com/gitlab-org/cli)
|
|
193
|
+
- Azure DevOps: [`az`](https://learn.microsoft.com/en-us/cli/azure/) + Azure DevOps extension
|
|
194
|
+
- Bitbucket: [`bb`](https://bitbucket.org/atlassian/bitbucket-cli) or `curl`
|
|
195
|
+
|
|
196
|
+
## Development
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
npm install
|
|
200
|
+
npm test
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Project Structure
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
prr-kit/
|
|
207
|
+
├── src/
|
|
208
|
+
│ ├── core/
|
|
209
|
+
│ │ ├── agents/
|
|
210
|
+
│ │ │ └── prr-master.agent.yaml # Master orchestrator + menu
|
|
211
|
+
│ │ └── tasks/
|
|
212
|
+
│ │ ├── help.md # [HH] Help
|
|
213
|
+
│ │ ├── clear.md # [CL] Clear output files
|
|
214
|
+
│ │ └── workflow.xml # Workflow engine rules
|
|
215
|
+
│ └── prr/
|
|
216
|
+
│ ├── agents/ # Specialist reviewer agents (GR SR PR AR)
|
|
217
|
+
│ ├── config-template.yaml # Full config template with all options
|
|
218
|
+
│ └── workflows/
|
|
219
|
+
│ ├── 1-discover/ # [SP] Select PR
|
|
220
|
+
│ ├── 2-analyze/
|
|
221
|
+
│ │ ├── describe-pr/ # [DP] Describe PR
|
|
222
|
+
│ │ └── collect-pr-context/ # Auto: build PR-specific knowledge base
|
|
223
|
+
│ ├── 3-review/
|
|
224
|
+
│ │ ├── general-review/ # [GR] Logic, naming, DRY
|
|
225
|
+
│ │ ├── security-review/ # [SR] OWASP, secrets, auth
|
|
226
|
+
│ │ ├── performance-review/ # [PR] N+1, async, memory
|
|
227
|
+
│ │ ├── architecture-review/# [AR] SOLID, layers, coupling
|
|
228
|
+
│ │ └── business-review/ # [BR] User impact, risk, completeness
|
|
229
|
+
│ ├── 4-improve/ # [IC] Improve Code
|
|
230
|
+
│ ├── 5-ask/ # [AK] Ask Code
|
|
231
|
+
│ ├── 6-report/ # [RR] Report + [PC] Post Comments
|
|
232
|
+
│ └── quick/ # [QR] Full pipeline in one command
|
|
233
|
+
├── tools/
|
|
234
|
+
│ └── cli/ # CLI installer + IDE handlers
|
|
235
|
+
├── test/ # Schema + component tests
|
|
236
|
+
├── CONFIGURATION.md # Full config reference (MCP, RAG, context)
|
|
237
|
+
└── docs/
|
|
238
|
+
└── assets/
|
|
239
|
+
├── banner.svg
|
|
240
|
+
└── how-it-works.svg
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Support the Project
|
|
246
|
+
|
|
247
|
+
PR Review Kit is free for everyone — and always will be. If you'd like to support development:
|
|
248
|
+
|
|
249
|
+
- ⭐ **Star on GitHub** — Click the star icon near the top right of this page
|
|
250
|
+
- ☕ **[Buy Me a Coffee](https://buymeacoffee.com/mrquangthay)** — Fuel the development
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Contributing
|
|
255
|
+
|
|
256
|
+
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on adding workflows, reviewer agents, IDE integrations, and more.
|
|
257
|
+
|
|
258
|
+
## License
|
|
259
|
+
|
|
260
|
+
[MIT](LICENSE) © mrquangthai278
|