dsh-superpower 6.3.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 +22 -0
- package/README.md +334 -0
- package/cordis.patch.yml +3 -0
- package/lib/superpowers.d.ts +44 -0
- package/lib/superpowers.d.ts.map +1 -0
- package/lib/superpowers.js +291 -0
- package/lib/superpowers.js.map +1 -0
- package/package.json +62 -0
- package/skills/brainstorming/SKILL.md +207 -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 +47 -0
- package/skills/brainstorming/visual-companion.md +293 -0
- package/skills/dispatching-parallel-agents/SKILL.md +167 -0
- package/skills/executing-plans/SKILL.md +64 -0
- package/skills/finishing-a-development-branch/SKILL.md +202 -0
- package/skills/receiving-code-review/SKILL.md +205 -0
- package/skills/requesting-code-review/SKILL.md +95 -0
- package/skills/requesting-code-review/code-reviewer.md +169 -0
- package/skills/subagent-driven-development/SKILL.md +347 -0
- package/skills/subagent-driven-development/implementer-prompt.md +133 -0
- package/skills/subagent-driven-development/re-review-prompt.md +84 -0
- package/skills/subagent-driven-development/scripts/review-package +46 -0
- package/skills/subagent-driven-development/scripts/sdd-workspace +40 -0
- package/skills/subagent-driven-development/scripts/task-brief +41 -0
- package/skills/subagent-driven-development/task-reviewer-prompt.md +129 -0
- package/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/systematic-debugging/SKILL.md +283 -0
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/systematic-debugging/condition-based-waiting.md +116 -0
- package/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/systematic-debugging/find-polluter.sh +72 -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 +322 -0
- package/skills/test-driven-development/writing-good-tests.md +145 -0
- package/skills/using-git-worktrees/SKILL.md +167 -0
- package/skills/using-superpowers/SKILL.md +64 -0
- package/skills/using-superpowers/references/antigravity-tools.md +23 -0
- package/skills/using-superpowers/references/codex-tools.md +108 -0
- package/skills/using-superpowers/references/dsh-tools.md +47 -0
- package/skills/using-superpowers/references/gemini-tools.md +63 -0
- package/skills/using-superpowers/references/hermes-tools.md +56 -0
- package/skills/using-superpowers/references/pi-tools.md +16 -0
- package/skills/verification-before-completion/SKILL.md +120 -0
- package/skills/writing-plans/SKILL.md +160 -0
- package/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/skills/writing-skills/SKILL.md +679 -0
- package/skills/writing-skills/anthropic-best-practices.md +1146 -0
- package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +188 -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 +169 -0
- package/skills/writing-skills/testing-skills-with-subagents.md +384 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 obra/superpowers contributors
|
|
4
|
+
Copyright (c) 2026 dsh-superpower contributors
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
# dsh-superpower
|
|
2
|
+
|
|
3
|
+
[](./package.json)
|
|
4
|
+
[](./LICENSE)
|
|
5
|
+
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
6
|
+
[](./package.json)
|
|
7
|
+
[](#包含技能)
|
|
8
|
+
|
|
9
|
+
[obra/superpowers](https://github.com/obra/superpowers) 的 **DSH 移植版** — 将完整的多智能体软件开发方法论以原生 DSH 技能的形式开箱即用。
|
|
10
|
+
|
|
11
|
+
> 上游 `obra/superpowers v6.3.0` 的完整移植:14 个方法论技能以 DSH 原生 `SkillProvider` 注入 `ctx.skills`,`rank 550` 可被项目级覆盖,安装即生效。所有技能正文已中文化。
|
|
12
|
+
|
|
13
|
+
- **上游**:https://github.com/obra/superpowers
|
|
14
|
+
- **版本同步**:本仓库版本号与上游 `package.json` 保持一致(当前 `6.3.0`)
|
|
15
|
+
- **协议**:MIT
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
> **3 秒速览:一个人拿到怎么用?**
|
|
20
|
+
>
|
|
21
|
+
> 已装好 `dsh` 的话,只需一行(零构建、零配置):
|
|
22
|
+
> ```bash
|
|
23
|
+
> dsh plugin --profile demo add github:Wenaixi/dsh-superpower#v6.3.0
|
|
24
|
+
> dsh --profile demo --dump-config # 看到 "# == dsh-superpower" 即成功
|
|
25
|
+
> dsh --profile demo # 进会话,技能自动可用
|
|
26
|
+
> ```
|
|
27
|
+
> 还没发布到 npm 也完全可用,无需 `npm publish`。详见 [安装](#安装)。
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 目录
|
|
32
|
+
|
|
33
|
+
- [特性](#特性)
|
|
34
|
+
- [包含技能](#包含技能)
|
|
35
|
+
- [安装](#安装)
|
|
36
|
+
- [前置要求](#前置要求)
|
|
37
|
+
- [方式一:GitHub 一键安装(推荐)](#方式一github-一键安装推荐零配置无需-npm)
|
|
38
|
+
- [方式二:本地克隆(二次开发/联调)](#方式二本地克隆二次开发联调推荐)
|
|
39
|
+
- [方式三:npm / tarball(可选)](#方式三npm--tarball可选当前未发布到-npm)
|
|
40
|
+
- [验证安装成功](#验证安装成功)
|
|
41
|
+
- [更新与卸载](#更新与卸载)
|
|
42
|
+
- [使用](#使用)
|
|
43
|
+
- [与 DSH 原生能力的分工](#与-dsh-原生能力的分工)
|
|
44
|
+
- [本地开发](#本地开发)
|
|
45
|
+
- [目录结构](#目录结构)
|
|
46
|
+
- [版本策略](#版本策略)
|
|
47
|
+
- [常见问题](#常见问题)
|
|
48
|
+
- [贡献](#贡献)
|
|
49
|
+
- [更新日志](#更新日志)
|
|
50
|
+
- [协议](#协议)
|
|
51
|
+
- [致谢](#致谢)
|
|
52
|
+
|
|
53
|
+
## 特性
|
|
54
|
+
|
|
55
|
+
- **零侵入**:以 DSH 标准 `SkillProvider` 注册,不新增 `ctx` 键,不污染宿主事件
|
|
56
|
+
- **可覆盖**:`rank 550` 介于 `user-agents (500)` 与 `bundled (600)` 之间,`.dsh/skills` 与 `~/.dsh/skills` 可按名覆盖
|
|
57
|
+
- **全中文化**:14 个 `SKILL.md` 及 20+ 辅助文档均已译为简体中文,代码/命令/路径保持原文
|
|
58
|
+
- **DSH 工具映射**:`Bash→pwsh/bash`、`Read/Write/Edit→fs`、`Glob/Grep→fs-search`、`Task/Subagent→subagent/workflow` 等详见 [`skills/using-superpowers/references/dsh-tools.md`](./skills/using-superpowers/references/dsh-tools.md)
|
|
59
|
+
- **热更新友好**:`ctx.skills.registerProvider` 走 `ctx.effect`,HMR 时自动清理重建
|
|
60
|
+
|
|
61
|
+
## 包含技能
|
|
62
|
+
|
|
63
|
+
| 技能 | 触发时机 | 说明 |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| `using-superpowers` | 任意会话起点(1% 原则) | 强制先做技能检查,禁止无约束直接编码 |
|
|
66
|
+
| `brainstorming` | 任何创意/新功能工作前 | 三路径分类(Spike / Bounded / Architectural)+ 苏格拉底式设计细化 |
|
|
67
|
+
| `writing-plans` | 设计获批后 | 切片为 2–5 分钟可执行的细粒度任务 |
|
|
68
|
+
| `using-git-worktrees` | 设计获批后、编码前 | 隔离分支 + 干净基线验证 |
|
|
69
|
+
| `executing-plans` | 已有计划时 | 分批执行 + 人工检查点 |
|
|
70
|
+
| `subagent-driven-development` | 已有计划时(推荐) | 每任务一子智能体 + 两阶段评审 |
|
|
71
|
+
| `dispatching-parallel-agents` | 需要并行时 | 并发子智能体编排 |
|
|
72
|
+
| `test-driven-development` | 任何功能/缺陷修复时 | RED-GREEN-REFACTOR 铁律 |
|
|
73
|
+
| `systematic-debugging` | 修复缺陷时 | 4 阶段根因追踪 + 纵深防御 + 条件等待 |
|
|
74
|
+
| `verification-before-completion` | 声称完成前 | 必须运行验证命令并用证据说话 |
|
|
75
|
+
| `requesting-code-review` | 任务间 | 按严重度报告问题,Critical 级别阻塞 |
|
|
76
|
+
| `receiving-code-review` | 收到评审后 | 回应反馈 |
|
|
77
|
+
| `finishing-a-development-branch` | 全部任务完成后 | 验证测试 + 合并/PR/保留/丢弃决策 |
|
|
78
|
+
| `writing-skills` | 创建新技能时 | 技能编写最佳实践 |
|
|
79
|
+
|
|
80
|
+
## 安装
|
|
81
|
+
|
|
82
|
+
### 前置要求
|
|
83
|
+
|
|
84
|
+
- **Node.js** `>=20`(`node -v` 检查)
|
|
85
|
+
- **pnpm** `>=9`(DSH 的 profile 安装依赖它,`pnpm -v` 检查)
|
|
86
|
+
- **dsh CLI**(`dsh --version` 检查;未安装执行 `npm i -g @deepseek-ai/dsh`)
|
|
87
|
+
|
|
88
|
+
> 首次使用 `dsh plugin` 会自动以 `@deepseek-ai/dsh-base` 初始化对应 profile,无需手动创建。
|
|
89
|
+
|
|
90
|
+
### 方式一:GitHub 一键安装(推荐,零配置,无需 npm)
|
|
91
|
+
|
|
92
|
+
适合 **“路人同事刚拿到链接,3 分钟内可用”** 的场景。本方式直接从 GitHub 拉取源码,无需本机有本仓库的检出,也无需发布到 npm。
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# 安装到名为 demo 的 profile(首次会自动初始化该 profile)
|
|
96
|
+
dsh plugin --profile demo add github:Wenaixi/dsh-superpower#v6.3.0
|
|
97
|
+
|
|
98
|
+
# 断言层已生效(应能看到 "# == dsh-superpower" 与 "id: superpowers")
|
|
99
|
+
dsh --profile demo --dump-config | grep -A2 "dsh-superpower"
|
|
100
|
+
|
|
101
|
+
# 启动,技能自动可用
|
|
102
|
+
dsh --profile demo
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
锁定到标签 `#v6.3.0` 可保证后续上游推送不会悄悄改变实际运行内容;想跟最新 `main` 可去掉 `#v6.3.0`。
|
|
106
|
+
|
|
107
|
+
**关于 `prepare` 构建**:本包 `package.json` 声明了 `prepare: npm run build`,`dsh plugin add github:...` 时会由 pnpm 在本地自动执行 `tsc` 编译出 `lib/`,无需你手动构建。产物自包含,不依赖仓库外的 monorepo 上下文。
|
|
108
|
+
|
|
109
|
+
**首次安装可能遇到的 `allowBuilds` 授权**:pnpm `>=10` 默认拒绝执行来自 git 依赖的 `prepare` 脚本,首次 `add` 会失败并打印类似:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
Ignored build scripts: dsh-superpower
|
|
113
|
+
Run "pnpm approve-builds" or add to pnpm-workspace.yaml: allowBuilds: { dsh-superpower: true }
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
按提示操作一次即可(这是 pnpm 的安全机制,授权仅表示允许该包在**安装时**执行其 `prepare`):
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# 在报错的 profile 目录下(提示中会给出路径,如 C:\Users\你\.dsh\profiles\demo)
|
|
120
|
+
# 编辑 pnpm-workspace.yaml,加入:
|
|
121
|
+
# allowBuilds:
|
|
122
|
+
# dsh-superpower: true
|
|
123
|
+
# 然后重新执行:
|
|
124
|
+
dsh plugin --profile demo add github:Wenaixi/dsh-superpower#v6.3.0
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
或执行 `pnpm approve-builds` 按交互授权。只对源码可信的包授权即可。
|
|
128
|
+
|
|
129
|
+
### 方式二:本地克隆(二次开发/联调,推荐)
|
|
130
|
+
|
|
131
|
+
适合要改技能正文、调 `rank`、或对照上游做中文化的开发者。
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
git clone https://github.com/Wenaixi/dsh-superpower.git
|
|
135
|
+
cd dsh-superpower
|
|
136
|
+
pnpm install && pnpm build # 产物输出到 lib/,lib/ 不提交
|
|
137
|
+
node scripts/verify.mjs # 冒烟:应输出 14/14 PASS
|
|
138
|
+
|
|
139
|
+
# 以本地路径安装到 profile(pnpm 会以 link: 形式依赖,改动后重新 pnpm build 即可生效)
|
|
140
|
+
dsh plugin --profile demo add ./
|
|
141
|
+
dsh --profile demo --dump-config # 断言 "# == dsh-superpower"
|
|
142
|
+
dsh --profile demo
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
后续改动 `skills/` 或 `src/` 后,只需 `pnpm build`,重启对应 profile 即生效(`ctx.effect` 会自动清理旧 Provider)。
|
|
146
|
+
|
|
147
|
+
### 方式三:npm / tarball(可选,当前未发布到 npm)
|
|
148
|
+
|
|
149
|
+
> **需要发布 npm 吗?不需要。** 上述 GitHub 直装已完全可用。发布到 npm 只是为了让安装命令能简写为 `dsh plugin --profile demo add dsh-superpower`(省去 `github:` 前缀与 `#tag`),并让 `npm` 镜像(如 `npmmirror`)可检索到包。
|
|
150
|
+
|
|
151
|
+
当前 `dsh-superpower` **尚未发布到 npm**,因此 `dsh plugin --profile demo add dsh-superpower` 会报 `404`。如需走 npm 渠道,有两种选择:
|
|
152
|
+
|
|
153
|
+
**A. 发布者发布到 npm(一次性)**:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# 需先 npm login(registry 需切回 https://registry.npmjs.org,而非 npmmirror)
|
|
157
|
+
npm login
|
|
158
|
+
pnpm build
|
|
159
|
+
npm publish --access public # 首次发布
|
|
160
|
+
# 之后他人即可:
|
|
161
|
+
dsh plugin --profile demo add dsh-superpower
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**B. 不发布,用 tarball 分发(无需授权)**:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
pnpm build
|
|
168
|
+
pnpm pack # 产出 dsh-superpower-6.3.0.tgz(已包含 lib/ + skills/)
|
|
169
|
+
|
|
170
|
+
# 接收方(无需本仓库、无需构建):
|
|
171
|
+
dsh plugin --profile demo add ./dsh-superpower-6.3.0.tgz
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
tarball 已包含构建产物,接收方无需执行 `prepare`,也就无需 `allowBuilds` 授权。
|
|
175
|
+
|
|
176
|
+
### 验证安装成功
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
# 1. 配置层可见
|
|
180
|
+
dsh --profile demo --dump-config | grep -A2 "dsh-superpower"
|
|
181
|
+
# 期望输出:
|
|
182
|
+
# # == dsh-superpower
|
|
183
|
+
# - id: superpowers
|
|
184
|
+
# name: dsh-superpower
|
|
185
|
+
|
|
186
|
+
# 2. 冒烟(本地检出时)
|
|
187
|
+
node scripts/verify.mjs
|
|
188
|
+
# 期望:found 14 skill directories ... ALL PASS
|
|
189
|
+
|
|
190
|
+
# 3. 会话内(模型侧,安装后重启 profile 再验证)
|
|
191
|
+
# await ctx.skills.list({ cwd: "/path/to/project" }) // 14 条,provider: superpowers, source: bundled
|
|
192
|
+
# await ctx.skills.get("brainstorming") // 返回含中文正文的完整 SKILL.md
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### 更新与卸载
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
# 更新到指定版本(GitHub 直装)
|
|
199
|
+
dsh plugin --profile demo add github:Wenaixi/dsh-superpower#v6.3.1
|
|
200
|
+
|
|
201
|
+
# 更新到最新 main(不推荐长期锁定场景)
|
|
202
|
+
dsh plugin --profile demo add github:Wenaixi/dsh-superpower
|
|
203
|
+
|
|
204
|
+
# 卸载
|
|
205
|
+
dsh plugin --profile demo remove dsh-superpower
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
> 每个 profile 独立:`demo`、`web`、`my-project` 等 profile 需分别安装。
|
|
209
|
+
|
|
210
|
+
## 使用
|
|
211
|
+
|
|
212
|
+
安装后无需额外配置。模型侧通过 `skill` 工具或用户显式指令 `/skill superpowers:<名称>` 加载:
|
|
213
|
+
|
|
214
|
+
- “帮我做一个 XXX 功能” → 自动触发 `brainstorming`
|
|
215
|
+
- “修一下这个缺陷” → 自动触发 `systematic-debugging`
|
|
216
|
+
- “先出个计划” → 触发 `writing-plans`
|
|
217
|
+
|
|
218
|
+
不走技能也能在模型侧直接验证:
|
|
219
|
+
|
|
220
|
+
```js
|
|
221
|
+
// 在 DSH 会话中(模型侧)
|
|
222
|
+
await ctx.skills.list({ cwd: "/path/to/project" }) // 14 条 superpowers/bundled
|
|
223
|
+
await ctx.skills.get("brainstorming") // 完整 SKILL.md 正文
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## 与 DSH 原生能力的分工
|
|
227
|
+
|
|
228
|
+
- `dsh-plan-mode`(只读规划锁定)负责计划模式的开关与轮次边界;本插件的 `writing-plans` 负责把已批准设计切片为可执行任务
|
|
229
|
+
- `dsh-skill-filesystem` 的 `~/.dsh/skills` 与 `.dsh/skills` 优先级高于本插件(`rank 550`),可在项目级覆盖同名 superpowers 技能
|
|
230
|
+
- `subagent` / `workflow` / `todo` / `goal` / `ask-user` 等 DSH 工具与技能正文中的映射见 `dsh-tools.md`
|
|
231
|
+
|
|
232
|
+
## 本地开发
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
pnpm install
|
|
236
|
+
pnpm build # tsc -p tsconfig.build.json -> lib/
|
|
237
|
+
pnpm typecheck # tsc --noEmit
|
|
238
|
+
node scripts/verify.mjs # 冒烟:14 个技能可列举 + 可加载
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
不走 profile 安装时,可用补丁叠加层本地调试:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
pnpm dsh web --patch ./cordis.patch.yml
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
或在 `cordis.patch.yml` 中覆盖技能目录(指向本地上游检出,便于对照):
|
|
248
|
+
|
|
249
|
+
```yaml
|
|
250
|
+
- insert:
|
|
251
|
+
- id: superpowers
|
|
252
|
+
name: dsh-superpower
|
|
253
|
+
config:
|
|
254
|
+
skillDir: E:/tmp/superpowers/skills
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### 代码规范
|
|
258
|
+
|
|
259
|
+
- 插件入口 `src/superpowers.ts`:函数形态 `export function apply(ctx, config)`,`inject = ['skills']`,配置走 Schemastery
|
|
260
|
+
- 失败要响亮:非法 frontmatter 仅跳过该技能并 `warn`,不吞整体
|
|
261
|
+
- 注释与提交信息使用简体中文,代码注释同
|
|
262
|
+
|
|
263
|
+
## 目录结构
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
dsh-superpower/
|
|
267
|
+
├── src/superpowers.ts # 插件入口 + SuperpowersProvider (rank 550)
|
|
268
|
+
├── skills/ # 14 个技能(已中文化,含 references/scripts)
|
|
269
|
+
│ ├── using-superpowers/references/dsh-tools.md
|
|
270
|
+
│ ├── brainstorming/
|
|
271
|
+
│ ├── writing-plans/
|
|
272
|
+
│ └── ...
|
|
273
|
+
├── scripts/verify.mjs # 冒烟:校验 14 技能 + 关键文件
|
|
274
|
+
├── cordis.patch.yml # bundle 层:insert superpowers
|
|
275
|
+
├── package.json # dsh.bundle.patch 指向 cordis.patch.yml
|
|
276
|
+
├── tsconfig.json
|
|
277
|
+
└── lib/ # 构建产物(不提交)
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## 版本策略
|
|
281
|
+
|
|
282
|
+
- 本仓库 `version` 与上游 `obra/superpowers` 的 `package.json#version` **严格同步**(当前 `6.3.0`)
|
|
283
|
+
- 上游发版后,本仓库同步 bump 版本、同步 `skills/` 内容(保留 DSH 映射与中文化),再发布
|
|
284
|
+
- `CHANGELOG.md` 汇总上游 Release Notes 与本仓库 DSH 适配变更
|
|
285
|
+
|
|
286
|
+
## 常见问题
|
|
287
|
+
|
|
288
|
+
**Q:一个人拿到链接,怎么最快用上?**
|
|
289
|
+
|
|
290
|
+
A:装好 `dsh` 后一行即可,无需克隆本仓库:`dsh plugin --profile demo add github:Wenaixi/dsh-superpower#v6.3.0`,然后 `dsh --profile demo`。这是推荐方式。
|
|
291
|
+
|
|
292
|
+
**Q:必须发布到 npm 吗?**
|
|
293
|
+
|
|
294
|
+
A:不必。GitHub 直装已完全可用。发到 npm 只是让命令可简写为 `dsh plugin --profile demo add dsh-superpower`,并让 `npm view` / 镜像可检索。当前本包尚未发布到 npm,走 GitHub 或 tarball 即可。
|
|
295
|
+
|
|
296
|
+
**Q:`dsh plugin add dsh-superpower` 报 404?**
|
|
297
|
+
|
|
298
|
+
A:因为尚未发布到 npm,请改用 `github:Wenaixi/dsh-superpower#v6.3.0` 或本地 `pnpm pack` 后的 `*.tgz`。发布到 npm 后该命令即生效。
|
|
299
|
+
|
|
300
|
+
**Q:首次 `add github:...` 报 `Ignored build scripts` / `allowBuilds`?**
|
|
301
|
+
|
|
302
|
+
A:pnpm `>=10` 的安全策略。按报错提示在对应 profile 的 `pnpm-workspace.yaml` 中加入 `allowBuilds: { dsh-superpower: true }` 后重试,或改用 `pnpm pack` 的 tarball(无需授权)。
|
|
303
|
+
|
|
304
|
+
**Q:安装后如何确认生效?**
|
|
305
|
+
|
|
306
|
+
A:`dsh --profile demo --dump-config | grep dsh-superpower` 应能看到 `# == dsh-superpower` 层;进会话后 `ctx.skills.list()` 应有 14 条 `superpowers`。
|
|
307
|
+
|
|
308
|
+
**Q:`pnpm install` 时 registry 是 `npmmirror` 有影响吗?**
|
|
309
|
+
|
|
310
|
+
A:对 GitHub 直装无影响(走 git)。仅在你执行 `npm publish` 或他人执行 `npm view dsh-superpower` 时才需切回 `https://registry.npmjs.org`。
|
|
311
|
+
|
|
312
|
+
## 贡献
|
|
313
|
+
|
|
314
|
+
欢迎提交 Issue / PR:
|
|
315
|
+
|
|
316
|
+
1. Fork 本仓库,基于 `main` 新建分支
|
|
317
|
+
2. 遵循 `writing-skills` 技能的编写与测试规范
|
|
318
|
+
3. `pnpm build && pnpm typecheck && node scripts/verify.mjs` 全绿后再提交
|
|
319
|
+
4. 提交 PR 时请说明关联的上游版本与改动范围
|
|
320
|
+
|
|
321
|
+
详见 [`CONTRIBUTING.md`](./CONTRIBUTING.md)。
|
|
322
|
+
|
|
323
|
+
## 更新日志
|
|
324
|
+
|
|
325
|
+
见 [`CHANGELOG.md`](./CHANGELOG.md)(上游 `v6.3.0` 及之前版本汇总 + DSH 移植变更)。
|
|
326
|
+
|
|
327
|
+
## 协议
|
|
328
|
+
|
|
329
|
+
MIT,与上游 [obra/superpowers](https://github.com/obra/superpowers) 保持一致。见 [`LICENSE`](./LICENSE)。
|
|
330
|
+
|
|
331
|
+
## 致谢
|
|
332
|
+
|
|
333
|
+
- 上游作者 [Jesse Vincent](https://blog.fsck.com) 与 [Prime Radiant](https://primeradiant.com)
|
|
334
|
+
- [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 的 `dsh-skill` 三角色架构
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dsh-superpower — DSH 移植版 Superpowers
|
|
3
|
+
*
|
|
4
|
+
* 将 obra/superpowers 的 14 个 skill 以 DSH 原生 SkillProvider 形式暴露,
|
|
5
|
+
* 通过 ctx.skills.registerProvider 注入全局层,rank 550 使 project 级 skill 可覆盖。
|
|
6
|
+
*/
|
|
7
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
8
|
+
import Schema from '@deepseek-ai/schemastery';
|
|
9
|
+
export declare const Config: Schema<Schemastery.ObjectS<{
|
|
10
|
+
/** 注册到 ctx.skills 的 provider 名称,默认为 superpowers */
|
|
11
|
+
providerName: Schema<string, string>;
|
|
12
|
+
/** skill 目录绝对路径,默认取包内 skills/;便于本地调试指向其他目录 */
|
|
13
|
+
skillDir: Schema<string, string>;
|
|
14
|
+
}>, Schemastery.ObjectT<{
|
|
15
|
+
/** 注册到 ctx.skills 的 provider 名称,默认为 superpowers */
|
|
16
|
+
providerName: Schema<string, string>;
|
|
17
|
+
/** skill 目录绝对路径,默认取包内 skills/;便于本地调试指向其他目录 */
|
|
18
|
+
skillDir: Schema<string, string>;
|
|
19
|
+
}>>;
|
|
20
|
+
export interface Config {
|
|
21
|
+
providerName?: string;
|
|
22
|
+
skillDir?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const name = "superpowers";
|
|
25
|
+
export declare const inject: readonly ["skills"];
|
|
26
|
+
export declare function apply(ctx: Context, config?: Config): void;
|
|
27
|
+
declare const _default: {
|
|
28
|
+
name: string;
|
|
29
|
+
inject: readonly ["skills"];
|
|
30
|
+
Config: Schema<Schemastery.ObjectS<{
|
|
31
|
+
/** 注册到 ctx.skills 的 provider 名称,默认为 superpowers */
|
|
32
|
+
providerName: Schema<string, string>;
|
|
33
|
+
/** skill 目录绝对路径,默认取包内 skills/;便于本地调试指向其他目录 */
|
|
34
|
+
skillDir: Schema<string, string>;
|
|
35
|
+
}>, Schemastery.ObjectT<{
|
|
36
|
+
/** 注册到 ctx.skills 的 provider 名称,默认为 superpowers */
|
|
37
|
+
providerName: Schema<string, string>;
|
|
38
|
+
/** skill 目录绝对路径,默认取包内 skills/;便于本地调试指向其他目录 */
|
|
39
|
+
skillDir: Schema<string, string>;
|
|
40
|
+
}>>;
|
|
41
|
+
apply: typeof apply;
|
|
42
|
+
};
|
|
43
|
+
export default _default;
|
|
44
|
+
//# sourceMappingURL=superpowers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"superpowers.d.ts","sourceRoot":"","sources":["../src/superpowers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAQlD,OAAO,MAAM,MAAM,0BAA0B,CAAA;AAM7C,eAAO,MAAM,MAAM;IACjB,mDAAmD;;IAEnD,8CAA8C;;;IAF9C,mDAAmD;;IAEnD,8CAA8C;;GAE9C,CAAA;AAEF,MAAM,WAAW,MAAM;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAMD,eAAO,MAAM,IAAI,gBAAgB,CAAA;AACjC,eAAO,MAAM,MAAM,qBAAsB,CAAA;AA0PzC,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,MAAqB,GAAG,IAAI,CAkBvE;;;;;QA5RC,mDAAmD;;QAEnD,8CAA8C;;;QAF9C,mDAAmD;;QAEnD,8CAA8C;;;;;AA4RhD,wBAA8C"}
|