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.
- package/README.md +157 -20
- package/package.json +1 -1
- package/src/core/agents/prr-master.agent.yaml +16 -3
- package/src/core/tasks/clear.md +36 -71
- package/src/core/tasks/help.md +10 -7
- package/src/core/tasks/select-session.md +94 -0
- package/src/core/workflows/party-mode/steps/step-00-user-instructions.md +125 -0
- package/src/core/workflows/party-mode/steps/step-01-load-reviewers.md +29 -14
- package/src/core/workflows/party-mode/steps/step-02-discussion.md +14 -7
- package/src/core/workflows/party-mode/workflow.md +7 -7
- package/src/prr/config-template.yaml +0 -3
- package/src/prr/workflows/1-discover/select-pr/steps/step-05-confirm.md +99 -25
- package/src/prr/workflows/1-discover/select-pr/workflow.md +1 -1
- package/src/prr/workflows/2-analyze/collect-pr-context/steps/step-03-manual-context-input.md +64 -50
- package/src/prr/workflows/2-analyze/collect-pr-context/steps/step-04-build-knowledge-base.md +42 -32
- package/src/prr/workflows/2-analyze/collect-pr-context/workflow.md +7 -7
- package/src/prr/workflows/2-analyze/describe-pr/steps/step-01-load-context.md +3 -3
- package/src/prr/workflows/2-analyze/describe-pr/steps/step-04-output.md +11 -7
- package/src/prr/workflows/2-analyze/describe-pr/workflow.md +2 -2
- package/src/prr/workflows/3-review/architecture-review/checklist.md +1 -2
- package/src/prr/workflows/3-review/architecture-review/instructions.xml +1 -1
- package/src/prr/workflows/3-review/architecture-review/workflow.yaml +3 -2
- package/src/prr/workflows/3-review/business-review/checklist.md +1 -2
- package/src/prr/workflows/3-review/business-review/workflow.yaml +3 -2
- package/src/prr/workflows/3-review/general-review/checklist.md +1 -2
- package/src/prr/workflows/3-review/general-review/workflow.yaml +3 -2
- package/src/prr/workflows/3-review/performance-review/checklist.md +1 -2
- package/src/prr/workflows/3-review/performance-review/workflow.yaml +3 -2
- package/src/prr/workflows/3-review/security-review/checklist.md +1 -2
- package/src/prr/workflows/3-review/security-review/workflow.yaml +3 -2
- package/src/prr/workflows/4-improve/improve-code/checklist.md +1 -2
- package/src/prr/workflows/4-improve/improve-code/workflow.yaml +3 -2
- package/src/prr/workflows/5-ask/ask-code/steps/step-01-load-context.md +2 -2
- package/src/prr/workflows/6-report/generate-report/steps/step-01-collect.md +19 -9
- package/src/prr/workflows/6-report/generate-report/steps/step-03-write.md +2 -2
- package/src/prr/workflows/6-report/generate-report/workflow.md +2 -1
- package/src/prr/workflows/6-report/post-comments/steps/step-01-format.md +17 -5
- package/src/prr/workflows/6-report/post-comments/steps/step-02-post.md +27 -4
- package/src/prr/workflows/6-report/post-comments/workflow.md +3 -2
- package/src/prr/workflows/quick/workflow.md +104 -35
- package/tools/cli/installers/lib/ide/platform-codes.yaml +4 -4
|
@@ -152,26 +152,78 @@ git -C {target_repo} diff {base_branch}...{target_branch}
|
|
|
152
152
|
```
|
|
153
153
|
Store diff in memory. Count files changed, lines added/removed.
|
|
154
154
|
|
|
155
|
-
### 1e.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
155
|
+
### 1e. Create Session Folder
|
|
156
|
+
|
|
157
|
+
Compute the session output folder:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
sanitized_branch = target_branch
|
|
161
|
+
.toLowerCase()
|
|
162
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
163
|
+
.replace(/^-+|-+$/g, '')
|
|
164
|
+
.substring(0, 40)
|
|
165
|
+
|
|
166
|
+
if pr_number is set:
|
|
167
|
+
session_slug = "pr{pr_number}-{sanitized_branch}"
|
|
168
|
+
else:
|
|
169
|
+
session_slug = "{sanitized_branch}"
|
|
170
|
+
|
|
171
|
+
datetime_prefix = current datetime as "YYYY-MM-DD-HHmm" (e.g. 2026-03-02-1430)
|
|
172
|
+
|
|
173
|
+
session_output = "{review_output}/{datetime_prefix}-{session_slug}"
|
|
169
174
|
```
|
|
170
175
|
|
|
171
|
-
|
|
176
|
+
Examples:
|
|
177
|
+
- `_prr-output/reviews/2026-03-02-1430-pr44-feature-auth-login`
|
|
178
|
+
- `_prr-output/reviews/2026-03-02-1430-feature-auth-login`
|
|
179
|
+
|
|
180
|
+
Create folder:
|
|
181
|
+
```bash
|
|
182
|
+
mkdir -p "{session_output}"
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Store in working context:** `session_output`, `target_branch`, `base_branch`, `pr_number`, `pr_title`, `active_platform`, `platform_repo`.
|
|
186
|
+
|
|
187
|
+
### 1f. Generate Diffs Folder
|
|
188
|
+
|
|
189
|
+
Parse the diff loaded in 1d and write per-file markdown files under `{session_output}/diffs/`, mirroring the repo folder tree.
|
|
190
|
+
|
|
191
|
+
**For each changed file in the diff:**
|
|
192
|
+
|
|
193
|
+
1. Determine file path, status, and line counts from the diff header.
|
|
194
|
+
2. Construct output path: `{session_output}/diffs/{file_path}.md`
|
|
195
|
+
3. Create parent directories:
|
|
196
|
+
```bash
|
|
197
|
+
mkdir -p "{session_output}/diffs/{file_dir}"
|
|
198
|
+
```
|
|
199
|
+
4. Write the markdown file:
|
|
200
|
+
|
|
201
|
+
```markdown
|
|
202
|
+
# {file_path}
|
|
203
|
+
**Status:** {modified|added|deleted|renamed} | **+{lines_added} / -{lines_removed} lines**
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
**Line {start_line}** *(or **Lines {start}–{end}** for multi-line hunks)*
|
|
207
|
+
```diff
|
|
208
|
+
- old line content
|
|
209
|
+
+ new line content
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
*(repeat for each hunk in this file)*
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Rules:**
|
|
216
|
+
- **New file:** show all lines as `+` additions under a single hunk block.
|
|
217
|
+
- **Deleted file:** show all lines as `-` deletions under a single hunk block.
|
|
218
|
+
- **Renamed file with no content change:** write status line only, no diff blocks.
|
|
219
|
+
- **Renamed file with changes:** write status `renamed` and include change hunks as normal.
|
|
220
|
+
- One `.md` file per changed file. Folder structure mirrors the repo exactly.
|
|
221
|
+
|
|
222
|
+
After writing all files, show summary:
|
|
172
223
|
```
|
|
173
224
|
✓ PR selected: {target_branch}
|
|
174
225
|
Files changed: X | +Y / -Z lines
|
|
226
|
+
✓ Diffs saved: {file_count} files → {session_output}/diffs/
|
|
175
227
|
```
|
|
176
228
|
|
|
177
229
|
---
|
|
@@ -186,6 +238,12 @@ Analyze the diff and classify as one of: `bugfix` | `feature` | `refactor` | `pe
|
|
|
186
238
|
For each changed file, write a 1-2 sentence summary of what changed and why.
|
|
187
239
|
Group by: new files | modified files | deleted files | renamed files.
|
|
188
240
|
|
|
241
|
+
### 2b2. Generate Impact Map
|
|
242
|
+
Scan for cross-cutting side effects following the same logic as `describe-pr/steps/step-03-walkthrough.md` section 3:
|
|
243
|
+
- Shared/generic module changes → count consumers, flag breaking vs additive
|
|
244
|
+
- Side effect scan → observer/reactive dependencies outside the diff
|
|
245
|
+
- Output the IMPACT MAP block
|
|
246
|
+
|
|
189
247
|
### 2c. Output description
|
|
190
248
|
Print to screen:
|
|
191
249
|
```
|
|
@@ -197,17 +255,22 @@ Print to screen:
|
|
|
197
255
|
|
|
198
256
|
### Files Changed
|
|
199
257
|
{walkthrough table}
|
|
258
|
+
|
|
259
|
+
{impact_map}
|
|
200
260
|
```
|
|
201
261
|
|
|
262
|
+
Write description to file: `{session_output}/pr-description.md`
|
|
263
|
+
Store `pr_type` and `risk_level` in working context.
|
|
264
|
+
|
|
202
265
|
---
|
|
203
266
|
|
|
204
267
|
## PHASE 2.5 — COLLECT PR-SPECIFIC CONTEXT
|
|
205
|
-
*Execute automatically.
|
|
268
|
+
*Execute automatically. Pauses once to ask the user for additional context — user must respond before continuing.*
|
|
206
269
|
|
|
207
270
|
Execute the collect-pr-context workflow in full:
|
|
208
271
|
`{project-root}/_prr/prr/workflows/2-analyze/collect-pr-context/workflow.md`
|
|
209
272
|
|
|
210
|
-
This workflow analyzes changed files, detects technology stacks, collects relevant context from all sources (primary docs, config files, standards docs, inline annotations, stack-specific rules, external MCP/RAG tools), asks the user for any additional context (marked ⚠️ IMPORTANT if provided), and builds a structured PR-specific knowledge base at `{
|
|
273
|
+
This workflow analyzes changed files, detects technology stacks, collects relevant context from all sources (primary docs, config files, standards docs, inline annotations, stack-specific rules, external MCP/RAG tools), asks the user for any additional context (marked ⚠️ IMPORTANT if provided), and builds a structured PR-specific knowledge base at `{session_output}/pr-context.yaml`.
|
|
211
274
|
|
|
212
275
|
On completion, store `pr_knowledge_base` = path to the generated context file.
|
|
213
276
|
|
|
@@ -216,45 +279,51 @@ On completion, store `pr_knowledge_base` = path to the generated context file.
|
|
|
216
279
|
## PHASE 3 — REVIEW
|
|
217
280
|
*Execute all review types automatically, one by one.*
|
|
218
281
|
|
|
219
|
-
**Before each review,
|
|
220
|
-
- `
|
|
221
|
-
- `
|
|
222
|
-
- `
|
|
223
|
-
- `
|
|
224
|
-
- `
|
|
225
|
-
|
|
226
|
-
|
|
282
|
+
**Before each review, confirm these variables are set in working context (all set by earlier phases):**
|
|
283
|
+
- `target_branch`, `base_branch`, `pr_number` — set by Phase 1 (Select PR)
|
|
284
|
+
- `pr_knowledge_base` — set by Phase 2.5 (`{session_output}/pr-context.yaml`)
|
|
285
|
+
- `session_output` — set by Phase 1 when session folder was created
|
|
286
|
+
- `target_repo`, `communication_language` — from config
|
|
287
|
+
- `output_file` — per-review path defined below *(ensures findings are saved to disk for [RR] and [PC] later)*
|
|
288
|
+
|
|
289
|
+
**Scope gate:** Read `user_instructions.review_scope` from `{pr_knowledge_base}`.
|
|
290
|
+
- If `"all"` (or knowledge base missing) → run all reviews 3a–3e normally.
|
|
291
|
+
- If a list (e.g. `[SR, AR]`) → only run reviews whose code is in the list. For each skipped review, print:
|
|
292
|
+
`⏭️ {Review Name} skipped (not in scope)`
|
|
293
|
+
and do NOT write its output file.
|
|
294
|
+
|
|
295
|
+
Review codes: `GR` = General · `SR` = Security · `PR` = Performance · `AR` = Architecture · `BR` = Business
|
|
227
296
|
|
|
228
297
|
### 3a. General Review
|
|
229
|
-
Set `output_file` = `{
|
|
298
|
+
Set `output_file` = `{session_output}/general-review.md`
|
|
230
299
|
Load and follow: `{project-root}/_prr/prr/workflows/3-review/general-review/instructions.xml`
|
|
231
300
|
|
|
232
301
|
Collect findings as `{general_findings}`.
|
|
233
302
|
Print section header: `## 👁️ General Review`
|
|
234
303
|
|
|
235
304
|
### 3b. Security Review
|
|
236
|
-
Set `output_file` = `{
|
|
305
|
+
Set `output_file` = `{session_output}/security-review.md`
|
|
237
306
|
Load and follow: `{project-root}/_prr/prr/workflows/3-review/security-review/instructions.xml`
|
|
238
307
|
|
|
239
308
|
Collect findings as `{security_findings}`.
|
|
240
309
|
Print section header: `## 🔒 Security Review`
|
|
241
310
|
|
|
242
311
|
### 3c. Performance Review
|
|
243
|
-
Set `output_file` = `{
|
|
312
|
+
Set `output_file` = `{session_output}/performance-review.md`
|
|
244
313
|
Load and follow: `{project-root}/_prr/prr/workflows/3-review/performance-review/instructions.xml`
|
|
245
314
|
|
|
246
315
|
Collect findings as `{performance_findings}`.
|
|
247
316
|
Print section header: `## ⚡ Performance Review`
|
|
248
317
|
|
|
249
318
|
### 3d. Architecture Review
|
|
250
|
-
Set `output_file` = `{
|
|
319
|
+
Set `output_file` = `{session_output}/architecture-review.md`
|
|
251
320
|
Load and follow: `{project-root}/_prr/prr/workflows/3-review/architecture-review/instructions.xml`
|
|
252
321
|
|
|
253
322
|
Collect findings as `{architecture_findings}`.
|
|
254
323
|
Print section header: `## 🏗️ Architecture Review`
|
|
255
324
|
|
|
256
325
|
### 3e. Business Review
|
|
257
|
-
Set `output_file` = `{
|
|
326
|
+
Set `output_file` = `{session_output}/business-review.md`
|
|
258
327
|
Load and follow: `{project-root}/_prr/prr/workflows/3-review/business-review/instructions.xml`
|
|
259
328
|
|
|
260
329
|
Collect findings as `{business_findings}`.
|
|
@@ -275,11 +344,9 @@ Count totals:
|
|
|
275
344
|
- `{blocker_count}` = number of 🔴 findings
|
|
276
345
|
- `{warning_count}` = number of 🟡 findings
|
|
277
346
|
- `{suggestion_count}` = number of 🟢 findings
|
|
347
|
+
- `{question_count}` = number of ❓ findings
|
|
278
348
|
|
|
279
|
-
|
|
280
|
-
where `{target_branch_slug}` = branch name with `/` replaced by `-`.
|
|
281
|
-
|
|
282
|
-
Write report to: `{review_output}/review-{target_branch_slug}-{date}.md`
|
|
349
|
+
Write report to: `{session_output}/final-review.md`
|
|
283
350
|
|
|
284
351
|
Report format:
|
|
285
352
|
```markdown
|
|
@@ -328,11 +395,13 @@ Print completion summary:
|
|
|
328
395
|
✅ Quick Review Complete
|
|
329
396
|
|
|
330
397
|
Branch: {target_branch}
|
|
331
|
-
|
|
398
|
+
Session: {session_output}/
|
|
399
|
+
Report: {session_output}/final-review.md
|
|
332
400
|
|
|
333
401
|
🔴 Blockers: {blocker_count}
|
|
334
402
|
🟡 Warnings: {warning_count}
|
|
335
403
|
🟢 Suggestions: {suggestion_count}
|
|
404
|
+
❓ Questions: {question_count}
|
|
336
405
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
337
406
|
```
|
|
338
407
|
|
|
@@ -41,7 +41,7 @@ platforms:
|
|
|
41
41
|
template_type: antigravity
|
|
42
42
|
|
|
43
43
|
auggie:
|
|
44
|
-
name: "
|
|
44
|
+
name: "Augment Code"
|
|
45
45
|
preferred: false
|
|
46
46
|
category: cli
|
|
47
47
|
description: "AI development tool"
|
|
@@ -122,10 +122,10 @@ platforms:
|
|
|
122
122
|
description: "OpenCode terminal coding assistant"
|
|
123
123
|
installer:
|
|
124
124
|
targets:
|
|
125
|
-
- target_dir: .opencode/
|
|
125
|
+
- target_dir: .opencode/agents
|
|
126
126
|
template_type: opencode
|
|
127
127
|
artifact_types: [agents]
|
|
128
|
-
- target_dir: .opencode/
|
|
128
|
+
- target_dir: .opencode/commands
|
|
129
129
|
template_type: opencode
|
|
130
130
|
artifact_types: [workflows]
|
|
131
131
|
|
|
@@ -139,7 +139,7 @@ platforms:
|
|
|
139
139
|
template_type: default
|
|
140
140
|
|
|
141
141
|
roo:
|
|
142
|
-
name: "Roo
|
|
142
|
+
name: "Roo Code"
|
|
143
143
|
preferred: false
|
|
144
144
|
category: ide
|
|
145
145
|
description: "Enhanced Cline fork"
|