@zfdx123/dsh-superpowers 1.0.0 → 1.0.2
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.en.md +93 -0
- package/README.md +53 -69
- package/package.json +2 -2
- package/test/index.test.js +5 -5
- package/README.zh.md +0 -109
package/README.en.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# @zfdx123/dsh-superpowers
|
|
2
|
+
|
|
3
|
+
Brings the [obra/superpowers](https://github.com/obra/superpowers) software-development methodology to [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): it registers 14 skills on `ctx.skills` (brainstorming, planning, TDD, systematic debugging, code review, and more) and injects the `using-superpowers` bootstrap as a system-prompt section, so it is present from the first request and survives context compaction. The skills are registered at runtime and never written to disk, so nothing is copied into `~/.dsh/skills` and no preset or profile skill directory has to change. This is version 1.0.0, targeting DSH `^0.1.6-alpha.1`.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
# The package on its own, from npm
|
|
9
|
+
dsh plugin --profile web add @zfdx123/dsh-superpowers
|
|
10
|
+
|
|
11
|
+
# The whole set (MCP manager, skills manager, memory, CodeGraph, hook ordering, session cleaner, Superpowers)
|
|
12
|
+
dsh plugin --profile web add @zfdx123/dsh-atelier
|
|
13
|
+
|
|
14
|
+
# Local development: install the dependency first — the config schema is a runtime dependency
|
|
15
|
+
cd /path/to/dsh-atelier/packages/dsh-superpowers && npm install
|
|
16
|
+
dsh plugin --profile web add link:/path/to/dsh-atelier/packages/dsh-superpowers
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Stop and restart `dsh web` afterwards (bundles are not hot-reloaded). Replace `web` with `headless` or a custom profile name when installing for a different surface, then restart that surface instead.
|
|
20
|
+
|
|
21
|
+
## Quick start
|
|
22
|
+
|
|
23
|
+
Check that the plugin is present in the profile:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
dsh --profile web --dump-config
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The output should contain `id: superpowers` followed by `name: @zfdx123/dsh-superpowers`. Then start a new session and ask for a feature: the agent should explore first and respond with questions or a design instead of writing code immediately, and its tool calls should include `skill`.
|
|
30
|
+
|
|
31
|
+
If the bootstrap never arrives, check the session's preset — a preset whose persona owns the complete system prompt is the one case where it is absent by design, see [Limitations](#limitations).
|
|
32
|
+
|
|
33
|
+
## What it does
|
|
34
|
+
|
|
35
|
+
- Registers all 14 skills on `ctx.skills`. They appear in the skill catalog and load on demand through the native `skill` tool; nothing is ever written to `~/.dsh/skills`.
|
|
36
|
+
- Registers `using-superpowers` as the `superpowers:bootstrap` prompt section at order 50: after the persona prefix (0), before the plan policy (500) and the tool guidance (1000+). It is present on the first request and survives context compaction because it is part of the system prompt, not a one-off session message.
|
|
37
|
+
- On the first agent of a workspace, warns once when a project or preset skill shadows one of the bundled names, naming the copy the model will actually load (provider, source and path). It reports once because every subagent of a session shares the same composition and would only repeat the warning.
|
|
38
|
+
- Maps Claude Code-style tool names onto the DSH tool vocabulary: `Task` → `subagent`, `TodoWrite` → `todo_write`, `Bash`/`Read`/`Write`/`Edit`/`Glob`/`Grep` → their lowercase equivalents, and so on. The mapping also notes that this environment exposes no hook or slash-command API, so an instruction to install a hook or register a command should be carried out with those tools instead.
|
|
39
|
+
- Reaches both registries through `ctx` alone (`systemPrompt`, `skills`), so it never depends on a `@deepseek-ai/*` service package resolving from its own directory.
|
|
40
|
+
|
|
41
|
+
## Configuration
|
|
42
|
+
|
|
43
|
+
Every field is optional. Override fields in the profile's own `cordis.patch.yml`:
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
- id: superpowers
|
|
47
|
+
config:
|
|
48
|
+
bootstrap: false
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
| Field | Default | Description |
|
|
52
|
+
| --- | --- | --- |
|
|
53
|
+
| `skills` | `true` | Register the bundled skills on `ctx.skills`. |
|
|
54
|
+
| `bootstrap` | `true` | Register the `using-superpowers` prompt section. |
|
|
55
|
+
| `toolMapping` | `true` | Append the DeepSeek Harness tool mapping to the bootstrap section. |
|
|
56
|
+
| `order` | `50` | Prompt order of the bootstrap section: after the persona prefix (0), before the plan policy (500) and the tool guidance (1000+). |
|
|
57
|
+
|
|
58
|
+
Every field is validated against the plugin's own schema (`@deepseek-ai/schemastery`) before it applies: a misspelled type fails the profile with the offending field named, instead of half-registering the plugin. With `bootstrap: false` the skills stay discoverable but stop self-triggering — the model uses them only when it decides to consult the catalog. The bootstrap section adds roughly 1.1k tokens (4,465 characters, measured) to the system prompt of each request; the section is static and stays within the cached prefix, and it is never appended as a new chat message on every turn, so `bootstrap: false` is exactly how that fixed prompt overhead is dropped.
|
|
59
|
+
|
|
60
|
+
## Requirements
|
|
61
|
+
|
|
62
|
+
- DeepSeek Harness `^0.1.6-alpha.1` (`engines.dsh`)
|
|
63
|
+
- Node `^22.19.0 || >=24.0.0`
|
|
64
|
+
- The peer `@deepseek-ai/cordis ^4.0.2`, plus the optional peers `@deepseek-ai/dsh-skill` and `@deepseek-ai/dsh-system-prompt` (both `^0.1.6-alpha.1`)
|
|
65
|
+
- One runtime dependency, `@deepseek-ai/schemastery` (the config schema): a registry install pulls it in, while a `link:` install needs `npm install` in the checkout first or the plugin fails to load
|
|
66
|
+
|
|
67
|
+
## Limitations
|
|
68
|
+
|
|
69
|
+
**A complete-persona preset drops the bootstrap section by design.** A preset can own the entire system prompt: when the preset's persona declares itself the complete prompt — the bundled `minimal` preset does, with `complete: true` — the prompt registry keeps that one section after assembly and drops every other section, including `superpowers:bootstrap`. The drop is silent, and dsh publishes no signal for it: a section's `complete` flag never leaves the registry, and a `system-prompt/assemble` listener cannot append prompt text to a scope that has one. The plugin therefore registers the section and documents the case rather than guessing.
|
|
70
|
+
|
|
71
|
+
Under such a preset:
|
|
72
|
+
|
|
73
|
+
- The bootstrap is not delivered, so the skills never self-trigger. The 14 skills are still registered on `ctx.skills`, but whether the model can reach them is the preset's decision, because the preset also decides which tools exist — `minimal` exposes only the persistent shell, so no `skill` tool is available there either.
|
|
74
|
+
- `bootstrap: true` cannot make the section appear, and `bootstrap: false` reports nothing: the section was never going to be delivered.
|
|
75
|
+
|
|
76
|
+
Use a preset whose persona is not complete to get the bootstrap. The limitation is pinned by an executable probe: `verify/src-02-complete-persona-shadow.mjs` mounts the real `SystemPrompt`, `SkillRegistry` and scope machinery, applies this plugin exactly as the loader does, and asserts that a scope with a complete persona delivers that section alone and that no `system-prompt/assemble` listener can put the text back; if the mechanism ever changes, the probe fails and says the documentation is stale.
|
|
77
|
+
|
|
78
|
+
## Testing
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
npm test # node --test
|
|
82
|
+
node verify/dsh-compat.mjs # runtime and packaging contracts
|
|
83
|
+
node verify/src-01-doc-order-drift.mjs # the documented order band vs the installed section orders
|
|
84
|
+
node verify/src-02-complete-persona-shadow.mjs # the complete-persona mechanism above
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`test/` ships in the published tarball, so `npm test` works from an installed copy as well as from a checkout. `verify/` holds maintainer-only probes: they are not published, and they need a local dsh installation (each takes another dsh's `package.json` path as its first argument; `src-01` takes the plugin root as its first instead).
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
|
|
91
|
+
The skills under `skills/` are vendored unmodified from [obra/superpowers](https://github.com/obra/superpowers) v6.3.0 at commit [`b36e082`](https://github.com/obra/superpowers/commit/b36e0829c6d0140e93cfef2ca599b1b07d4a7797). The exact upstream version, commit and repository are recorded in `package.json`'s `superpowers` field. The optional visual companion in `brainstorming` loads an upstream-hosted logo containing the Superpowers version; it sends no project or prompt content. Set `SUPERPOWERS_DISABLE_TELEMETRY` to a true value to disable it.
|
|
92
|
+
|
|
93
|
+
Two MIT license notices apply: the adapter is © its contributors under [LICENSE](LICENSE), while the bundled skills are © Jesse Vincent and the Superpowers contributors under [LICENSE.superpowers](LICENSE.superpowers). The Chinese `README.md` is this package's primary document; this file is its English mirror.
|
package/README.md
CHANGED
|
@@ -1,56 +1,46 @@
|
|
|
1
|
-
# dsh-superpowers
|
|
1
|
+
# @zfdx123/dsh-superpowers
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
把 [obra/superpowers](https://github.com/obra/superpowers) 的软件开发方法论接进 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness):在 `ctx.skills` 上注册 14 个技能(需求澄清、任务规划、TDD、系统化调试、代码审查等),并把 `using-superpowers` 引导语作为系统提示词段落注入,让它从第一条请求起就生效、在上下文压缩后依然存在。技能是**运行时注册**的、不落盘,所以既不往 `~/.dsh/skills` 复制任何文件,也不要求改动预设或 profile 里的技能目录。当前版本 1.0.0,面向 DSH `^0.1.6-alpha.1`。
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Contents
|
|
8
|
-
|
|
9
|
-
- [Installation](#installation)
|
|
10
|
-
- [What it does](#what-it-does)
|
|
11
|
-
- [Verification](#verification)
|
|
12
|
-
- [Configuration](#configuration)
|
|
13
|
-
- [Limitations](#limitations)
|
|
14
|
-
- [Overhead](#overhead)
|
|
15
|
-
- [Testing](#testing)
|
|
16
|
-
- [Requirements](#requirements)
|
|
17
|
-
- [Upstream and license](#upstream-and-license)
|
|
18
|
-
|
|
19
|
-
## Installation
|
|
20
|
-
|
|
21
|
-
Add the package to the profile as a local workspace dependency, then restart the surface:
|
|
5
|
+
## 安装
|
|
22
6
|
|
|
23
7
|
```sh
|
|
24
|
-
|
|
25
|
-
dsh plugin --profile web add
|
|
26
|
-
```
|
|
8
|
+
# 从 npm 安装单个包
|
|
9
|
+
dsh plugin --profile web add @zfdx123/dsh-superpowers
|
|
27
10
|
|
|
28
|
-
|
|
11
|
+
# 一次装齐整套(MCP 管理器、技能管理器、记忆、CodeGraph、钩子排序、会话清理、Superpowers)
|
|
12
|
+
dsh plugin --profile web add @zfdx123/dsh-atelier
|
|
29
13
|
|
|
30
|
-
|
|
14
|
+
# 本地开发:link: 安装之前先在检出目录装依赖——配置 schema 是运行时依赖
|
|
15
|
+
cd /path/to/dsh-atelier/packages/dsh-superpowers && npm install
|
|
16
|
+
dsh plugin --profile web add link:/path/to/dsh-atelier/packages/dsh-superpowers
|
|
17
|
+
```
|
|
31
18
|
|
|
32
|
-
|
|
33
|
-
- Adds the `using-superpowers` bootstrap as the `superpowers:bootstrap` prompt section at order 50. It is present on the first request and survives context compaction because it is part of the system prompt, not a one-off session message. A preset that owns the whole system prompt replaces it — see [Limitations](#limitations).
|
|
34
|
-
- Warns on the first agent of a workspace when a project or preset skill shadows one of the bundled names, naming the copy the model will load instead.
|
|
35
|
-
- Maps Claude Code-style tool names such as `Task`, `TodoWrite`, and `Bash`/`Read`/`Write`/`Edit` to their DeepSeek Harness equivalents. The mapping also notes that hooks and slash commands are not available.
|
|
19
|
+
装完先停止再重启 `dsh web`(bundle 不做热加载)。装到别的形态就把 `web` 换成 `headless` 或自定义 profile 名,并重启对应形态。
|
|
36
20
|
|
|
37
|
-
##
|
|
21
|
+
## 快速上手
|
|
38
22
|
|
|
39
|
-
|
|
23
|
+
先确认插件已经挂进 profile:
|
|
40
24
|
|
|
41
25
|
```sh
|
|
42
26
|
dsh --profile web --dump-config
|
|
43
27
|
```
|
|
44
28
|
|
|
45
|
-
|
|
29
|
+
输出里应当出现 `id: superpowers`,紧跟其后是 `name: @zfdx123/dsh-superpowers`。然后新建一个会话,直接提一个功能需求:agent 应当先探查现状、再给出问题或设计,而不是立刻开始写代码;它的工具调用里应当出现 `skill`。
|
|
30
|
+
|
|
31
|
+
如果 bootstrap 始终没有出现,请检查该会话所用的预设——当预设的 persona 独占完整系统提示词时,它按设计就不会下发,见[已知限制](#已知限制)。
|
|
46
32
|
|
|
47
|
-
|
|
33
|
+
## 它做什么
|
|
48
34
|
|
|
49
|
-
|
|
35
|
+
- 在 `ctx.skills` 注册全部 14 个技能。它们出现在技能目录里,并通过原生 `skill` 工具按需加载;`~/.dsh/skills` 不会被写入任何东西。
|
|
36
|
+
- 把 `using-superpowers` 注册为 `superpowers:bootstrap` 提示词段落,order 50:位于 persona 前缀(0)之后、计划策略(500)与工具指导(1000+)之前。它在第一条请求就存在,并能在上下文压缩后继续存在——因为它属于系统提示词,而不是一次性会话消息。
|
|
37
|
+
- 每个工作区的首个 agent 创建时,若某个内置技能名被项目技能或预设技能遮蔽,会告警一次,并指明模型实际会加载的那份副本(provider、来源与路径)。只报一次,因为同一会话的子 agent 共享同一套组合,重复告警没有信息量。
|
|
38
|
+
- 把 Claude Code 风格的工具名映射到 DSH 的工具词汇:`Task` → `subagent`、`TodoWrite` → `todo_write`、`Bash`/`Read`/`Write`/`Edit`/`Glob`/`Grep` → 对应的小写工具等。映射里同时说明当前环境不提供 hooks 与斜杠命令 API,所以遇到「安装 hook / 注册斜杠命令」的指令时,应改用这些工具把活干完。
|
|
39
|
+
- 两个注册表都只经 `ctx` 访问(`systemPrompt`、`skills`),因此不依赖任何 `@deepseek-ai/*` 服务包从本包目录解析出来。
|
|
50
40
|
|
|
51
|
-
##
|
|
41
|
+
## 配置
|
|
52
42
|
|
|
53
|
-
|
|
43
|
+
所有字段都是可选的,在 profile 自己的 `cordis.patch.yml` 里按行覆盖:
|
|
54
44
|
|
|
55
45
|
```yaml
|
|
56
46
|
- id: superpowers
|
|
@@ -58,52 +48,46 @@ Every field is optional. Override fields in the profile's own `cordis.patch.yml`
|
|
|
58
48
|
bootstrap: false
|
|
59
49
|
```
|
|
60
50
|
|
|
61
|
-
|
|
|
51
|
+
| 字段 | 默认值 | 说明 |
|
|
62
52
|
| --- | --- | --- |
|
|
63
|
-
| `skills` | `true` |
|
|
64
|
-
| `bootstrap` | `true` |
|
|
65
|
-
| `toolMapping` | `true` |
|
|
66
|
-
| `order` | `50` |
|
|
53
|
+
| `skills` | `true` | 把内置技能注册到 `ctx.skills`。 |
|
|
54
|
+
| `bootstrap` | `true` | 注册 `using-superpowers` 提示词段落。 |
|
|
55
|
+
| `toolMapping` | `true` | 在 bootstrap 段落里追加 DeepSeek Harness 工具映射。 |
|
|
56
|
+
| `order` | `50` | bootstrap 段落的 order:persona 前缀(0)之后、计划策略(500)与工具指导(1000+)之前。 |
|
|
67
57
|
|
|
68
|
-
|
|
58
|
+
每个字段在生效前都会先过插件自己的 schema(`@deepseek-ai/schemastery`):类型写错时 profile 会直接失败并指出出错字段,而不是把插件注册到一半。设置 `bootstrap: false` 之后技能仍可被发现,但不会再自动触发——模型只在自己决定查询技能目录时才会用到它们。bootstrap 段落给每次请求的系统提示词增加约 1.1k token(实测 4,465 字符);这段内容是静态的、位于缓存前缀内,不会在每一轮作为新的聊天消息追加,所以 `bootstrap: false` 正是去掉这份固定开销的做法。
|
|
69
59
|
|
|
70
|
-
|
|
60
|
+
## 前置要求
|
|
71
61
|
|
|
72
|
-
|
|
62
|
+
- DeepSeek Harness `^0.1.6-alpha.1`(`engines.dsh`)
|
|
63
|
+
- Node `^22.19.0 || >=24.0.0`
|
|
64
|
+
- peer `@deepseek-ai/cordis ^4.0.2`,以及可选的 peer `@deepseek-ai/dsh-skill`、`@deepseek-ai/dsh-system-prompt`(均为 `^0.1.6-alpha.1`)
|
|
65
|
+
- 一个运行时依赖 `@deepseek-ai/schemastery`(提供配置 schema):从 registry 安装会自动带上;用 `link:` 安装需要先在检出目录执行 `npm install`,否则插件加载失败
|
|
73
66
|
|
|
74
|
-
|
|
67
|
+
## 已知限制
|
|
75
68
|
|
|
76
|
-
|
|
69
|
+
**bootstrap 段落会被 complete persona 预设按设计丢掉。** 预设可以独占整个系统提示词:当预设的 persona 声明自己就是完整提示词时——内置的 `minimal` 预设正是如此(`complete: true`)——提示词注册表会在装配结束后只保留那一个段落,丢掉包括 `superpowers:bootstrap` 在内的其他所有段落。这一丢弃是静默的,而且 dsh 不发布任何相关信号:段落的 `complete` 标记不会离开注册表,`system-prompt/assemble` 监听器也无法向存在 complete 段落的 scope 追加提示词文本。因此本插件照常注册该段落、把这种情况写进文档,而不是去猜。
|
|
77
70
|
|
|
78
|
-
|
|
79
|
-
- `bootstrap: true` cannot make the section appear, and `bootstrap: false` reports nothing: the section was never going to be delivered.
|
|
71
|
+
在该类预设下:
|
|
80
72
|
|
|
81
|
-
|
|
73
|
+
- bootstrap 不会下发,技能因此不会自动触发。14 个技能仍注册在 `ctx.skills` 上,但模型能否取到它们由预设决定——预设同时决定有哪些工具:`minimal` 只挂常驻 shell,所以那里也没有 `skill` 工具。
|
|
74
|
+
- `bootstrap: true` 不会让它出现,`bootstrap: false` 也不会有任何提示:这个段落本来就不会下发。
|
|
82
75
|
|
|
83
|
-
|
|
76
|
+
要拿到 bootstrap,请使用 persona 不是 complete 的预设。这条限制由可执行探针钉住:`verify/src-02-complete-persona-shadow.mjs` 会挂载真实的 `SystemPrompt`、`SkillRegistry` 与 scope 机制、按加载器的方式应用本插件,并断言「带 complete persona 的 scope 只交付它自己,且任何 `system-prompt/assemble` 监听器都补不回来」;机制一旦变化,探针会失败并提示文档已经过期。
|
|
84
77
|
|
|
85
|
-
|
|
78
|
+
## 开发
|
|
86
79
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
- `verify/dsh-compat.mjs` — every runtime and packaging contract this plugin depends on.
|
|
94
|
-
- `verify/src-01-doc-order-drift.mjs` — the documented prompt-order band against the installed section orders.
|
|
95
|
-
- `verify/src-02-complete-persona-shadow.mjs` — the complete-persona drop recorded under [Limitations](#limitations).
|
|
96
|
-
|
|
97
|
-
## Requirements
|
|
98
|
-
|
|
99
|
-
- DeepSeek Harness `0.1.0-rc.6` or newer
|
|
100
|
-
- Node.js 22.19+ or 24+
|
|
101
|
-
- One runtime dependency, `@deepseek-ai/schemastery`, which provides the config schema. A registry install pulls it in; a `link:` install needs `npm install` in the checkout first, or the plugin fails to load. Every other registry is reached through `ctx`.
|
|
80
|
+
```sh
|
|
81
|
+
npm test # node --test
|
|
82
|
+
node verify/dsh-compat.mjs # 运行时与打包契约
|
|
83
|
+
node verify/src-01-doc-order-drift.mjs # 文档里的 order 区间 vs 已安装的段落顺序
|
|
84
|
+
node verify/src-02-complete-persona-shadow.mjs # 上面那条 complete persona 限制的机制
|
|
85
|
+
```
|
|
102
86
|
|
|
103
|
-
|
|
87
|
+
`test/` 随发布产物一起发布,所以在安装后的副本里和源码检出里都能直接跑 `npm test`。`verify/` 是维护者专用的探针:不随包发布,需要本机装有 dsh(第一个参数都可传入另一份 dsh 的 `package.json` 路径,`src-01` 的第一个参数则是插件根目录)。
|
|
104
88
|
|
|
105
|
-
|
|
89
|
+
## 许可
|
|
106
90
|
|
|
107
|
-
|
|
91
|
+
`skills/` 下的技能原样取自 [obra/superpowers](https://github.com/obra/superpowers) v6.3.0,对应 commit [`b36e082`](https://github.com/obra/superpowers/commit/b36e0829c6d0140e93cfef2ca599b1b07d4a7797),未做修改;`package.json` 的 `superpowers` 字段记录了确切的上游版本、commit 与仓库地址。`brainstorming` 的可选视觉组件会从上游网站加载带 Superpowers 版本号的 logo,不包含项目或提示词内容;把 `SUPERPOWERS_DISABLE_TELEMETRY` 设为任一 true 值即可关闭。
|
|
108
92
|
|
|
109
|
-
|
|
93
|
+
这里同时适用两份 MIT 许可声明:适配器版权归其贡献者所有,依据 [LICENSE](LICENSE) 许可;内置技能版权归 Jesse Vincent 与 Superpowers 贡献者所有,依据 [LICENSE.superpowers](LICENSE.superpowers) 许可。中文文档 `README.md` 是本包的主文档,英文版见 [README.en.md](README.en.md)。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zfdx123/dsh-superpowers",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Superpowers(移植自 obra/superpowers):把整套软件开发方法论技能与会话引导语作为 dsh 插件提供,技能在运行时注册,首轮对话自动注入引导。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "zfdx123",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"skills/**",
|
|
26
26
|
"test/**",
|
|
27
27
|
"README.md",
|
|
28
|
-
"README.
|
|
28
|
+
"README.en.md",
|
|
29
29
|
"LICENSE",
|
|
30
30
|
"LICENSE.superpowers"
|
|
31
31
|
],
|
package/test/index.test.js
CHANGED
|
@@ -290,7 +290,7 @@ test('reports a failing skill lookup without failing agent creation', async () =
|
|
|
290
290
|
})
|
|
291
291
|
|
|
292
292
|
test('documents the prompt-order placement the same way in code and both READMEs', async () => {
|
|
293
|
-
const sources = ['index.js', 'README.md', 'README.
|
|
293
|
+
const sources = ['index.js', 'README.md', 'README.en.md']
|
|
294
294
|
for (const source of sources) {
|
|
295
295
|
const text = await readFile(join(packageRoot, source), 'utf8')
|
|
296
296
|
assert.doesNotMatch(text, /100\s*[–-]\s*199/, `${source} still claims the stale tool-guidance band`)
|
|
@@ -300,14 +300,14 @@ test('documents the prompt-order placement the same way in code and both READMEs
|
|
|
300
300
|
})
|
|
301
301
|
|
|
302
302
|
test('keeps the English and Chinese READMEs structurally in sync', async () => {
|
|
303
|
-
const [
|
|
304
|
-
['README.md', 'README.
|
|
303
|
+
const [chinese, english] = await Promise.all(
|
|
304
|
+
['README.md', 'README.en.md'].map((file) => readFile(join(packageRoot, file), 'utf8')),
|
|
305
305
|
)
|
|
306
306
|
for (const pattern of [/^#{2,3} /gm, /^\| /gm, /^```/gm, /^```sh$/gm]) {
|
|
307
307
|
assert.equal(
|
|
308
|
-
[...chinese.matchAll(pattern)].length,
|
|
309
308
|
[...english.matchAll(pattern)].length,
|
|
310
|
-
|
|
309
|
+
[...chinese.matchAll(pattern)].length,
|
|
310
|
+
`README.en.md and README.md disagree on ${pattern}`,
|
|
311
311
|
)
|
|
312
312
|
}
|
|
313
313
|
})
|
package/README.zh.md
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
# dsh-superpowers
|
|
2
|
-
|
|
3
|
-
[English](README.md) | 中文
|
|
4
|
-
|
|
5
|
-
dsh-superpowers 为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 提供 [obra/superpowers](https://github.com/obra/superpowers) 适配。它注册 14 个覆盖需求澄清、任务规划、TDD、调试与代码审查的技能,并让 `using-superpowers` bootstrap 在整个会话中保持生效。
|
|
6
|
-
|
|
7
|
-
## 目录
|
|
8
|
-
|
|
9
|
-
- [安装](#安装)
|
|
10
|
-
- [它做了什么](#它做了什么)
|
|
11
|
-
- [验证](#验证)
|
|
12
|
-
- [配置](#配置)
|
|
13
|
-
- [已知限制](#已知限制)
|
|
14
|
-
- [开销](#开销)
|
|
15
|
-
- [测试](#测试)
|
|
16
|
-
- [环境要求](#环境要求)
|
|
17
|
-
- [上游与许可](#上游与许可)
|
|
18
|
-
|
|
19
|
-
## 安装
|
|
20
|
-
|
|
21
|
-
把本包作为本地工作区依赖加进 profile,然后重启对应形态:
|
|
22
|
-
|
|
23
|
-
```sh
|
|
24
|
-
cd E:/work/ai/dsh-superpowers && npm install # 配置 schema 是运行时依赖
|
|
25
|
-
dsh plugin --profile web add link:E:/work/ai/dsh-superpowers
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
执行后先停止再重启 `dsh web`。如果要安装到其他形态,可把 `web` 换成 `headless` 或自定义 profile 名,并重启对应形态。
|
|
29
|
-
|
|
30
|
-
## 它做了什么
|
|
31
|
-
|
|
32
|
-
- 在 `ctx.skills` 注册全部 14 个 Superpowers 技能。它们会出现在技能目录中,并通过原生 `skill` 工具加载;不会往 `~/.dsh/skills` 复制任何文件。
|
|
33
|
-
- 把 `using-superpowers` bootstrap 注册为 `superpowers:bootstrap` 提示词段落,order 为 50。它在第一条请求中生效,并能在上下文压缩后继续存在,因为它属于系统提示词,不是一次性会话消息。若预设独占整个系统提示词,它会被替换,见[已知限制](#已知限制)。
|
|
34
|
-
- 每个工作区首个 agent 创建时,若内置技能名被项目或预设技能遮蔽,会报出警告,并指明模型实际加载的那份副本。
|
|
35
|
-
- 将 `Task`、`TodoWrite`、`Bash`/`Read`/`Write`/`Edit` 等 Claude Code 风格工具名映射到 DeepSeek Harness 对应工具。映射中也会说明当前环境不提供 hooks 与斜杠命令。
|
|
36
|
-
|
|
37
|
-
## 验证
|
|
38
|
-
|
|
39
|
-
先确认插件已挂载到 profile:
|
|
40
|
-
|
|
41
|
-
```sh
|
|
42
|
-
dsh --profile web --dump-config
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
输出中应包含 `id: superpowers`,其后是 `name: @zfdx123/dsh-superpowers`。
|
|
46
|
-
|
|
47
|
-
然后新建会话并提出一个功能需求。Agent 应先探查,再给出问题或设计,不会立即开始写代码。工具调用中应出现 `skill`。
|
|
48
|
-
|
|
49
|
-
如果 bootstrap 始终没有出现,请检查会话所用的预设:当预设的 persona 独占完整系统提示词时,它按设计就不会下发,见[已知限制](#已知限制)。
|
|
50
|
-
|
|
51
|
-
## 配置
|
|
52
|
-
|
|
53
|
-
所有字段均为可选项,可在 profile 自己的 `cordis.patch.yml` 中覆盖:
|
|
54
|
-
|
|
55
|
-
```yaml
|
|
56
|
-
- id: superpowers
|
|
57
|
-
config:
|
|
58
|
-
bootstrap: false
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
| 字段 | 默认值 | 说明 |
|
|
62
|
-
| --- | --- | --- |
|
|
63
|
-
| `skills` | `true` | 把内置技能注册到 `ctx.skills`。 |
|
|
64
|
-
| `bootstrap` | `true` | 注册 `using-superpowers` 提示词段落。 |
|
|
65
|
-
| `toolMapping` | `true` | 在 bootstrap 段落中追加 DeepSeek Harness 工具映射。 |
|
|
66
|
-
| `order` | `50` | 把 bootstrap 放在 persona 前缀(0)之后、计划策略(500)与工具指导(1000+)之前。 |
|
|
67
|
-
|
|
68
|
-
所有字段在生效前都会先过插件自己的 schema:类型写错时 profile 会直接失败并指出出错字段,而不是把插件注册到一半。
|
|
69
|
-
|
|
70
|
-
设置 `bootstrap: false` 后,技能仍可被发现,但不会再自动触发;模型只会在自己决定查询技能目录时使用它们。
|
|
71
|
-
|
|
72
|
-
## 已知限制
|
|
73
|
-
|
|
74
|
-
预设可以独占整个系统提示词。当预设的 persona 声明自己就是完整提示词时——内置的 `minimal` 预设正是如此(`complete: true`)——提示词注册表会在装配结束后只保留那一个段落,丢掉包括 `superpowers:bootstrap` 在内的其他所有段落。这一丢弃是静默的,而且 dsh 不发布任何相关信号:段落的 `complete` 标记不会离开注册表,`system-prompt/assemble` 监听器也无法向存在 complete 段落的 scope 追加提示词文本。因此本插件照常注册该段落、把这种情况写进文档,而不是去猜;`verify/src-02-complete-persona-shadow.mjs` 会针对已安装的 dsh 钉住这一机制。
|
|
75
|
-
|
|
76
|
-
在该类预设下:
|
|
77
|
-
|
|
78
|
-
- bootstrap 不会下发,技能因此不会自动触发。14 个技能仍注册在 `ctx.skills` 上,但模型能否取到它们由预设决定——预设同时决定有哪些工具:`minimal` 只挂常驻 shell,所以那里也没有 `skill` 工具。
|
|
79
|
-
- `bootstrap: true` 不会让它出现,`bootstrap: false` 也不会有任何提示:这个段落本来就不会下发。
|
|
80
|
-
|
|
81
|
-
要拿到 bootstrap,请使用 persona 不是 complete 的预设。
|
|
82
|
-
|
|
83
|
-
## 开销
|
|
84
|
-
|
|
85
|
-
bootstrap 会给每次请求的系统提示词增加约 1.1k token(4,465 字符)。这段内容是静态的,位于缓存前缀内,不会在每一轮作为新的聊天消息追加。设置 `bootstrap: false` 可以保留技能,同时去掉这份固定提示词开销。
|
|
86
|
-
|
|
87
|
-
## 测试
|
|
88
|
-
|
|
89
|
-
`npm test` 通过 `node --test` 运行测试。`test/` 会随发布产物一起发布,因此在安装后的副本里和源码检出里都能直接运行。
|
|
90
|
-
|
|
91
|
-
`verify/` 下是维护者专用的探针,会挂载真实的 dsh 服务类。它们不随包发布,且需要本机装有 dsh(第一个参数可传入另一份 dsh 的 `package.json` 路径):
|
|
92
|
-
|
|
93
|
-
- `verify/dsh-compat.mjs` —— 本插件依赖的全部运行时与打包契约。
|
|
94
|
-
- `verify/src-01-doc-order-drift.mjs` —— 文档中的 order 区间与已安装段落顺序表的对照。
|
|
95
|
-
- `verify/src-02-complete-persona-shadow.mjs` —— [已知限制](#已知限制) 中记录的 complete persona 覆盖机制。
|
|
96
|
-
|
|
97
|
-
## 环境要求
|
|
98
|
-
|
|
99
|
-
- DeepSeek Harness `0.1.0-rc.6` 及以上
|
|
100
|
-
- Node.js 22.19+ 或 24+
|
|
101
|
-
- 一个运行时依赖 `@deepseek-ai/schemastery`,用于提供配置 schema。从 registry 安装会自动带上它;用 `link:` 安装时需要先在检出目录执行 `npm install`,否则插件无法加载。其余注册表都只通过 `ctx` 访问。
|
|
102
|
-
|
|
103
|
-
## 上游与许可
|
|
104
|
-
|
|
105
|
-
`skills/` 下的技能原样取自 [obra/superpowers](https://github.com/obra/superpowers) v6.3.0,对应 commit [`b36e082`](https://github.com/obra/superpowers/commit/b36e0829c6d0140e93cfef2ca599b1b07d4a7797),未做修改;`package.json` 记录了确切的上游版本与 commit。
|
|
106
|
-
|
|
107
|
-
`brainstorming` 的可选视觉组件会从上游网站加载带 Superpowers 版本号的 logo,不包含项目或提示词内容。把 `SUPERPOWERS_DISABLE_TELEMETRY` 设为任一 true 值即可关闭。
|
|
108
|
-
|
|
109
|
-
这里同时适用两份 MIT 许可声明:适配器版权归其贡献者所有,依据 [LICENSE](LICENSE) 许可;内置技能版权归 Jesse Vincent 与 Superpowers 贡献者所有,依据 [LICENSE.superpowers](LICENSE.superpowers) 许可。
|