prr-kit 1.1.3 → 1.2.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.
Files changed (173) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +260 -235
  3. package/docs/assets/banner.svg +30 -248
  4. package/docs/assets/how-it-works.svg +87 -0
  5. package/package.json +60 -60
  6. package/src/core/agents/prr-master.agent.yaml +18 -7
  7. package/src/core/tasks/clear.md +140 -0
  8. package/src/core/tasks/help.md +15 -13
  9. package/src/core/workflows/clear/workflow.md +6 -0
  10. package/src/core/workflows/help/workflow.md +6 -0
  11. package/src/core/workflows/party-mode/steps/step-01-load-reviewers.md +35 -24
  12. package/src/core/workflows/party-mode/steps/step-02-discussion.md +45 -25
  13. package/src/core/workflows/party-mode/workflow.md +2 -2
  14. package/src/prr/agents/architecture-reviewer.agent.yaml +65 -45
  15. package/src/prr/agents/business-reviewer.agent.yaml +66 -0
  16. package/src/prr/agents/general-reviewer.agent.yaml +64 -48
  17. package/src/prr/agents/performance-reviewer.agent.yaml +65 -45
  18. package/src/prr/agents/security-reviewer.agent.yaml +67 -43
  19. package/src/prr/config-template.yaml +97 -0
  20. package/src/prr/data/stacks/actix.md +55 -0
  21. package/src/prr/data/stacks/alpine.md +47 -0
  22. package/src/prr/data/stacks/android.md +53 -0
  23. package/src/prr/data/stacks/angular.md +96 -0
  24. package/src/prr/data/stacks/ansible.md +55 -0
  25. package/src/prr/data/stacks/apollo.md +54 -0
  26. package/src/prr/data/stacks/astro.md +48 -0
  27. package/src/prr/data/stacks/aws-cdk.md +55 -0
  28. package/src/prr/data/stacks/axum.md +56 -0
  29. package/src/prr/data/stacks/babylonjs.md +55 -0
  30. package/src/prr/data/stacks/bash.md +53 -0
  31. package/src/prr/data/stacks/bevy.md +53 -0
  32. package/src/prr/data/stacks/bootstrap.md +52 -0
  33. package/src/prr/data/stacks/bun.md +55 -0
  34. package/src/prr/data/stacks/cpp.md +57 -0
  35. package/src/prr/data/stacks/csharp.md +95 -0
  36. package/src/prr/data/stacks/css.md +55 -0
  37. package/src/prr/data/stacks/cypress.md +53 -0
  38. package/src/prr/data/stacks/d3.md +53 -0
  39. package/src/prr/data/stacks/deno.md +49 -0
  40. package/src/prr/data/stacks/django.md +92 -0
  41. package/src/prr/data/stacks/docker.md +79 -0
  42. package/src/prr/data/stacks/drizzle.md +54 -0
  43. package/src/prr/data/stacks/dynamodb.md +55 -0
  44. package/src/prr/data/stacks/electron.md +44 -0
  45. package/src/prr/data/stacks/elixir.md +53 -0
  46. package/src/prr/data/stacks/expo.md +53 -0
  47. package/src/prr/data/stacks/expressjs.md +82 -0
  48. package/src/prr/data/stacks/fastapi.md +88 -0
  49. package/src/prr/data/stacks/fastify.md +60 -0
  50. package/src/prr/data/stacks/fiber.md +55 -0
  51. package/src/prr/data/stacks/firebase.md +43 -0
  52. package/src/prr/data/stacks/flask.md +46 -0
  53. package/src/prr/data/stacks/flutter.md +75 -0
  54. package/src/prr/data/stacks/gin.md +57 -0
  55. package/src/prr/data/stacks/github-actions.md +71 -0
  56. package/src/prr/data/stacks/go.md +88 -0
  57. package/src/prr/data/stacks/godot.md +56 -0
  58. package/src/prr/data/stacks/graphql.md +76 -0
  59. package/src/prr/data/stacks/grpc.md +56 -0
  60. package/src/prr/data/stacks/haskell.md +48 -0
  61. package/src/prr/data/stacks/helm.md +54 -0
  62. package/src/prr/data/stacks/hono.md +54 -0
  63. package/src/prr/data/stacks/htmx.md +38 -0
  64. package/src/prr/data/stacks/java.md +87 -0
  65. package/src/prr/data/stacks/jest-vitest.md +87 -0
  66. package/src/prr/data/stacks/jquery.md +50 -0
  67. package/src/prr/data/stacks/junit.md +53 -0
  68. package/src/prr/data/stacks/kotlin.md +89 -0
  69. package/src/prr/data/stacks/kubernetes.md +148 -0
  70. package/src/prr/data/stacks/langchain.md +56 -0
  71. package/src/prr/data/stacks/laravel.md +56 -0
  72. package/src/prr/data/stacks/libgdx.md +46 -0
  73. package/src/prr/data/stacks/lit.md +49 -0
  74. package/src/prr/data/stacks/love2d.md +51 -0
  75. package/src/prr/data/stacks/lua.md +51 -0
  76. package/src/prr/data/stacks/mobx.md +54 -0
  77. package/src/prr/data/stacks/mongodb.md +85 -0
  78. package/src/prr/data/stacks/monogame.md +51 -0
  79. package/src/prr/data/stacks/mysql.md +57 -0
  80. package/src/prr/data/stacks/nestjs.md +95 -0
  81. package/src/prr/data/stacks/nextjs.md +88 -0
  82. package/src/prr/data/stacks/nginx.md +55 -0
  83. package/src/prr/data/stacks/node.md +56 -0
  84. package/src/prr/data/stacks/nuxtjs.md +91 -0
  85. package/src/prr/data/stacks/openai-api.md +54 -0
  86. package/src/prr/data/stacks/opengl.md +54 -0
  87. package/src/prr/data/stacks/phaser.md +54 -0
  88. package/src/prr/data/stacks/phoenix.md +55 -0
  89. package/src/prr/data/stacks/php.md +56 -0
  90. package/src/prr/data/stacks/playwright.md +86 -0
  91. package/src/prr/data/stacks/postgresql.md +60 -0
  92. package/src/prr/data/stacks/prisma.md +81 -0
  93. package/src/prr/data/stacks/pygame.md +52 -0
  94. package/src/prr/data/stacks/pytest.md +53 -0
  95. package/src/prr/data/stacks/python.md +94 -0
  96. package/src/prr/data/stacks/pytorch.md +54 -0
  97. package/src/prr/data/stacks/qwik.md +50 -0
  98. package/src/prr/data/stacks/rails.md +48 -0
  99. package/src/prr/data/stacks/react-native.md +77 -0
  100. package/src/prr/data/stacks/react.md +104 -0
  101. package/src/prr/data/stacks/redis.md +76 -0
  102. package/src/prr/data/stacks/redux.md +107 -0
  103. package/src/prr/data/stacks/remix.md +51 -0
  104. package/src/prr/data/stacks/rust.md +88 -0
  105. package/src/prr/data/stacks/sass.md +51 -0
  106. package/src/prr/data/stacks/scala.md +50 -0
  107. package/src/prr/data/stacks/scikit-learn.md +53 -0
  108. package/src/prr/data/stacks/sequelize.md +54 -0
  109. package/src/prr/data/stacks/socket-io.md +54 -0
  110. package/src/prr/data/stacks/solidity.md +53 -0
  111. package/src/prr/data/stacks/solidjs.md +45 -0
  112. package/src/prr/data/stacks/spring-boot.md +92 -0
  113. package/src/prr/data/stacks/sql.md +85 -0
  114. package/src/prr/data/stacks/sqlite.md +55 -0
  115. package/src/prr/data/stacks/styled-components.md +51 -0
  116. package/src/prr/data/stacks/supabase.md +57 -0
  117. package/src/prr/data/stacks/svelte.md +77 -0
  118. package/src/prr/data/stacks/sveltekit.md +54 -0
  119. package/src/prr/data/stacks/swift.md +61 -0
  120. package/src/prr/data/stacks/tailwindcss.md +10 -0
  121. package/src/prr/data/stacks/tanstack-query.md +48 -0
  122. package/src/prr/data/stacks/tauri.md +52 -0
  123. package/src/prr/data/stacks/terraform.md +53 -0
  124. package/src/prr/data/stacks/three.md +53 -0
  125. package/src/prr/data/stacks/trpc.md +49 -0
  126. package/src/prr/data/stacks/typeorm.md +40 -0
  127. package/src/prr/data/stacks/typescript.md +83 -0
  128. package/src/prr/data/stacks/unity.md +61 -0
  129. package/src/prr/data/stacks/unreal.md +58 -0
  130. package/src/prr/data/stacks/vite.md +48 -0
  131. package/src/prr/data/stacks/vue3.md +95 -0
  132. package/src/prr/data/stacks/vulkan.md +53 -0
  133. package/src/prr/data/stacks/wasm.md +49 -0
  134. package/src/prr/data/stacks/webpack.md +48 -0
  135. package/src/prr/data/stacks/zig.md +51 -0
  136. package/src/prr/data/stacks/zustand.md +56 -0
  137. package/src/prr/workflows/1-discover/select-pr/steps/step-05-confirm.md +1 -0
  138. package/src/prr/workflows/1-discover/select-pr/workflow.md +1 -1
  139. package/src/prr/workflows/2-analyze/collect-pr-context/steps/step-01-analyze-files.md +334 -0
  140. package/src/prr/workflows/2-analyze/collect-pr-context/steps/step-02-collect-sources.md +451 -0
  141. package/src/prr/workflows/2-analyze/collect-pr-context/steps/step-03-build-knowledge-base.md +337 -0
  142. package/src/prr/workflows/2-analyze/collect-pr-context/workflow.md +123 -0
  143. package/src/prr/workflows/2-analyze/describe-pr/steps/step-02-classify.md +12 -6
  144. package/src/prr/workflows/2-analyze/describe-pr/steps/step-03-walkthrough.md +59 -1
  145. package/src/prr/workflows/3-review/architecture-review/checklist.md +4 -0
  146. package/src/prr/workflows/3-review/architecture-review/instructions.xml +32 -4
  147. package/src/prr/workflows/3-review/architecture-review/workflow.yaml +17 -18
  148. package/src/prr/workflows/3-review/business-review/checklist.md +27 -0
  149. package/src/prr/workflows/3-review/business-review/instructions.xml +153 -0
  150. package/src/prr/workflows/3-review/business-review/workflow.yaml +17 -0
  151. package/src/prr/workflows/3-review/general-review/checklist.md +5 -1
  152. package/src/prr/workflows/3-review/general-review/instructions.xml +39 -8
  153. package/src/prr/workflows/3-review/general-review/workflow.yaml +17 -18
  154. package/src/prr/workflows/3-review/performance-review/checklist.md +3 -1
  155. package/src/prr/workflows/3-review/performance-review/instructions.xml +10 -3
  156. package/src/prr/workflows/3-review/performance-review/workflow.yaml +17 -18
  157. package/src/prr/workflows/3-review/security-review/checklist.md +2 -1
  158. package/src/prr/workflows/3-review/security-review/instructions.xml +8 -3
  159. package/src/prr/workflows/3-review/security-review/workflow.yaml +18 -19
  160. package/src/prr/workflows/4-improve/improve-code/workflow.yaml +17 -18
  161. package/src/prr/workflows/6-report/generate-report/steps/step-01-collect.md +9 -2
  162. package/src/prr/workflows/6-report/generate-report/steps/step-02-organize.md +28 -7
  163. package/src/prr/workflows/6-report/generate-report/steps/step-03-write.md +6 -4
  164. package/src/prr/workflows/6-report/generate-report/templates/review-report.template.md +124 -78
  165. package/src/prr/workflows/6-report/post-comments/steps/step-01-format.md +104 -13
  166. package/src/prr/workflows/6-report/post-comments/steps/step-02-post.md +92 -21
  167. package/src/prr/workflows/6-report/post-comments/workflow.md +6 -0
  168. package/src/prr/workflows/quick/workflow.md +138 -32
  169. package/src/prr/workflows/0-setup/collect-project-context/steps/step-01-scan-configs.md +0 -106
  170. package/src/prr/workflows/0-setup/collect-project-context/steps/step-02-extract-rules.md +0 -131
  171. package/src/prr/workflows/0-setup/collect-project-context/steps/step-03-ask-context.md +0 -194
  172. package/src/prr/workflows/0-setup/collect-project-context/steps/step-04-save-context.md +0 -161
  173. package/src/prr/workflows/0-setup/collect-project-context/workflow.md +0 -58
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 mrquangthai278
3
+ Copyright (c) 2026 mrquangthai278
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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
- > 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/oauthmain @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` | Orchestratorroutes 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
+ [![Version](https://img.shields.io/npm/v/prr-kit?color=blue&label=version)](https://www.npmjs.com/package/prr-kit)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
9
+ [![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen)](https://nodejs.org)
10
+ [![npm downloads](https://img.shields.io/npm/dm/prr-kit?color=orange&label=downloads)](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 modeone 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 modestep 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