kilo-superpowers-compose 0.1.2 → 0.1.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
@@ -11,7 +11,7 @@
11
11
 
12
12
  ## Status
13
13
 
14
- **v0.1.2.** Installed via the npm CLI and verified on both **Kilo CLI** and the
14
+ **v0.1.3.** Installed via the npm CLI and verified on both **Kilo CLI** and the
15
15
  **VS Code Kilo Code** extension (they share the same config, so one install
16
16
  covers both).
17
17
 
@@ -24,19 +24,20 @@ covers both).
24
24
  ## What it is
25
25
 
26
26
  `kilo-superpowers-compose` bundles 14 battle-tested Superpowers skills + 3
27
- purpose-built agents + a `/superpowers` slash command into one npm package.
27
+ purpose-built agents into one npm package.
28
28
  Run one install command and the skills link into `~/.kilo/skills/`, the agent
29
- files copy into `~/.config/kilo/agent/`, the command into
30
- `~/.config/kilo/commands/`, and `kilo.jsonc` gets the skill path registered.
31
- Restart Kilo and a `compose` agent appears in the agent picker, ready to run
32
- the full, disciplined Superpowers workflow on any coding task.
29
+ files copy into `~/.config/kilo/agent/`, and `kilo.jsonc` gets the skill path
30
+ registered. Restart Kilo and a `compose` agent appears in the agent picker.
31
+ Pick `compose` and the full, disciplined Superpowers workflow runs on any
32
+ coding task no extra slash command required (this matches the mimo-compose
33
+ convention).
33
34
 
34
35
  ## Installation
35
36
 
36
37
  > ⚠ **Two steps required.** Running only step ① (`npm install -g`) does
37
- > nothing visible — it only installs the CLI binary, not the agent/command
38
- > files, the skills link, or `kilo.jsonc`. Skipping step ② is the most
39
- > common mistake.
38
+ > nothing visible — it only installs the CLI binary, not the agent files,
39
+ > the skills link, or `kilo.jsonc`. Skipping step ② is the most common
40
+ > mistake.
40
41
 
41
42
  **Step ① — Install the CLI**:
42
43
 
@@ -53,17 +54,16 @@ itself); does not touch your config directory.
53
54
  kilo-superpowers-compose install
54
55
  ```
55
56
 
56
- Copies the 3 agent files to `~/.config/kilo/agent/`, the command to
57
- `~/.config/kilo/commands/`, creates the skills link at
58
- `~/.kilo/skills/superpowers`, and adds an entry to `kilo.jsonc`'s
57
+ Copies the 3 agent files to `~/.config/kilo/agent/`, creates the skills
58
+ link at `~/.kilo/skills/superpowers`, and adds an entry to `kilo.jsonc`'s
59
59
  `skills.paths`. **Idempotent**: safe to re-run.
60
60
 
61
61
  **Step ③ — Restart Kilo** (fully quit and reopen the CLI; **Reload Window**
62
62
  in VS Code).
63
63
 
64
- After this, `compose` appears in `/agents` and `/superpowers` works. One
65
- install covers both Kilo CLI and the VS Code Kilo Code extension (they
66
- share `~/.config/kilo/`).
64
+ After this, `compose` appears in the agent picker pick it to enter the
65
+ Superpowers workflow. One install covers both Kilo CLI and the VS Code
66
+ Kilo Code extension (they share `~/.config/kilo/`).
67
67
 
68
68
  ### Kilo Marketplace (official channel — coming soon)
69
69
 
@@ -84,14 +84,17 @@ Until then, use the npm install above.
84
84
  `writing-skills`.
85
85
  - **3 agents**: `compose` (primary orchestrator), `compose-dev` (TDD
86
86
  implementer subagent), `compose-review` (two-stage reviewer subagent). None
87
- pin a `model` — they use your global default model.
88
- - **1 slash command**: `/superpowers` (routes to `compose`).
87
+ pin a `model` — they use your global default model. Pick `compose` in the
88
+ agent picker to enter the Superpowers workflow.
89
+
90
+ > v0.1.x 早期版本同时注册了 `/superpowers` 斜杠命令;自 v0.1.3 起移除以与
91
+ > mimo-compose 保持一致——选 `compose` 代理即可触发完整工作流,不再占用命令面板。
89
92
 
90
93
  ## Update & uninstall
91
94
 
92
95
  > **Update is also two steps.** `npm update -g` upgrades the package
93
96
  > itself; the `update` subcommand re-syncs the artifacts to Kilo's config.
94
- > Running only step ① won't update your agents/commands/skills link.
97
+ > Running only step ① won't update your agents / skills link.
95
98
 
96
99
  **Update** (two steps, after a new version is published):
97
100
 
@@ -112,21 +115,20 @@ kilo-superpowers-compose uninstall # remove artifacts
112
115
  npm uninstall -g kilo-superpowers-compose # remove the CLI itself
113
116
  ```
