rpi-kit 2.2.0 → 2.2.2

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.
@@ -5,14 +5,14 @@
5
5
  },
6
6
  "metadata": {
7
7
  "description": "Research → Plan → Implement. 7-phase pipeline with 13 named agents, delta specs, party mode, and knowledge compounding.",
8
- "version": "2.2.0"
8
+ "version": "2.2.2"
9
9
  },
10
10
  "plugins": [
11
11
  {
12
12
  "name": "rpi-kit",
13
13
  "source": "./",
14
14
  "description": "Research → Plan → Implement. 7-phase pipeline with 13 named agents, delta specs, party mode, and knowledge compounding.",
15
- "version": "2.2.0",
15
+ "version": "2.2.2",
16
16
  "author": {
17
17
  "name": "Daniel Mendes"
18
18
  },
package/bin/cli.js CHANGED
@@ -102,18 +102,34 @@ function findInstalledPlugin() {
102
102
  ];
103
103
  for (const dir of searchDirs) {
104
104
  if (fs.existsSync(path.join(dir, ".claude-plugin", "plugin.json"))) {
105
- return dir;
105
+ return { dir, type: "git" };
106
106
  }
107
107
  }
108
+ // Check npm cache: ~/.claude/plugins/cache/rpi-kit/rpi-kit/{version}/
109
+ const cacheBase = path.join(home, ".claude", "plugins", "cache", "rpi-kit", "rpi-kit");
110
+ if (fs.existsSync(cacheBase)) {
111
+ try {
112
+ const versions = fs.readdirSync(cacheBase).filter(f => !f.startsWith("."));
113
+ if (versions.length > 0) {
114
+ // Pick the latest version directory
115
+ const latest = versions.sort().pop();
116
+ const dir = path.join(cacheBase, latest);
117
+ if (fs.existsSync(path.join(dir, ".claude-plugin", "plugin.json"))) {
118
+ return { dir, type: "npm" };
119
+ }
120
+ }
121
+ } catch {}
122
+ }
108
123
  // Glob fallback
109
124
  const pluginsRoot = path.join(home, ".claude", "plugins");
110
125
  if (fs.existsSync(pluginsRoot)) {
111
- const { execFileSync } = require("child_process");
112
126
  try {
113
- const result = execFileSync("find", [pluginsRoot, "-path", "*/rpi-kit/.claude-plugin/plugin.json", "-maxdepth", 5], { encoding: "utf8" }).trim();
127
+ const result = execFileSync("find", [pluginsRoot, "-path", "*/rpi-kit/.claude-plugin/plugin.json", "-maxdepth", 6], { encoding: "utf8" }).trim();
114
128
  if (result) {
115
129
  const pluginJson = result.split("\n")[0];
116
- return path.resolve(pluginJson, "..", "..");
130
+ const dir = path.resolve(pluginJson, "..", "..");
131
+ const isNpm = dir.includes(path.join("cache", "rpi-kit"));
132
+ return { dir, type: isNpm ? "npm" : "git" };
117
133
  }
118
134
  } catch {}
119
135
  }
@@ -121,21 +137,14 @@ function findInstalledPlugin() {
121
137
  }
122
138
 
123
139
  function updatePlugin() {
124
- const pluginDir = findInstalledPlugin();
125
- if (!pluginDir) {
140
+ const result = findInstalledPlugin();
141
+ if (!result) {
126
142
  log("RPIKit installation not found in ~/.claude/plugins/.");
127
143
  log("Install first: claude plugin install rpi-kit");
128
144
  return false;
129
145
  }
130
146
 
131
- const gitDir = path.join(pluginDir, ".git");
132
- if (!fs.existsSync(gitDir)) {
133
- log("Installed plugin has no .git directory — cannot update via git pull.");
134
- log("Re-install to enable updates:");
135
- log(" claude plugin remove rpi-kit");
136
- log(" claude plugin install git@github.com:dmend3z/rpi-kit.git");
137
- return false;
138
- }
147
+ const { dir: pluginDir, type: installType } = result;
139
148
 
140
149
  // Current version
141
150
  let currentVersion = "unknown";
@@ -144,6 +153,66 @@ function updatePlugin() {
144
153
  currentVersion = pj.version || "unknown";
145
154
  } catch {}
146
155
 
156
+ if (installType === "npm") {
157
+ return updateNpmPlugin(pluginDir, currentVersion);
158
+ }
159
+ return updateGitPlugin(pluginDir, currentVersion);
160
+ }
161
+
162
+ function updateNpmPlugin(pluginDir, currentVersion) {
163
+ log(`Current: v${currentVersion} (npm)`);
164
+ log("Checking for updates...");
165
+
166
+ // Check latest version on npm
167
+ const npmView = spawnSync("npm", ["view", "rpi-kit", "version"], { encoding: "utf8", stdio: "pipe" });
168
+ const latestVersion = (npmView.stdout || "").trim();
169
+
170
+ if (!latestVersion) {
171
+ log("Could not check npm for latest version.");
172
+ log("Update manually:");
173
+ log(" claude plugin remove rpi-kit && claude plugin install rpi-kit");
174
+ return false;
175
+ }
176
+
177
+ if (latestVersion === currentVersion) {
178
+ log(`Already up to date (v${currentVersion}).`);
179
+ return true;
180
+ }
181
+
182
+ log(`Update available: v${currentVersion} → v${latestVersion}`);
183
+ log("Updating...");
184
+
185
+ // Remove old version
186
+ const remove = spawnSync("claude", ["plugin", "remove", "rpi-kit"], { encoding: "utf8", stdio: "pipe" });
187
+ if (remove.status !== 0) {
188
+ log("Could not remove current version. Update manually:");
189
+ log(" claude plugin remove rpi-kit && claude plugin install rpi-kit");
190
+ return false;
191
+ }
192
+
193
+ // Install new version
194
+ const install = spawnSync("claude", ["plugin", "install", "rpi-kit"], { encoding: "utf8", stdio: "pipe" });
195
+ if (install.status !== 0) {
196
+ log("Could not install new version. Install manually:");
197
+ log(" claude plugin install rpi-kit");
198
+ return false;
199
+ }
200
+
201
+ log(`\nv${currentVersion} → v${latestVersion}\n`);
202
+ log("Restart Claude Code to load the new version.");
203
+ return true;
204
+ }
205
+
206
+ function updateGitPlugin(pluginDir, currentVersion) {
207
+ const gitDir = path.join(pluginDir, ".git");
208
+ if (!fs.existsSync(gitDir)) {
209
+ log("Installed plugin has no .git directory — cannot update via git pull.");
210
+ log("Re-install to enable updates:");
211
+ log(" claude plugin remove rpi-kit");
212
+ log(" claude plugin install rpi-kit");
213
+ return false;
214
+ }
215
+
147
216
  const currentCommit = spawnSync("git", ["-C", pluginDir, "rev-parse", "--short", "HEAD"], { encoding: "utf8" });
148
217
  const oldCommit = (currentCommit.stdout || "").trim();
149
218
 
@@ -226,7 +295,7 @@ Usage:
226
295
  rpi-kit onboarding Interactive walkthrough of the workflow
227
296
  rpi-kit help Show this help
228
297
 
229
- Commands (15):
298
+ Commands (17):
230
299
  /rpi:new <feature> Describe your feature → REQUEST.md
231
300
  /rpi:research <feature> Parallel agent analysis → RESEARCH.md
232
301
  /rpi:plan <feature> Generate specs + tasks → PLAN.md
@@ -243,6 +312,8 @@ Commands (15):
243
312
  /rpi:learn [description] Capture a solution to knowledge base
244
313
  /rpi:archive <feature> Archive a completed feature
245
314
  /rpi:party Multi-agent debate on any topic
315
+ /rpi:docs-gen Generate CLAUDE.md from codebase analysis
316
+ /rpi:evolve [--quick] Product evolution analysis with health score
246
317
 
247
318
  Agents (13):
248
319
  Luna (Analyst) · Atlas (Explorer) · Scout (Researcher) · Nexus (Synthesizer)
package/marketplace.json CHANGED
@@ -5,14 +5,14 @@
5
5
  },
6
6
  "metadata": {
7
7
  "description": "Research → Plan → Implement. 7-phase pipeline with 13 named agents, delta specs, party mode, and knowledge compounding.",
8
- "version": "2.1.1"
8
+ "version": "2.2.2"
9
9
  },
10
10
  "plugins": [
11
11
  {
12
12
  "name": "rpi-kit",
13
13
  "source": "./",
14
14
  "description": "Research → Plan → Implement. 7-phase pipeline with 13 named agents, delta specs, party mode, and knowledge compounding.",
15
- "version": "2.1.1",
15
+ "version": "2.2.2",
16
16
  "author": {
17
17
  "name": "Daniel Mendes"
18
18
  },
@@ -22,6 +22,8 @@
22
22
  "commands": [
23
23
  "./commands/rpi/archive.md",
24
24
  "./commands/rpi/docs.md",
25
+ "./commands/rpi/docs-gen.md",
26
+ "./commands/rpi/evolve.md",
25
27
  "./commands/rpi/implement.md",
26
28
  "./commands/rpi/init.md",
27
29
  "./commands/rpi/learn.md",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rpi-kit",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "Research → Plan → Implement. AI-assisted feature development with 13 named agents, delta specs, and knowledge compounding.",
5
5
  "license": "MIT",
6
6
  "author": "Daniel Mendes",