prr-kit 1.4.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 +21 -10
- package/package.json +1 -1
- package/src/core/agents/prr-master.agent.yaml +11 -2
- package/src/core/tasks/help.md +8 -6
- package/src/core/workflows/party-mode/steps/step-01-load-reviewers.md +11 -4
- package/src/core/workflows/party-mode/steps/step-02-discussion.md +6 -1
- package/src/prr/workflows/1-discover/select-pr/steps/step-05-confirm.md +4 -1
- package/src/prr/workflows/2-analyze/collect-pr-context/steps/step-04-build-knowledge-base.md +18 -2
- package/src/prr/workflows/2-analyze/collect-pr-context/workflow.md +4 -2
- package/src/prr/workflows/2-analyze/describe-pr/steps/step-04-output.md +5 -0
- package/src/prr/workflows/3-review/architecture-review/instructions.xml +1 -1
- package/src/prr/workflows/3-review/business-review/workflow.yaml +1 -1
- package/src/prr/workflows/6-report/generate-report/steps/step-01-collect.md +6 -0
- package/src/prr/workflows/6-report/post-comments/steps/step-01-format.md +13 -0
- package/src/prr/workflows/6-report/post-comments/steps/step-02-post.md +27 -4
- package/src/prr/workflows/quick/workflow.md +19 -8
- 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
|
|
@@ -274,18 +278,20 @@ Pauses **twice** for user input: once to select the PR/branch, once for review i
|
|
|
274
278
|
|
|
275
279
|
| Code | Command | Description |
|
|
276
280
|
|------|---------|-------------|
|
|
277
|
-
| `SP` | Select PR | Fetch latest → list open PRs
|
|
281
|
+
| `SP` | Select PR | Fetch latest → list open PRs or branches → select head + base → load diff |
|
|
278
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 |
|
|
279
284
|
| `GR` | General Review | Logic, naming, readability, DRY, best practices, etc. — adapted to your stack |
|
|
280
285
|
| `SR` | Security Review | OWASP Top 10, secrets, auth, rate limits, injection, etc. — adapted to your project |
|
|
281
286
|
| `PR` | Performance Review | N+1 queries, memory leaks, async patterns, caching, etc. — adapted to your stack |
|
|
282
287
|
| `AR` | Architecture Review | SOLID, layers, coupling, consistency with codebase, etc. — adapted to your architecture |
|
|
283
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 |
|
|
284
290
|
| `IC` | Improve Code | Concrete BEFORE/AFTER code suggestions |
|
|
285
291
|
| `AK` | Ask Code | Q&A about specific changes in this PR |
|
|
286
292
|
| `RR` | Generate Report | Compile all findings → Markdown report in `_prr-output/reviews/` |
|
|
287
|
-
| `PC` | Post Comments | Post inline
|
|
288
|
-
| `
|
|
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 |
|
|
289
295
|
| `CL` | Clear | Remove context files and/or review reports from output folder |
|
|
290
296
|
| `HH` | Help | Show this guide |
|
|
291
297
|
|
|
@@ -316,7 +322,7 @@ Enter PR number → base and head resolved automatically.
|
|
|
316
322
|
| PRR Master | `/prr-master` | Orchestrator — routes all workflows, full menu |
|
|
317
323
|
| PRR Quick | `/prr-quick` | One-command full pipeline (select → review → report) |
|
|
318
324
|
|
|
319
|
-
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.
|
|
320
326
|
|
|
321
327
|
## Reviewers at a Glance
|
|
322
328
|
|
|
@@ -343,7 +349,10 @@ All findings use a standard format:
|
|
|
343
349
|
|
|
344
350
|
## Context Collection
|
|
345
351
|
|
|
346
|
-
|
|
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:
|
|
347
356
|
|
|
348
357
|
1. Analyzes changed files to detect domains (`authentication`, `state-management`, etc.)
|
|
349
358
|
2. Reads relevant config files (`.eslintrc`, `.prettierrc`, `tsconfig.json`) and standards docs (`CONTRIBUTING.md`, `ARCHITECTURE.md`)
|
|
@@ -367,7 +376,7 @@ When `[PC] Post Comments` is run with `platform_repo` configured, it posts findi
|
|
|
367
376
|
|
|
368
377
|
## Supported IDEs
|
|
369
378
|
|
|
370
|
-
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
|
|
371
380
|
|
|
372
381
|
## Requirements
|
|
373
382
|
|
|
@@ -394,10 +403,12 @@ prr-kit/
|
|
|
394
403
|
│ ├── core/
|
|
395
404
|
│ │ ├── agents/
|
|
396
405
|
│ │ │ └── prr-master.agent.yaml # Master orchestrator + menu
|
|
397
|
-
│ │
|
|
398
|
-
│ │
|
|
399
|
-
│ │
|
|
400
|
-
│ │
|
|
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
|
|
401
412
|
│ └── prr/
|
|
402
413
|
│ ├── agents/ # Specialist reviewer agents (GR SR PR AR)
|
|
403
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"
|
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
|
|
|
@@ -37,4 +38,5 @@ Use `/prr-help` anytime for guidance on what to do.
|
|
|
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.
|
|
40
42
|
- **[CL] Clear** — Delete one or more past review session folders. Choose specific sessions or clear all.
|
|
@@ -15,10 +15,17 @@ It contains stack-specific rules, ESLint/linting rules, project guidelines (CLAU
|
|
|
15
15
|
|
|
16
16
|
If no knowledge base exists (DP was not run), proceed with local context only — do not block.
|
|
17
17
|
|
|
18
|
-
**Read `user_instructions
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
18
|
+
**Read `user_instructions`** from the knowledge base:
|
|
19
|
+
|
|
20
|
+
- **`review_scope`**: determines active reviewers
|
|
21
|
+
- If `"all"` (or knowledge base missing) → all 5 reviewers are active.
|
|
22
|
+
- If a list (e.g. `[SR, AR]`) → only activate reviewers matching those codes:
|
|
23
|
+
`GR` = Alex · `SR` = Sam · `PR` = Petra · `AR` = Arch · `BR` = Biz
|
|
24
|
+
|
|
25
|
+
- **`focus_areas`** / **`custom_requirements`** / **`context_notes`**: if `user_instructions.provided` is true, store these in working context — all active reviewers will apply them in step 2:
|
|
26
|
+
- `focus_areas` → each reviewer must prioritize these areas above their default checklist
|
|
27
|
+
- `custom_requirements` → treat as mandatory checks (prefix each with "MANDATORY:")
|
|
28
|
+
- `context_notes` → background info explaining trade-offs or constraints; do not flag issues the user has explicitly accepted
|
|
22
29
|
|
|
23
30
|
### 2. Introduce Party Mode
|
|
24
31
|
|
|
@@ -9,9 +9,14 @@ description: "Run the multi-reviewer discussion and compile unified findings"
|
|
|
9
9
|
|
|
10
10
|
> **Active reviewers only.** Read the active reviewer list from step 1 (determined by `user_instructions.review_scope`). Skip any reviewer section below whose code is not in the active list. Only active reviewers speak and produce findings.
|
|
11
11
|
|
|
12
|
+
> **User instructions (if `user_instructions.provided` is true):** Before each reviewer begins, they must:
|
|
13
|
+
> 1. Prioritize any `focus_areas` above their default checklist
|
|
14
|
+
> 2. Include all `custom_requirements` as mandatory checks (prefix each finding with "MANDATORY:")
|
|
15
|
+
> 3. Use `context_notes` as background — do not flag issues the user explicitly accepted as trade-offs
|
|
16
|
+
|
|
12
17
|
### 1. Round 1 — Each Reviewer's Initial Take
|
|
13
18
|
|
|
14
|
-
Go through the diff once per reviewer. Each reviewer applies rules from the PR knowledge base loaded in step 1
|
|
19
|
+
Go through the diff once per reviewer. Each reviewer applies rules from the PR knowledge base loaded in step 1, applies `user_instructions` (focus areas, mandatory requirements, context notes), and uses their domain expertise.
|
|
15
20
|
|
|
16
21
|
---
|
|
17
22
|
|
|
@@ -43,7 +43,10 @@ Create the folder:
|
|
|
43
43
|
mkdir -p "{session_output}"
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
**Store
|
|
46
|
+
**Store in working context** — all subsequent workflows in this session will use these values:
|
|
47
|
+
- `session_output` = computed above
|
|
48
|
+
- `target_branch` = `selected_branch` ← canonical name used by all downstream workflows
|
|
49
|
+
- `base_branch`, `diff_range`, `pr_number`, `pr_title`, `pr_author`, `pr_body`, `pr_head_sha`, `active_platform`, `platform_repo` = from step 3
|
|
47
50
|
|
|
48
51
|
### 0b. Generate Diffs Folder
|
|
49
52
|
|
package/src/prr/workflows/2-analyze/collect-pr-context/steps/step-04-build-knowledge-base.md
CHANGED
|
@@ -16,7 +16,18 @@ Transform collected data into structured knowledge base optimized for reviewers.
|
|
|
16
16
|
🧠 Building PR-specific knowledge base...
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
### 2.
|
|
19
|
+
### 2. Map `manual_context` → `user_instructions`
|
|
20
|
+
|
|
21
|
+
Using the `manual_context` variable set in step-03:
|
|
22
|
+
|
|
23
|
+
- **If `manual_context` is null** (user skipped): set `user_instructions.provided = false`, all other fields `null`.
|
|
24
|
+
- **If `manual_context` is not null** (user provided text): set `user_instructions.provided = true`, `raw = manual_context`, then parse the free-form text:
|
|
25
|
+
- `review_scope` — look for scope signals ("only SR", "skip performance", "security and architecture"). Default `"all"` if none found.
|
|
26
|
+
- `focus_areas` — extract specific things to prioritize (e.g. "focus on JWT handling" → `["JWT handling"]`). `null` if none.
|
|
27
|
+
- `custom_requirements` — extract mandatory checks the user stated (e.g. "all endpoints must have auth middleware"). `null` if none.
|
|
28
|
+
- `context_notes` — extract background info, trade-offs, constraints. `null` if none.
|
|
29
|
+
|
|
30
|
+
### 3. Create Knowledge Base Structure
|
|
20
31
|
|
|
21
32
|
Build YAML structure with all collected context:
|
|
22
33
|
|
|
@@ -288,6 +299,11 @@ reviewer_guidance:
|
|
|
288
299
|
- "Check Pinia setup function style (not Options API)"
|
|
289
300
|
- "Verify SRP adherence"
|
|
290
301
|
|
|
302
|
+
business_review:
|
|
303
|
+
- "Verify feature matches acceptance criteria"
|
|
304
|
+
- "Check for user-facing regressions"
|
|
305
|
+
- "Flag missing observability (logging, metrics) for new flows"
|
|
306
|
+
|
|
291
307
|
context_sources:
|
|
292
308
|
# Track what sources were used
|
|
293
309
|
primary_docs: [CLAUDE.md, AGENTS.md]
|
|
@@ -344,4 +360,4 @@ Review workflows (GR, SR, PR, AR, BR) find the knowledge base via working contex
|
|
|
344
360
|
|
|
345
361
|
### 7. Workflow Complete
|
|
346
362
|
|
|
347
|
-
Mark workflow as complete. Context is ready for use by review workflows (GR, SR, PR, AR).
|
|
363
|
+
Mark workflow as complete. Context is ready for use by review workflows (GR, SR, PR, AR, BR, IC).
|
|
@@ -26,8 +26,10 @@ output_file: "{session_output}/pr-context.yaml"
|
|
|
26
26
|
|
|
27
27
|
## WHEN TO RUN
|
|
28
28
|
|
|
29
|
-
**
|
|
30
|
-
|
|
29
|
+
**In [QR] Quick Review:** runs automatically as Phase 2.5 — no manual step needed.
|
|
30
|
+
|
|
31
|
+
**In standalone mode:** run manually after [DP] Describe PR and before starting any review workflow (GR/SR/PR/AR/BR).
|
|
32
|
+
The master agent will remind you to run context collection if you attempt to start a review without it.
|
|
31
33
|
|
|
32
34
|
## CONTEXT SOURCES
|
|
33
35
|
|
|
@@ -44,6 +44,11 @@ Summary:
|
|
|
44
44
|
|
|
45
45
|
Recommended next steps:
|
|
46
46
|
{recommended_reviews}
|
|
47
|
+
|
|
48
|
+
💡 Before reviewing: run [CC] Collect Context to build a fresh PR-specific knowledge base.
|
|
49
|
+
Reviews use this context to apply your project's rules, stack-specific guidelines, and any
|
|
50
|
+
external sources (Jira, Confluence, Figma) — skipping it means reviewers work with
|
|
51
|
+
general rules only.
|
|
47
52
|
```
|
|
48
53
|
|
|
49
54
|
Workflow complete. Return to agent menu.
|
|
@@ -98,7 +98,7 @@ Context: Loaded architectural patterns & ADRs from project docs
|
|
|
98
98
|
</step>
|
|
99
99
|
|
|
100
100
|
<step n="7" goal="Compile and write findings">
|
|
101
|
-
<action>Group findings: Layer Violations | Coupling Issues | Consistency Problems | SOLID Violations | ❓ Questions for Author</action>
|
|
101
|
+
<action>Group findings: Layer Violations | Coupling Issues | Consistency Problems | Blast Radius & Breaking Changes | SOLID Violations | ❓ Questions for Author</action>
|
|
102
102
|
<action>For each finding: reference the EXISTING pattern that should be followed instead</action>
|
|
103
103
|
<action>Write findings to {output_file}</action>
|
|
104
104
|
<action>Update {pr_context}: add 'architecture-review' to completed list</action>
|
|
@@ -14,5 +14,5 @@ installed_path: "{project-root}/_prr/prr/workflows/3-review/business-review"
|
|
|
14
14
|
instructions: "{installed_path}/instructions.xml"
|
|
15
15
|
validation: "{installed_path}/checklist.md"
|
|
16
16
|
|
|
17
|
-
pr_context: "working-context:target_branch,base_branch,pr_number,pr_knowledge_base"
|
|
17
|
+
pr_context: "working-context:target_branch,base_branch,pr_number,pr_knowledge_base,pr_type,completed_reviews"
|
|
18
18
|
output_file: "{session_output}/business-review.md"
|
|
@@ -41,6 +41,12 @@ From each file, extract all findings with their:
|
|
|
41
41
|
- `🟢` or `Low` → Suggestion
|
|
42
42
|
- `❓` → Question (collect separately — do not count as blocker/warning/suggestion)
|
|
43
43
|
|
|
44
|
+
**Special handling — `improve-code.md`:**
|
|
45
|
+
The improve-code output uses `[CATEGORY]` format (`[BUGS]`, `[QUALITY]`, `[PERFORMANCE]`, `[BEST-PRACTICES]`), not severity emojis. Treat improve-code findings as a separate collection:
|
|
46
|
+
- Do NOT mix them into the Blockers/Warnings/Suggestions counts
|
|
47
|
+
- Include them in the report's **💡 Code Improvement Suggestions** section (see template)
|
|
48
|
+
- Map `[BUGS]` → 🔴 only if the improve-code entry describes an actual bug that could cause incorrect behavior; otherwise keep as 💡 Improvement
|
|
49
|
+
|
|
44
50
|
### 4. Count Statistics
|
|
45
51
|
|
|
46
52
|
Count:
|
|
@@ -54,6 +54,19 @@ Store as `{commit_sha}`.
|
|
|
54
54
|
|
|
55
55
|
### 3. Load Review Report
|
|
56
56
|
|
|
57
|
+
Check that `{session_output}/final-review.md` exists:
|
|
58
|
+
```bash
|
|
59
|
+
ls "{session_output}/final-review.md"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
If it does NOT exist:
|
|
63
|
+
```
|
|
64
|
+
❌ No report found at {session_output}/final-review.md
|
|
65
|
+
Run [RR] Generate Report first to compile all findings into a report,
|
|
66
|
+
then run [PC] Post Comments to post them.
|
|
67
|
+
```
|
|
68
|
+
Stop workflow.
|
|
69
|
+
|
|
57
70
|
Read the report at `{session_output}/final-review.md`.
|
|
58
71
|
|
|
59
72
|
### 4. Parse All Findings
|
|
@@ -74,21 +74,40 @@ done
|
|
|
74
74
|
---
|
|
75
75
|
|
|
76
76
|
**Bitbucket:**
|
|
77
|
+
|
|
78
|
+
**⚠️ Do NOT embed `$(cat ...)` in curl `-d` — the summary body contains emojis and backticks that will break shell expansion.**
|
|
79
|
+
|
|
80
|
+
Use the runtime script approach to build the summary payload first:
|
|
81
|
+
|
|
82
|
+
Write `{temp_dir}/build-bb-summary.mjs` (or `.py`) using the Write tool:
|
|
83
|
+
|
|
84
|
+
```js
|
|
85
|
+
// Node.js
|
|
86
|
+
import { readFileSync, writeFileSync } from 'fs'
|
|
87
|
+
const body = readFileSync("{temp_dir}/prr-summary.md", "utf-8")
|
|
88
|
+
const payload = { content: { raw: body } }
|
|
89
|
+
writeFileSync("{temp_dir}/prr-bb-summary.json", JSON.stringify(payload, null, 2), "utf-8")
|
|
90
|
+
console.log("OK: summary payload written")
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Execute: `node "{temp_dir}/build-bb-summary.mjs"`
|
|
94
|
+
|
|
95
|
+
Then post using `--data @`:
|
|
77
96
|
```bash
|
|
78
97
|
# Post summary
|
|
79
98
|
curl -s -X POST \
|
|
80
99
|
"https://api.bitbucket.org/2.0/repositories/{platform_repo}/pullrequests/{pr_number}/comments" \
|
|
81
100
|
-H "Authorization: Bearer {BB_TOKEN}" \
|
|
82
101
|
-H "Content-Type: application/json" \
|
|
83
|
-
|
|
102
|
+
--data "@{temp_dir}/prr-bb-summary.json"
|
|
84
103
|
|
|
85
104
|
# Post each inline comment
|
|
86
|
-
for payload in "{temp_dir}/prr-bb-"*.json; do
|
|
105
|
+
for payload in "{temp_dir}/prr-bb-"[0-9]*.json; do
|
|
87
106
|
curl -s -X POST \
|
|
88
107
|
"https://api.bitbucket.org/2.0/repositories/{platform_repo}/pullrequests/{pr_number}/comments" \
|
|
89
108
|
-H "Authorization: Bearer {BB_TOKEN}" \
|
|
90
109
|
-H "Content-Type: application/json" \
|
|
91
|
-
|
|
110
|
+
--data "@$payload"
|
|
92
111
|
done
|
|
93
112
|
```
|
|
94
113
|
|
|
@@ -146,8 +165,12 @@ rm -f "{temp_dir}/prr-payload.json" \
|
|
|
146
165
|
"{temp_dir}/prr-summary.md" \
|
|
147
166
|
"{temp_dir}/prr-thread-"*.json \
|
|
148
167
|
"{temp_dir}/prr-bb-"*.json \
|
|
168
|
+
"{temp_dir}/prr-bb-summary.json" \
|
|
149
169
|
"{temp_dir}/build-payload.mjs" \
|
|
150
|
-
"{temp_dir}/build-payload.py"
|
|
170
|
+
"{temp_dir}/build-payload.py" \
|
|
171
|
+
"{temp_dir}/build-bb-summary.mjs" \
|
|
172
|
+
"{temp_dir}/build-bb-summary.py"
|
|
173
|
+
rmdir "{temp_dir}" 2>/dev/null || true
|
|
151
174
|
```
|
|
152
175
|
|
|
153
176
|
---
|
|
@@ -238,6 +238,12 @@ Analyze the diff and classify as one of: `bugfix` | `feature` | `refactor` | `pe
|
|
|
238
238
|
For each changed file, write a 1-2 sentence summary of what changed and why.
|
|
239
239
|
Group by: new files | modified files | deleted files | renamed files.
|
|
240
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
|
+
|
|
241
247
|
### 2c. Output description
|
|
242
248
|
Print to screen:
|
|
243
249
|
```
|
|
@@ -249,8 +255,13 @@ Print to screen:
|
|
|
249
255
|
|
|
250
256
|
### Files Changed
|
|
251
257
|
{walkthrough table}
|
|
258
|
+
|
|
259
|
+
{impact_map}
|
|
252
260
|
```
|
|
253
261
|
|
|
262
|
+
Write description to file: `{session_output}/pr-description.md`
|
|
263
|
+
Store `pr_type` and `risk_level` in working context.
|
|
264
|
+
|
|
254
265
|
---
|
|
255
266
|
|
|
256
267
|
## PHASE 2.5 — COLLECT PR-SPECIFIC CONTEXT
|
|
@@ -268,14 +279,12 @@ On completion, store `pr_knowledge_base` = path to the generated context file.
|
|
|
268
279
|
## PHASE 3 — REVIEW
|
|
269
280
|
*Execute all review types automatically, one by one.*
|
|
270
281
|
|
|
271
|
-
**Before each review,
|
|
272
|
-
- `
|
|
273
|
-
- `
|
|
274
|
-
- `
|
|
275
|
-
- `
|
|
276
|
-
- `
|
|
277
|
-
- `target_repo`, `communication_language` = from config
|
|
278
|
-
- `output_file` = per-review path defined below *(ensures findings are saved to disk for [RR] and [PC] later)*
|
|
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)*
|
|
279
288
|
|
|
280
289
|
**Scope gate:** Read `user_instructions.review_scope` from `{pr_knowledge_base}`.
|
|
281
290
|
- If `"all"` (or knowledge base missing) → run all reviews 3a–3e normally.
|
|
@@ -335,6 +344,7 @@ Count totals:
|
|
|
335
344
|
- `{blocker_count}` = number of 🔴 findings
|
|
336
345
|
- `{warning_count}` = number of 🟡 findings
|
|
337
346
|
- `{suggestion_count}` = number of 🟢 findings
|
|
347
|
+
- `{question_count}` = number of ❓ findings
|
|
338
348
|
|
|
339
349
|
Write report to: `{session_output}/final-review.md`
|
|
340
350
|
|
|
@@ -391,6 +401,7 @@ Report: {session_output}/final-review.md
|
|
|
391
401
|
🔴 Blockers: {blocker_count}
|
|
392
402
|
🟡 Warnings: {warning_count}
|
|
393
403
|
🟢 Suggestions: {suggestion_count}
|
|
404
|
+
❓ Questions: {question_count}
|
|
394
405
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
395
406
|
```
|
|
396
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"
|