prr-kit 1.3.0 β†’ 2.0.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.
Files changed (41) hide show
  1. package/README.md +157 -20
  2. package/package.json +1 -1
  3. package/src/core/agents/prr-master.agent.yaml +16 -3
  4. package/src/core/tasks/clear.md +36 -71
  5. package/src/core/tasks/help.md +10 -7
  6. package/src/core/tasks/select-session.md +94 -0
  7. package/src/core/workflows/party-mode/steps/step-00-user-instructions.md +125 -0
  8. package/src/core/workflows/party-mode/steps/step-01-load-reviewers.md +29 -14
  9. package/src/core/workflows/party-mode/steps/step-02-discussion.md +14 -7
  10. package/src/core/workflows/party-mode/workflow.md +7 -7
  11. package/src/prr/config-template.yaml +0 -3
  12. package/src/prr/workflows/1-discover/select-pr/steps/step-05-confirm.md +99 -25
  13. package/src/prr/workflows/1-discover/select-pr/workflow.md +1 -1
  14. package/src/prr/workflows/2-analyze/collect-pr-context/steps/step-03-manual-context-input.md +64 -50
  15. package/src/prr/workflows/2-analyze/collect-pr-context/steps/step-04-build-knowledge-base.md +42 -32
  16. package/src/prr/workflows/2-analyze/collect-pr-context/workflow.md +7 -7
  17. package/src/prr/workflows/2-analyze/describe-pr/steps/step-01-load-context.md +3 -3
  18. package/src/prr/workflows/2-analyze/describe-pr/steps/step-04-output.md +11 -7
  19. package/src/prr/workflows/2-analyze/describe-pr/workflow.md +2 -2
  20. package/src/prr/workflows/3-review/architecture-review/checklist.md +1 -2
  21. package/src/prr/workflows/3-review/architecture-review/instructions.xml +1 -1
  22. package/src/prr/workflows/3-review/architecture-review/workflow.yaml +3 -2
  23. package/src/prr/workflows/3-review/business-review/checklist.md +1 -2
  24. package/src/prr/workflows/3-review/business-review/workflow.yaml +3 -2
  25. package/src/prr/workflows/3-review/general-review/checklist.md +1 -2
  26. package/src/prr/workflows/3-review/general-review/workflow.yaml +3 -2
  27. package/src/prr/workflows/3-review/performance-review/checklist.md +1 -2
  28. package/src/prr/workflows/3-review/performance-review/workflow.yaml +3 -2
  29. package/src/prr/workflows/3-review/security-review/checklist.md +1 -2
  30. package/src/prr/workflows/3-review/security-review/workflow.yaml +3 -2
  31. package/src/prr/workflows/4-improve/improve-code/checklist.md +1 -2
  32. package/src/prr/workflows/4-improve/improve-code/workflow.yaml +3 -2
  33. package/src/prr/workflows/5-ask/ask-code/steps/step-01-load-context.md +2 -2
  34. package/src/prr/workflows/6-report/generate-report/steps/step-01-collect.md +19 -9
  35. package/src/prr/workflows/6-report/generate-report/steps/step-03-write.md +2 -2
  36. package/src/prr/workflows/6-report/generate-report/workflow.md +2 -1
  37. package/src/prr/workflows/6-report/post-comments/steps/step-01-format.md +17 -5
  38. package/src/prr/workflows/6-report/post-comments/steps/step-02-post.md +27 -4
  39. package/src/prr/workflows/6-report/post-comments/workflow.md +3 -2
  40. package/src/prr/workflows/quick/workflow.md +104 -35
  41. package/tools/cli/installers/lib/ide/platform-codes.yaml +4 -4
package/README.md CHANGED
@@ -16,6 +16,10 @@ Module system, agent YAML, step-file workflows, CLI installer with full IDE inte
16
16
 
