prr-kit 2.0.1 → 2.0.3

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 CHANGED
@@ -178,7 +178,7 @@ The framework installs into your project as a `_prr/` folder. Agents and workflo
178
178
 
179
179
  ## Configuration
180
180
 
181
- The installer handles configuration interactively — no manual file editing required. During `npx prr-kit install`, you'll be prompted for your name, language, output folder, target repo, and platform.
181
+ The installer handles configuration interactively — no manual file editing required. During `npx prr-kit install`, you'll be prompted for your name, language, and output folder. Platform, repo, and target directory are auto-detected from your git remote.
182
182
 
183
183
  All values are written to `_prr/prr/config.yaml`. Full schema overview:
184
184
 
@@ -189,12 +189,6 @@ communication_language: English # Any language: English | Vietnamese | Ja
189
189
 
190
190
  # ─── Project ───────────────────────────────────────────────────────────────
191
191
  project_name: my-project # Display name in reports (cosmetic only)
192
- target_repo: . # Path to git repo (. = current dir, or ../other-repo)
193
-
194
- # ─── Platform ──────────────────────────────────────────────────────────────
195
- platform: auto # auto | github | gitlab | azure | bitbucket | none
196
- platform_repo: "owner/repo" # owner/repo slug — required for PR listing + inline comments
197
- # leave blank for local-only mode (git diff only)
198
192
 
199
193
  # ─── Output ────────────────────────────────────────────────────────────────
200
194
  review_output: ./_prr-output/reviews # Where review reports + context files are written
@@ -297,14 +291,14 @@ Pauses **twice** for user input: once to select the PR/branch, once for review i
297
291
 
298
292
  ### Selecting a PR (SP step)
299
293
 
300
- **With `platform_repo` configured** — lists open PRs/MRs via platform CLI:
294
+ **When platform is detected** — lists open PRs/MRs via platform CLI:
301
295
  ```
302
296
  #45 "Add OAuth2 login" feature/oauth → main @alice 3h ago
303
297
  #44 "Fix memory leak" fix/memory → main @bob 1d ago
304
298
  ```
305
299
  Enter PR number → base and head resolved automatically.
306
300
 
307
- **Without `platform_repo`** — asks explicitly for both branches:
301
+ **When no platform detected (local mode)** — asks explicitly for both branches:
308
302
  ```
309
303
  🎯 Head branch (the branch to review)?
310
304
  • Enter a number from the list (e.g., 1)
@@ -365,7 +359,7 @@ Either way, the agent pauses once for your instructions before building the know
365
359
 
366
360
  ## Inline Code Comments
367
361
 
368
- When `[PC] Post Comments` is run with `platform_repo` configured, it posts findings as **inline code comments** on the exact file and line — the same experience as a human reviewer.
362
+ When `[PC] Post Comments` is run, it posts findings as **inline code comments** on the exact file and line — the same experience as a human reviewer. Platform and repo are auto-detected from your git remote.
369
363
 
370
364
  | Platform | Method | Required CLI |
371
365
  |----------|--------|-------------|
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prr-kit",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
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": {
@@ -7,11 +7,6 @@ communication_language: English # Language for all review output
7
7
 
8
8
  # ─── Project ───────────────────────────────────────────────────────────────
9
9
  project_name: my-project
10
- target_repo: . # Path to git repo (. = current directory)
11
-
12
- # ─── Platform ──────────────────────────────────────────────────────────────
13
- platform: github # auto | github | gitlab | azure | bitbucket | none
14
- platform_repo: "org/repo-name" # Used for gh pr list, gh pr view, etc.
15
10
 
16
11
  # ─── Output ────────────────────────────────────────────────────────────────
17
12
  review_output: ./_prr-output/reviews # Where review reports are written
@@ -13,21 +13,6 @@ project_name:
13
13
  default: "{directory_name}"
14
14
  result: "{value}"
15
15
 
16
- target_repo:
17
- prompt: "Path to the git repository to review? (relative or absolute, default: current directory)"
18
- default: "."
19
- result: "{value}"
20
-
21
- platform:
22
- prompt: "Git platform? (auto-detect, github, gitlab, azure, bitbucket, none)"
23
- default: "auto"
24
- result: "{value}"
25
-
26
- platform_repo:
27
- prompt: "Repository identifier for posting comments? Format: owner/repo (GitHub/GitLab/Bitbucket) or org/project/repo (Azure). Leave blank to skip."
28
- default: ""
29
- result: "{value}"
30
-
31
16
  review_output:
32
17
  prompt: "Where should review reports be stored?"
33
18
  default: "{output_folder}/reviews"
@@ -18,7 +18,7 @@ nextStepFile: "./step-02-list-branches.md"
18
18
 
19
19
  ### 1. Detect Platform
20
20
 
21
- If `{platform}` is `auto` or empty, detect from the git remote URL:
21
+ Detect from the git remote URL:
22
22
 
23
23
  ```bash