114
117
 
115
- Uninstall removes: the skills link, the 3 agent files, the
116
- `superpowers.md` command, this package's `skills.paths` entry in
117
- `kilo.jsonc`, and the install manifest. Your own skills, agents, and config
118
- are left untouched.
118
+ Uninstall removes: the skills link, the 3 agent files, this package's
119
+ `skills.paths` entry in `kilo.jsonc`, and the install manifest. Your own
120
+ skills, agents, and config are left untouched.
119
121
 
120
122
  ## Common mistakes
121
123
 
122
- **"I ran `npm install -g` but `/agents` doesn't show `compose`."**
123
- — You only ran step ①. The CLI is installed, but no agent files, skills
124
- link, or command were created. Run `kilo-superpowers-compose install`.
124
+ **"I ran `npm install -g` but the agent picker doesn't show `compose`."**
125
+ — You only ran step ①. The CLI is installed, but no agent files or skills
126
+ link were created. Run `kilo-superpowers-compose install`.
125
127
 
126
128
  **"I changed package code after install; restarting Kilo doesn't pick it up."**
127
129
  — `~/.kilo/skills/superpowers` is a junction pointing to the package
128
130
  directory, so package upgrades are picked up automatically. But
129
- agent/command files were copied at install time and don't auto-update. Run
131
+ agent files were copied at install time and don't auto-update. Run
130
132
  `kilo-superpowers-compose update`.
131
133
 
132
134
  **"I added `plugin: ['kilo-superpowers-compose']` to `kilo.jsonc`."**
@@ -139,7 +141,7 @@ This package installs via the npm CLI — no `plugin` field needed.
139
141
  kilo-superpowers-compose <command>
140
142
 
141
143
  Commands:
142
- install Install skills, agents, and the slash command (default)
144
+ install Install skills and agents (default)
143
145
  uninstall Remove everything this package installed (manifest-based)
144
146
  update Re-run install (idempotent)
145
147
 
