kilo-superpowers-compose 0.1.2 → 0.1.5
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 +36 -27
- package/bin/cli.js +1 -1
- package/bin/lib.js +26 -34
- package/package.json +2 -3
- package/plugin/index.js +8 -75
- package/commands/superpowers.md +0 -38
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
## Status
|
|
13
13
|
|
|
14
|
-
**v0.1.
|
|
14
|
+
**v0.1.5.** 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
|
|
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
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
|
38
|
-
>
|
|
39
|
-
>
|
|
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
|
|
57
|
-
`~/.
|
|
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
|
|
65
|
-
install covers both Kilo CLI and the VS Code
|
|
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,24 @@ 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
|
-
|
|
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` 代理即可触发完整工作流,不再占用命令面板。
|
|
92
|
+
> **从老版本升级到 v0.1.3+:** 若你的 `~/.config/kilo/commands/superpowers.md`
|
|
93
|
+
> 仍是 v0.1.2 之前留下的副本,运行 `kilo-superpowers-compose uninstall`(再 install
|
|
94
|
+
> 也可)会顺手清掉它。如果还想自己手动清:
|
|
95
|
+
>
|
|
96
|
+
> ```powershell
|
|
97
|
+
> Remove-Item -Force "$env:USERPROFILE\.config\kilo\commands\superpowers.md"
|
|
98
|
+
> ```
|
|
89
99
|
|
|
90
100
|
## Update & uninstall
|
|
91
101
|
|
|
92
102
|
> **Update is also two steps.** `npm update -g` upgrades the package
|
|
93
103
|
> itself; the `update` subcommand re-syncs the artifacts to Kilo's config.
|
|
94
|
-
> Running only step ① won't update your agents/
|
|
104
|
+
> Running only step ① won't update your agents / skills link.
|
|
95
105
|
|
|
96
106
|
**Update** (two steps, after a new version is published):
|
|
97
107
|
|
|
@@ -112,21 +122,20 @@ kilo-superpowers-compose uninstall # remove artifacts
|
|
|
112
122
|
npm uninstall -g kilo-superpowers-compose # remove the CLI itself
|
|
113
123
|
```
|
|
114
124
|
|
|
115
|
-
Uninstall removes: the skills link, the 3 agent files,
|
|
116
|
-
`
|
|
117
|
-
|
|
118
|
-
are left untouched.
|
|
125
|
+
Uninstall removes: the skills link, the 3 agent files, this package's
|
|
126
|
+
`skills.paths` entry in `kilo.jsonc`, and the install manifest. Your own
|
|
127
|
+
skills, agents, and config are left untouched.
|
|
119
128
|
|
|
120
129
|
## Common mistakes
|
|
121
130
|
|
|
122
|
-
**"I ran `npm install -g` but
|
|
123
|
-
— You only ran step ①. The CLI is installed, but no agent files
|
|
124
|
-
link
|
|
131
|
+
**"I ran `npm install -g` but the agent picker doesn't show `compose`."**
|
|
132
|
+
— You only ran step ①. The CLI is installed, but no agent files or skills
|
|
133
|
+
link were created. Run `kilo-superpowers-compose install`.
|
|
125
134
|
|
|
126
135
|
**"I changed package code after install; restarting Kilo doesn't pick it up."**
|
|
127
136
|
— `~/.kilo/skills/superpowers` is a junction pointing to the package
|
|
128
137
|
directory, so package upgrades are picked up automatically. But
|
|
129
|
-
agent
|
|
138
|
+
agent files were copied at install time and don't auto-update. Run
|
|
130
139
|
`kilo-superpowers-compose update`.
|
|
131
140
|
|
|
132
141
|
**"I added `plugin: ['kilo-superpowers-compose']` to `kilo.jsonc`."**
|
|
@@ -139,7 +148,7 @@ This package installs via the npm CLI — no `plugin` field needed.
|
|
|
139
148
|
kilo-superpowers-compose <command>
|
|
140
149
|
|
|
141
150
|
Commands:
|
|
142
|
-
install Install skills
|
|
151
|
+
install Install skills and agents (default)
|
|
143
152
|
uninstall Remove everything this package installed (manifest-based)
|
|
144
153
|
update Re-run install (idempotent)
|
|
145
154
|
|
package/bin/cli.js
CHANGED
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.
|
|
253
|
+
for (const d of [ctx.configDir, ctx.agentsDir, ctx.skillsDir]) {
|
|
256
254
|
try {
|
|
257
255
|
ensureDir(d, { dryRun, log });
|
|
258
256
|
} catch (e) {
|
|
@@ -261,6 +259,16 @@ export function runInstall(opts = {}) {
|
|
|
261
259
|
}
|
|
262
260
|
}
|
|
263
261
|
|
|
262
|
+
// 1.5 兜底清理:v0.1.3 之前的版本曾向 ~/.config/kilo/commands/superpowers.md
|
|
263
|
+
// 写入 /superpowers 斜杠命令副本(已随 v0.1.3 停止分发)。老用户机器上若
|
|
264
|
+
// 残留该文件,install / update 路径上都主动删掉它,消除 Kilo 命令面板里的
|
|
265
|
+
// 幽灵条目。该清理与 uninstall 路径共用的 safeRemove 幂等安全。
|
|
266
|
+
const legacyCmdInInstall = path.join(ctx.configDir, 'commands', 'superpowers.md');
|
|
267
|
+
let legacyRemovedOnInstall = false;
|
|
268
|
+
if (linkExists(legacyCmdInInstall)) {
|
|
269
|
+
legacyRemovedOnInstall = safeRemove(legacyCmdInInstall, { dryRun, log });
|
|
270
|
+
}
|
|
271
|
+
|
|
264
272
|
// 2. 备份 kilo.jsonc
|
|
265
273
|
const bak = backupConfig(ctx.configFile, { dryRun, log });
|
|
266
274
|
|
|
@@ -310,25 +318,7 @@ export function runInstall(opts = {}) {
|
|
|
310
318
|
installedAgentPaths.push(dst);
|
|
311
319
|
}
|
|
312
320
|
|
|
313
|
-
// 6.
|
|
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 步解析校验通过)
|
|
321
|
+
// 6. 追加 skills.paths(config 已在第 3 步解析校验通过)
|
|
332
322
|
config.skills = config.skills || {};
|
|
333
323
|
config.skills.paths = config.skills.paths || [];
|
|
334
324
|
let added = false;
|
|
@@ -351,7 +341,6 @@ export function runInstall(opts = {}) {
|
|
|
351
341
|
skillsLinkType: linkRes.type,
|
|
352
342
|
skillsPathsEntry: srcSkills,
|
|
353
343
|
agents: installedAgentPaths,
|
|
354
|
-
commands: installedCommandPaths,
|
|
355
344
|
},
|
|
356
345
|
{ dryRun, log }
|
|
357
346
|
);
|
|
@@ -364,8 +353,10 @@ export function runInstall(opts = {}) {
|
|
|
364
353
|
console.log(` 注意: 链接创建失败,已回退为递归复制(${linkRes.fallback})`);
|
|
365
354
|
}
|
|
366
355
|
console.log(` 代理: ${agentFiles.map((f) => f.name).join(', ') || '(无)'}`);
|
|
367
|
-
console.log(` 命令: /${cmdFiles.map((f) => f.name.replace(/\.md$/, '')).join(', /') || '(无)'}`);
|
|
368
356
|
console.log(` kilo.jsonc: skills.paths ${added ? '已新增条目' : '已存在(幂等跳过)'}`);
|
|
357
|
+
if (legacyRemovedOnInstall) {
|
|
358
|
+
console.log(` 遗留命令: 已移除 ~/.config/kilo/commands/superpowers.md(来自 v0.1.3 之前版本)`);
|
|
359
|
+
}
|
|
369
360
|
console.log('');
|
|
370
361
|
console.log(' 请重启 Kilo CLI / VS Code 扩展以加载。');
|
|
371
362
|
console.log('');
|
|
@@ -408,21 +399,20 @@ export function runUninstall(opts = {}) {
|
|
|
408
399
|
}
|
|
409
400
|
for (const p of agentPaths) safeRemove(p, { dryRun, log });
|
|
410
401
|
|
|
411
|
-
//
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}
|
|
402
|
+
// 1b. 兜底清理:从 v0.1.3 之前的版本残留的 /superpowers 斜杠命令副本。
|
|
403
|
+
// 新安装已不再分发该命令;但老用户机器上可能还留有旧文件,主动清掉防止幽灵命令。
|
|
404
|
+
const legacyCmd = path.join(ctx.configDir, 'commands', 'superpowers.md');
|
|
405
|
+
let legacyRemoved = false;
|
|
406
|
+
if (linkExists(legacyCmd)) {
|
|
407
|
+
legacyRemoved = safeRemove(legacyCmd, { dryRun, log });
|
|
417
408
|
}
|
|
418
|
-
for (const p of cmdPaths) safeRemove(p, { dryRun, log });
|
|
419
409
|
|
|
420
|
-
//
|
|
410
|
+
// 2. 移除技能链接(清单有记录类型则用之,否则按链接处理)
|
|
421
411
|
if (linkExists(ctx.skillLink)) {
|
|
422
412
|
safeRemove(ctx.skillLink, { dryRun, log });
|
|
423
413
|
}
|
|
424
414
|
|
|
425
|
-
//
|
|
415
|
+
// 3. 从 kilo.jsonc 移除本包的 skills.paths 条目
|
|
426
416
|
const config = readJsonc(ctx.configFile);
|
|
427
417
|
if (config.__parseError) {
|
|
428
418
|
if (bak && !dryRun) {
|
|
@@ -459,9 +449,11 @@ export function runUninstall(opts = {}) {
|
|
|
459
449
|
|
|
460
450
|
console.log('✓ kilo-superpowers-compose 已卸载');
|
|
461
451
|
console.log(` agents: ${agentPaths.length} 个文件`);
|
|
462
|
-
console.log(` commands: ${cmdPaths.length} 个文件`);
|
|
463
452
|
console.log(` 技能链接: ${ctx.skillLink}`);
|
|
464
453
|
console.log(` kilo.jsonc: skills.paths 移除 ${removedEntries} 条`);
|
|
454
|
+
if (legacyRemoved) {
|
|
455
|
+
console.log(` 遗留命令: 已移除 ~/.config/kilo/commands/superpowers.md(来自 v0.1.3 之前版本)`);
|
|
456
|
+
}
|
|
465
457
|
console.log(' 未触碰用户自有的技能 / 代理 / 配置。');
|
|
466
458
|
return EXIT.OK;
|
|
467
459
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kilo-superpowers-compose",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "将 obra/superpowers 工作流打包为 Kilo 插件:一个 compose
|
|
3
|
+
"version": "0.1.5",
|
|
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:
|
|
14
|
+
// - 零第三方依赖;仅用 node:fs / node:path / node:url。
|
|
14
15
|
// - 绝不抛异常:**插件崩溃会让 Kilo 启动失败**。所有 fs / 解析操作均包 try/catch。
|
|
15
|
-
// - 跨平台路径一律用 path.join
|
|
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
|
|
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 {
|
package/commands/superpowers.md
DELETED
|
@@ -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.
|