prr-kit 2.0.5 → 2.0.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prr-kit",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
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": {
@@ -64,7 +64,13 @@ class Installer {
64
64
  await prompts.log.info(' ✓ Output directories created');
65
65
 
66
66
  // Update .gitignore
67
- await this.updateGitignore(projectDir, config.outputFolder || '_prr-output');
67
+ const ideGitignorePatterns = selectedIdes.flatMap((ide) =>
68
+ this.ideManager.getTargetDirs(ide).flatMap((dir) => [
69
+ `${dir}/prr-*`,
70
+ `${dir}/.prr-installed.json`,
71
+ ])
72
+ );
73
+ await this.updateGitignore(projectDir, config.outputFolder || '_prr-output', ideGitignorePatterns);
68
74
 
69
75
  // Generate manifests
70
76
  const cfgDir = path.join(prrDir, '_config');
@@ -138,9 +144,9 @@ class Installer {
138
144
  }
139
145
  }
140
146
 
141
- async updateGitignore(projectDir, outputFolder) {
147
+ async updateGitignore(projectDir, outputFolder, extraPatterns = []) {
142
148
  const gitignorePath = path.join(projectDir, '.gitignore');
143
- const entries = [`${PRR_FOLDER_NAME}/`, `${outputFolder}/`];
149
+ const entries = [`${PRR_FOLDER_NAME}/`, `${outputFolder}/`, ...extraPatterns];
144
150
 
145
151
  if (!(await fs.pathExists(gitignorePath))) return;
146
152
 
@@ -100,6 +100,10 @@ IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @{project-root}/${rel
100
100
  return { success: true, results: { agents: count, workflows: 0 } };
101
101
  }
102
102
 
103
+ getTargetDirs() {
104
+ return ['.codex/prompts'];
105
+ }
106
+
103
107
  async cleanup(projectDir) {
104
108
  for (const loc of ['global', 'project']) {
105
109
  const dir = this._getPromptDir(projectDir, loc);
@@ -208,6 +208,10 @@ Use \`#prr-\` in Copilot Chat to access PR Review prompts, or select agents from
208
208
  }
209
209
  }
210
210
 
211
+ getTargetDirs() {
212
+ return ['.github/agents', '.github/prompts'];
213
+ }
214
+
211
215
  async cleanup(projectDir, options = {}) {
212
216
  // Clean agents
213
217
  const agentsDir = path.join(projectDir, this.githubDir, this.agentsDir);
@@ -103,6 +103,10 @@ IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @{project-root}/${rel
103
103
  return { success: true, results: { agents: modeCount, workflows: wfCount } };
104
104
  }
105
105
 
106
+ getTargetDirs() {
107
+ return ['.kilocode/workflows'];
108
+ }
109
+
106
110
  async cleanup(projectDir) {
107
111
  // Remove prr- modes from .kilocodemodes
108
112
  const kiloModesPath = path.join(projectDir, this.configFile);
@@ -100,6 +100,21 @@ class IdeManager {
100
100
  return this.getAvailableIdes().filter((i) => i.preferred);
101
101
  }
102
102
 
103
+ getTargetDirs(ideName) {
104
+ const handler = this.handlers.get(ideName.toLowerCase());
105
+ if (!handler) return [];
106
+ if (typeof handler.getTargetDirs === 'function') return handler.getTargetDirs();
107
+ if (handler.installerConfig) {
108
+ if (handler.installerConfig.targets) {
109
+ return handler.installerConfig.targets.map((t) => t.target_dir);
110
+ }
111
+ if (handler.installerConfig.target_dir) {
112
+ return [handler.installerConfig.target_dir];
113
+ }
114
+ }
115
+ return [];
116
+ }
117
+
103
118
  async setup(ideName, projectDir, prrDir, options = {}) {
104
119
  await this.ensureInitialized();
105
120
  const handler = this.handlers.get(ideName.toLowerCase());