@zfdx123/dsh-superpowers 1.0.8 → 1.0.9
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 +6 -6
- package/README.md +6 -6
- package/package.json +3 -3
- package/skills/brainstorming/SKILL.md +47 -12
- package/skills/brainstorming/visual-companion.md +6 -6
- package/skills/diagnosing-superpowers/SKILL.md +120 -0
- package/skills/diagnosing-superpowers/prompts/analyst-common.md +38 -0
- package/skills/diagnosing-superpowers/prompts/cost-and-time.md +28 -0
- package/skills/diagnosing-superpowers/prompts/plan-adherence.md +29 -0
- package/skills/diagnosing-superpowers/prompts/quality-evidence.md +26 -0
- package/skills/diagnosing-superpowers/prompts/repeated-work.md +30 -0
- package/skills/diagnosing-superpowers/prompts/request-conflicts.md +20 -0
- package/skills/diagnosing-superpowers/prompts/scrub-audit.md +33 -0
- package/skills/diagnosing-superpowers/prompts/scrub.md +29 -0
- package/skills/diagnosing-superpowers/prompts/similar-session.md +38 -0
- package/skills/diagnosing-superpowers/prompts/skill-timeline.md +30 -0
- package/skills/diagnosing-superpowers/prompts/stumbles.md +28 -0
- package/skills/diagnosing-superpowers/references/context-safety.md +22 -0
- package/skills/diagnosing-superpowers/references/github-issues.md +47 -0
- package/skills/diagnosing-superpowers/references/redaction-policy.md +34 -0
- package/skills/diagnosing-superpowers/references/session-discovery.md +31 -0
- package/skills/diagnosing-superpowers/templates/bundle-README.md +77 -0
- package/skills/diagnosing-superpowers/templates/case.md +64 -0
- package/skills/diagnosing-superpowers/templates/issue.md +51 -0
- package/skills/diagnosing-superpowers/templates/report.md +82 -0
- package/skills/executing-plans/SKILL.md +350 -41
- package/skills/executing-plans/scripts/task-done +52 -0
- package/skills/executing-plans/scripts/task-start +28 -0
- package/skills/requesting-code-review/SKILL.md +1 -1
- package/skills/requesting-code-review/code-reviewer.md +17 -0
- package/skills/subagent-driven-development/SKILL.md +18 -18
- package/skills/subagent-driven-development/re-review-prompt.md +1 -1
- package/skills/subagent-driven-development/scripts/review-package +8 -1
- package/skills/subagent-driven-development/scripts/sdd-workspace +44 -2
- package/skills/subagent-driven-development/scripts/task-brief +3 -1
- package/skills/subagent-driven-development/task-reviewer-prompt.md +2 -2
- package/skills/systematic-debugging/root-cause-tracing.md +1 -1
- package/skills/test-driven-development/SKILL.md +10 -0
- package/skills/using-superpowers/SKILL.md +2 -0
- package/skills/using-superpowers/references/claude-code-tools.md +29 -0
- package/skills/using-superpowers/references/muse-tools.md +35 -0
- package/skills/writing-plans/SKILL.md +62 -29
- package/skills/writing-skills/SKILL.md +4 -2
- package/test/index.test.js +26 -2
- package/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
package/README.en.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @zfdx123/dsh-superpowers
|
|
2
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
|
|
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 15 skills on `ctx.skills` (brainstorming, planning, TDD, systematic debugging, code review, session diagnosis, 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.9, targeting DSH `^0.1.7-rc.2`.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -32,7 +32,7 @@ If the bootstrap never arrives, check the session's preset — a preset whose pe
|
|
|
32
32
|
|
|
33
33
|
## What it does
|
|
34
34
|
|
|
35
|
-
- Registers all
|
|
35
|
+
- Registers all 15 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
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
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
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.
|
|
@@ -59,9 +59,9 @@ Every field is validated against the plugin's own schema (`@deepseek-ai/schemast
|
|
|
59
59
|
|
|
60
60
|
## Requirements
|
|
61
61
|
|
|
62
|
-
- DeepSeek Harness `^0.1.
|
|
62
|
+
- DeepSeek Harness `^0.1.7-rc.2` (`engines.dsh`)
|
|
63
63
|
- Node `^22.19.0 || >=24.0.0`
|
|
64
|
-
- The peer `@deepseek-ai/cordis ^4.0.
|
|
64
|
+
- The peer `@deepseek-ai/cordis ^4.0.4`, plus the optional peers `@deepseek-ai/dsh-skill` and `@deepseek-ai/dsh-system-prompt` (both `^0.1.7-rc.2`)
|
|
65
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
66
|
|
|
67
67
|
## Limitations
|
|
@@ -70,7 +70,7 @@ Every field is validated against the plugin's own schema (`@deepseek-ai/schemast
|
|
|
70
70
|
|
|
71
71
|
Under such a preset:
|
|
72
72
|
|
|
73
|
-
- The bootstrap is not delivered, so the skills never self-trigger. The
|
|
73
|
+
- The bootstrap is not delivered, so the skills never self-trigger. The 15 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
74
|
- `bootstrap: true` cannot make the section appear, and `bootstrap: false` reports nothing: the section was never going to be delivered.
|
|
75
75
|
|
|
76
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.
|
|
@@ -88,6 +88,6 @@ node verify/src-02-complete-persona-shadow.mjs # the complete-persona mechanis
|
|
|
88
88
|
|
|
89
89
|
## License
|
|
90
90
|
|
|
91
|
-
The skills under `skills/` are
|
|
91
|
+
The skills under `skills/` are taken from [obra/superpowers](https://github.com/obra/superpowers) v6.4.2 at commit [`8ca22db`](https://github.com/obra/superpowers/commit/8ca22dba9a94f28898bbce59f2537ff4d87c747d); the exact upstream version, commit and repository are recorded in `package.json`'s `superpowers` field. **The one deviation from upstream is formatting**: `brainstorming/scripts/helper.js`, `brainstorming/scripts/server.cjs`, `systematic-debugging/condition-based-waiting-example.ts` and `writing-skills/render-graphs.js` were reflowed by this repository's prettier (no semantic change, and upstream did not touch them in 6.4.x); every other file is byte-for-byte upstream. 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
92
|
|
|
93
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,6 +1,6 @@
|
|
|
1
1
|
# @zfdx123/dsh-superpowers
|
|
2
2
|
|
|
3
|
-
把 [obra/superpowers](https://github.com/obra/superpowers) 的软件开发方法论接进 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness):在 `ctx.skills` 上注册
|
|
3
|
+
把 [obra/superpowers](https://github.com/obra/superpowers) 的软件开发方法论接进 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness):在 `ctx.skills` 上注册 15 个技能(需求澄清、任务规划、TDD、系统化调试、代码审查、会话诊断等),并把 `using-superpowers` 引导语作为系统提示词段落注入,让它从第一条请求起就生效、在上下文压缩后依然存在。技能是**运行时注册**的、不落盘,所以既不往 `~/.dsh/skills` 复制任何文件,也不要求改动预设或 profile 里的技能目录。当前版本 1.0.9,面向 DSH `^0.1.7-rc.2`。
|
|
4
4
|
|
|
5
5
|
## 安装
|
|
6
6
|
|
|
@@ -32,7 +32,7 @@ dsh --profile web --dump-config
|
|
|
32
32
|
|
|
33
33
|
## 它做什么
|
|
34
34
|
|
|
35
|
-
- 在 `ctx.skills` 注册全部
|
|
35
|
+
- 在 `ctx.skills` 注册全部 15 个技能。它们出现在技能目录里,并通过原生 `skill` 工具按需加载;`~/.dsh/skills` 不会被写入任何东西。
|
|
36
36
|
- 把 `using-superpowers` 注册为 `superpowers:bootstrap` 提示词段落,order 50:位于 persona 前缀(0)之后、计划策略(500)与工具指导(1000+)之前。它在第一条请求就存在,并能在上下文压缩后继续存在——因为它属于系统提示词,而不是一次性会话消息。
|
|
37
37
|
- 每个工作区的首个 agent 创建时,若某个内置技能名被项目技能或预设技能遮蔽,会告警一次,并指明模型实际会加载的那份副本(provider、来源与路径)。只报一次,因为同一会话的子 agent 共享同一套组合,重复告警没有信息量。
|
|
38
38
|
- 把 Claude Code 风格的工具名映射到 DSH 的工具词汇:`Task` → `subagent`、`TodoWrite` → `todo_write`、`Bash`/`Read`/`Write`/`Edit`/`Glob`/`Grep` → 对应的小写工具等。映射里同时说明当前环境不提供 hooks 与斜杠命令 API,所以遇到「安装 hook / 注册斜杠命令」的指令时,应改用这些工具把活干完。
|
|
@@ -59,9 +59,9 @@ dsh --profile web --dump-config
|
|
|
59
59
|
|
|
60
60
|
## 前置要求
|
|
61
61
|
|
|
62
|
-
- DeepSeek Harness `^0.1.
|
|
62
|
+
- DeepSeek Harness `^0.1.7-rc.2`(`engines.dsh`)
|
|
63
63
|
- Node `^22.19.0 || >=24.0.0`
|
|
64
|
-
- peer `@deepseek-ai/cordis ^4.0.
|
|
64
|
+
- peer `@deepseek-ai/cordis ^4.0.4`,以及可选的 peer `@deepseek-ai/dsh-skill`、`@deepseek-ai/dsh-system-prompt`(均为 `^0.1.7-rc.2`)
|
|
65
65
|
- 一个运行时依赖 `@deepseek-ai/schemastery`(提供配置 schema):从 registry 安装会自动带上;用 `link:` 安装需要先在检出目录执行 `npm install`,否则插件加载失败
|
|
66
66
|
|
|
67
67
|
## 已知限制
|
|
@@ -70,7 +70,7 @@ dsh --profile web --dump-config
|
|
|
70
70
|
|
|
71
71
|
在该类预设下:
|
|
72
72
|
|
|
73
|
-
- bootstrap 不会下发,技能因此不会自动触发。
|
|
73
|
+
- bootstrap 不会下发,技能因此不会自动触发。15 个技能仍注册在 `ctx.skills` 上,但模型能否取到它们由预设决定——预设同时决定有哪些工具:`minimal` 只挂常驻 shell,所以那里也没有 `skill` 工具。
|
|
74
74
|
- `bootstrap: true` 不会让它出现,`bootstrap: false` 也不会有任何提示:这个段落本来就不会下发。
|
|
75
75
|
|
|
76
76
|
要拿到 bootstrap,请使用 persona 不是 complete 的预设。这条限制由可执行探针钉住:`verify/src-02-complete-persona-shadow.mjs` 会挂载真实的 `SystemPrompt`、`SkillRegistry` 与 scope 机制、按加载器的方式应用本插件,并断言「带 complete persona 的 scope 只交付它自己,且任何 `system-prompt/assemble` 监听器都补不回来」;机制一旦变化,探针会失败并提示文档已经过期。
|
|
@@ -88,6 +88,6 @@ node verify/src-02-complete-persona-shadow.mjs # 上面那条 complete persona
|
|
|
88
88
|
|
|
89
89
|
## 许可
|
|
90
90
|
|
|
91
|
-
`skills/`
|
|
91
|
+
`skills/` 下的技能取自 [obra/superpowers](https://github.com/obra/superpowers) v6.4.2,对应 commit [`8ca22db`](https://github.com/obra/superpowers/commit/8ca22dba9a94f28898bbce59f2537ff4d87c747d);`package.json` 的 `superpowers` 字段记录了确切的上游版本、commit 与仓库地址。**唯一偏离上游的是格式**:`brainstorming/scripts/helper.js`、`brainstorming/scripts/server.cjs`、`systematic-debugging/condition-based-waiting-example.ts`、`writing-skills/render-graphs.js` 这 4 个文件被本仓库的 prettier 重排过(语义未变,上游在 6.4.x 也没动它们),其余文件逐字节同上游。`brainstorming` 的可选视觉组件会从上游网站加载带 Superpowers 版本号的 logo,不包含项目或提示词内容;把 `SUPERPOWERS_DISABLE_TELEMETRY` 设为任一 true 值即可关闭。
|
|
92
92
|
|
|
93
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.9",
|
|
4
4
|
"description": "Superpowers(移植自 obra/superpowers):把整套软件开发方法论技能与会话引导语作为 dsh 插件提供,技能在运行时注册,首轮对话自动注入引导。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "zfdx123",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"superpowers": {
|
|
64
|
-
"upstreamVersion": "6.
|
|
65
|
-
"upstreamCommit": "
|
|
64
|
+
"upstreamVersion": "6.4.2",
|
|
65
|
+
"upstreamCommit": "8ca22dba9a94f28898bbce59f2537ff4d87c747d",
|
|
66
66
|
"upstreamRepository": "https://github.com/obra/superpowers"
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -11,12 +11,48 @@ Start by classifying how much process the request needs, then work
|
|
|
11
11
|
through your path: understand the context, refine the idea, present a
|
|
12
12
|
design, and get your human partner's approval.
|
|
13
13
|
|
|
14
|
+
## Establish Shared Understanding
|
|
15
|
+
|
|
16
|
+
The outcome of brainstorming is an understanding your human partner can
|
|
17
|
+
recognize and correct, grounded in what they want to accomplish.
|
|
18
|
+
|
|
19
|
+
1. **Discover intent.** Use the request and available context to identify
|
|
20
|
+
the intended outcome, who it is for, and what success looks like. When
|
|
21
|
+
that information is missing, ask one focused question about purpose or
|
|
22
|
+
intended use before proposing features or an approach. Knowing the app
|
|
23
|
+
genre does not tell you why your partner wants it. Gathering missing
|
|
24
|
+
requirements does not ask them to authorize the task again.
|
|
25
|
+
2. **Write back your understanding.** Summarize the intended outcome,
|
|
26
|
+
relevant constraints, and success criteria in a short note your partner
|
|
27
|
+
can assess. Separate what they said from assumptions. Invite correction
|
|
28
|
+
and incorporate their answer before treating this as the design brief.
|
|
29
|
+
3. **Carry intent into the design.** Preserve the agreed understanding in
|
|
30
|
+
the selected path's design artifact: the written spec for architectural
|
|
31
|
+
work, or the in-chat design/probe for bounded work and spikes. Check
|
|
32
|
+
proposed features and technical choices against that understanding.
|
|
33
|
+
|
|
34
|
+
When the request already supplies the purpose and constraints, reflect
|
|
35
|
+
that understanding instead of asking the same questions again. Keep the
|
|
36
|
+
note concise; its accuracy and the opportunity to correct it matter.
|
|
37
|
+
|
|
14
38
|
<HARD-GATE>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
39
|
+
Before taking any implementation action, including invoking an
|
|
40
|
+
implementation skill, writing product code, scaffolding, installing
|
|
41
|
+
product dependencies, or creating an external project, complete the
|
|
42
|
+
selected path's prerequisites:
|
|
43
|
+
|
|
44
|
+
- Spike: the human partner approves the question and probe.
|
|
45
|
+
- Bounded: the human partner approves the short in-chat design.
|
|
46
|
+
- Architectural: the human partner reviews and approves the written spec,
|
|
47
|
+
then reviews the written implementation plan and selects its execution
|
|
48
|
+
method. Conversational design approval only permits writing the spec;
|
|
49
|
+
written-spec approval only permits invoking writing-plans.
|
|
50
|
+
|
|
51
|
+
A reply approves the stage actually presented. Approval of an idea or
|
|
52
|
+
feature scope does not approve artifacts that do not exist yet. Resume
|
|
53
|
+
at the earliest incomplete stage; do not turn one approval into permission
|
|
54
|
+
to skip the rest of the selected path. Read-only project exploration is
|
|
55
|
+
allowed while those prerequisites remain incomplete.
|
|
20
56
|
</HARD-GATE>
|
|
21
57
|
|
|
22
58
|
## Three Paths
|
|
@@ -53,18 +89,17 @@ stop, say so, and step up. Nothing downgrades mid-task.
|
|
|
53
89
|
|
|
54
90
|
## Anti-Pattern: "Too Simple To Need Approval"
|
|
55
91
|
|
|
56
|
-
Every path ends with your human partner approving
|
|
57
|
-
implementation. A
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
artifact, never the approval.
|
|
92
|
+
Every path ends with your human partner approving the required design
|
|
93
|
+
before implementation. A bounded change may need only two sentences in
|
|
94
|
+
chat. A new todo-list project is architectural and requires the written
|
|
95
|
+
spec and planning handoffs. Scale the artifact to the selected path;
|
|
96
|
+
complete that path's reviews before implementation.
|
|
62
97
|
|
|
63
98
|
## Red Flags
|
|
64
99
|
|
|
65
100
|
| Thought | Reality |
|
|
66
101
|
|---------|---------|
|
|
67
|
-
| "This is too simple to need a design" |
|
|
102
|
+
| "This is too simple to need a design" | Follow the selected path: a bounded change gets a short chat design; an architectural change gets the written spec and planning handoffs. |
|
|
68
103
|
| "I'll call it bounded and skip the spec" | Reaching for a label to skip work IS the doubt — take the heavier path. |
|
|
69
104
|
| "It's bounded and the design is obvious — I'll start while they read it" | The gate is the approval, not the design's length. Present, then stop until you hear yes. |
|
|
70
105
|
| "I understand this kind of app, so it's bounded" | Bounded measures the repo, not your familiarity. A new project has no existing flow — it is architectural. |
|
|
@@ -35,7 +35,7 @@ The server watches a directory for HTML files and serves the newest one to the b
|
|
|
35
35
|
```bash
|
|
36
36
|
# Start AFTER the user approves the companion. --open auto-opens their browser on
|
|
37
37
|
# the first screen; --project-dir persists mockups and enables same-port restart.
|
|
38
|
-
scripts/start-server.sh --project-dir /path/to/project --open
|
|
38
|
+
bash scripts/start-server.sh --project-dir /path/to/project --open
|
|
39
39
|
|
|
40
40
|
# Returns: {"type":"server-started","port":52341,
|
|
41
41
|
# "url":"http://localhost:52341/?key=ab12…",
|
|
@@ -62,7 +62,7 @@ without repeating it.
|
|
|
62
62
|
**Claude Code:**
|
|
63
63
|
```bash
|
|
64
64
|
# Default mode works — the script backgrounds the server itself.
|
|
65
|
-
scripts/start-server.sh --project-dir /path/to/project --open
|
|
65
|
+
bash scripts/start-server.sh --project-dir /path/to/project --open
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
On Windows, the script auto-detects and switches to foreground mode (which blocks the tool call). Use `run_in_background: true` on the Bash tool call so the server survives across conversation turns, then read `$STATE_DIR/server-info` on the next turn to get the URL and port.
|
|
@@ -71,14 +71,14 @@ On Windows, the script auto-detects and switches to foreground mode (which block
|
|
|
71
71
|
```bash
|
|
72
72
|
# Codex reaps background processes. The script auto-detects CODEX_CI and
|
|
73
73
|
# switches to foreground mode. Run it normally — no extra flags needed.
|
|
74
|
-
scripts/start-server.sh --project-dir /path/to/project --open
|
|
74
|
+
bash scripts/start-server.sh --project-dir /path/to/project --open
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
**Gemini CLI:**
|
|
78
78
|
```bash
|
|
79
79
|
# Use --foreground and set is_background: true on your shell tool call
|
|
80
80
|
# so the process survives across turns
|
|
81
|
-
scripts/start-server.sh --project-dir /path/to/project --open --foreground
|
|
81
|
+
bash scripts/start-server.sh --project-dir /path/to/project --open --foreground
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
**Copilot CLI:**
|
|
@@ -95,7 +95,7 @@ bash scripts/start-server.sh --project-dir /path/to/project --open --foreground
|
|
|
95
95
|
If the URL is unreachable from your browser (common in remote/containerized setups), bind a non-loopback host:
|
|
96
96
|
|
|
97
97
|
```bash
|
|
98
|
-
scripts/start-server.sh \
|
|
98
|
+
bash scripts/start-server.sh \
|
|
99
99
|
--project-dir /path/to/project \
|
|
100
100
|
--host 0.0.0.0 \
|
|
101
101
|
--url-host localhost
|
|
@@ -288,7 +288,7 @@ If `$STATE_DIR/events` doesn't exist, the user didn't interact with the browser
|
|
|
288
288
|
## Cleaning Up
|
|
289
289
|
|
|
290
290
|
```bash
|
|
291
|
-
scripts/stop-server.sh $SESSION_DIR
|
|
291
|
+
bash scripts/stop-server.sh $SESSION_DIR
|
|
292
292
|
```
|
|
293
293
|
|
|
294
294
|
If the session used `--project-dir`, mockup files persist in `.superpowers/brainstorm/` for later reference. Only `/tmp` sessions get deleted on stop.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: diagnosing-superpowers
|
|
3
|
+
description: Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Diagnosing Superpowers
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Pin down with your human partner what went wrong in a session, read the
|
|
11
|
+
transcripts on disk, and report what happened with evidence. You report;
|
|
12
|
+
you do not diagnose superpowers. Whoever triages the bundle or the issue
|
|
13
|
+
decides whether superpowers changes.
|
|
14
|
+
|
|
15
|
+
**Core principle:** Every finding cites `path:line`. No citation, no
|
|
16
|
+
finding. Every number comes from the transcript or from a command you ran,
|
|
17
|
+
never from memory.
|
|
18
|
+
|
|
19
|
+
## Workflow
|
|
20
|
+
|
|
21
|
+
Create a todo per step. Steps 5–7 run only on their stated condition.
|
|
22
|
+
|
|
23
|
+
1. **Problem intake.** Ask one question at a time until you can write a
|
|
24
|
+
statement naming the session(s), the turn range if known, what your
|
|
25
|
+
partner expected, what happened, and the observable they care about
|
|
26
|
+
(wall-clock, tokens, repeated actions, one specific action). "It took
|
|
27
|
+
too long" is a complaint, not a problem statement. Note whether the
|
|
28
|
+
goal is a superpowers bug report.
|
|
29
|
+
2. **Locate.** Resolve each session to verified absolute filesystem paths using
|
|
30
|
+
`references/session-discovery.md`. Confirm a past session by quoting its
|
|
31
|
+
first prompt and timestamp, and list every candidate you rejected with the
|
|
32
|
+
reason, or "none". Enumerate subagent transcripts. Create
|
|
33
|
+
`~/.superpowers/diagnosing-superpowers/<session-id>/`, tell your
|
|
34
|
+
partner the path, and fill `templates/case.md` there, following its
|
|
35
|
+
provenance rules for environment and skill observations.
|
|
36
|
+
3. **Triage.** Read the region around the reported problem yourself. Then
|
|
37
|
+
dispatch one analyst subagent per dimension in parallel, each given the
|
|
38
|
+
case file path, `prompts/analyst-common.md`, and one dimension file from
|
|
39
|
+
`prompts/`: `skill-timeline.md`,
|
|
40
|
+
`plan-adherence.md`, `repeated-work.md`, `stumbles.md`,
|
|
41
|
+
`quality-evidence.md`, `request-conflicts.md`, `cost-and-time.md`.
|
|
42
|
+
Split a dimension by turn range when the transcript is long. Discard
|
|
43
|
+
any returned finding without `path:line`.
|
|
44
|
+
4. **Report.** Fill every section of `templates/report.md` in order, write
|
|
45
|
+
it to the workspace, show it, and give the path. Check what cited content
|
|
46
|
+
actually proves and preserve the supporting case; a symlink alias is not a
|
|
47
|
+
redundant copy.
|
|
48
|
+
5. **GitHub issues** — when report §7 says possible or likely, or your
|
|
49
|
+
partner asks. Search open and closed issues for the symptoms per
|
|
50
|
+
`references/github-issues.md`. Show matches and suggest adding the
|
|
51
|
+
report to the closest. If none match, fill `templates/issue.md`, write
|
|
52
|
+
it to the workspace, show the exact text, and create the issue only
|
|
53
|
+
after approval. `gh` cannot attach files; if a bundle exists, give
|
|
54
|
+
your partner its path to attach in the browser.
|
|
55
|
+
6. **Export** — only when your partner asks for a bundle; never build one
|
|
56
|
+
unprompted. If the intake goal was a bug report, say once that a
|
|
57
|
+
scrubbed bundle is available on request, then wait. Ask the redaction
|
|
58
|
+
level, stating what each includes: skeleton (no tool-result bodies),
|
|
59
|
+
evidence (bodies only for cited events), full. Build the bundle per
|
|
60
|
+
`templates/bundle-README.md`, dispatch `prompts/scrub.md`, then
|
|
61
|
+
`prompts/scrub-audit.md`, repeating both until the audit returns CLEAN.
|
|
62
|
+
Complete the bundle template's evidence check and reconciliation before
|
|
63
|
+
showing the final scrub log, file list, and privacy and evidence outcomes.
|
|
64
|
+
Archive (`zip -r` or `tar -czf`) only after approval. With the archive
|
|
65
|
+
path, state what it contains, point at the scrub log for replacements, and
|
|
66
|
+
say scrubbing can miss things: they must review every file before sharing.
|
|
67
|
+
7. **Similar sessions** — when asked. Turn confirmed findings into a
|
|
68
|
+
signature, list candidates by mtime and size, find marker line numbers,
|
|
69
|
+
dispatch `prompts/similar-session.md` per candidate in parallel, and
|
|
70
|
+
append report §9.
|
|
71
|
+
|
|
72
|
+
## Quick reference
|
|
73
|
+
|
|
74
|
+
All seven analysts always run. This table says which region to read
|
|
75
|
+
yourself in step 3 and which findings to lead with in the verdict.
|
|
76
|
+
|
|
77
|
+
| Complaint | Read first, lead with |
|
|
78
|
+
|---|---|
|
|
79
|
+
| "It took too long" | cost-and-time, stumbles |
|
|
80
|
+
| "Why did it do this extra work?" | repeated-work, plan-adherence |
|
|
81
|
+
| "Why is it so expensive?" | cost-and-time |
|
|
82
|
+
| "What the hell is it doing?" (still running) | skill-timeline; note in-progress in coverage |
|
|
83
|
+
| "It ignored the plan" | plan-adherence, compaction lines first |
|
|
84
|
+
| "Skill X never fired" | skill-timeline |
|
|
85
|
+
|
|
86
|
+
## Hard rules
|
|
87
|
+
|
|
88
|
+
- **Context safety.** One transcript line can be a megabyte. Follow
|
|
89
|
+
`references/context-safety.md` on every session file, every time.
|
|
90
|
+
- **Read-only.** Never modify, move, or delete a session file.
|
|
91
|
+
- **Exact paths to subagents.** A subagent's "current session" is its
|
|
92
|
+
own. Pass absolute paths and ids.
|
|
93
|
+
- **Human prompts only.** Hook output, system reminders, and tool results
|
|
94
|
+
are not your partner's words. In a subagent transcript, "user" is the
|
|
95
|
+
parent agent.
|
|
96
|
+
- **No superpowers diagnosis.** Report §7 states involvement and stops.
|
|
97
|
+
Never name a defect in a skill or propose a change. Your partner
|
|
98
|
+
pressing for a fix does not waive this; point at the issue step and
|
|
99
|
+
mention that a bundle is available on request. No advice to your
|
|
100
|
+
partner either.
|
|
101
|
+
- **Approval gates.** No archive before your partner has seen the scrub
|
|
102
|
+
log and file list. No issue or comment before they approve the exact
|
|
103
|
+
text.
|
|
104
|
+
- **Intake before analysis.** Nothing in steps 2–7 starts until your
|
|
105
|
+
partner has answered. If they are away, write the questions and stop.
|
|
106
|
+
A statement you reconstructed for them is not an answer. An
|
|
107
|
+
already-scoped request — one specific event, what is running now, or
|
|
108
|
+
the analysis to run — is itself the statement: answer it, then ask.
|
|
109
|
+
A whole-session "why" is a complaint.
|
|
110
|
+
|
|
111
|
+
## Red Flags
|
|
112
|
+
|
|
113
|
+
| Thought | Reality |
|
|
114
|
+
|---------|---------|
|
|
115
|
+
| "The problem is obvious, skip intake" | The problem statement scopes everything. Ask. |
|
|
116
|
+
| "They're away, so I'll reconstruct the statement" | You cannot reconstruct what they wanted. Write the questions and stop. |
|
|
117
|
+
| "I'll sweep everything now and ask at the end" | An unscoped sweep spends their budget on the wrong question. Ask first. |
|
|
118
|
+
| "They want a bug report, so I'll build the bundle now" | The bundle is their session data, packaged. Build it only when they ask for it. |
|
|
119
|
+
| "Small, targeted edit, no restructuring needed" | Not your call, however small. Report the evidence; the triager decides. |
|
|
120
|
+
| "The price per token is well known" | Numbers you did not compute from the transcript are invented. Cite or drop. |
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
You are an analyst subagent. You read a coding-agent session transcript on
|
|
2
|
+
disk and return findings with evidence. You do not fix anything, you do not
|
|
3
|
+
modify any file under the session store, and you do not say what
|
|
4
|
+
superpowers should change.
|
|
5
|
+
|
|
6
|
+
Inputs (from your dispatcher):
|
|
7
|
+
- CASE: absolute path of the case file. Read it first. It names the session
|
|
8
|
+
files, the discovered sources and record meanings to use, and the
|
|
9
|
+
context-safety rules you must follow. Use the recorded meanings rather than
|
|
10
|
+
repeating discovery or assuming a harness format.
|
|
11
|
+
- RANGE (optional): a turn range or line range. If present, analyze only
|
|
12
|
+
that range and say so in your Checked line.
|
|
13
|
+
|
|
14
|
+
Context safety: follow `references/context-safety.md`, named in CASE, on
|
|
15
|
+
every file before reading it, and extract fields with the recorded commands or
|
|
16
|
+
queries. "The current session" is not a thing you can look at: use only the
|
|
17
|
+
paths in CASE.
|
|
18
|
+
|
|
19
|
+
Human prompts are the records the case file identifies as human-typed. Hook
|
|
20
|
+
output, system reminders, and tool results are not human prompts. In a subagent
|
|
21
|
+
transcript, "user" is the parent agent.
|
|
22
|
+
|
|
23
|
+
Return format (nothing else):
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
## <Dimension> findings
|
|
27
|
+
|
|
28
|
+
- finding: <one sentence, what happened>
|
|
29
|
+
evidence: <absolute path>:<line> — "<quote, at most 200 characters>"
|
|
30
|
+
turns: <first human turn>–<last human turn>
|
|
31
|
+
confidence: high | medium | low
|
|
32
|
+
|
|
33
|
+
Checked: <what you examined: files, line ranges, commands used>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The dispatcher discards any finding without a `path:line`, so do not
|
|
37
|
+
write one. If you found nothing, return `- none found` and the Checked
|
|
38
|
+
line.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Read `prompts/analyst-common.md` first; it gives your role, inputs,
|
|
2
|
+
context-safety rules, and the return format. This file adds the dimension.
|
|
3
|
+
|
|
4
|
+
Dimension: Cost and time
|
|
5
|
+
|
|
6
|
+
Account for where tokens and wall-clock went.
|
|
7
|
+
|
|
8
|
+
1. Tokens. Use only the usage records and counter meanings established in the
|
|
9
|
+
case file. State whether each counter is incremental or cumulative before
|
|
10
|
+
calculating totals; difference cumulative observations without turning a
|
|
11
|
+
missing observation into zero. Report the five turns with the largest
|
|
12
|
+
supported totals and the supported totals per associated session.
|
|
13
|
+
2. Wall-clock. Use the evidenced timestamp fields, event boundaries, and units
|
|
14
|
+
recorded in the case file. Report the five longest supported turns and any
|
|
15
|
+
gap longer than ten minutes between consecutive events (idle, waiting on an
|
|
16
|
+
associated session, or waiting on your human partner; say which only when
|
|
17
|
+
the records show it).
|
|
18
|
+
3. Largest tool results: use the case file's evidenced tool-result records to
|
|
19
|
+
report the ten largest results with their tool and turn. Measure records
|
|
20
|
+
before extracting bounded content.
|
|
21
|
+
4. Compactions: count and locate records whose meaning as compaction events was
|
|
22
|
+
established during discovery. Report available before/after counters and
|
|
23
|
+
what the session was doing when each fired; mark unsupported fields absent.
|
|
24
|
+
5. Associated sessions: count them and report supported usage, duration, and
|
|
25
|
+
dispatching turn for each.
|
|
26
|
+
6. Report the turns, subagents, tools, or repeats that dominate the
|
|
27
|
+
totals, with numbers. Do not speculate about why a
|
|
28
|
+
turn was expensive beyond what the transcript shows.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Read `prompts/analyst-common.md` first; it gives your role, inputs,
|
|
2
|
+
context-safety rules, and the return format. This file adds the dimension.
|
|
3
|
+
|
|
4
|
+
Dimension: Plan adherence
|
|
5
|
+
|
|
6
|
+
Recover the plan the session agreed to, then map each plan step to what
|
|
7
|
+
happened. "Plan" here means any agreed course of action, not git commits.
|
|
8
|
+
|
|
9
|
+
1. Find the agreed plan: a design or plan agreed in chat (look for the
|
|
10
|
+
assistant text preceding a human "yes/ok/go ahead"), a spec or plan file
|
|
11
|
+
written during the session (tool calls that write under `docs/`,
|
|
12
|
+
`plans/`, `specs/`, or any file the human named), a todo-list record whose
|
|
13
|
+
meaning was established in the case file, or any numbered checklist in
|
|
14
|
+
assistant text. Quote each plan step with its `path:line`.
|
|
15
|
+
2. Mark structural events between the plan and its execution: compaction
|
|
16
|
+
events identified during discovery, resumes, aborted turns, and associated
|
|
17
|
+
session dispatches. Note their line numbers; plan drift right after one of
|
|
18
|
+
these is a distinct finding.
|
|
19
|
+
3. For each plan step, find the tool calls and assistant text that
|
|
20
|
+
executed it, or establish that none did. Report:
|
|
21
|
+
- steps skipped (no execution found; quote the plan step);
|
|
22
|
+
- steps executed out of order (line numbers show the order);
|
|
23
|
+
- steps silently changed (execution differs from the plan step in a
|
|
24
|
+
way the assistant never announced; quote both);
|
|
25
|
+
- steps invented (work done that no plan step covers);
|
|
26
|
+
- drift immediately after a structural event (cite the event line and
|
|
27
|
+
the first divergent action).
|
|
28
|
+
4. If there is no recoverable plan, say so as the only finding, with
|
|
29
|
+
the lines you checked.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Read `prompts/analyst-common.md` first; it gives your role, inputs,
|
|
2
|
+
context-safety rules, and the return format. This file adds the dimension.
|
|
3
|
+
|
|
4
|
+
Dimension: Quality evidence
|
|
5
|
+
|
|
6
|
+
Judge the process against its own claims. This is not a code review; do
|
|
7
|
+
not evaluate the code the session produced.
|
|
8
|
+
|
|
9
|
+
1. Tests: every test run (commands containing `test`, `pytest`, `npm test`,
|
|
10
|
+
`cargo test`, `go test`, `bats`, `bash tests/…`, or the project's runner
|
|
11
|
+
named in instruction files) with its result line. Report runs that
|
|
12
|
+
failed and what the assistant did next.
|
|
13
|
+
2. Verification behind claims: find assistant text claiming done, fixed,
|
|
14
|
+
passing, verified, works, complete. For each, look backward in the same
|
|
15
|
+
turn for a tool result that shows it (a test run, a command output, a
|
|
16
|
+
diff). Report claims with no supporting result in that turn.
|
|
17
|
+
3. Commits: every `git commit` with its message; compare each message to
|
|
18
|
+
the tool calls in the preceding turn(s). Report commits whose message
|
|
19
|
+
claims work that no tool call performed, and work performed that was
|
|
20
|
+
never committed when the agreed plan said it would be.
|
|
21
|
+
4. Review feedback: where a reviewer (human or subagent) raised points,
|
|
22
|
+
find the response. Report points acknowledged but not acted on, and
|
|
23
|
+
points dismissed without a stated reason.
|
|
24
|
+
5. Acceptance criteria: if the case file's problem statement or the
|
|
25
|
+
agreed plan states criteria, report each as met / not met /
|
|
26
|
+
not checked with the evidence line.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Read `prompts/analyst-common.md` first; it gives your role, inputs,
|
|
2
|
+
context-safety rules, and the return format. This file adds the dimension.
|
|
3
|
+
|
|
4
|
+
Dimension: Repeated work
|
|
5
|
+
|
|
6
|
+
Find work the session did more than once.
|
|
7
|
+
|
|
8
|
+
1. Extract every tool call as `(line, turn, tool, key)` where `key` is: the
|
|
9
|
+
file path for reads/edits/writes; the command text for shell calls (strip
|
|
10
|
+
trailing whitespace; keep the whole command); the `description` plus the
|
|
11
|
+
first 80 characters of the prompt for subagent dispatches; the query for
|
|
12
|
+
searches.
|
|
13
|
+
2. Group by `(tool, key)` and report the groups at or over threshold:
|
|
14
|
+
|
|
15
|
+
| Category | Threshold | Exempt |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| reads, searches | 3 | |
|
|
18
|
+
| edits | 2 | |
|
|
19
|
+
| shell commands | 2 | status checks and test runs (`git status`, `ls`, `pwd`, test runners) |
|
|
20
|
+
| subagent dispatches | 2 with the same description | |
|
|
21
|
+
3. For each group, check whether anything changed between repetitions (a
|
|
22
|
+
write to that file, a compaction, a human correction). Say which case
|
|
23
|
+
it is; a re-read after an edit is not a finding, a re-read after a
|
|
24
|
+
compaction is a finding attributed to the compaction, a re-read with
|
|
25
|
+
nothing in between is a finding on its own.
|
|
26
|
+
4. Look for re-derived decisions: assistant text that reaches a conclusion
|
|
27
|
+
already stated earlier in the session (same file, same design choice,
|
|
28
|
+
same command to run). Quote both places.
|
|
29
|
+
5. One finding per group, with the first and last line numbers and the
|
|
30
|
+
count.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Read `prompts/analyst-common.md` first; it gives your role, inputs,
|
|
2
|
+
context-safety rules, and the return format. This file adds the dimension.
|
|
3
|
+
|
|
4
|
+
Dimension: Request conflicts
|
|
5
|
+
|
|
6
|
+
1. List every human prompt with line and turn. For each, extract the
|
|
7
|
+
instructions it contains (imperatives, constraints, "don't", "always",
|
|
8
|
+
"never", "only", scope statements).
|
|
9
|
+
2. Report:
|
|
10
|
+
- two human instructions that cannot both be followed (quote both, with
|
|
11
|
+
lines), and what the assistant did;
|
|
12
|
+
- a human instruction that conflicts with an instruction file loaded in
|
|
13
|
+
the session (CLAUDE.md, AGENTS.md, GEMINI.md, or the harness's
|
|
14
|
+
equivalent; paths are in the case file), quoting both;
|
|
15
|
+
- a human instruction to skip, ignore, or override a step, skill, or
|
|
16
|
+
rule, and what happened afterwards;
|
|
17
|
+
- an instruction the assistant asked to clarify and the answer, when the
|
|
18
|
+
answer changed scope.
|
|
19
|
+
3. Do not judge whether your human partner was right. Report the conflict
|
|
20
|
+
and the assistant's resolution.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Read and follow `references/redaction-policy.md` before inspecting any file.
|
|
2
|
+
Use its categories and the supplied lists for every audit decision.
|
|
3
|
+
|
|
4
|
+
You are the scrub auditor. Another agent has already scrubbed every file
|
|
5
|
+
under BUNDLE. Your only job is to find what it missed. You do not fix
|
|
6
|
+
anything; you report.
|
|
7
|
+
|
|
8
|
+
Inputs:
|
|
9
|
+
- BUNDLE: absolute path of the bundle directory.
|
|
10
|
+
- PUBLIC_REPOS: list of repository names or URLs your human partner said are
|
|
11
|
+
public (may be empty).
|
|
12
|
+
- PROPRIETARY: list of terms your human partner named as proprietary (may be
|
|
13
|
+
empty).
|
|
14
|
+
|
|
15
|
+
Read every file under BUNDLE in full (these are condensed files, not raw
|
|
16
|
+
transcripts; still check `wc -c` first and read in chunks if a file is larger
|
|
17
|
+
than 200 KB). Apply the shared policy to every file, including quoted
|
|
18
|
+
transcript text, commit messages, git author lines, and encrypted payloads.
|
|
19
|
+
Check that safe command, result, source and session-line structure remains
|
|
20
|
+
available for the findings.
|
|
21
|
+
|
|
22
|
+
Return CLEAN only if no policy misses or unresolved classifications remain.
|
|
23
|
+
Otherwise return:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
MISSED
|
|
27
|
+
- <file>:<line> — <category> — <non-sensitive description or classification question>
|
|
28
|
+
...
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Never include the original sensitive value. CLEAN addresses privacy only; it
|
|
32
|
+
does not establish that exported findings remain supported. Do not comment on
|
|
33
|
+
the scrub's quality. Do not suggest fixes.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Read and follow `references/redaction-policy.md` before processing any file.
|
|
2
|
+
Use its categories and the supplied lists for every redaction decision.
|
|
3
|
+
|
|
4
|
+
You are the scrubber. You rewrite every file under BUNDLE (a directory path
|
|
5
|
+
from your dispatcher) so it can leave this machine, and you write
|
|
6
|
+
BUNDLE/scrub-log.md. You never touch anything outside BUNDLE.
|
|
7
|
+
|
|
8
|
+
Inputs:
|
|
9
|
+
- BUNDLE: absolute path of the bundle directory.
|
|
10
|
+
- PUBLIC_REPOS: list of repository names or URLs your human partner said are
|
|
11
|
+
public (may be empty).
|
|
12
|
+
- PROPRIETARY: list of terms your human partner named as proprietary (may be
|
|
13
|
+
empty).
|
|
14
|
+
|
|
15
|
+
The shared policy defines the categories and stable placeholders. Keep the
|
|
16
|
+
same original value mapped to the same placeholder across every file, with
|
|
17
|
+
numbers assigned in order of first appearance. Preserve the policy's safe
|
|
18
|
+
identity, linkage, quotation and evidence rules.
|
|
19
|
+
|
|
20
|
+
Procedure:
|
|
21
|
+
1. `find BUNDLE -type f` and process every file, including
|
|
22
|
+
`environment.json` and `findings/*.md`.
|
|
23
|
+
2. Build the replacement map as you go and apply it to every file so a value
|
|
24
|
+
first seen in `report.md` is also replaced in `transcripts/`.
|
|
25
|
+
3. After rewriting, recount occurrences in all final non-log bundle files,
|
|
26
|
+
excluding `scrub-log.md`. Write `BUNDLE/scrub-log.md` as a table of
|
|
27
|
+
placeholder → category → count. Never write a plaintext replacement map or
|
|
28
|
+
an original value into the log.
|
|
29
|
+
4. Return the scrub-log table and the list of files rewritten. Nothing else.
|