24
24
  git -C {target_repo} remote get-url origin
@@ -46,7 +46,7 @@ mkdir -p "{session_output}"
46
46
  **Store in working context** — all subsequent workflows in this session will use these values:
47
47
  - `session_output` = computed above
48
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
49
+ - `base_branch`, `diff_range`, `pr_number`, `pr_title`, `pr_author`, `pr_body`, `pr_head_sha`, `active_platform`, `active_platform_repo` = from step 3
50
50
 
51
51
  ### 0b. Generate Diffs Folder
52
52
 
@@ -28,8 +28,10 @@ This uses **step-file architecture** with sequential orchestration:
28
28
  ## INITIALIZATION
29
29
 
30
30
  Load config from `{main_config}` and resolve:
31
- - `project_name`, `target_repo`, `user_name`, `communication_language`
32
- - `review_output`, `platform_repo`, `date` (system-generated)
31
+ - `project_name`, `user_name`, `communication_language`
32
+ - `review_output`, `date` (system-generated)
33
+
34
+ Set `target_repo` = `.` (the repository containing this config file).
33
35
 
34
36
  ## EXECUTION
35
37
 
@@ -1,18 +1,18 @@
1
- name: architecture-review
2
- description: "Architecture-focused review: SOLID principles, layering, coupling, codebase consistency, etc. — adapted to your architecture"
3
- author: "PR Review Kit"
4
-
5
- config_source: "{project-root}/_prr/prr/config.yaml"
6
- user_name: "{config_source}:user_name"
7
- communication_language: "{config_source}:communication_language"
8
- target_repo: "{config_source}:target_repo"
9
- review_output: "{config_source}:review_output"
10
- session_output: "working-context:session_output || latest-session-folder-in:{review_output}"
11
- date: system-generated
12
-
13
- installed_path: "{project-root}/_prr/prr/workflows/3-review/architecture-review"
14
- instructions: "{installed_path}/instructions.xml"
15
- validation: "{installed_path}/checklist.md"
16
-
17
- pr_context: "working-context:target_branch,base_branch,pr_number,pr_knowledge_base"
18
- output_file: "{session_output}/architecture-review.md"
1
+ name: architecture-review
2
+ description: "Architecture-focused review: SOLID principles, layering, coupling, codebase consistency, etc. — adapted to your architecture"
3
+ author: "PR Review Kit"
4
+
5
+ config_source: "{project-root}/_prr/prr/config.yaml"
6
+ user_name: "{config_source}:user_name"
7
+ communication_language: "{config_source}:communication_language"
8
+ target_repo: "."
9
+ review_output: "{config_source}:review_output"
10
+ session_output: "working-context:session_output || latest-session-folder-in:{review_output}"
11
+ date: system-generated
12
+
13
+ installed_path: "{project-root}/_prr/prr/workflows/3-review/architecture-review"
14
+ instructions: "{installed_path}/instructions.xml"
15
+ validation: "{installed_path}/checklist.md"
16
+
17
+ pr_context: "working-context:target_branch,base_branch,pr_number,pr_knowledge_base"
18
+ output_file: "{session_output}/architecture-review.md"
@@ -1,18 +1,18 @@
1
- name: business-review
2
- description: "Business impact review: user impact, business risk, feature completeness, data safety, observability — adapted to your project"
3
- author: "PR Review Kit"
4
-
5
- config_source: "{project-root}/_prr/prr/config.yaml"
6
- user_name: "{config_source}:user_name"
7
- communication_language: "{config_source}:communication_language"
8
- target_repo: "{config_source}:target_repo"
9
- review_output: "{config_source}:review_output"
10
- session_output: "working-context:session_output || latest-session-folder-in:{review_output}"
11
- date: system-generated
12
-
13
- installed_path: "{project-root}/_prr/prr/workflows/3-review/business-review"
14
- instructions: "{installed_path}/instructions.xml"
15
- validation: "{installed_path}/checklist.md"
16
-
17
- pr_context: "working-context:target_branch,base_branch,pr_number,pr_knowledge_base,pr_type,completed_reviews"
18
- output_file: "{session_output}/business-review.md"
1
+ name: business-review
2
+ description: "Business impact review: user impact, business risk, feature completeness, data safety, observability — adapted to your project"
3
+ author: "PR Review Kit"
4
+
5
+ config_source: "{project-root}/_prr/prr/config.yaml"
6
+ user_name: "{config_source}:user_name"
7
+ communication_language: "{config_source}:communication_language"
8
+ target_repo: "."
9
+ review_output: "{config_source}:review_output"
10
+ session_output: "working-context:session_output || latest-session-folder-in:{review_output}"
11
+ date: system-generated
12
+
13
+ installed_path: "{project-root}/_prr/prr/workflows/3-review/business-review"
14
+ instructions: "{installed_path}/instructions.xml"
15
+ validation: "{installed_path}/checklist.md"
16
+
17
+ pr_context: "working-context:target_branch,base_branch,pr_number,pr_knowledge_base,pr_type,completed_reviews"
18
+ output_file: "{session_output}/business-review.md"
@@ -1,18 +1,18 @@
1
- name: general-review
2
- description: "General code quality review: logic, naming, readability, error handling, DRY, test coverage, etc. — adapted to your stack"
3
- author: "PR Review Kit"
4
-
5
- config_source: "{project-root}/_prr/prr/config.yaml"
6
- user_name: "{config_source}:user_name"
7
- communication_language: "{config_source}:communication_language"
8
- target_repo: "{config_source}:target_repo"
9
- review_output: "{config_source}:review_output"
10
- session_output: "working-context:session_output || latest-session-folder-in:{review_output}"
11
- date: system-generated
12
-
13
- installed_path: "{project-root}/_prr/prr/workflows/3-review/general-review"
14
- instructions: "{installed_path}/instructions.xml"
15
- validation: "{installed_path}/checklist.md"
16
-
17
- pr_context: "working-context:target_branch,base_branch,pr_number,pr_knowledge_base"
18
- output_file: "{session_output}/general-review.md"
1
+ name: general-review
2
+ description: "General code quality review: logic, naming, readability, error handling, DRY, test coverage, etc. — adapted to your stack"
3
+ author: "PR Review Kit"
4
+
5
+ config_source: "{project-root}/_prr/prr/config.yaml"
6
+ user_name: "{config_source}:user_name"
7
+ communication_language: "{config_source}:communication_language"
8
+ target_repo: "."
9
+ review_output: "{config_source}:review_output"
10
+ session_output: "working-context:session_output || latest-session-folder-in:{review_output}"
11
+ date: system-generated
12
+
13
+ installed_path: "{project-root}/_prr/prr/workflows/3-review/general-review"
14
+ instructions: "{installed_path}/instructions.xml"
15
+ validation: "{installed_path}/checklist.md"
16
+
17
+ pr_context: "working-context:target_branch,base_branch,pr_number,pr_knowledge_base"
18
+ output_file: "{session_output}/general-review.md"
@@ -1,18 +1,18 @@
1
- name: performance-review
2
- description: "Performance-focused code review: N+1 queries, memory leaks, async patterns, bundle size, caching, etc. — adapted to your stack"
3
- author: "PR Review Kit"
4
-
5
- config_source: "{project-root}/_prr/prr/config.yaml"
6
- user_name: "{config_source}:user_name"
7
- communication_language: "{config_source}:communication_language"
8
- target_repo: "{config_source}:target_repo"
9
- review_output: "{config_source}:review_output"
10
- session_output: "working-context:session_output || latest-session-folder-in:{review_output}"
11
- date: system-generated
12
-
13
- installed_path: "{project-root}/_prr/prr/workflows/3-review/performance-review"
14
- instructions: "{installed_path}/instructions.xml"
15
- validation: "{installed_path}/checklist.md"
16
-
17
- pr_context: "working-context:target_branch,base_branch,pr_number,pr_knowledge_base"
18
- output_file: "{session_output}/performance-review.md"
1
+ name: performance-review
2
+ description: "Performance-focused code review: N+1 queries, memory leaks, async patterns, bundle size, caching, etc. — adapted to your stack"
3
+ author: "PR Review Kit"
4
+
5
+ config_source: "{project-root}/_prr/prr/config.yaml"
6
+ user_name: "{config_source}:user_name"
7
+ communication_language: "{config_source}:communication_language"
8
+ target_repo: "."
9
+ review_output: "{config_source}:review_output"
10
+ session_output: "working-context:session_output || latest-session-folder-in:{review_output}"
11
+ date: system-generated
12
+
13
+ installed_path: "{project-root}/_prr/prr/workflows/3-review/performance-review"
14
+ instructions: "{installed_path}/instructions.xml"
15
+ validation: "{installed_path}/checklist.md"
16
+
17
+ pr_context: "working-context:target_branch,base_branch,pr_number,pr_knowledge_base"
18
+ output_file: "{session_output}/performance-review.md"
@@ -1,19 +1,19 @@
1
- name: security-review
2
- description: "Security-focused code review: OWASP top 10, injection, auth, secrets, dependencies, etc. — adapted to your project"
3
- author: "PR Review Kit"
4
-
5
- config_source: "{project-root}/_prr/prr/config.yaml"
6
- user_name: "{config_source}:user_name"
7
- communication_language: "{config_source}:communication_language"
8
- target_repo: "{config_source}:target_repo"
9
- review_output: "{config_source}:review_output"
10
- session_output: "working-context:session_output || latest-session-folder-in:{review_output}"
11
- date: system-generated
12
-
13
- installed_path: "{project-root}/_prr/prr/workflows/3-review/security-review"
14
- instructions: "{installed_path}/instructions.xml"
15
- validation: "{installed_path}/checklist.md"
16
- owasp_data: "{installed_path}/data/owasp-checklist.csv"
17
-
18
- pr_context: "working-context:target_branch,base_branch,pr_number,pr_knowledge_base"
19
- output_file: "{session_output}/security-review.md"
1
+ name: security-review
2
+ description: "Security-focused code review: OWASP top 10, injection, auth, secrets, dependencies, etc. — adapted to your project"
3
+ author: "PR Review Kit"
4
+
5
+ config_source: "{project-root}/_prr/prr/config.yaml"
6
+ user_name: "{config_source}:user_name"
7
+ communication_language: "{config_source}:communication_language"
8
+ target_repo: "."
9
+ review_output: "{config_source}:review_output"
10
+ session_output: "working-context:session_output || latest-session-folder-in:{review_output}"
11
+ date: system-generated
12
+
13
+ installed_path: "{project-root}/_prr/prr/workflows/3-review/security-review"
14
+ instructions: "{installed_path}/instructions.xml"
15
+ validation: "{installed_path}/checklist.md"
16
+ owasp_data: "{installed_path}/data/owasp-checklist.csv"
17
+
18
+ pr_context: "working-context:target_branch,base_branch,pr_number,pr_knowledge_base"
19
+ output_file: "{session_output}/security-review.md"
@@ -1,18 +1,18 @@
1
- name: improve-code
2
- description: "Generate concrete inline code suggestions with before/after diffs — focused on actionable improvements"
3
- author: "PR Review Kit"
4
-
5
- config_source: "{project-root}/_prr/prr/config.yaml"
6
- user_name: "{config_source}:user_name"
7
- communication_language: "{config_source}:communication_language"
8
- target_repo: "{config_source}:target_repo"
9
- review_output: "{config_source}:review_output"
10
- session_output: "working-context:session_output || latest-session-folder-in:{review_output}"
11
- date: system-generated
12
-
13
- installed_path: "{project-root}/_prr/prr/workflows/4-improve/improve-code"
14
- instructions: "{installed_path}/instructions.xml"
15
- validation: "{installed_path}/checklist.md"
16
-
17
- pr_context: "working-context:target_branch,base_branch,pr_number,pr_knowledge_base"
18
- output_file: "{session_output}/improve-code.md"
1
+ name: improve-code
2
+ description: "Generate concrete inline code suggestions with before/after diffs — focused on actionable improvements"
3
+ author: "PR Review Kit"
4
+
5
+ config_source: "{project-root}/_prr/prr/config.yaml"
6
+ user_name: "{config_source}:user_name"
7
+ communication_language: "{config_source}:communication_language"
8
+ target_repo: "."
9
+ review_output: "{config_source}:review_output"
10
+ session_output: "working-context:session_output || latest-session-folder-in:{review_output}"
11
+ date: system-generated
12
+
13
+ installed_path: "{project-root}/_prr/prr/workflows/4-improve/improve-code"
14
+ instructions: "{installed_path}/instructions.xml"
15
+ validation: "{installed_path}/checklist.md"
16
+
17
+ pr_context: "working-context:target_branch,base_branch,pr_number,pr_knowledge_base"
18
+ output_file: "{session_output}/improve-code.md"
@@ -37,9 +37,8 @@ Depends on `{active_platform}`:
37
37
  ## INITIALIZATION