package/bin/cli.js CHANGED
@@ -32,7 +32,7 @@ if (cmd === '--help' || cmd === '-h') {
32
32
  ' kilo-superpowers-compose <command>',
33
33
  '',
34
34
  '命令:',
35
- ' install 安装技能、代理与斜杠命令(默认)',
35
+ ' install 安装技能与代理(默认)',
36
36
  ' uninstall 移除本包安装的全部内容(清单法,不触碰用户自有文件)',
37
37
  ' update 重新运行安装(幂等)',
38
38
  '',
package/bin/lib.js CHANGED
@@ -52,7 +52,6 @@ export function resolvePaths(home) {
52
52
  configDir,
53
53
  configFile: path.join(configDir, 'kilo.jsonc'),
54
54
  agentsDir: path.join(configDir, 'agent'),
55
- commandsDir: path.join(configDir, 'commands'),
56
55
  skillsDir,
57
56
  skillLink: path.join(skillsDir, 'superpowers'),
58
57
  manifestFile: path.join(configDir, MANIFEST_NAME),
@@ -237,7 +236,6 @@ export function runInstall(opts = {}) {
237
236
 
238
237
  const srcSkills = path.join(root, 'skills');
239
238
  const srcAgents = path.join(root, 'agents');
240
- const srcCommands = path.join(root, 'commands');
241
239
 
242
240
  let pkg;
243
241
  try {
@@ -252,7 +250,7 @@ export function runInstall(opts = {}) {
252
250
  log('config dir', ctx.configDir);
253
251
 
254
252
  // 1. 确保目标目录
255
- for (const d of [ctx.configDir, ctx.agentsDir, ctx.commandsDir, ctx.skillsDir]) {
253
+ for (const d of [ctx.configDir, ctx.agentsDir, ctx.skillsDir]) {
256
254
  try {
257
255
  ensureDir(d, { dryRun, log });
258
256
  } catch (e) {
@@ -310,25 +308,7 @@ export function runInstall(opts = {}) {
310
308
  installedAgentPaths.push(dst);
311
309
  }
312
310
 
313
- // 6. 复制 commands
314
- const cmdFiles = listMdFiles(srcCommands);
315
- const installedCommandPaths = [];
316
- for (const f of cmdFiles) {
317
- const dst = path.join(ctx.commandsDir, f.name);
318
- log('copy command', f.abs, '->', dst);
319
- if (!dryRun) {
320
- try {
321
- fs.mkdirSync(ctx.commandsDir, { recursive: true });
322
- fs.copyFileSync(f.abs, dst);
323
- } catch (e) {
324
- console.error(`✗ 复制 command 失败 ${f.name}: ${e.message}`);
325
- return EXIT.NOT_WRITABLE;
326
- }
327
- }
328
- installedCommandPaths.push(dst);
329
- }
330
-
331
- // 7. 追加 skills.paths(config 已在第 3 步解析校验通过)
311
+ // 6. 追加 skills.paths(config 已在第 3 步解析校验通过)
332
312
  config.skills = config.skills || {};
333
313
  config.skills.paths = config.skills.paths || [];
334
314
  let added = false;
@@ -351,7 +331,6 @@ export function runInstall(opts = {}) {
351
331
  skillsLinkType: linkRes.type,
352
332
  skillsPathsEntry: srcSkills,
353
333
  agents: installedAgentPaths,
354
- commands: installedCommandPaths,
355
334
  },
356
335
  { dryRun, log }
357
336
  );
@@ -364,7 +343,6 @@ export function runInstall(opts = {}) {
364
343
  console.log(` 注意: 链接创建失败,已回退为递归复制(${linkRes.fallback})`);
365
344
  }
366
345
  console.log(` 代理: ${agentFiles.map((f) => f.name).join(', ') || '(无)'}`);
367
- console.log(` 命令: /${cmdFiles.map((f) => f.name.replace(/\.md$/, '')).join(', /') || '(无)'}`);
368
346
  console.log(` kilo.jsonc: skills.paths ${added ? '已新增条目' : '已存在(幂等跳过)'}`);
369
347
  console.log('');
370
348
  console.log(' 请重启 Kilo CLI / VS Code 扩展以加载。');
@@ -408,21 +386,12 @@ export function runUninstall(opts = {}) {
408
386
  }
409
387
  for (const p of agentPaths) safeRemove(p, { dryRun, log });
410
388
 
411
- // 2. 移除 commands
412
- const cmdPaths = (manifest && manifest.commands) || [];
413
- if (cmdPaths.length === 0) {
414
- for (const n of ['superpowers.md']) {
415
- cmdPaths.push(path.join(ctx.commandsDir, n));
416
- }
417
- }
418
- for (const p of cmdPaths) safeRemove(p, { dryRun, log });
419
-
420
- // 3. 移除技能链接(清单有记录类型则用之,否则按链接处理)
389
+ // 2. 移除技能链接(清单有记录类型则用之,否则按链接处理)
421
390
  if (linkExists(ctx.skillLink)) {
422
391
  safeRemove(ctx.skillLink, { dryRun, log });
423
392
  }
424
393
 
425
- // 4. 从 kilo.jsonc 移除本包的 skills.paths 条目
394
+ // 3. 从 kilo.jsonc 移除本包的 skills.paths 条目
426
395
  const config = readJsonc(ctx.configFile);
427
396
  if (config.__parseError) {
428
397
  if (bak && !dryRun) {
@@ -459,7 +428,6 @@ export function runUninstall(opts = {}) {
459
428
 
460
429
  console.log('✓ kilo-superpowers-compose 已卸载');
461
430
  console.log(` agents: ${agentPaths.length} 个文件`);
462
- console.log(` commands: ${cmdPaths.length} 个文件`);
463
431
  console.log(` 技能链接: ${ctx.skillLink}`);
464
432
  console.log(` kilo.jsonc: skills.paths 移除 ${removedEntries} 条`);
465
433
  console.log(' 未触碰用户自有的技能 / 代理 / 配置。');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kilo-superpowers-compose",
3
- "version": "0.1.2",
4
- "description": "将 obra/superpowers 工作流打包为 Kilo 插件:一个 compose 编排器代理、/superpowers 斜杠命令与 14 个技能,一条命令安装。",
3
+ "version": "0.1.3",
4
+ "description": "将 obra/superpowers 工作流打包为 Kilo 插件:一个 compose 编排器代理、3 个子代理与 14 个技能,通过 compose 代理选择器直接进入完整工作流,一条命令安装。",
5
5
  "keywords": [
6
6
  "kilo",
7
7
  "kilo-code",
@@ -46,7 +46,6 @@
46
46
  "bin",
47
47
  "skills",
48
48
  "agents",
49
- "commands",
50
49
  "plugin",
51
50
  "NOTICE"
52
51
  ],
package/plugin/index.js CHANGED
@@ -5,25 +5,23 @@
5
5
  // 在 kilo.jsonc 里写 `"plugin": ["kilo-superpowers-compose"]`,Kilo 启动时
6
6
  // 会加载本模块的默认导出(工厂函数),调用其 `config(config)` 钩子,向**运行时**
7
7
  // 配置对象直接注入 3 个 agent 与 skills.paths —— agent 从不落盘,仅存活于运行时。
8
+ // 用户通过在代理选择器中选取 `compose` 代理即可进入工作流,无需注册斜杠命令。
8
9
  //
9
10
  // 设计参考:moyu-by/opencode-mimo-compose 的 src/index.js(OpenCode 插件机制)。
10
11
  // Kilo 是 OpenCode 的 fork,复用同样的 `config` 钩子契约。
11
12
  //
12
13
  // 硬性约束(与 bin/lib.js 一致):
13
- // - 零第三方依赖;仅用 node:fs / node:path / node:os / node:url。
14
+ // - 零第三方依赖;仅用 node:fs / node:path / node:url。
14
15
  // - 绝不抛异常:**插件崩溃会让 Kilo 启动失败**。所有 fs / 解析操作均包 try/catch。
15
- // - 跨平台路径一律用 path.join,绝不手拼反斜杠;尊重 KILO_HOME。
16
+ // - 跨平台路径一律用 path.join,绝不手拼反斜杠。
16
17
  // - skills.paths 幂等判定用规范化路径比较(path.resolve + toLowerCase)。
17
18
  //
18
19
  // 自动更新原理:
19
20
  // - agents:每次 Kilo 启动由 config 钩子重注(永远取包内最新内容)。
20
21
  // - skills:config.skills.paths 指向**包内** skills 目录,`npm update -g` 后即时刷新。
21
- // - /superpowers 命令:无法经 config 钩子注册(Kilo 无对应钩子),故采用
22
- // "复制到 ~/.config/kilo/commands/ + 版本标记" 的方式;包升级时标记比对触发重同步。
23
22
 
24
23
  import fs from 'node:fs';
25
24
  import path from 'node:path';
26
- import os from 'node:os';
27
25
  import { fileURLToPath } from 'node:url';
28
26
 
29
27
  // ─── 路径常量 ──────────────────────────────────────────────────────────
@@ -33,32 +31,6 @@ const PKG_ROOT = path.resolve(__dirname, '..');
33
31
 
34
32
  const AGENTS_SRC = path.join(PKG_ROOT, 'agents');
35
33
  const SKILLS_SRC = path.join(PKG_ROOT, 'skills');
36
- const COMMANDS_SRC = path.join(PKG_ROOT, 'commands');
37
-
38
- // Kilo 配置目录(尊重 KILO_HOME,便于测试与隔离配置)。
39
- // 惰性求值 —— 读取在调用时进行(而非模块加载时),使测试可用临时 KILO_HOME 隔离,
40
- // 不触碰用户真实配置目录。
41
- function defaultConfigDir() {
42
- const home = (process.env.KILO_HOME || os.homedir()) + '';
43
- return path.join(home, '.config', 'kilo');
44
- }
45
- function defaultMarkerFile() {
46
- return path.join(defaultConfigDir(), '.kilo-superpowers-compose-plugin');
47
- }
48
- function defaultCommandsDstDir() {
49
- return path.join(defaultConfigDir(), 'commands');
50
- }
51
-
52
- // 包版本(仅用于版本标记比对;读失败回退为占位串)。
53
- const PKG_VERSION = readPkgVersion(PKG_ROOT);
54
-
55
- function readPkgVersion(root) {
56
- try {
57
- return JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8')).version || '0.0.0';
58
- } catch (_) {
59
- return '0.0.0';
60
- }
61
- }
62
34
 
63
35
  // ─── 纯函数 / 路径规范化 ───────────────────────────────────────────────
64
36
  // 与 bin/lib.js 的 normalizePath 行为一致,便于 skills.paths 去重判定。
@@ -159,48 +131,14 @@ export function loadAgents(agentsSrc) {
159
131
  return agents;
160
132
  }
161
133
 
162
- // ─── 版本标记:同步复制的命令 ──────────────────────────────────────────
163
- // agents / skills 每次启动自动重注 / 自动刷新;只有复制的 /superpowers 命令
164
- // 需要版本标记触发重同步。
165
- export function needsSetup(markerFile) {
166
- const f = markerFile || defaultMarkerFile();
167
- try {
168
- if (!fs.existsSync(f)) return true;
169
- return fs.readFileSync(f, 'utf8').trim() !== PKG_VERSION;
170
- } catch (_) {
171
- return true;
172
- }
173
- }
174
-
175
- // 执行命令同步:把 commands/superpowers.md 复制到 ~/.config/kilo/commands/,并写标记。
176
- export function runSetup(opts = {}) {
177
- const commandsDst = opts.commandsDstDir || defaultCommandsDstDir();
178
- const mf = opts.markerFile || defaultMarkerFile();
179
- try {
180
- const srcCmd = path.join(opts.commandsSrc || COMMANDS_SRC, 'superpowers.md');
181
- if (fs.existsSync(srcCmd)) {
182
- try {
183
- fs.mkdirSync(commandsDst, { recursive: true });
184
- fs.copyFileSync(srcCmd, path.join(commandsDst, 'superpowers.md'));
185
- } catch (_) {
186
- // 命令复制失败不应阻断 agent / skills 注入 —— 仅记录为无命令。
187
- }
188
- }
189
- try {
190
- fs.mkdirSync(path.dirname(mf), { recursive: true });
191
- fs.writeFileSync(mf, PKG_VERSION, 'utf8');
192
- } catch (_) {
193
- // 标记写失败:下次启动会重试,无致命影响。
194
- }
195
- } catch (_) {
196
- // 整体防御:runSetup 任何异常都不外泄。
197
- }
198
- }
199
-
200
134
  // ─── 插件工厂(Kilo 加载入口,当前休眠)──────────────────────────────
201
135
  // 设计目标:Kilo 按 PluginModule 契约({ server: Plugin },见 @kilocode/plugin)
202
136
  // import 本模块、调用 server() 工厂、再调用返回的 config() 钩子,向运行时配置
203
- // 注入 agents/skills/command
137
+ // 注入 agents/skills。
138
+ //
139
+ // 用户使用方式:在代理选择器中选取 `compose` 代理即可进入 Superpowers 工作流,
140
+ // 流程由 compose 编排器(agents/compose.md)驱动:brainstorming → planning →
141
+ // dispatch compose-dev → dispatch compose-review。
204
142
  //
205
143
  // 实测结论(2026-07,见 docs/DESIGN.md §10 Q5):当前 Kilo **不会**经
206
144
  // `kilo.jsonc` 的 `plugin:["包名"]` 字段加载 npm 命名插件(该字段无效,还会拖慢
@@ -208,11 +146,6 @@ export function runSetup(opts = {}) {
208
146
  // 但作为用户安装方式暂不启用 —— 安装走 npm CLI(见 bin/)。本模块保留待 Kilo
209
147
  // 正式支持插件加载后即可启用。命名兼容:同时以 server 命名导出(与 mimo 一致)。
210
148
  export async function plugin(_input, _options) {
211
- // 首次安装或包升级时同步命令(失败被 runSetup 内部吞掉)。
212
- try {
213
- if (needsSetup()) runSetup();
214
- } catch (_) {}
215
-
216
149
  const agents = loadAgents();
217
150
 
218
151
  return {
@@ -1,38 +0,0 @@
1
- ---
2
- description: |
3
- Start the Superpowers workflow. Loads the using-superpowers discipline
4
- rules, then hands the user's request to the compose orchestrator agent,
5
- which classifies the task (simple / complex / bug) and drives the full
6
- brainstorming → planning → subagent implementation → two-stage review
7
- → merge pipeline.
8
- agent: compose
9
- ---
10
-
11
- # /superpowers
12
-
13
- You are being launched via the `/superpowers` slash command. Follow these
14
- steps in order:
15
-
16
- 1. **Bootstrap discipline (mandatory first step).** Load the
17
- `using-superpowers` skill before doing anything else. This installs the
18
- core rules that govern all subsequent work in this session.
19
-
20
- 2. **Hand off to the compose workflow.** Treat the user's request (the
21
- text they supplied after `/superpowers`, or the most recent message if
22
- none) as the task to process. Run the compose orchestrator's workflow
23
- decision tree:
24
- - Classify the task: **simple**, **complex**, or **bug fix**.
25
- - For complex work: brainstorm → plan → get explicit user approval →
26
- dispatch `compose-dev` per task → dispatch `compose-review` →
27
- finish the branch.
28
- - For bugs: `systematic-debugging` first, then a failing test, then
29
- the simple or complex path based on fix size.
30
- - For simple work: do it directly, then invoke
31
- `verification-before-completion` before reporting done.
32
-
33
- 3. **Never skip the gates.** Brainstorming for new features, TDD for any
34
- logic, systematic debugging for bugs, and review before merge on
35
- complex work are mandatory — not suggestions.
36
-
37
- Begin by loading `using-superpowers`, then emit the task classification
38
- checkpoint so the user can see your reasoning.