17
17
  **[🌐 Website](https://prrkit.sitenow.cloud)** **[πŸ“– Full Documentation](https://prrkit.sitenow.cloud/docs)**
18
18
 
19
+ <a href="https://unikorn.vn/p/prr-kit?ref=embed" target="_blank"><img src="https://unikorn.vn/api/widgets/badge/prr-kit?theme=light" alt="PR Review Kit trΓͺn Unikorn.vn" style="width: 256px; height: 64px;" width="256" height="64" /></a>
20
+ <a href="https://unikorn.vn/p/prr-kit?ref=embed" target="_blank"><img src="https://unikorn.vn/api/widgets/badge/prr-kit/rank?theme=light&type=daily" alt="PR Review Kit - HΓ ng ngΓ y" style="width: 250px; height: 64px;" width="250" height="64" /></a>
21
+
22
+
19
23
  ## Quick Start
20
24
 
21
25
  ```bash
@@ -38,9 +42,137 @@ Then open your IDE in the installed project and use one of these commands to sta
38
42
 
39
43
  ## How It Works
40
44
 
41
- <p align="center">
42
- <img src="docs/assets/how-it-works.svg" alt="How It Works" width="100%"/>
43
- </p>
45
+ ```
46
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
47
+ β”‚ /prr-quick β”‚
48
+ β”‚ Load config.yaml β”‚
49
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
50
+ β”‚
51
+ ╔═══════════════▼════════════════╗
52
+ β•‘ PHASE 1 β€” SELECT PR β•‘
53
+ β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•€β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
54
+ β”‚
55
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
56
+ β”‚ 1a. git fetch origin β”‚
57
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
58
+ β”‚
59
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
60
+ β”‚ 1b. List open PRs/MRs β”‚
61
+ β”‚ + recent branches β”‚
62
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
63
+ β”‚
64
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
65
+ β”‚ 1c. ⌨️ Select PR/branch β”‚ ← USER INPUT
66
+ β”‚ Enter PR# or name β”‚
67
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
68
+ β”‚
69
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
70
+ β”‚ 1d. Load diff β”‚
71
+ β”‚ count files/linesβ”‚
72
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
73
+ β”‚
74
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
75
+ β”‚ 1e. Create session folder β”‚
76
+ β”‚ {output}/{date}-{slug}/ β”‚
77
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
78
+ β”‚
79
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
80
+ β”‚ 1f. Generate diffs/ folder β”‚
81
+ β”‚ one .md per changed file β”‚
82
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
83
+ β”‚
84
+ ╔═══════════════▼════════════════╗
85
+ β•‘ PHASE 2 β€” DESCRIBE PR β•‘
86
+ β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•€β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
87
+ β”‚
88
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
89
+ β”‚ 2a. Classify PR type β”‚
90
+ β”‚ bugfix/feature/... β”‚
91
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
92
+ β”‚
93
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
94
+ β”‚ 2b. File-by-file β”‚
95
+ β”‚ walkthrough β”‚
96
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
97
+ β”‚
98
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
99
+ β”‚ 2c. Print PR description β”‚
100
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
101
+ β”‚
102
+ ╔═══════════════▼═══════════════════════╗
103
+ β•‘ PHASE 2.5 β€” COLLECT PR CONTEXT β•‘
104
+ β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•€β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
105
+ β”‚
106
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
107
+ β”‚ Step 1. Analyze changed files β”‚
108
+ β”‚ detect stacks, domains, file types β”‚
109
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
110
+ β”‚
111
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
112
+ β”‚ Step 2. Collect context from: β”‚
113
+ β”‚ CLAUDE.md Β· CONTRIBUTING.md β”‚
114
+ β”‚ .eslintrc Β· tsconfig Β· pyproject β”‚
115
+ β”‚ ARCHITECTURE.md Β· docs/** β”‚
116
+ β”‚ @context/@security annotations β”‚
117
+ β”‚ stack rules (vue3/react/django/...) β”‚
118
+ β”‚ MCP tools Β· RAG Β· URL sources β”‚
119
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
120
+ β”‚
121
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
122
+ β”‚ Step 3. ⌨️ User instructions β”‚ ← USER INPUT
123
+ β”‚ scope / focus / requirements / β”‚
124
+ β”‚ context β€” or Enter for full review β”‚
125
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
126
+ β”‚
127
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
128
+ β–Ό β–Ό
129
+ [provided] [empty]
130
+ parse scope & scope = "all"
131
+ focus/req/ctx full standard
132
+ β”‚ β”‚
133
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
134
+ β”‚
135
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
136
+ β”‚ Step 4. Build pr-context.yaml β”‚
137
+ β”‚ all collected context + user_instr β”‚
138
+ β”‚ β†’ {session_output}/pr-context.yaml β”‚
139
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
140
+ β”‚
141
+ ╔═══════════════▼════════════════╗
142
+ β•‘ PHASE 3 β€” REVIEW β•‘
143
+ β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•€β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
144
+ β”‚
145
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
146
+ β”‚ Scope gate β”‚
147
+ β”‚ read user_instructions.review_scope β”‚
148
+ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
149
+ β”‚
150
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
151
+ [in scope] [not in scope]
152
+ β”‚ β”‚
153
+ β–Ό β–Ό
154
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” ⏭️ skipped
155
+ β”‚ GR Β· SR β”‚ (no output file)
156
+ β”‚ PR Β· AR β”‚
157
+ β”‚ BR β”‚
158
+ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
159
+ β”‚
160
+ ╔▼════════════════════════╗
161
+ β•‘ PHASE 4 β€” REPORT β•‘
162
+ β•šβ•€β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
163
+ β”‚
164
+ β”‚ Compile findings β†’ sort by severity
165
+ β”‚ πŸ”΄ Blockers β†’ 🟑 Warnings
166
+ β”‚ 🟒 Suggestions β†’ ❓ Questions
167
+ β”‚ Write β†’ final-review.md
168
+ β”‚
169
+ ╔▼════════════════════════╗
170
+ β•‘ PHASE 5 β€” DONE β•‘
171
+ β•šβ•€β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
172
+ β”‚
173
+ β”œβ”€β”€ auto_post_comment: true β†’ post inline comments automatically
174
+ └── auto_post_comment: false β†’ ⌨️ type PC to post, Enter to finish
175
+ ```
44
176
 
45
177
  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.
46
178
 
@@ -71,9 +203,6 @@ auto_post_comment: false # true β†’ auto-post findings after every
71
203
  # ─── Context Collection ────────────────────────────────────────────────────
72
204
  context_collection:
73
205
  enabled: true # false β†’ disable context collection entirely
74
- skip_manual_input_context: false # true β†’ skip the manual context input prompt
75
- # false (default) β†’ agent asks user for additional context
76
- # before building the knowledge base; input is marked ⚠️ IMPORTANT
77
206
  mode: pr-specific # only value: pr-specific (always fresh, never cached)
78
207
 
79
208
  # Sources below are auto-detected β€” override only if needed:
@@ -139,28 +268,30 @@ external_sources:
139
268
  ### Quick mode β€” one command, full pipeline
140
269
 
141
270
  ```
142
- /prr-quick or /prr-master β†’ QR
271
+ /prr-quick
143
272
  ```
144
273
 
145
- Runs automatically: **select PR β†’ describe β†’ collect context β†’ 5 reviews β†’ generate report**
146
- Only pauses once to ask which PR/branch to review.
274
+ Runs automatically: **select PR β†’ describe β†’ collect context β†’ review β†’ report**
275
+ Pauses **twice** for user input: once to select the PR/branch, once for review instructions (scope, focus, requirements β€” or Enter for a full standard review).
147
276
 
148
277
  ### Manual mode β€” step by step
149
278
 
150
279
  | Code | Command | Description |
151
280
  |------|---------|-------------|
152
- | `SP` | Select PR | Fetch latest β†’ list open PRs (via `gh`) or branches β†’ select head + base β†’ load diff |
281
+ | `SP` | Select PR | Fetch latest β†’ list open PRs or branches β†’ select head + base β†’ load diff |
153
282
  | `DP` | Describe PR | Classify PR type, generate summary, file-by-file walkthrough |
283
+ | `CC` | Collect Context | Build PR-specific knowledge base from project docs, config files, standards, and external tools β€” run after DP, before any review |
154
284
  | `GR` | General Review | Logic, naming, readability, DRY, best practices, etc. β€” adapted to your stack |
155
285
  | `SR` | Security Review | OWASP Top 10, secrets, auth, rate limits, injection, etc. β€” adapted to your project |
156
286
  | `PR` | Performance Review | N+1 queries, memory leaks, async patterns, caching, etc. β€” adapted to your stack |
157
287
  | `AR` | Architecture Review | SOLID, layers, coupling, consistency with codebase, etc. β€” adapted to your architecture |
158
288
  | `BR` | Business Review | User impact, business risk, feature completeness, data safety, observability β€” adapted to your project |
289
+ | `PM` | Party Mode πŸŽ‰ | All reviewers discuss the PR together in one collaborative session |
159
290
  | `IC` | Improve Code | Concrete BEFORE/AFTER code suggestions |
160
291
  | `AK` | Ask Code | Q&A about specific changes in this PR |
161
292
  | `RR` | Generate Report | Compile all findings β†’ Markdown report in `_prr-output/reviews/` |
162
- | `PC` | Post Comments | Post inline code comments to GitHub PR via `gh` Reviews API |
163
- | `PM` | Party Mode πŸŽ‰ | All reviewers in one collaborative session |
293
+ | `PC` | Post Comments | Post inline review comments to GitHub, GitLab, Azure DevOps, or Bitbucket PR |
294
+ | `SS` | Select Session | List past review sessions and resume one |
164
295
  | `CL` | Clear | Remove context files and/or review reports from output folder |
165
296
  | `HH` | Help | Show this guide |
166
297
 
@@ -191,7 +322,7 @@ Enter PR number β†’ base and head resolved automatically.
191
322
  | PRR Master | `/prr-master` | Orchestrator β€” routes all workflows, full menu |
192
323
  | PRR Quick | `/prr-quick` | One-command full pipeline (select β†’ review β†’ report) |
193
324
 
194
- 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.
325
+ Specialist reviewer agents are orchestrated internally by the master agent and party-mode workflow. Use **[PM] Party Mode** from the master menu (`/prr-master`) to run all reviewers together in one collaborative session.
195
326
 
196
327
  ## Reviewers at a Glance
197
328
 
@@ -218,13 +349,17 @@ All findings use a standard format:
218
349
 
219
350
  ## Context Collection
220
351
 
221
- After [DP] Describe PR, context is collected **automatically** β€” no manual step needed:
352
+ **In [QR] Quick Review:** context is collected automatically as Phase 2.5 β€” no manual step needed.
353
+ **In manual mode (SP β†’ DP β†’ reviews):** run **[CC] Collect Context** after [DP] and before starting any review.
354
+
355
+ Either way, the agent pauses once for your instructions before building the knowledge base:
222
356
 
223
357
  1. Analyzes changed files to detect domains (`authentication`, `state-management`, etc.)
224
358
  2. Reads relevant config files (`.eslintrc`, `.prettierrc`, `tsconfig.json`) and standards docs (`CONTRIBUTING.md`, `ARCHITECTURE.md`)
225
359
  3. Extracts inline `@context:` / `@security:` / `@pattern:` annotations from the diff
226
360
  4. Optionally queries **MCP tools** (Confluence, Jira, Figma) and **RAG systems** if configured
227
- 5. Writes `pr-{branch}-context.yaml` β€” loaded by all reviewers
361
+ 5. Asks for **review instructions** β€” scope (`only security`), focus, requirements, or context. Press Enter for a full standard review
362
+ 6. Writes `pr-context.yaml` inside the session folder β€” loaded by all reviewers
228
363
 
229
364
  > See [CONFIGURATION.md](CONFIGURATION.md) for MCP intents, RAG setup, and URL sources.
230
365
 
@@ -241,7 +376,7 @@ When `[PC] Post Comments` is run with `platform_repo` configured, it posts findi
241
376
 
242
377
  ## Supported IDEs
243
378
 
244
- Antigravity, Auggie, Claude Code, Cline, Codex, Crush, Cursor, Gemini CLI, GitHub Copilot, iFlow, Kilo, Kiro, OpenCode, QwenCoder, Roo Cline, Rovo Dev, Trae, Windsurf
379
+ Antigravity, Augment Code, Claude Code, Cline, Codex, Crush, Cursor, Gemini CLI, GitHub Copilot, iFlow, Kilo, Kiro, OpenCode, QwenCoder, Roo Code, Rovo Dev, Trae, Windsurf
245
380
 
246
381
  ## Requirements
247
382
 
@@ -268,10 +403,12 @@ prr-kit/
268
403
  β”‚ β”œβ”€β”€ core/
269
404
  β”‚ β”‚ β”œβ”€β”€ agents/
270
405
  β”‚ β”‚ β”‚ └── prr-master.agent.yaml # Master orchestrator + menu
271
- β”‚ β”‚ └── tasks/
272
- β”‚ β”‚ β”œβ”€β”€ help.md # [HH] Help
273
- β”‚ β”‚ β”œβ”€β”€ clear.md # [CL] Clear output files
274
- β”‚ β”‚ └── workflow.xml # Workflow engine rules
406
+ β”‚ β”‚ β”œβ”€β”€ tasks/
407
+ β”‚ β”‚ β”‚ β”œβ”€β”€ help.md # [HH] Help
408
+ β”‚ β”‚ β”‚ β”œβ”€β”€ clear.md # [CL] Clear output files
409
+ β”‚ β”‚ β”‚ └── workflow.xml # Workflow engine rules
410
+ β”‚ β”‚ └── workflows/
411
+ β”‚ β”‚ └── party-mode/ # [PM] Party Mode β€” all reviewers together
275
412
  β”‚ └── prr/
276
413
  β”‚ β”œβ”€β”€ agents/ # Specialist reviewer agents (GR SR PR AR)
277
414
  β”‚ β”œβ”€β”€ config-template.yaml # Full config template with all options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prr-kit",
3
- "version": "1.3.0",
3
+ "version": "2.0.0",
4
4
  "description": "AI-driven Pull Request Review Kit β€” structured agent workflows for thorough, consistent code review",
5
5
  "main": "tools/cli/prr-cli.js",
6
6
  "bin": {
@@ -24,10 +24,11 @@ agent:
24
24
  - When a PM MCP is available, extract issue key from branch name and fetch acceptance criteria to use as review checklist
25
25
 
26
26
  critical_actions:
27
- - "Context is collected AUTOMATICALLY after Describe PR β€” no manual context collection needed"
27
+ - "In [QR] Quick Review: context is collected AUTOMATICALLY as part of the pipeline β€” no manual step needed"
28
+ - "In standalone mode (SP β†’ DP β†’ reviews): context is NOT auto-collected. After running DP, remind the user to run [CC] Collect Context before starting any review workflow for best results"
28
29
  - "Run [SP] Select PR FIRST before any review β€” never review without knowing the exact branch/diff"
29
30
  - "After Select PR, suggest running [DP] Describe PR to understand scope before diving into review"
30
- - "Context collection happens automatically after DP β€” it's always fresh and PR-specific"
31
+ - "Context is always fresh and PR-specific β€” never stale or cached"
31
32
  - "Track completed reviews and remind user of remaining uncompleted review types"
32
33
  - "For PRs touching auth, API keys, or user data: always suggest [SR] Security Review"
33
34
  - "For feature PRs and PRs with data migration: always run [BR] Business Review to assess user impact and deployment risk"
@@ -46,6 +47,10 @@ agent:
46
47
  exec: "{project-root}/_prr/prr/workflows/2-analyze/describe-pr/workflow.md"
47
48
  description: "[DP] Describe PR: Auto-generate PR type, summary, file-by-file walkthrough"
48
49
 
50
+ - trigger: "CC or fuzzy match on collect-context"
51
+ exec: "{project-root}/_prr/prr/workflows/2-analyze/collect-pr-context/workflow.md"
52
+ description: "[CC] Collect Context: Build PR-specific knowledge base (run after DP, before reviews)"
53
+
49
54
  - trigger: "GR or fuzzy match on general-review"
50
55
  workflow: "{project-root}/_prr/prr/workflows/3-review/general-review/workflow.yaml"
51
56
  description: "[GR] General Review: Code quality analysis β€” adapted to your stack"
@@ -70,6 +75,10 @@ agent:
70
75
  workflow: "{project-root}/_prr/prr/workflows/4-improve/improve-code/workflow.yaml"
71
76
  description: "[IC] Improve Code: Concrete inline code suggestions with before/after fixes"
72
77
 
78
+ - trigger: "PM or fuzzy match on party-mode"
79
+ exec: "{project-root}/_prr/core/workflows/party-mode/workflow.md"
80
+ description: "[PM] Party Mode: All reviewers discuss the PR together in one collaborative session"
81
+
73
82
  - trigger: "AK or fuzzy match on ask-code"
74
83
  exec: "{project-root}/_prr/prr/workflows/5-ask/ask-code/workflow.md"
75
84
  description: "[AK] Ask: Interactive Q&A about specific code changes in this PR"
@@ -82,10 +91,14 @@ agent:
82
91
  exec: "{project-root}/_prr/prr/workflows/6-report/post-comments/workflow.md"
83
92
  description: "[PC] Post Comments: Post inline review comments to GitHub/GitLab/Azure/Bitbucket PR"
84
93
 
94
+ - trigger: "SS or fuzzy match on select-session or resume-session"
95
+ exec: "{project-root}/_prr/core/tasks/select-session.md"
96
+ description: "[SS] Select Session: List past review sessions and resume one"
97
+
85
98
  - trigger: "HH or fuzzy match on help"
86
99
  exec: "{project-root}/_prr/core/tasks/help.md"
87
100
  description: "[HH] Help: Show review workflow guide and available commands"
88
101
 
89
102
  - trigger: "CL or fuzzy match on clear or clean or reset"
90
103
  exec: "{project-root}/_prr/core/tasks/clear.md"
91
- description: "[CL] Clear: Remove context files and/or review reports from output folder"
104
+ description: "[CL] Clear: Delete one or more past review sessions"
@@ -8,58 +8,41 @@
8
8
 
9
9
  Read `{project-root}/_prr/prr/config.yaml` to get `review_output` path.
10
10
 
11
- ### 2. Scan Output Folder
11
+ ### 2. Scan Session Folders
12
12
 
13
- List all files currently in `{review_output}`:
13
+ List all session folders in `{review_output}` (datetime-slug subdirectories):
14
14
 
15
15
  ```bash
16
- ls "{review_output}/"
16
+ ls -d "{review_output}"/*/
17
17
  ```
18
18
 
19
- Group into three categories:
19
+ Each session folder is named `{YYYY-MM-DD-HHmm}-{slug}` (e.g. `2026-03-02-1430-pr44-feature-auth`).
20
+ Inside each folder are: `pr-context.yaml` (knowledge base) and review `.md` files.
20
21
 
21
- **Context files** (session state + knowledge bases):
22
- - `current-pr-context.yaml` β€” active session state (which PR is selected)
23
- - `pr-*-context.yaml` β€” per-PR knowledge bases built during context collection
24
-
25
- **Intermediate review files** (individual review output, used by [RR] and [PC]):
26
- - `general-review-*.md`
27
- - `security-review-*.md`
28
- - `performance-review-*.md`
29
- - `architecture-review-*.md`
30
- - `business-review-*.md`
31
- - `improve-code-*.md`
32
- - `pr-description-*.md`
33
-
34
- **Review reports** (final compiled reports):
35
- - `review-*.md` β€” final review reports generated by [RR]
22
+ Also detect any legacy flat files still directly in `{review_output}/` (pre-session-folder format).
36
23
 
37
24
  ### 3. Display What Exists
38
25
 
39
- Show the user exactly what will be affected:
26
+ Show the user a summary of each session:
40
27
 
41
28
  ```
42
29
  πŸ—‚οΈ PRR Output β€” {review_output}
43
30
 
44
- Context files ({n}):
45
- β€’ current-pr-context.yaml
46
- β€’ pr-feature-auth-...-context.yaml
47
- β€’ pr-feature-search-...-context.yaml
48
- ... (list all pr-*.yaml)
49
-
50
- Intermediate review files ({k}):
51
- β€’ general-review-2026-02-21.md
52
- β€’ security-review-2026-02-21.md
53
- β€’ pr-description-2026-02-21.md
54
- ... (list all intermediate review files)
55
-
56
- Review reports ({m}):
57
- β€’ review-feature-auth-indexeddb-migration-2026-02-21.md
58
- β€’ review-feature-add-search-functionality-2026-02-21.md
59
- ... (list all review-*.md)
31
+ Session folders ({n}):
32
+
33
+ πŸ“ 2026-03-02-1430-pr44-feature-auth/
34
+ Branch: feature/auth | PR #44 | 2026-03-02
35
+ Files: pr-context.yaml, pr-description.md,
36
+ general-review.md, security-review.md, final-review.md
37
+
38
+ πŸ“ 2026-03-01-0915-fix-null-pointer/
39
+ Branch: fix/null-pointer | no PR | 2026-03-01
40
+ Files: general-review.md
41
+
42
+ ... (list all session folders)
60
43
  ```
61
44
 
62
- If output folder is already empty or doesn't exist:
45
+ If no session folders exist:
63
46
  ```
64
47
  βœ… Nothing to clear β€” output folder is already empty.
65
48
  ```
@@ -72,49 +55,32 @@ Ask the user what to clear:
72
55
  ```
73
56
  What would you like to clear?
74
57
 
75
- [1] All β€” context files + intermediate review files + review reports
76
- [2] Context only β€” clear session state and knowledge bases (keep reports)
77
- [3] Reports only β€” clear intermediate review files + final review reports (keep context)
78
- [4] Cancel β€” do nothing
58
+ [1] All sessions β€” delete all session folders
59
+ [2] Select sessions β€” choose specific session(s) to delete
60
+ [3] Cancel β€” do nothing
79
61
  ```
80
62
 
81
63
  Wait for user input.
82
64
 
83
- ### 5. Execute Deletion
84
-
85
- **If [1] All:**
86
- ```bash
87
- rm -f "{review_output}/current-pr-context.yaml"
88
- rm -f "{review_output}"/pr-*-context.yaml
89
- rm -f "{review_output}"/general-review-*.md
90
- rm -f "{review_output}"/security-review-*.md
91
- rm -f "{review_output}"/performance-review-*.md
92
- rm -f "{review_output}"/architecture-review-*.md
93
- rm -f "{review_output}"/business-review-*.md
94
- rm -f "{review_output}"/improve-code-*.md
95
- rm -f "{review_output}"/pr-description-*.md
96
- rm -f "{review_output}"/review-*.md
65
+ **If [2] Select sessions:** List sessions numbered and ask:
66
+ ```
67
+ Which session(s) to delete? (e.g. 1, 3 or 1-3)
97
68
  ```
69
+ Wait for response.
70
+
71
+ ### 5. Execute Deletion
98
72
 
99
- **If [2] Context only:**
73
+ **If [1] All sessions:**
100
74
  ```bash
101
- rm -f "{review_output}/current-pr-context.yaml"
102
- rm -f "{review_output}"/pr-*-context.yaml
75
+ rm -rf "{review_output}"/*/
103
76
  ```
104
77
 
105
- **If [3] Reports only:**
78
+ **If [2] Selected sessions:** For each chosen session folder:
106
79
  ```bash
107
- rm -f "{review_output}"/general-review-*.md
108
- rm -f "{review_output}"/security-review-*.md
109
- rm -f "{review_output}"/performance-review-*.md
110
- rm -f "{review_output}"/architecture-review-*.md
111
- rm -f "{review_output}"/business-review-*.md
112
- rm -f "{review_output}"/improve-code-*.md
113
- rm -f "{review_output}"/pr-description-*.md
114
- rm -f "{review_output}"/review-*.md
80
+ rm -rf "{review_output}/{selected_session_folder}/"
115
81
  ```
116
82
 
117
- **If [4] Cancel:**
83
+ **If [3] Cancel:**
118
84
  ```
119
85
  ❌ Cancelled β€” nothing was deleted.
120
86
  ```
@@ -122,15 +88,14 @@ Stop.
122
88
 
123
89
  ### 6. Confirm Deletion
124
90
 
125
- Verify files are gone and report:
91
+ Verify folders are gone and report:
126
92
 
127
93
  ```
128
94
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
129
95
  βœ… Clear complete
130
96
 
131
97
  Deleted:
132
- πŸ—‘οΈ Context files: {n_ctx} file(s) removed
133
- πŸ—‘οΈ Review reports: {n_rpt} file(s) removed
98
+ πŸ—‘οΈ Sessions removed: {n} folder(s)
134
99
 
135
100
  Output folder: {review_output}
136
101
  Status: clean
@@ -12,12 +12,13 @@ Use `/prr-help` anytime for guidance on what to do.
12
12
  **Per PR β€” Manual mode (step by step):**
13
13
  1. **[SP] Select PR** β€” Fetch latest, list branches/PRs, choose what to review
14
14
  2. **[DP] Describe PR** β€” Auto-generate PR type, summary, file-by-file walkthrough
15
- ↳ *Context collected automatically β€” fresh, PR-specific, no setup needed*
16
- 3. **[GR/SR/PR/AR/BR] Review** β€” Run one or more specialized reviews
17
- 4. **[IC] Improve Code** β€” Get concrete code suggestions with inline fixes
18
- 5. **[AK] Ask** β€” Ask specific questions about the code changes
19
- 6. **[RR] Generate Report** β€” Compile all findings into a Markdown report
20
- 7. **[PC] Post Comments** β€” Post inline review comments to GitHub / GitLab / Azure DevOps / Bitbucket
15
+ 3. **[CC] Collect Context** β€” Build a PR-specific knowledge base from your project docs, configs, stack rules, and external tools (Jira, Confluence, Figma). Run this before any review for best results.
16
+ 4. **[GR/SR/PR/AR/BR] Review** β€” Run one or more specialized reviews
17
+ 5. **[PM] Party Mode** πŸŽ‰ β€” All reviewers discuss the PR together in one collaborative session
18
+ 6. **[IC] Improve Code** β€” Get concrete code suggestions with inline fixes
19
+ 7. **[AK] Ask** β€” Ask specific questions about the code changes
20
+ 8. **[RR] Generate Report** β€” Compile all findings into a Markdown report
21
+ 9. **[PC] Post Comments** β€” Post inline review comments to GitHub / GitLab / Azure DevOps / Bitbucket
21
22
 
22
23
  ### Available Reviews
23
24
 
@@ -36,4 +37,6 @@ Use `/prr-help` anytime for guidance on what to do.
36
37
 
37
38
  ### Utilities
38
39
 
39
- - **[CL] Clear** β€” Remove context files and/or review reports from output folder. Useful when starting fresh or cleaning up after a session. Choose: All / Context only / Reports only.
40
+ - **[SS] Select Session** β€” List past review sessions and resume one. Use this at the start of a new conversation to pick up where you left off.
41
+ - **[HH] Help** β€” Show this guide.
42
+ - **[CL] Clear** β€” Delete one or more past review session folders. Choose specific sessions or clear all.
@@ -0,0 +1,94 @@
1
+ # Select Session
2
+
3
+ **Goal:** List all past PR review sessions and let the user resume one by restoring `session_output` into working context.
4
+
5
+ ## EXECUTION
6
+
7
+ ### 1. Load Config
8
+
9
+ Read `{project-root}/_prr/prr/config.yaml` to get `review_output` path.
10
+
11
+ ### 2. Scan Session Folders
12
+
13
+ List all session folders in `{review_output}`:
14
+
15
+ ```bash
16
+ ls -d "{review_output}"/*/
17
+ ```
18
+
19
+ For each session folder, read its contents to build a summary:
20
+
21
+ ```bash
22
+ ls "{review_output}/{session_folder}/"
23
+ ```
24
+
25
+ From the files present, determine:
26
+ - **Branch / PR** β€” from folder name (e.g. `2026-03-02-1430-pr44-feature-auth` β†’ PR #44, branch `feature/auth`)
27
+ - **Date / Time** β€” from folder name prefix (`2026-03-02-1430`)
28
+ - **Reviews done** β€” which `*-review.md` files exist
29
+ - **Has final report** β€” `final-review.md` exists
30
+ - **Has description** β€” `pr-description.md` exists
31
+
32
+ ### 3. Display Sessions
33
+
34
+ ```
35
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
36
+ πŸ“‚ Review Sessions β€” {review_output}
37
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
38
+
39
+ [1] 2026-03-02 14:30 β€” PR #44 feature/auth-login
40
+ Reviews: DP βœ“ GR βœ“ SR βœ“ RR βœ“
41
+ Report: final-review.md βœ“
42
+
43
+ [2] 2026-03-01 09:15 β€” fix/null-pointer-checkout
44
+ Reviews: DP βœ“ GR βœ“
45
+ Report: β€”
46
+
47
+ [3] 2026-02-28 17:00 β€” PR #41 chore/upgrade-deps
48
+ Reviews: DP βœ“ GR βœ“ AR βœ“ RR βœ“
49
+ Report: final-review.md βœ“
50
+
51
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
52
+ ```
53
+
54
+ If no sessions exist:
55
+ ```
56
+ βœ… No sessions found in {review_output}.
57
+ Run [SP] Select PR or [QR] Quick Review to start a new session.
58
+ ```
59
+ Then stop.
60
+
61
+ ### 4. Ask User to Select
62
+
63
+ ```
64
+ Select a session to resume (enter number):
65
+ ```
66
+
67
+ **HALT β€” wait for user response.**
68
+
69
+ ### 5. Restore Session
70
+
71
+ Set `session_output` = full path of the selected session folder.
72
+
73
+ Load PR metadata from working context sources available in the session folder:
74
+ - Parse `session_output` folder name to extract: `datetime_prefix`, `pr_number` (if `prN-` prefix), `branch_slug`
75
+ - Read `pr-context.yaml` if it exists β€” extract `pr_metadata.pr_number`, `pr_metadata.branch`, `pr_metadata.base_branch`
76
+ - Derive `target_branch` and `base_branch` from knowledge base or folder name
77
+
78
+ **Store in working context:**
79
+ - `session_output` = selected folder path
80
+ - `target_branch`, `base_branch`, `pr_number` = from above
81
+
82
+ Display:
83
+ ```
84
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
85
+ βœ… Session restored
86
+
87
+ πŸ“ {session_output}
88
+ Branch: {target_branch} β†’ {base_branch}
89
+ PR #: {pr_number} (if applicable)
90
+
91
+ Reviews completed: {list or "none"}
92
+ Ready to continue β€” run any command from the menu.
93
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
94
+ ```