38
38
 
39
39
  Load config from `{main_config}`.
40
- Use `session_output`, `target_branch`, `base_branch`, `pr_number`, `active_platform` from working context.
40
+ Use `session_output`, `target_branch`, `base_branch`, `pr_number`, `active_platform`, `active_platform_repo` from working context.
41
41
  If `session_output` not set: prompt user to run [SS] Select Session or [SP] Select PR first.
42
- Use `{active_platform}` (or detect from `{platform}` config).
43
42
 
44
43
  Set `{temp_dir}` = `{session_output}/temp`.
45
44
  Create it if it doesn't exist:
@@ -11,8 +11,9 @@ Only pause for user input when selecting the branch. Everything else runs automa
11
11
 
12
12
  ## INITIALIZATION
13
13
 
14
- Load config from {main_config}: `user_name`, `communication_language`, `target_repo`, `review_output`, `auto_post_comment`.
14
+ Load config from {main_config}: `user_name`, `communication_language`, `review_output`, `auto_post_comment`.
15
15
 
16
+ Set `target_repo` = `.` (the repository containing this config file).
16
17
  Set `date` = today's date (YYYY-MM-DD).
17
18
 
18
19
  **Note:** Context will be collected dynamically in Phase 2.5 after describing the PR.
@@ -42,14 +43,14 @@ Map the remote URL to a platform:
42
43
 
