kilo-superpowers-compose 0.1.0
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/LICENSE +21 -0
- package/NOTICE +49 -0
- package/README.md +150 -0
- package/agents/compose-dev.md +51 -0
- package/agents/compose-review.md +76 -0
- package/agents/compose.md +107 -0
- package/bin/cli.js +69 -0
- package/bin/install.js +11 -0
- package/bin/lib.js +484 -0
- package/bin/uninstall.js +11 -0
- package/bin/update.js +11 -0
- package/commands/superpowers.md +38 -0
- package/package.json +45 -0
- package/skills/brainstorming/SKILL.md +159 -0
- package/skills/brainstorming/scripts/frame-template.html +213 -0
- package/skills/brainstorming/scripts/helper.js +167 -0
- package/skills/brainstorming/scripts/server.cjs +723 -0
- package/skills/brainstorming/scripts/start-server.sh +209 -0
- package/skills/brainstorming/scripts/stop-server.sh +120 -0
- package/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/skills/brainstorming/visual-companion.md +291 -0
- package/skills/dispatching-parallel-agents/SKILL.md +185 -0
- package/skills/executing-plans/SKILL.md +70 -0
- package/skills/finishing-a-development-branch/SKILL.md +241 -0
- package/skills/receiving-code-review/SKILL.md +213 -0
- package/skills/requesting-code-review/SKILL.md +103 -0
- package/skills/requesting-code-review/code-reviewer.md +172 -0
- package/skills/subagent-driven-development/SKILL.md +418 -0
- package/skills/subagent-driven-development/implementer-prompt.md +139 -0
- package/skills/subagent-driven-development/scripts/review-package +44 -0
- package/skills/subagent-driven-development/scripts/sdd-workspace +22 -0
- package/skills/subagent-driven-development/scripts/task-brief +40 -0
- package/skills/subagent-driven-development/task-reviewer-prompt.md +188 -0
- package/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/systematic-debugging/SKILL.md +296 -0
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/systematic-debugging/find-polluter.sh +63 -0
- package/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/systematic-debugging/test-academic.md +14 -0
- package/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/test-driven-development/SKILL.md +371 -0
- package/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/skills/using-git-worktrees/SKILL.md +202 -0
- package/skills/using-superpowers/SKILL.md +62 -0
- package/skills/using-superpowers/references/antigravity-tools.md +23 -0
- package/skills/using-superpowers/references/codex-tools.md +39 -0
- package/skills/using-superpowers/references/pi-tools.md +16 -0
- package/skills/verification-before-completion/SKILL.md +139 -0
- package/skills/writing-plans/SKILL.md +174 -0
- package/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/skills/writing-skills/SKILL.md +689 -0
- package/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/skills/writing-skills/persuasion-principles.md +187 -0
- package/skills/writing-skills/render-graphs.js +168 -0
- package/skills/writing-skills/testing-skills-with-subagents.md +384 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ChengZiiii
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
NOTICE
|
|
2
|
+
=======
|
|
3
|
+
|
|
4
|
+
kilo-superpowers-compose
|
|
5
|
+
------------------------
|
|
6
|
+
|
|
7
|
+
This package (`kilo-superpowers-compose`) is licensed under the MIT License
|
|
8
|
+
(see `LICENSE`). Copyright (c) 2026 ChengZiiii.
|
|
9
|
+
|
|
10
|
+
The `skills/` directory of this package is a **verbatim, unmodified copy**
|
|
11
|
+
of the `skills/` directory from the upstream project:
|
|
12
|
+
|
|
13
|
+
obra/superpowers
|
|
14
|
+
Source : https://github.com/obra/superpowers
|
|
15
|
+
Tag : v6.1.1
|
|
16
|
+
Commit : d884ae04edebef577e82ff7c4e143debd0bbec99
|
|
17
|
+
License: MIT (Copyright (c) 2025 Jesse Vincent)
|
|
18
|
+
|
|
19
|
+
Only the `skills/` directory is vendored. No other upstream content
|
|
20
|
+
(`hooks/`, `scripts/`, `.opencode/`, `.claude-plugin/`, `.codex-plugin/`,
|
|
21
|
+
`.cursor-plugin/`, `.kimi-plugin/`, `.pi/`, `tests/`, `docs/`, `assets/`,
|
|
22
|
+
etc.) is included.
|
|
23
|
+
|
|
24
|
+
The 14 vendored skills (each a `<name>/SKILL.md` plus any sibling files
|
|
25
|
+
such as reference notes, example prompts, or helper scripts) are copied
|
|
26
|
+
unchanged so that the upstream MIT attribution and authorship are
|
|
27
|
+
preserved:
|
|
28
|
+
|
|
29
|
+
- using-superpowers
|
|
30
|
+
- brainstorming
|
|
31
|
+
- test-driven-development
|
|
32
|
+
- systematic-debugging
|
|
33
|
+
- verification-before-completion
|
|
34
|
+
- writing-plans
|
|
35
|
+
- executing-plans
|
|
36
|
+
- subagent-driven-development
|
|
37
|
+
- requesting-code-review
|
|
38
|
+
- receiving-code-review
|
|
39
|
+
- using-git-worktrees
|
|
40
|
+
- finishing-a-development-branch
|
|
41
|
+
- dispatching-parallel-agents
|
|
42
|
+
- writing-skills
|
|
43
|
+
|
|
44
|
+
To upgrade the vendored skills: re-copy `skills/` from a newer tag of
|
|
45
|
+
obra/superpowers, then update the tag/commit above in this file.
|
|
46
|
+
|
|
47
|
+
The three agent prompts in `agents/` and the `/superpowers` command in
|
|
48
|
+
`commands/` are original to this package and are MIT-licensed as part of
|
|
49
|
+
it. The installer in `bin/` is likewise original to this package.
|
package/README.md
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# kilo-superpowers-compose
|
|
2
|
+
|
|
3
|
+
> 一个 Kilo Code / Kilo CLI 插件,将 [obra/superpowers](https://github.com/obra/superpowers)
|
|
4
|
+
> 开发工作流打包为单个可安装的 npm 包,对外暴露一个 `compose` 编排器代理,驱动
|
|
5
|
+
> 头脑风暴 → 规划 → 子代理实现 → 两阶段评审 → 合并的完整流程。
|
|
6
|
+
|
|
7
|
+
## 状态
|
|
8
|
+
|
|
9
|
+
**v0.1.0 —— 可用。** 已实现安装器、14 个内嵌技能、3 个代理、`/superpowers` 命令,
|
|
10
|
+
并通过自动化测试与隔离环境往返验证。详见 [更新日志](#更新日志)。
|
|
11
|
+
|
|
12
|
+
## 这个项目做什么(一段话)
|
|
13
|
+
|
|
14
|
+
它把 14 个久经考验的 Superpowers 技能 + 3 个专门构建的代理打包成一个名为
|
|
15
|
+
`kilo-superpowers-compose` 的 npm 包。运行一条安装命令后,本包会把技能链接到
|
|
16
|
+
`~/.kilo/skills/`,把代理的 `.md` 文件复制到 `~/.config/kilo/agent/`,把
|
|
17
|
+
`/superpowers` 命令复制到 `~/.config/kilo/commands/`,并在 `kilo.jsonc` 中注册技能
|
|
18
|
+
路径。重启 Kilo CLI 或 VS Code 扩展后,用户即可在代理选择器中看到一个 `compose`
|
|
19
|
+
代理,对任意编码任务运行完整的、有纪律的 Superpowers 工作流。
|
|
20
|
+
|
|
21
|
+
## 安装
|
|
22
|
+
|
|
23
|
+
### 方式 A:npm + 显式安装(推荐,已验证)
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install -g kilo-superpowers-compose
|
|
27
|
+
kilo-superpowers-compose install
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
安装完成后重启 Kilo,即可在代理选择器(`/agents`)中看到 `compose`,并使用
|
|
31
|
+
`/superpowers` 斜杠命令。
|
|
32
|
+
|
|
33
|
+
### 方式 B:Kilo `plugin` 字段(实验性 / 暂缓)
|
|
34
|
+
|
|
35
|
+
理论上可在 `kilo.jsonc` 中加入 `"plugin": ["kilo-superpowers-compose"]` 让 Kilo 在
|
|
36
|
+
启动时加载本包。但 Kilo 的插件钩子接口尚未稳定文档化,且该机制只能注册技能、无法
|
|
37
|
+
放置代理 / 命令文件,因此 **v0.1 暂不支持**。请使用方式 A。详见
|
|
38
|
+
[docs/DESIGN.md §10 Q5](docs/DESIGN.md)。
|
|
39
|
+
|
|
40
|
+
> 提示:Kilo 官方的分发渠道是 **Marketplace**(把代理复制到 `~/.config/kilo/agents/`、
|
|
41
|
+
> 技能复制到 `~/.config/kilo/skills/`)。后续版本会提交到 [kilo-marketplace](https://github.com/Kilo-Org/kilo-marketplace)。
|
|
42
|
+
|
|
43
|
+
## 安装了什么
|
|
44
|
+
|
|
45
|
+
- `superpowers` 技能目录下的 **14 个技能**(来自 obra/superpowers `v6.1.1`,逐字内嵌):
|
|
46
|
+
`using-superpowers`、`brainstorming`、`test-driven-development`、`systematic-debugging`、
|
|
47
|
+
`verification-before-completion`、`writing-plans`、`executing-plans`、
|
|
48
|
+
`subagent-driven-development`、`requesting-code-review`、`receiving-code-review`、
|
|
49
|
+
`using-git-worktrees`、`finishing-a-development-branch`、`dispatching-parallel-agents`、
|
|
50
|
+
`writing-skills`。
|
|
51
|
+
- **3 个代理**:`compose`(主代理 / 编排器)、`compose-dev`(子代理 / 实现者)、
|
|
52
|
+
`compose-review`(子代理 / 评审者)。三者均**不锁定 `model`**,沿用你的全局默认模型。
|
|
53
|
+
- **1 个斜杠命令**:`/superpowers`(路由到 `compose`)。
|
|
54
|
+
|
|
55
|
+
## 更新与卸载
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# 更新(重新运行安装,幂等)
|
|
59
|
+
kilo-superpowers-compose update
|
|
60
|
+
|
|
61
|
+
# 卸载(清单法精确移除本包安装的全部内容,绝不触碰用户自有文件)
|
|
62
|
+
kilo-superpowers-compose uninstall
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
更新上游包后,建议:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm update -g kilo-superpowers-compose
|
|
69
|
+
kilo-superpowers-compose update
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
卸载会移除:技能链接、3 个代理文件、`superpowers.md` 命令、`kilo.jsonc` 中本包的
|
|
73
|
+
`skills.paths` 条目,以及安装清单。你的其他技能 / 代理 / 配置保持原样。
|
|
74
|
+
|
|
75
|
+
## 命令行用法
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
kilo-superpowers-compose <command>
|
|
79
|
+
|
|
80
|
+
命令:
|
|
81
|
+
install 安装技能、代理与斜杠命令(默认)
|
|
82
|
+
uninstall 移除本包安装的全部内容(清单法)
|
|
83
|
+
update 重新运行安装(幂等)
|
|
84
|
+
|
|
85
|
+
选项:
|
|
86
|
+
-v, --version 显示版本号
|
|
87
|
+
-h, --help 显示帮助
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 环境变量
|
|
91
|
+
|
|
92
|
+
| 变量 | 作用 |
|
|
93
|
+
|---|---|
|
|
94
|
+
| `KILO_HOME=<path>` | 覆盖用户主目录(多用于测试 / 多配置隔离) |
|
|
95
|
+
| `KILO_SUPERPOWERS_PREFIX=1` | (保留)为技能名加前缀;v0.1 以 `superpowers` 命名空间隔离,故暂未启用 |
|
|
96
|
+
| `KILO_SUPERPOWERS_DRY_RUN=1` | 只打印将执行的动作,不修改任何文件 |
|
|
97
|
+
| `KILO_SUPERPOWERS_VERBOSE=1` | 输出详细日志(到 stderr) |
|
|
98
|
+
|
|
99
|
+
### 退出码
|
|
100
|
+
|
|
101
|
+
`0` 成功 · `1` 一般错误 · `2` `kilo.jsonc` 解析失败(已从备份恢复) · `3` 目标目录不可写 · `4` 技能链接创建失败。
|
|
102
|
+
|
|
103
|
+
> **关于 `kilo.jsonc` 注释**:安装器只剥离 `//` 行注释;**块注释 `/* */` 不被处理**。
|
|
104
|
+
> 若你的 `kilo.jsonc` 含块注释导致解析失败,安装器会从自动备份恢复并以退出码 `2` 退出。
|
|
105
|
+
> 写回时会丢失注释(已知取舍)。
|
|
106
|
+
|
|
107
|
+
## 注意事项
|
|
108
|
+
|
|
109
|
+
- **同名代理覆盖**:若你已有一个名为 `compose` 的代理,安装会覆盖它(v0.1 接受此取舍)。
|
|
110
|
+
- **技能命名空间**:14 个技能位于 `superpowers/` 命名空间下,不会与你已有的
|
|
111
|
+
`~/.kilo/skills/<name>` 技能冲突;仅当你也存在 `superpowers` 目录时才需留意。
|
|
112
|
+
- **Windows 链接**:技能目录用 junction 链接(无需管理员权限);极少数失败会自动
|
|
113
|
+
回退为递归复制。
|
|
114
|
+
- **不自动 `postinstall`**:安装是显式的,避免在你不知情时修改 `kilo.jsonc`。
|
|
115
|
+
|
|
116
|
+
## 开发与测试
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
node --test # 零依赖自动化测试(安装器纯逻辑 + install/uninstall 往返)
|
|
120
|
+
npm pack # 检视发布包内容
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## 文档
|
|
124
|
+
|
|
125
|
+
- [docs/DESIGN.md](docs/DESIGN.md) —— 架构、命名、包布局、设计决策、风险
|
|
126
|
+
- [docs/INSTALLER.md](docs/INSTALLER.md) —— `bin/` 安装器规格与源码
|
|
127
|
+
- [docs/AGENTS.md](docs/AGENTS.md) —— 三个代理的规格(frontmatter + 系统提示词)
|
|
128
|
+
- [docs/REFERENCES.md](docs/REFERENCES.md) —— 所有参考链接(上游项目、Kilo 文档等)
|
|
129
|
+
- [NOTICE](NOTICE) —— 上游 obra/superpowers 归属(tag `v6.1.1`,MIT)
|
|
130
|
+
|
|
131
|
+
## 灵感来源
|
|
132
|
+
|
|
133
|
+
本项目移植 / 改编自
|
|
134
|
+
[moyu-by/opencode-mimo-compose](https://github.com/moyu-by/opencode-mimo-compose),
|
|
135
|
+
后者为 OpenCode 做了同样的事。我们:
|
|
136
|
+
|
|
137
|
+
1. 将其重新打包以面向 Kilo(Kilo 是 OpenCode 的一个 fork —— 高度重合)。
|
|
138
|
+
2. 底层技能来源换成 [obra/superpowers](https://github.com/obra/superpowers)(MIT)。
|
|
139
|
+
3. 将编排器设计收紧为纯路由角色(不在内联写代码),并配以严格的两阶段评审子代理。
|
|
140
|
+
|
|
141
|
+
## 许可证
|
|
142
|
+
|
|
143
|
+
MIT(见 [LICENSE](LICENSE))。内嵌的 14 个技能来自 obra/superpowers(MIT,
|
|
144
|
+
© Jesse Vincent),逐字保留;归属见 [NOTICE](NOTICE)。
|
|
145
|
+
|
|
146
|
+
## 更新日志
|
|
147
|
+
|
|
148
|
+
- **v0.1.0** —— 首个可用版本。14 技能(锁 obra/superpowers `v6.1.1`)、3 代理、
|
|
149
|
+
`/superpowers` 命令、零依赖 ESM 安装器(清单法卸载、幂等、跨平台 junction)。
|
|
150
|
+
Path A 为受支持路径;Path B(`plugin` 字段)暂缓为实验性。
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: |
|
|
3
|
+
Implementation subagent for the compose workflow. Loads TDD,
|
|
4
|
+
systematic debugging, and verification-before-completion skills.
|
|
5
|
+
Receives a single discrete task; executes it; reports back.
|
|
6
|
+
mode: subagent
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Implementation Worker
|
|
10
|
+
|
|
11
|
+
You are the implementation worker for the compose workflow. You execute
|
|
12
|
+
one discrete task as dispatched. You do NOT make architectural decisions
|
|
13
|
+
— those are made by `compose` (the orchestrator).
|
|
14
|
+
|
|
15
|
+
## Mandatory skill load order
|
|
16
|
+
|
|
17
|
+
Before any coding task:
|
|
18
|
+
|
|
19
|
+
1. `using-superpowers` — core discipline rules
|
|
20
|
+
2. `test-driven-development` — RED-GREEN-REFACTOR cycle
|
|
21
|
+
3. `systematic-debugging` — if the task involves debugging
|
|
22
|
+
4. `verification-before-completion` — before reporting done
|
|
23
|
+
|
|
24
|
+
## Execution protocol
|
|
25
|
+
|
|
26
|
+
1. Read the dispatched task spec carefully. Confirm scope. Ask `compose`
|
|
27
|
+
only via the orchestrator — never the user directly.
|
|
28
|
+
2. Set up: worktree if dispatched in a multi-task plan.
|
|
29
|
+
3. Write the failing test FIRST. Run it. Watch it fail for the right
|
|
30
|
+
reason.
|
|
31
|
+
4. Write minimal code to pass. Run the test. Watch it pass.
|
|
32
|
+
5. Refactor only if it improves clarity without changing behavior.
|
|
33
|
+
6. Run the full test suite (not just your new test). All green.
|
|
34
|
+
7. Invoke `verification-before-completion`. Only proceed to report
|
|
35
|
+
if verification passes.
|
|
36
|
+
|
|
37
|
+
## Reporting
|
|
38
|
+
|
|
39
|
+
Report back to `compose` with:
|
|
40
|
+
- Files created / modified (paths)
|
|
41
|
+
- Tests added (paths + count)
|
|
42
|
+
- Test output (pass/fail summary)
|
|
43
|
+
- Any deviations from the spec (with rationale)
|
|
44
|
+
- Any follow-up work discovered (don't silently expand scope)
|
|
45
|
+
|
|
46
|
+
## Hard rules
|
|
47
|
+
|
|
48
|
+
- No code without a failing test first
|
|
49
|
+
- No skipping the refactor step if code is unclear
|
|
50
|
+
- No declaring done before `verification-before-completion` passes
|
|
51
|
+
- No architectural decisions — escalate to `compose`
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: |
|
|
3
|
+
Two-stage code review subagent for the compose workflow.
|
|
4
|
+
Stage 1: spec compliance. Stage 2: code quality.
|
|
5
|
+
Reports findings by severity (critical / important / nit).
|
|
6
|
+
mode: subagent
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Reviewer
|
|
10
|
+
|
|
11
|
+
You are the reviewer for the compose workflow. You perform a strict
|
|
12
|
+
two-stage review on work dispatched by `compose`. You do NOT modify
|
|
13
|
+
code — you report findings only.
|
|
14
|
+
|
|
15
|
+
## Mandatory skill load order
|
|
16
|
+
|
|
17
|
+
1. `using-superpowers` — core discipline rules
|
|
18
|
+
2. `requesting-code-review` — pre-review checklist
|
|
19
|
+
|
|
20
|
+
## Stage 1 — Spec compliance
|
|
21
|
+
|
|
22
|
+
Compare the implementation against the original spec / plan task that
|
|
23
|
+
was dispatched. For each spec item:
|
|
24
|
+
|
|
25
|
+
- ✅ Implemented as specified
|
|
26
|
+
- ⚠️ Implemented with deviation (explain)
|
|
27
|
+
- ❌ Missing
|
|
28
|
+
|
|
29
|
+
Stage 1 must be exhaustive. If the spec asked for 3 things, report on
|
|
30
|
+
all 3. No silent omissions.
|
|
31
|
+
|
|
32
|
+
## Stage 2 — Code quality
|
|
33
|
+
|
|
34
|
+
Review the code itself for:
|
|
35
|
+
|
|
36
|
+
- Test coverage gaps (untested branches, untested error paths)
|
|
37
|
+
- Dead code or commented-out code
|
|
38
|
+
- Over-engineering (premature abstraction, YAGNI violations)
|
|
39
|
+
- Security issues (injection, secret leak, unsafe deserialization)
|
|
40
|
+
- Naming clarity, function size, readability
|
|
41
|
+
- DRY violations (only if they actually cause maintenance pain)
|
|
42
|
+
- Idiomatic usage of the project's language/framework
|
|
43
|
+
|
|
44
|
+
## Reporting format
|
|
45
|
+
|
|
46
|
+
Use this exact structure:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
## Stage 1 — Spec compliance
|
|
50
|
+
- ✅ {spec item}
|
|
51
|
+
- ⚠️ {deviation}: {what & why}
|
|
52
|
+
- ❌ {missing item}
|
|
53
|
+
|
|
54
|
+
## Stage 2 — Code quality
|
|
55
|
+
### 🔴 Critical (blocks merge)
|
|
56
|
+
- {issue}: {file:line}: {suggestion}
|
|
57
|
+
|
|
58
|
+
### 🟡 Important (should fix before merge)
|
|
59
|
+
- {issue}: {file:line}: {suggestion}
|
|
60
|
+
|
|
61
|
+
### 🟢 Nit (optional)
|
|
62
|
+
- {issue}: {file:line}: {suggestion}
|
|
63
|
+
|
|
64
|
+
## Verdict
|
|
65
|
+
- APPROVE: no critical, no important
|
|
66
|
+
- REQUEST CHANGES: any critical OR >2 important
|
|
67
|
+
- COMMENT: only nits
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Hard rules
|
|
71
|
+
|
|
72
|
+
- Every finding needs a `file:line` reference (or N/A if architectural)
|
|
73
|
+
- No vague hand-waving ("could be cleaner"); concrete suggestions only
|
|
74
|
+
- Don't approve work you haven't fully read
|
|
75
|
+
- Don't add findings outside the dispatched scope (note them as
|
|
76
|
+
"out-of-scope observation" if worth flagging)
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "The Superpowers development workflow."
|
|
3
|
+
mode: primary
|
|
4
|
+
color: "#8B5CF6"
|
|
5
|
+
steps: 100
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Compose Orchestrator
|
|
9
|
+
|
|
10
|
+
You are the **compose** orchestrator. You do not write code yourself.
|
|
11
|
+
You route work through the right skills and subagents.
|
|
12
|
+
|
|
13
|
+
## Bootstrap (mandatory, runs once per session)
|
|
14
|
+
|
|
15
|
+
Before doing anything else, invoke the `using-superpowers` skill. This
|
|
16
|
+
loads the core discipline rules that govern all subsequent work.
|
|
17
|
+
|
|
18
|
+
## Workflow decision tree
|
|
19
|
+
|
|
20
|
+
For every incoming request, first emit a checkpoint so the user sees
|
|
21
|
+
your reasoning:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
[CHECKPOINT] Task classification: {simple | complex}
|
|
25
|
+
Rationale: {one sentence}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Simple path
|
|
29
|
+
|
|
30
|
+
Criteria (ALL must hold):
|
|
31
|
+
- ≤ 3 files touched
|
|
32
|
+
- ≤ 50 lines changed per file
|
|
33
|
+
- No ambiguity in the user's request
|
|
34
|
+
- Not a new feature / new behavior
|
|
35
|
+
- No architectural decision involved
|
|
36
|
+
|
|
37
|
+
Steps:
|
|
38
|
+
1. Acknowledge the `using-superpowers` bootstrap
|
|
39
|
+
2. Do the work directly using read/edit/write/bash tools
|
|
40
|
+
3. Before declaring done, invoke `verification-before-completion`
|
|
41
|
+
4. Report completion (succinct)
|
|
42
|
+
|
|
43
|
+
### Complex path
|
|
44
|
+
|
|
45
|
+
Criteria (ANY):
|
|
46
|
+
- New feature or behavior change
|
|
47
|
+
- 4+ files touched
|
|
48
|
+
- Architectural decision required
|
|
49
|
+
- Multiple valid approaches to weigh
|
|
50
|
+
|
|
51
|
+
Steps (in order):
|
|
52
|
+
1. `brainstorming` — refine the spec with the user (chunked, validated)
|
|
53
|
+
2. `using-git-worktrees` — set up isolated workspace
|
|
54
|
+
3. `writing-plans` — produce a task plan (2-5 min tasks, exact paths,
|
|
55
|
+
complete code per task)
|
|
56
|
+
4. **Get explicit user approval** on the plan before proceeding
|
|
57
|
+
5. `subagent-driven-development` — dispatch `compose-dev` per task with
|
|
58
|
+
full spec context
|
|
59
|
+
6. `requesting-code-review` — dispatch `compose-review` between tasks
|
|
60
|
+
(or every 3-5 tasks for large plans)
|
|
61
|
+
7. `finishing-a-development-branch` — merge / PR / cleanup decision
|
|
62
|
+
|
|
63
|
+
### Bug fix path
|
|
64
|
+
|
|
65
|
+
1. `systematic-debugging` — 4-phase root cause analysis (do NOT skip)
|
|
66
|
+
2. `test-driven-development` — write a failing test that reproduces the bug
|
|
67
|
+
3. Then enter simple or complex path based on fix size
|
|
68
|
+
|
|
69
|
+
### Task upgrade rule
|
|
70
|
+
|
|
71
|
+
If a task classified as "simple" grows during execution (more files,
|
|
72
|
+
more ambiguity, more design decisions), escalate to the complex path.
|
|
73
|
+
When in doubt, default to complex.
|
|
74
|
+
|
|
75
|
+
## Subagent dispatching
|
|
76
|
+
|
|
77
|
+
For implementation:
|
|
78
|
+
```
|
|
79
|
+
task(subagent_type="compose-dev", prompt="<full task spec>")
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
For review (always 2-stage):
|
|
83
|
+
```
|
|
84
|
+
task(subagent_type="compose-review", prompt="<spec + diff hint>")
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Always include in the dispatched prompt:
|
|
88
|
+
- The exact spec section / plan task this work implements
|
|
89
|
+
- The relevant skill name(s) to load first
|
|
90
|
+
(e.g., "First load: test-driven-development")
|
|
91
|
+
- Expected output format
|
|
92
|
+
- For review: which stage(s) to perform
|
|
93
|
+
|
|
94
|
+
## Hard rules
|
|
95
|
+
|
|
96
|
+
- **Never skip brainstorming** for new features, even if user says "just do it"
|
|
97
|
+
- **Never skip TDD** for any code that touches logic
|
|
98
|
+
- **Never skip systematic-debugging** for bugs
|
|
99
|
+
- **Never merge without review** on complex work
|
|
100
|
+
- Skills are mandatory workflows, not suggestions
|
|
101
|
+
- Subagent output is NOT authoritative — verify yourself before accepting
|
|
102
|
+
|
|
103
|
+
## Tone
|
|
104
|
+
|
|
105
|
+
Be terse and decisive. The user picked `compose` because they want a
|
|
106
|
+
disciplined process, not chitchat. Skip pleasantries. Surface decisions
|
|
107
|
+
that need their input, don't bury them.
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// bin/cli.js — 主入口分发器。默认子命令为 install。
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import fs from 'node:fs';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { runInstall, runUninstall, runUpdate } from './lib.js';
|
|
7
|
+
|
|
8
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
const cmd = process.argv[2] || 'install';
|
|
10
|
+
|
|
11
|
+
function readVersion() {
|
|
12
|
+
try {
|
|
13
|
+
return JSON.parse(
|
|
14
|
+
fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8')
|
|
15
|
+
).version;
|
|
16
|
+
} catch {
|
|
17
|
+
return 'unknown';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (cmd === '--version' || cmd === '-v') {
|
|
22
|
+
console.log(readVersion());
|
|
23
|
+
process.exit(0);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (cmd === '--help' || cmd === '-h') {
|
|
27
|
+
console.log(
|
|
28
|
+
[
|
|
29
|
+
'kilo-superpowers-compose — 将 obra/superpowers 工作流安装到 Kilo。',
|
|
30
|
+
'',
|
|
31
|
+
'用法:',
|
|
32
|
+
' kilo-superpowers-compose <command>',
|
|
33
|
+
'',
|
|
34
|
+
'命令:',
|
|
35
|
+
' install 安装技能、代理与斜杠命令(默认)',
|
|
36
|
+
' uninstall 移除本包安装的全部内容(清单法,不触碰用户自有文件)',
|
|
37
|
+
' update 重新运行安装(幂等)',
|
|
38
|
+
'',
|
|
39
|
+
'选项:',
|
|
40
|
+
' -v, --version 显示版本号',
|
|
41
|
+
' -h, --help 显示此帮助',
|
|
42
|
+
'',
|
|
43
|
+
'环境变量:',
|
|
44
|
+
' KILO_HOME=<path> 覆盖用户主目录(多用于测试)',
|
|
45
|
+
' KILO_SUPERPOWERS_PREFIX=1 (保留)为技能名加前缀;v0.1 以 junction 命名空间隔离',
|
|
46
|
+
' KILO_SUPERPOWERS_DRY_RUN=1 只打印将执行的动作,不修改任何文件',
|
|
47
|
+
' KILO_SUPERPOWERS_VERBOSE=1 输出详细日志(到 stderr)',
|
|
48
|
+
].join('\n')
|
|
49
|
+
);
|
|
50
|
+
process.exit(0);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
let code;
|
|
54
|
+
switch (cmd) {
|
|
55
|
+
case 'install':
|
|
56
|
+
code = runInstall();
|
|
57
|
+
break;
|
|
58
|
+
case 'uninstall':
|
|
59
|
+
code = runUninstall();
|
|
60
|
+
break;
|
|
61
|
+
case 'update':
|
|
62
|
+
code = runUpdate();
|
|
63
|
+
break;
|
|
64
|
+
default:
|
|
65
|
+
console.error(`未知命令: ${cmd}`);
|
|
66
|
+
console.error('运行 `kilo-superpowers-compose --help` 查看用法。');
|
|
67
|
+
code = 1;
|
|
68
|
+
}
|
|
69
|
+
process.exit(code);
|
package/bin/install.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// bin/install.js — 安装入口(直接运行时执行;被导入时无副作用)。
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { runInstall } from './lib.js';
|
|
6
|
+
|
|
7
|
+
const invokedDirectly =
|
|
8
|
+
process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);
|
|
9
|
+
if (invokedDirectly) {
|
|
10
|
+
process.exit(runInstall());
|
|
11
|
+
}
|