rpi-kit 2.0.0 → 2.1.1

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
3
3
  "name": "rpi-kit",
4
- "version": "2.0.0",
4
+ "version": "2.1.0",
5
5
  "description": "Research → Plan → Implement. 7-phase pipeline with 13 named agents, delta specs, party mode, and knowledge compounding.",
6
6
  "owner": {
7
7
  "name": "Daniel Mendes"
@@ -11,7 +11,7 @@
11
11
  "name": "rpi-kit",
12
12
  "source": "./",
13
13
  "description": "Research → Plan → Implement. 7-phase pipeline with 13 named agents, delta specs, party mode, and knowledge compounding.",
14
- "version": "2.0.0",
14
+ "version": "2.1.0",
15
15
  "author": {
16
16
  "name": "Daniel Mendes"
17
17
  },
@@ -19,7 +19,7 @@
19
19
  "keywords": ["workflow", "research", "planning", "implementation", "agents", "delta-specs", "knowledge-compounding"],
20
20
  "category": "productivity",
21
21
  "agents": 13,
22
- "commands": 14,
22
+ "commands": 15,
23
23
  "skills": 2
24
24
  }
25
25
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rpi-kit",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Research → Plan → Implement. 7-phase pipeline with 13 named agents, delta specs, party mode, and knowledge compounding.",
5
5
  "author": {
6
6
  "name": "Daniel Mendes",
package/README.md CHANGED
@@ -50,6 +50,7 @@ Use `/rpi <feature>` to auto-detect the current phase and progress to the next o
50
50
  | `/rpi:party <topic>` | Multi-agent debate on any topic |
51
51
  | `/rpi:learn` | Save a solution or insight to the knowledge base |
52
52
  | `/rpi:archive <feature>` | Merge delta specs into `rpi/specs/` and clean up |
53
+ | `/rpi:update` | Update RPIKit plugin to the latest version |
53
54
  | `/rpi:onboarding` | Guided first-time setup with codebase analysis |
54
55
 
55
56
  ## Agents
package/bin/cli.js CHANGED
@@ -32,15 +32,36 @@ function hasGeminiCLI() {
32
32
 
33
33
  function installClaude() {
34
34
  log("Installing RPIKit for Claude Code...");
35
+
36
+ // 1. Ensure marketplace is registered
37
+ const listResult = spawnSync("claude", ["plugin", "marketplace", "list"], { encoding: "utf8", stdio: "pipe" });
38
+ const hasMarketplace = (listResult.stdout || "").includes("rpi-kit");
39
+
40
+ if (!hasMarketplace) {
41
+ log("Adding rpi-kit marketplace...");
42
+ try {
43
+ execFileSync("claude", ["plugin", "marketplace", "add", "dmend3z/rpi-kit"], {
44
+ stdio: silent ? "pipe" : "inherit",
45
+ });
46
+ } catch {
47
+ log("Could not add marketplace. Add manually:");
48
+ log(" claude plugin marketplace add dmend3z/rpi-kit");
49
+ return false;
50
+ }
51
+ }
52
+
53
+ // 2. Install plugin from marketplace
35
54
  try {
36
- execFileSync("claude", ["plugin", "install", PLUGIN_DIR], {
55
+ execFileSync("claude", ["plugin", "install", "rpi-kit"], {
37
56
  stdio: silent ? "pipe" : "inherit",
38
57
  });
39
58
  log("Claude Code: installed.");
40
59
  return true;
41
60
  } catch {
42
- log("Claude Code: could not register plugin automatically.");
43
- log(" Manual install: claude plugin install " + PLUGIN_DIR);
61
+ log("Claude Code: could not install plugin.");
62
+ log(" Manual install:");
63
+ log(" claude plugin marketplace add dmend3z/rpi-kit");
64
+ log(" claude plugin install rpi-kit");
44
65
  return false;
45
66
  }
46
67
  }
@@ -73,6 +94,107 @@ function installGeminiCLI() {
73
94
  return true;
74
95
  }
75
96
 
97
+ function findInstalledPlugin() {
98
+ const home = process.env.HOME || process.env.USERPROFILE;
99
+ const searchDirs = [
100
+ path.join(home, ".claude", "plugins", "marketplaces", "rpi-kit"),
101
+ path.join(home, ".claude", "plugins", "installed", "rpi-kit"),
102
+ ];
103
+ for (const dir of searchDirs) {
104
+ if (fs.existsSync(path.join(dir, ".claude-plugin", "plugin.json"))) {
105
+ return dir;
106
+ }
107
+ }
108
+ // Glob fallback
109
+ const pluginsRoot = path.join(home, ".claude", "plugins");
110
+ if (fs.existsSync(pluginsRoot)) {
111
+ const { execFileSync } = require("child_process");
112
+ try {
113
+ const result = execFileSync("find", [pluginsRoot, "-path", "*/rpi-kit/.claude-plugin/plugin.json", "-maxdepth", 5], { encoding: "utf8" }).trim();
114
+ if (result) {
115
+ const pluginJson = result.split("\n")[0];
116
+ return path.resolve(pluginJson, "..", "..");
117
+ }
118
+ } catch {}
119
+ }
120
+ return null;
121
+ }
122
+
123
+ function updatePlugin() {
124
+ const pluginDir = findInstalledPlugin();
125
+ if (!pluginDir) {
126
+ log("RPIKit installation not found in ~/.claude/plugins/.");
127
+ log("Install first: claude plugin install rpi-kit");
128
+ return false;
129
+ }
130
+
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
+ }
139
+
140
+ // Current version
141
+ let currentVersion = "unknown";
142
+ try {
143
+ const pj = JSON.parse(fs.readFileSync(path.join(pluginDir, ".claude-plugin", "plugin.json"), "utf8"));
144
+ currentVersion = pj.version || "unknown";
145
+ } catch {}
146
+
147
+ const currentCommit = spawnSync("git", ["-C", pluginDir, "rev-parse", "--short", "HEAD"], { encoding: "utf8" });
148
+ const oldCommit = (currentCommit.stdout || "").trim();
149
+
150
+ log(`Current: v${currentVersion} (${oldCommit})`);
151
+ log("Pulling latest...");
152
+
153
+ const pull = spawnSync("git", ["-C", pluginDir, "pull", "origin", "main"], { encoding: "utf8", stdio: "pipe" });
154
+
155
+ if (pull.status !== 0) {
156
+ log("Git pull failed:");
157
+ log(pull.stderr || pull.stdout || "Unknown error");
158
+ return false;
159
+ }
160
+
161
+ if ((pull.stdout || "").includes("Already up to date")) {
162
+ log("Already up to date.");
163
+ return true;
164
+ }
165
+
166
+ // New version
167
+ let newVersion = "unknown";
168
+ try {
169
+ const pj = JSON.parse(fs.readFileSync(path.join(pluginDir, ".claude-plugin", "plugin.json"), "utf8"));
170
+ newVersion = pj.version || "unknown";
171
+ } catch {}
172
+
173
+ const newCommit = spawnSync("git", ["-C", pluginDir, "rev-parse", "--short", "HEAD"], { encoding: "utf8" });
174
+ const newHash = (newCommit.stdout || "").trim();
175
+
176
+ // Changelog
177
+ if (oldCommit) {
178
+ const changelog = spawnSync("git", ["-C", pluginDir, "log", "--oneline", `${oldCommit}..${newHash}`], { encoding: "utf8" });
179
+ if (changelog.stdout) {
180
+ log(`\nv${currentVersion} (${oldCommit}) → v${newVersion} (${newHash})\n`);
181
+ log("Changes:");
182
+ log(changelog.stdout.trim());
183
+ }
184
+ }
185
+
186
+ // Clear cache
187
+ const home = process.env.HOME || process.env.USERPROFILE;
188
+ const cacheDir = path.join(home, ".claude", "plugins", "cache", "rpi-kit");
189
+ if (fs.existsSync(cacheDir)) {
190
+ fs.rmSync(cacheDir, { recursive: true, force: true });
191
+ log("\nPlugin cache cleared.");
192
+ }
193
+
194
+ log("\nRestart Claude Code to load the new version.");
195
+ return true;
196
+ }
197
+
76
198
  function uninstallClaude() {
77
199
  log("Removing RPIKit from Claude Code...");
78
200
  try {
@@ -99,11 +221,12 @@ Usage:
99
221
  rpi-kit install --claude Install for Claude Code only
100
222
  rpi-kit install --codex Install for Codex only (copies AGENTS.md to cwd)
101
223
  rpi-kit install --gemini Install for Gemini CLI only
224
+ rpi-kit update Update installed plugin to latest version
102
225
  rpi-kit uninstall Remove from Claude Code
103
226
  rpi-kit onboarding Interactive walkthrough of the workflow
104
227
  rpi-kit help Show this help
105
228
 
106
- Commands (14):
229
+ Commands (15):
107
230
  /rpi:new <feature> Describe your feature → REQUEST.md
108
231
  /rpi:research <feature> Parallel agent analysis → RESEARCH.md
109
232
  /rpi:plan <feature> Generate specs + tasks → PLAN.md
@@ -116,6 +239,7 @@ Commands (14):
116
239
  /rpi:status Show all features and their phases
117
240
  /rpi <feature> Auto-progress to next phase
118
241
  /rpi:onboarding Guided first-time setup
242
+ /rpi:update Update plugin to latest version
119
243
  /rpi:learn [description] Capture a solution to knowledge base
120
244
  /rpi:archive <feature> Archive a completed feature
121
245
  /rpi:party Multi-agent debate on any topic
@@ -238,6 +362,10 @@ async function run() {
238
362
  break;
239
363
  }
240
364
 
365
+ case "update":
366
+ updatePlugin();
367
+ break;
368
+
241
369
  case "onboarding": {
242
370
  const { run } = require("./onboarding");
243
371
  run();
@@ -0,0 +1,113 @@
1
+ ---
2
+ name: rpi:update
3
+ description: Update RPIKit plugin to the latest version from the remote repository.
4
+ argument-hint: ""
5
+ allowed-tools:
6
+ - Bash
7
+ - Read
8
+ - Glob
9
+ ---
10
+
11
+ # /rpi:update — Update RPIKit
12
+
13
+ Pull the latest version of RPIKit from the remote repository and clear the plugin cache.
14
+
15
+ ---
16
+
17
+ ## Step 1: Find the installed plugin directory
18
+
19
+ Search for the RPIKit installation:
20
+
21
+ ```bash
22
+ find ~/.claude/plugins -name "plugin.json" -path "*/rpi-kit/*" 2>/dev/null
23
+ ```
24
+
25
+ From the results, determine the plugin root directory (the parent of `.claude-plugin/`).
26
+
27
+ If not found:
28
+ ```
29
+ RPIKit installation not found in ~/.claude/plugins/.
30
+ Re-install from the marketplace or run:
31
+ claude plugin add git@github.com:dmend3z/rpi-kit.git
32
+ ```
33
+ Stop.
34
+
35
+ Store the plugin root path as `$PLUGIN_DIR`.
36
+
37
+ ## Step 2: Show current version
38
+
39
+ Read `$PLUGIN_DIR/.claude-plugin/plugin.json` and extract the current `version` field.
40
+ Store as `$CURRENT_VERSION`.
41
+
42
+ Also get the current git commit:
43
+
44
+ ```bash
45
+ cd $PLUGIN_DIR && git rev-parse --short HEAD
46
+ ```
47
+
48
+ Store as `$CURRENT_COMMIT`.
49
+
50
+ ## Step 3: Pull latest changes
51
+
52
+ Run git pull in the plugin directory:
53
+
54
+ ```bash
55
+ cd $PLUGIN_DIR && git pull origin main 2>&1
56
+ ```
57
+
58
+ If it fails:
59
+ - If "not a git repository": report the error and suggest re-installing.
60
+ - If merge conflict: report the error and suggest `cd $PLUGIN_DIR && git reset --hard origin/main` (ask user first — this discards local changes).
61
+ - If network error: report "Could not reach remote. Check your connection."
62
+ - Stop on any error.
63
+
64
+ If output says "Already up to date.":
65
+ ```
66
+ RPIKit is already up to date (v{$CURRENT_VERSION}, {$CURRENT_COMMIT}).
67
+ ```
68
+ Stop.
69
+
70
+ ## Step 4: Show what changed
71
+
72
+ Get the new version:
73
+
74
+ ```bash
75
+ cd $PLUGIN_DIR && cat .claude-plugin/plugin.json | grep '"version"'
76
+ ```
77
+
78
+ Store as `$NEW_VERSION`.
79
+
80
+ Get the new commit:
81
+
82
+ ```bash
83
+ cd $PLUGIN_DIR && git rev-parse --short HEAD
84
+ ```
85
+
86
+ Store as `$NEW_COMMIT`.
87
+
88
+ Show the changelog between old and new commits:
89
+
90
+ ```bash
91
+ cd $PLUGIN_DIR && git log --oneline $CURRENT_COMMIT..$NEW_COMMIT
92
+ ```
93
+
94
+ ## Step 5: Clear plugin cache
95
+
96
+ Remove cached versions so Claude Code picks up the new files:
97
+
98
+ ```bash
99
+ rm -rf ~/.claude/plugins/cache/rpi-kit 2>/dev/null
100
+ ```
101
+
102
+ ## Step 6: Output summary
103
+
104
+ ```
105
+ RPIKit updated!
106
+
107
+ {$CURRENT_VERSION} ({$CURRENT_COMMIT}) → {$NEW_VERSION} ({$NEW_COMMIT})
108
+
109
+ Changes:
110
+ {git log output from step 4}
111
+
112
+ Restart Claude Code to load the new version.
113
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rpi-kit",
3
- "version": "2.0.0",
3
+ "version": "2.1.1",
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",
@@ -149,6 +149,7 @@ Output is saved to `rpi/solutions/decisions/` when requested.
149
149
  /rpi:party -- multi-agent debate on any topic
150
150
  /rpi:learn -- manually capture a solution/insight
151
151
  /rpi:archive -- merge delta into specs, delete feature folder
152
+ /rpi:update -- update RPIKit to the latest version from remote
152
153
  /rpi:onboarding -- first-time setup, analyzes codebase, guides the user
153
154
  ```
154
155