43
44
  Set `{detected_platform}` = detected value.
44
45
 
45
- If `{platform_repo}` is empty, also extract `{detected_platform_repo}` from the URL:
46
+ Also extract `{detected_platform_repo}` from the URL:
46
47
  - GitHub/GitLab/Bitbucket: extract `owner/repo` (strip `.git` suffix)
47
48
  - Azure DevOps: extract `org/project/repo` from `dev.azure.com/{org}/{project}/_git/{repo}` or `{org}.visualstudio.com/{project}/_git/{repo}`
48
49
 
49
50
  Display:
50
51
  ```
51
52
  🔍 Platform detected: {detected_platform}
52
- Remote: {platform_repo or detected_platform_repo}
53
+ Remote: {detected_platform_repo}
53
54
  ```
54
55
 
55
56
  If platform cannot be detected, set `{detected_platform}` = `none` and continue.
@@ -68,29 +69,38 @@ git -C {target_repo} fetch origin --prune
68
69
 
69
70
  ### 1b. List open PRs/MRs (primary) + recent branches (secondary)
70
71
 
71
- **Primary Platform PRs/MRs** (if `{platform_repo}` is configured):
72
+ **Resolve active repo identifier** (before running any CLI):
73
+ - Set `{active_platform}` = `{detected_platform}`
74
+ - Set `{active_platform_repo}` = `{detected_platform_repo}`
72
75
 
