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
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
|
271
|
+
/prr-quick
|
|
143
272
|
```
|
|
144
273
|
|
|
145
|
-
Runs automatically: **select PR β describe β collect context β
|
|
146
|
-
|
|
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
|
|
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
|
|
163
|
-
| `
|
|
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
|
|
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
|
-
|
|
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.
|
|
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,
|
|
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
|
-
β β
|
|
272
|
-
β β
|
|
273
|
-
β β
|
|
274
|
-
β β
|
|
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
|
@@ -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
|
-
- "
|
|
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
|
|
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:
|
|
104
|
+
description: "[CL] Clear: Delete one or more past review sessions"
|
package/src/core/tasks/clear.md
CHANGED
|
@@ -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
|
|
11
|
+
### 2. Scan Session Folders
|
|
12
12
|
|
|
13
|
-
List all
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
26
|
+
Show the user a summary of each session:
|
|
40
27
|
|
|
41
28
|
```
|
|
42
29
|
ποΈ PRR Output β {review_output}
|
|
43
30
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
|
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
|
|
76
|
-
[2]
|
|
77
|
-
[3]
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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 [
|
|
73
|
+
**If [1] All sessions:**
|
|
100
74
|
```bash
|
|
101
|
-
rm -
|
|
102
|
-
rm -f "{review_output}"/pr-*-context.yaml
|
|
75
|
+
rm -rf "{review_output}"/*/
|
|
103
76
|
```
|
|
104
77
|
|
|
105
|
-
**If [
|
|
78
|
+
**If [2] Selected sessions:** For each chosen session folder:
|
|
106
79
|
```bash
|
|
107
|
-
rm -
|
|
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 [
|
|
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
|
|
91
|
+
Verify folders are gone and report:
|
|
126
92
|
|
|
127
93
|
```
|
|
128
94
|
ββββββββββββββββββββββββββββββββββββββββ
|
|
129
95
|
β
Clear complete
|
|
130
96
|
|
|
131
97
|
Deleted:
|
|
132
|
-
ποΈ
|
|
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
|
package/src/core/tasks/help.md
CHANGED
|
@@ -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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
- **[
|
|
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
|
+
```
|