73
- Use the appropriate command based on `{platform}` (or `{detected_platform}`):
76
+ For **Azure DevOps**, extract from `{active_platform_repo}` (format: `org/project/repo`):
77
+ - `{az_org}` = first segment → `{az_org}.visualstudio.com` as `{org_url}`
78
+ - `{az_project}` = second segment
79
+ - `{az_repo}` = third segment
80
+
81
+ **Primary — Platform PRs/MRs** (if `{active_platform_repo}` is available and `{active_platform}` ≠ `none`):
82
+
83
+ Use the appropriate command based on `{active_platform}`:
74
84
 
75
85
  **GitHub:**
76
86
  ```bash
77
- gh pr list --repo {platform_repo} --state open \
87
+ gh pr list --repo {active_platform_repo} --state open \
78
88
  --json number,title,headRefName,baseRefName,author,createdAt,isDraft --limit 20
79
89
  ```
80
90
 
81
91
  **GitLab:**
82
92
  ```bash
83
- glab mr list --repo {platform_repo} --state opened --output json
93
+ glab mr list --repo {active_platform_repo} --state opened --output json
84
94
  ```
85
95
 
86
96
  **Azure DevOps:**
87
97
  ```bash
88
- az repos pr list --repository {repo} --project {project} --org {org_url} --status active --output json
98
+ az repos pr list --repository {az_repo} --project {az_project} --org https://{org_url} --status active --output json
89
99
  ```
90
100
 
91
101
  **Bitbucket:**
92
102
  ```bash
93
- curl https://api.bitbucket.org/2.0/repositories/{platform_repo}/pullrequests?state=OPEN
103
+ curl https://api.bitbucket.org/2.0/repositories/{active_platform_repo}/pullrequests?state=OPEN
94
104
  ```
95
105
 
96
106
  Display as a table: `#N | title | head → base | author | age`
@@ -104,7 +114,7 @@ git -C {target_repo} branch -r --sort=-committerdate \
104
114
 
105
115
  ### 1c. Select PR/MR ← **ONLY USER INPUT IN THIS WORKFLOW**
106
116
 
107
- **If `{platform_repo}` is configured** — ask:
117
+ **If `{active_platform_repo}` is available and `{active_platform}` ≠ `none`** — ask:
108
118
  > Select a PR/MR to review:
109
119
  > Enter PR/MR number (e.g. `44`) or branch name (e.g. `feature/my-feature`):
110
120
 
@@ -114,7 +124,7 @@ Wait for response.
114
124
 
115
125
  **GitHub:**
116
126
  ```bash
117
- gh pr view {pr_number} --repo {platform_repo} \
127
+ gh pr view {pr_number} --repo {active_platform_repo} \
118
128
  --json number,title,headRefName,baseRefName,author,headRefOid
119
129
  ```
120
130
  Set `target_branch` = `headRefName`, `base_branch` = `baseRefName` ← **exact from platform, not assumed**.
@@ -122,20 +132,20 @@ Set `pr_head_sha` = `headRefOid`.
122
132
 
123
133
  **GitLab:**
124
134
  ```bash
125
- glab mr view {pr_number} --repo {platform_repo} --output json
135
+ glab mr view {pr_number} --repo {active_platform_repo} --output json
126
136
  ```
127
137
  Set `target_branch` = `source_branch`, `base_branch` = `target_branch`.
128
138
  Get head SHA: `git -C {target_repo} rev-parse origin/{target_branch}` → `pr_head_sha`.
129
139
 
130
140
  **Azure DevOps:**
131
141
  ```bash
132
- az repos pr show --id {pr_number} --output json
142
+ az repos pr show --id {pr_number} --org https://{org_url} --output json
133
143
  ```
134
144
  Set `target_branch` = `sourceRefName` (strip `refs/heads/`), `base_branch` = `targetRefName` (strip `refs/heads/`).
135
145
 
136
146
  **Bitbucket:**
137
147
  ```bash
138
- curl https://api.bitbucket.org/2.0/repositories/{platform_repo}/pullrequests/{pr_number}
148
+ curl https://api.bitbucket.org/2.0/repositories/{active_platform_repo}/pullrequests/{pr_number}
139
149
  ```
140
150
  Set `target_branch` = `source.branch.name`, `base_branch` = `destination.branch.name`.
141
151
 
@@ -144,7 +154,7 @@ Check if a PR/MR exists for it on the platform. If yes: use its base branch. If
144
154
 
145
155
  ---
146
156
 
147
- **If `{platform_repo}` is NOT configured** — ask two separate questions:
157
+ **If `{active_platform_repo}` is NOT available or `{active_platform}` = `none`** — ask two separate questions:
148
158
 
149
159
  First, display EXACTLY:
150
160
  ```
@@ -174,12 +184,12 @@ Use the first available method based on platform:
174
184
 
175
185
  **GitHub** (if `active_platform = github` and `pr_number` is set):
176
186
  ```bash
177
- gh pr diff {pr_number} --repo {platform_repo}
187
+ gh pr diff {pr_number} --repo {active_platform_repo}
178
188
  ```
179
189
 
180
190
  **GitLab** (if `active_platform = gitlab` and `pr_number` is set):
181
191
  ```bash
182
- glab mr diff {pr_number} --repo {platform_repo}
192
+ glab mr diff {pr_number} --repo {active_platform_repo}
183
193
  ```
184
194
 
185
195
  **Azure DevOps / Bitbucket / fallback:**
@@ -219,7 +229,7 @@ Create folder:
219
229
  mkdir -p "{session_output}"
220
230
  ```
221
231
 
222
- **Store in working context:** `session_output`, `target_branch`, `base_branch`, `pr_number`, `pr_title`, `active_platform`, `platform_repo`.
232
+ **Store in working context:** `session_output`, `target_branch`, `base_branch`, `pr_number`, `pr_title`, `active_platform`, `active_platform_repo`.
223
233
 
224
234
  ### 1f. Generate Diffs Folder
225
235
 
@@ -448,7 +458,7 @@ Report: {session_output}/final-review.md
448
458
 
449
459
  **If `auto_post_comment: false`** (default):
450
460
  → Ask:
451
- > Post these findings as inline comments to the PR/MR? (requires platform CLI and `platform_repo` configured)
461
+ > Post these findings as inline comments to the PR/MR? (requires platform CLI)
452
462
  > Supports: GitHub (`gh`), GitLab (`glab`), Azure DevOps (`az`), Bitbucket (API)
453
463
  > Type **PC** to post, or **Enter** to finish.
454
464
 
@@ -34,9 +34,6 @@ class ConfigCollector {
34
34
  const prrConfig = {
35
35
  ...coreConfig,
36
36
  project_name: config.projectName || path.basename(config.projectDir),
37
- target_repo: config.targetRepo || '.',
38
- platform: config.platform || 'auto',
39
- platform_repo: config.platformRepo || config.githubRepo || '',
40
37
  review_output: reviewOutput,
41
38
  };
42
39
  await fs.writeFile(prrConfigPath, yaml.stringify(prrConfig, { indent: 2 }), 'utf8');
@@ -63,6 +63,9 @@ class Installer {
63
63
  await fs.ensureDir(path.join(outputFolderAbs, 'reviews'));
64
64
  await prompts.log.info(' ✓ Output directories created');
65
65
 
66
+ // Update .gitignore
67
+ await this.updateGitignore(projectDir, config.outputFolder || '_prr-output');
68
+
66
69
  // Generate manifests
67
70
  const cfgDir = path.join(prrDir, '_config');
68
71
  await fs.ensureDir(cfgDir);
@@ -135,6 +138,23 @@ class Installer {
135
138
  }
136
139
  }
137
140
 
141
+ async updateGitignore(projectDir, outputFolder) {
142
+ const gitignorePath = path.join(projectDir, '.gitignore');
143
+ const entries = [`${PRR_FOLDER_NAME}/`, `${outputFolder}/`];
144
+
145
+ if (!(await fs.pathExists(gitignorePath))) return;
146
+
147
+ const content = await fs.readFile(gitignorePath, 'utf8');
148
+ const lines = content.split('\n').map((l) => l.trim());
149
+ const toAdd = entries.filter((e) => !lines.includes(e) && !lines.includes(e.replace(/\/$/, '')));
150
+
151
+ if (toAdd.length === 0) return;
152
+
153
+ const separator = content.endsWith('\n') ? '' : '\n';
154
+ await fs.appendFile(gitignorePath, `${separator}${toAdd.join('\n')}\n`, 'utf8');
155
+ await prompts.log.info(` ✓ .gitignore updated (${toAdd.join(', ')})`);
156
+ }
157
+
138
158
  async uninstall(projectDir) {
139
159
  const prrDir = path.join(projectDir, PRR_FOLDER_NAME);
140
160
  if (await fs.pathExists(prrDir)) {
@@ -156,7 +156,7 @@ ${body}
156
156
 
157
157
  - **User**: ${config.user_name || 'Dev'}
158
158
  - **Communication Language**: ${config.communication_language || 'English'}
159
- - **Target Repo**: ${config.target_repo || '.'}
159
+ - **Target Repo**: . (auto-detected)
160
160
  - **Output Folder**: ${config.output_folder || '_prr-output'}
161
161
  - **Review Output**: ${config.review_output || '_prr-output/reviews'}
162
162