@zfdx123/dsh-superpowers 1.0.7 → 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
|
@@ -22,10 +22,17 @@ head=$3
|
|
|
22
22
|
git rev-parse --verify --quiet "$base" >/dev/null || { echo "bad BASE: $base" >&2; exit 2; }
|
|
23
23
|
git rev-parse --verify --quiet "$head" >/dev/null || { echo "bad HEAD: $head" >&2; exit 2; }
|
|
24
24
|
|
|
25
|
+
# Range guards (exit 3): a wrong-branch HEAD yields a range that is empty or
|
|
26
|
+
# not rooted at BASE; either would silently produce a bogus review package.
|
|
27
|
+
git merge-base --is-ancestor "$base" "$head" || { echo "HEAD is not a descendant of BASE: ${base}..${head}" >&2; exit 3; }
|
|
28
|
+
[ "$(git rev-list --count "${base}..${head}")" -gt 0 ] || { echo "empty commit range: ${base}..${head}" >&2; exit 3; }
|
|
29
|
+
|
|
25
30
|
if [ $# -eq 4 ]; then
|
|
26
31
|
out=$4
|
|
27
32
|
else
|
|
28
|
-
|
|
33
|
+
# Invoke via bash rather than direct exec: some extractors (Python zipfile)
|
|
34
|
+
# strip Unix exec bits when unpacking marketplace packages (#2040).
|
|
35
|
+
dir=$("${BASH:-bash}" "$(cd "$(dirname "$0")" && pwd)/sdd-workspace" "$plan")
|
|
29
36
|
out="$dir/review-$(git rev-parse --short "$base")..$(git rev-parse --short "$head").diff"
|
|
30
37
|
fi
|
|
31
38
|
|
|
@@ -8,6 +8,16 @@
|
|
|
8
8
|
# artifacts. A stale ledger misread as current progress makes controllers
|
|
9
9
|
# skip whole task sequences — plan-scoping removes that failure structurally.
|
|
10
10
|
#
|
|
11
|
+
# Basename slugs collide when two plans share a filename (docs/alpha/plan.md
|
|
12
|
+
# vs docs/beta/plan.md), so each workspace records its owning plan's path in
|
|
13
|
+
# a plan-path marker (repo-relative in-repo, absolute outside). A workspace
|
|
14
|
+
# owned by a different plan is skipped and the slug disambiguated with the
|
|
15
|
+
# plan's parent-directory name, then a counter. A workspace with no marker
|
|
16
|
+
# predates the marker scheme and is adopted for the current plan so in-flight
|
|
17
|
+
# workspaces keep resolving — which means the first collision on such a
|
|
18
|
+
# legacy workspace adopts instead of detecting; acceptable, marker-less
|
|
19
|
+
# workspaces age out as plans finish.
|
|
20
|
+
#
|
|
11
21
|
# The workspace lives in the working tree (not under .git/) because Claude Code
|
|
12
22
|
# treats .git/ as a protected path and denies agent writes there — which blocks
|
|
13
23
|
# an implementer subagent from writing its report file. A self-ignoring
|
|
@@ -34,7 +44,39 @@ slug=$(basename "$plan" .md)
|
|
|
34
44
|
|
|
35
45
|
root=$(git rev-parse --show-toplevel)
|
|
36
46
|
base="$root/.superpowers/sdd"
|
|
47
|
+
|
|
48
|
+
# Normalize the plan path (physical directory, so relative/absolute/../
|
|
49
|
+
# spellings of one plan compare equal) and express it as the marker value:
|
|
50
|
+
# repo-relative when the plan lives under the repo root, absolute otherwise.
|
|
51
|
+
plan_dir=$(CDPATH= cd -- "$(dirname "$plan")" && pwd -P)
|
|
52
|
+
plan_abs="$plan_dir/$(basename "$plan")"
|
|
53
|
+
case "$plan_abs" in
|
|
54
|
+
"$root"/*) plan_id=${plan_abs#"$root"/} ;;
|
|
55
|
+
*) plan_id=$plan_abs ;;
|
|
56
|
+
esac
|
|
57
|
+
|
|
58
|
+
# True when the workspace at $1 is (or becomes) this plan's: an existing
|
|
59
|
+
# marker must name this plan; a missing marker means a new workspace or a
|
|
60
|
+
# pre-marker legacy one, and either way the plan claims it by writing one.
|
|
61
|
+
owns() {
|
|
62
|
+
if [ -e "$1/plan-path" ]; then
|
|
63
|
+
[ "$(cat "$1/plan-path")" = "$plan_id" ]
|
|
64
|
+
else
|
|
65
|
+
mkdir -p "$1"
|
|
66
|
+
printf '%s\n' "$plan_id" > "$1/plan-path"
|
|
67
|
+
fi
|
|
68
|
+
}
|
|
69
|
+
|
|
37
70
|
dir="$base/$slug"
|
|
38
|
-
|
|
71
|
+
if ! owns "$dir"; then
|
|
72
|
+
parent=$(basename "$plan_dir")
|
|
73
|
+
dir="$base/$slug-$parent"
|
|
74
|
+
if ! owns "$dir"; then
|
|
75
|
+
n=2
|
|
76
|
+
while ! owns "$base/$slug-$parent-$n"; do n=$((n + 1)); done
|
|
77
|
+
dir="$base/$slug-$parent-$n"
|
|
78
|
+
fi
|
|
79
|
+
fi
|
|
80
|
+
|
|
39
81
|
printf '*\n' > "$base/.gitignore"
|
|
40
|
-
cd "$dir" && pwd
|
|
82
|
+
CDPATH= cd -- "$dir" && pwd
|
|
@@ -21,7 +21,9 @@ n=$2
|
|
|
21
21
|
if [ $# -eq 3 ]; then
|
|
22
22
|
out=$3
|
|
23
23
|
else
|
|
24
|
-
|
|
24
|
+
# Invoke via bash rather than direct exec: some extractors (Python zipfile)
|
|
25
|
+
# strip Unix exec bits when unpacking marketplace packages (#2040).
|
|
26
|
+
dir=$("${BASH:-bash}" "$(cd "$(dirname "$0")" && pwd)/sdd-workspace" "$plan")
|
|
25
27
|
out="$dir/task-${n}-brief.md"
|
|
26
28
|
fi
|
|
27
29
|
|
|
@@ -189,7 +189,7 @@ Subagent (general-purpose):
|
|
|
189
189
|
|
|
190
190
|
**Placeholders:**
|
|
191
191
|
- `[MODEL]` — REQUIRED: reviewer model per SKILL.md Model Selection
|
|
192
|
-
- `[BRIEF_FILE]` — REQUIRED: the task brief file (`scripts/task-brief PLAN N`
|
|
192
|
+
- `[BRIEF_FILE]` — REQUIRED: the task brief file (`bash scripts/task-brief PLAN N`
|
|
193
193
|
prints the path; same file the implementer worked from)
|
|
194
194
|
- `[GLOBAL_CONSTRAINTS]` — the binding requirements copied verbatim from
|
|
195
195
|
the plan's Global Constraints section or the spec: exact values, formats,
|
|
@@ -200,7 +200,7 @@ Subagent (general-purpose):
|
|
|
200
200
|
- `[BASE_SHA]` — commit before this task
|
|
201
201
|
- `[HEAD_SHA]` — current commit
|
|
202
202
|
- `[DIFF_FILE]` — REQUIRED: the path the controller wrote the review
|
|
203
|
-
package to (`scripts/review-package PLAN_FILE BASE HEAD` prints the unique
|
|
203
|
+
package to (`bash scripts/review-package PLAN_FILE BASE HEAD` prints the unique
|
|
204
204
|
path it wrote; the package never enters the controller's context)
|
|
205
205
|
|
|
206
206
|
**Reviewer returns:** Spec Compliance verdict (✅/❌/⚠️), Strengths, Issues
|
|
@@ -101,7 +101,7 @@ If something appears during tests but you don't know which test:
|
|
|
101
101
|
Use the bisection script `find-polluter.sh` in this directory:
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
|
-
./find-polluter.sh '.git' 'src/**/*.test.ts'
|
|
104
|
+
bash ./find-polluter.sh '.git' 'src/**/*.test.ts'
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
Runs tests one-by-one, stops at first polluter. See script for usage.
|
|
@@ -182,6 +182,16 @@ Confirm:
|
|
|
182
182
|
|
|
183
183
|
**Other tests fail?** Fix now.
|
|
184
184
|
|
|
185
|
+
**"Other tests" means the project's suite, not just your file.** A
|
|
186
|
+
green run of the test you wrote is not a green suite. Before you call
|
|
187
|
+
the change done, run the project's test command (bare `pytest`,
|
|
188
|
+
`npm test`, `cargo test` — whatever the repo uses) even when your task
|
|
189
|
+
named only one test file. A scope statement in your task bounds the
|
|
190
|
+
deliverable, not your verification. Any failure that run shows —
|
|
191
|
+
including one you didn't cause — goes in your report by name; a red
|
|
192
|
+
test you watched scroll past and didn't mention is a report falsified
|
|
193
|
+
by omission.
|
|
194
|
+
|
|
185
195
|
### REFACTOR - Clean Up
|
|
186
196
|
|
|
187
197
|
After green only:
|
|
@@ -53,10 +53,12 @@ These thoughts mean STOP—you're rationalizing:
|
|
|
53
53
|
|
|
54
54
|
If your harness appears here, read its reference file for special instructions:
|
|
55
55
|
|
|
56
|
+
- Claude Code: `references/claude-code-tools.md`
|
|
56
57
|
- Codex: `references/codex-tools.md`
|
|
57
58
|
- Pi: `references/pi-tools.md`
|
|
58
59
|
- Antigravity: `references/antigravity-tools.md`
|
|
59
60
|
- Hermes Agent: `references/hermes-tools.md`
|
|
61
|
+
- Muse: `references/muse-tools.md`
|
|
60
62
|
|
|
61
63
|
## User Instructions
|
|
62
64
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Claude Code Tool Notes
|
|
2
|
+
|
|
3
|
+
Claude Code is the reference harness: skills speak its vocabulary
|
|
4
|
+
(`Agent` for a subagent dispatch, todos, `Skill`). These notes cover the
|
|
5
|
+
one place Claude Code can run a plan cheaper than the skills' default
|
|
6
|
+
shape. It is opt-in by your human partner and changes nothing the skills
|
|
7
|
+
require.
|
|
8
|
+
|
|
9
|
+
## Cheaper orchestration for subagent-driven development
|
|
10
|
+
|
|
11
|
+
The controller session is the most expensive seat in a
|
|
12
|
+
superpowers:subagent-driven-development run: it reads every dispatch
|
|
13
|
+
result and every report, and it usually runs on the session's most
|
|
14
|
+
capable model. Claude Code supports nested subagents (three layers below
|
|
15
|
+
the main conversation by default; `CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH`
|
|
16
|
+
adjusts it), so the whole loop can run one layer down.
|
|
17
|
+
|
|
18
|
+
When your human partner asks for it — or has said the session model is
|
|
19
|
+
too expensive to spend on coordination — dispatch ONE orchestrator
|
|
20
|
+
subagent on a mid-tier model with the plan path and the instruction to
|
|
21
|
+
use superpowers:subagent-driven-development end to end. The orchestrator
|
|
22
|
+
dispatches its own implementers and reviewers per that skill's Model
|
|
23
|
+
Selection; the workspace and ledger live on disk, so nothing is lost to
|
|
24
|
+
the extra layer. Its final message must carry the "Rulings I made" list
|
|
25
|
+
verbatim — that list is how the decisions reach your human partner, and
|
|
26
|
+
you relay it, not summarize it.
|
|
27
|
+
|
|
28
|
+
Do this only for a whole plan. Nesting a single task's dispatch buys
|
|
29
|
+
nothing and adds a seat.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Muse Tool Mapping
|
|
2
|
+
|
|
3
|
+
Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On Muse these resolve to the tools below.
|
|
4
|
+
|
|
5
|
+
| Action skills request | Muse equivalent |
|
|
6
|
+
|----------------------|----------------|
|
|
7
|
+
| Read a file | `read_file` |
|
|
8
|
+
| Read multiple files | `read_file` (call multiple times) or `search` |
|
|
9
|
+
| Create a new file | `write_file` |
|
|
10
|
+
| Edit a file | `edit_file` |
|
|
11
|
+
| Run a shell command | `bash` |
|
|
12
|
+
| Search file contents | `search` |
|
|
13
|
+
| Find files by name | `search` with `glob` |
|
|
14
|
+
| Fetch a URL | `web_fetch` |
|
|
15
|
+
| Search the web | `web_search` |
|
|
16
|
+
| Invoke a skill | `read_file` on `skills/<name>/SKILL.md` or native skill tool |
|
|
17
|
+
| Dispatch a subagent (`Subagent (general-purpose):` template) | `subagent_spawn` with prompt filling |
|
|
18
|
+
| Task tracking ("create a todo", "mark complete") | `write_todos` or `bash` task file |
|
|
19
|
+
| Ask the user a question | `request_user_input` |
|
|
20
|
+
|
|
21
|
+
## Instructions file
|
|
22
|
+
|
|
23
|
+
When a skill mentions "your instructions file", on Muse this is **`CLAUDE.md`** or **`AGENTS.md`** in the project root. Muse loads these hierarchically where configured.
|
|
24
|
+
|
|
25
|
+
## Skill invocation
|
|
26
|
+
|
|
27
|
+
Muse has native skill support via `muse skills`. To invoke a Superpowers skill, read its `SKILL.md` and follow the instructions. The bootstrap (`using-superpowers`) is injected automatically at `SessionStart` via the plugin hook — you are already following it, do not re-load it.
|
|
28
|
+
|
|
29
|
+
## Subagent dispatch
|
|
30
|
+
|
|
31
|
+
Use `subagent_spawn` to delegate work to isolated subagents. Fill prompt templates (e.g., `implementer-prompt.md`, `task-reviewer-prompt.md`) before dispatching. If no subagent tool is available, do the work inline rather than inventing tool calls.
|
|
32
|
+
|
|
33
|
+
## Task tracking
|
|
34
|
+
|
|
35
|
+
Use `write_todos` for checklist tracking. Create one todo per skill checklist item, mark in_progress/completed as you go. If `write_todos` is unavailable, maintain a markdown task file via `write_file`/`edit_file`.
|
|
@@ -7,9 +7,7 @@ description: Use when you have a spec or requirements for a multi-step task, bef
|
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
10
|
-
Write
|
|
11
|
-
|
|
12
|
-
Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
|
|
10
|
+
Write implementation plans for an engineer who has not seen this codebase or this spec. Assume they write idiomatic code in the project's language once they know the exact interface and the exact test, and that they will make a reasonable choice wherever the plan leaves one open. What they cannot know is what you decided: which files, which names and signatures, which values from the spec, which tests prove each task. Document those. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
|
|
13
11
|
|
|
14
12
|
**Announce at start:** "I'm using the writing-plans skill to create the implementation plan."
|
|
15
13
|
|
|
@@ -42,9 +40,9 @@ deliverable needs them; split only where a reviewer could meaningfully
|
|
|
42
40
|
reject one task while approving its neighbor. Each task ends with an
|
|
43
41
|
independently testable deliverable.
|
|
44
42
|
|
|
45
|
-
##
|
|
43
|
+
## Step Granularity
|
|
46
44
|
|
|
47
|
-
**Each step is one action
|
|
45
|
+
**Each step is one action with a checkable result:**
|
|
48
46
|
- "Write the failing test" - step
|
|
49
47
|
- "Run it to make sure it fails" - step
|
|
50
48
|
- "Implement the minimal code to make the test pass" - step
|
|
@@ -76,6 +74,18 @@ naming and copy rules, platform requirements — one line each, with exact
|
|
|
76
74
|
values copied verbatim from the spec. Every task's requirements implicitly
|
|
77
75
|
include this section.]
|
|
78
76
|
|
|
77
|
+
## Review Focus
|
|
78
|
+
|
|
79
|
+
[The five input classes or failure modes the spec implies but no task's
|
|
80
|
+
tests exercise that are most likely to bite a person using this software
|
|
81
|
+
— one line each, naming the input or condition and the behavior a
|
|
82
|
+
reasonable person would expect, most likely first. The spec is a vision
|
|
83
|
+
document: it says what the software must do, not everything it will
|
|
84
|
+
meet, and its silence on an input is not permission for that input to
|
|
85
|
+
break the program. Write the list here, once, with the spec in front of
|
|
86
|
+
you. Then, for each line, add the test that pins it to the task that
|
|
87
|
+
owns the code, in that task's own step style.]
|
|
88
|
+
|
|
79
89
|
---
|
|
80
90
|
```
|
|
81
91
|
|
|
@@ -108,12 +118,11 @@ def test_specific_behavior():
|
|
|
108
118
|
Run: `pytest tests/path/test.py::test_name -v`
|
|
109
119
|
Expected: FAIL with "function not defined"
|
|
110
120
|
|
|
111
|
-
- [ ] **Step 3:
|
|
121
|
+
- [ ] **Step 3: Implement `function(input: InputType) -> ResultType` in `exact/path/to/file.py`**
|
|
112
122
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
```
|
|
123
|
+
One line on the approach when the signature and the test leave a choice
|
|
124
|
+
(which library call, which data structure); a code block only for an
|
|
125
|
+
algorithm they do not determine.
|
|
117
126
|
|
|
118
127
|
- [ ] **Step 4: Run test to verify it passes**
|
|
119
128
|
|
|
@@ -128,15 +137,28 @@ git commit -m "feat: add specific feature"
|
|
|
128
137
|
```
|
|
129
138
|
````
|
|
130
139
|
|
|
131
|
-
##
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
-
|
|
138
|
-
|
|
139
|
-
-
|
|
140
|
+
## What a Step Contains
|
|
141
|
+
|
|
142
|
+
A step is done when the implementer can write exactly one reasonable thing
|
|
143
|
+
from it. That is the whole requirement: unambiguous, not complete. Each kind
|
|
144
|
+
of step carries what makes it unambiguous and nothing more:
|
|
145
|
+
|
|
146
|
+
- **A test step:** the test's name and its assertions, as code, with the
|
|
147
|
+
spec's exact values in them.
|
|
148
|
+
- **A code step:** the exact signature (name, parameters, return type), the
|
|
149
|
+
file it lives in, and the specific values the spec pins. The implementer
|
|
150
|
+
writes the body. A body appears only for an algorithm the signature and
|
|
151
|
+
tests do not determine, or for exact copy the spec fixes.
|
|
152
|
+
- **A verification step:** the command to run and the output that means it
|
|
153
|
+
passed.
|
|
154
|
+
- **A reference to another task:** that task's Interfaces block says what
|
|
155
|
+
to use; the plan does not repeat that task's code.
|
|
156
|
+
|
|
157
|
+
A plan is the set of decisions the implementer cannot make alone. A plan
|
|
158
|
+
longer than the code it describes has written the code instead. Lines that
|
|
159
|
+
decide nothing ("TBD", "handle edge cases", "add appropriate validation",
|
|
160
|
+
"write tests for the above", a type or function no task defines) are the
|
|
161
|
+
opposite failure, and the self-review catches both.
|
|
140
162
|
|
|
141
163
|
## Self-Review
|
|
142
164
|
|
|
@@ -144,28 +166,39 @@ After writing the complete plan, look at the spec with fresh eyes and check the
|
|
|
144
166
|
|
|
145
167
|
**1. Spec coverage:** Skim each section/requirement in the spec. Can you point to a task that implements it? List any gaps.
|
|
146
168
|
|
|
147
|
-
**2.
|
|
169
|
+
**2. Step scan:** Every step must let the implementer write exactly one reasonable thing, and no step may carry more than that: a line that decides nothing is a gap, a function body the signature and tests already determine is a transcript. Fix both.
|
|
148
170
|
|
|
149
171
|
**3. Type consistency:** Do the types, method signatures, and property names you used in later tasks match what you defined in earlier tasks? A function called `clearLayers()` in Task 3 but `clearFullLayers()` in Task 7 is a bug.
|
|
150
172
|
|
|
173
|
+
**4. Review Focus:** For each input class or failure mode the spec implies, is there a task whose tests exercise it? The five uncovered ones most likely to bite a person go in the Review Focus section, and each line there gets its test added to the owning task. An empty section means you checked and found none, not that you skipped the check.
|
|
174
|
+
|
|
175
|
+
**5. Proportion:** Compare the plan's length to the spec's. A plan several times longer than the spec it implements is a transcript of the program, not a plan. If code blocks are most of the document, replace bodies with signatures, test names and assertions, and check that each step is still unambiguous.
|
|
176
|
+
|
|
151
177
|
If you find issues, fix them inline. No need to re-review — just fix and move on. If you find a spec requirement with no task, add the task.
|
|
152
178
|
|
|
153
179
|
## Execution Handoff
|
|
154
180
|
|
|
155
|
-
After saving the plan,
|
|
181
|
+
After saving and self-reviewing the plan, link it for your human partner
|
|
182
|
+
to read. If they have already explicitly supplied an execution method, ask
|
|
183
|
+
them to review the plan and confirm it captures what they want; wait for that
|
|
184
|
+
review before implementation, then use the preserved method. Otherwise, ask
|
|
185
|
+
them to review the plan and choose an execution method before implementation.
|
|
186
|
+
|
|
187
|
+
**When no execution method has already been supplied:**
|
|
188
|
+
|
|
189
|
+
**"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Please review the plan. Which execution approach would you prefer?**
|
|
156
190
|
|
|
157
|
-
**
|
|
191
|
+
- **Subagent-driven** - A fresh subagent implements each task and a fresh reviewer checks it before the next one starts, then a whole-branch review at the end. Most thorough; costs a fresh context per task and per review.
|
|
192
|
+
- **Native** - I implement every task myself in this session, the way this harness runs work, then one fresh reviewer on the most capable model checks the whole branch. Cheapest and fastest; no independent review until the end. Runs well with a mid-tier session model, since the plan carries the design.
|
|
158
193
|
|
|
159
|
-
**
|
|
194
|
+
**For this plan I recommend <one of the two>, because <one sentence from the plan: how much the tasks depend on each other's interfaces, how many there are, what a shipped mistake would cost>. Does the plan capture what you want, and which approach should we use?"**
|
|
160
195
|
|
|
161
|
-
**
|
|
196
|
+
**When an execution method has already been supplied:**
|
|
162
197
|
|
|
163
|
-
**
|
|
198
|
+
**"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Please review the plan. Does it capture what you want?"**
|
|
164
199
|
|
|
165
|
-
**If Subagent-
|
|
200
|
+
**If Subagent-driven chosen:**
|
|
166
201
|
- **REQUIRED SUB-SKILL:** Use superpowers:subagent-driven-development
|
|
167
|
-
- Fresh subagent per task + two-stage review
|
|
168
202
|
|
|
169
|
-
**If
|
|
203
|
+
**If Native chosen:**
|
|
170
204
|
- **REQUIRED SUB-SKILL:** Use superpowers:executing-plans
|
|
171
|
-
- Batch execution with checkpoints for review
|
|
@@ -317,8 +317,8 @@ See `graphviz-conventions.dot` in this directory for graphviz style rules.
|
|
|
317
317
|
|
|
318
318
|
**Visualizing for your human partner:** Use `render-graphs.js` in this directory to render a skill's flowcharts to SVG:
|
|
319
319
|
```bash
|
|
320
|
-
./render-graphs.js ../some-skill # Each diagram separately
|
|
321
|
-
./render-graphs.js ../some-skill --combine # All diagrams in one SVG
|
|
320
|
+
node ./render-graphs.js ../some-skill # Each diagram separately
|
|
321
|
+
node ./render-graphs.js ../some-skill --combine # All diagrams in one SVG
|
|
322
322
|
```
|
|
323
323
|
|
|
324
324
|
## Code Examples
|
|
@@ -371,6 +371,8 @@ pptx/
|
|
|
371
371
|
```
|
|
372
372
|
When: Reference material too large for inline
|
|
373
373
|
|
|
374
|
+
Invoke bundled scripts through their interpreter in the prose (`bash scripts/tool.sh`, `node scripts/tool.js`), never by bare path: some harness plugin packagers strip executable bits, and a bare `scripts/tool.sh` fails there with `Permission denied`.
|
|
375
|
+
|
|
374
376
|
## The Iron Law (Same as TDD)
|
|
375
377
|
|
|
376
378
|
```
|
package/test/index.test.js
CHANGED
|
@@ -104,8 +104,8 @@ test('registers all vendored skills with source-accurate metadata', async () =>
|
|
|
104
104
|
.filter((entry) => entry.isDirectory())
|
|
105
105
|
.sort((left, right) => left.name.localeCompare(right.name))
|
|
106
106
|
|
|
107
|
-
assert.equal(entries.length,
|
|
108
|
-
assert.equal(state.registered.length,
|
|
107
|
+
assert.equal(entries.length, 15)
|
|
108
|
+
assert.equal(state.registered.length, 15)
|
|
109
109
|
assert.deepEqual(state.warnings, [])
|
|
110
110
|
assert.equal(state.sections.length, 1)
|
|
111
111
|
assert.match(state.sections[0].text, /`interrupt_agent`/)
|
|
@@ -312,6 +312,30 @@ test('keeps the English and Chinese READMEs structurally in sync', async () => {
|
|
|
312
312
|
}
|
|
313
313
|
})
|
|
314
314
|
|
|
315
|
+
test('records the vendored upstream revision in the manifest and both READMEs', async () => {
|
|
316
|
+
const manifest = JSON.parse(await readFile(join(packageRoot, 'package.json'), 'utf8'))
|
|
317
|
+
const upstream = manifest.superpowers
|
|
318
|
+
assert.notEqual(upstream, undefined, 'package.json must record the vendored upstream revision')
|
|
319
|
+
assert.match(upstream.upstreamVersion, /^\d+\.\d+\.\d+$/)
|
|
320
|
+
assert.match(upstream.upstreamCommit, /^[0-9a-f]{40}$/)
|
|
321
|
+
assert.equal(upstream.upstreamRepository, 'https://github.com/obra/superpowers')
|
|
322
|
+
|
|
323
|
+
const [chinese, english] = await Promise.all(
|
|
324
|
+
['README.md', 'README.en.md'].map((file) => readFile(join(packageRoot, file), 'utf8')),
|
|
325
|
+
)
|
|
326
|
+
for (const [file, text] of [['README.md', chinese], ['README.en.md', english]]) {
|
|
327
|
+
assert.ok(text.includes(upstream.upstreamVersion), `${file} should name the vendored upstream version`)
|
|
328
|
+
assert.ok(text.includes(upstream.upstreamCommit), `${file} should link the vendored upstream commit`)
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
// The advertised skill count is a user-visible claim: keep it tied to the tree.
|
|
332
|
+
const shipped = (await readdir(join(packageRoot, 'skills'), { withFileTypes: true })).filter((entry) =>
|
|
333
|
+
entry.isDirectory(),
|
|
334
|
+
).length
|
|
335
|
+
assert.equal(Number(/注册\s*(\d+)\s*个技能/.exec(chinese)?.[1]), shipped, 'README.md should count the shipped skills')
|
|
336
|
+
assert.equal(Number(/registers\s*(\d+)\s*skills/.exec(english)?.[1]), shipped, 'README.en.md should count the shipped skills')
|
|
337
|
+
})
|
|
338
|
+
|
|
315
339
|
test('ships every path its test script and manifest reference', async () => {
|
|
316
340
|
const manifest = JSON.parse(await readFile(join(packageRoot, 'package.json'), 'utf8'))
|
|
317
341
|
assert.equal(manifest.scripts.test, 'node --test')
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Plan Document Reviewer Prompt Template
|
|
2
|
-
|
|
3
|
-
Use this template when dispatching a plan document reviewer subagent.
|
|
4
|
-
|
|
5
|
-
**Purpose:** Verify the plan is complete, matches the spec, and has proper task decomposition.
|
|
6
|
-
|
|
7
|
-
**Dispatch after:** The complete plan is written.
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
Subagent (general-purpose):
|
|
11
|
-
description: "Review plan document"
|
|
12
|
-
prompt: |
|
|
13
|
-
You are a plan document reviewer. Verify this plan is complete and ready for implementation.
|
|
14
|
-
|
|
15
|
-
**Plan to review:** [PLAN_FILE_PATH]
|
|
16
|
-
**Spec for reference:** [SPEC_FILE_PATH]
|
|
17
|
-
|
|
18
|
-
## What to Check
|
|
19
|
-
|
|
20
|
-
| Category | What to Look For |
|
|
21
|
-
|----------|------------------|
|
|
22
|
-
| Completeness | TODOs, placeholders, incomplete tasks, missing steps |
|
|
23
|
-
| Spec Alignment | Plan covers spec requirements, no major scope creep |
|
|
24
|
-
| Task Decomposition | Tasks have clear boundaries, steps are actionable |
|
|
25
|
-
| Buildability | Could an engineer follow this plan without getting stuck? |
|
|
26
|
-
|
|
27
|
-
## Calibration
|
|
28
|
-
|
|
29
|
-
**Only flag issues that would cause real problems during implementation.**
|
|
30
|
-
An implementer building the wrong thing or getting stuck is an issue.
|
|
31
|
-
Minor wording, stylistic preferences, and "nice to have" suggestions are not.
|
|
32
|
-
|
|
33
|
-
Approve unless there are serious gaps — missing requirements from the spec,
|
|
34
|
-
contradictory steps, placeholder content, or tasks so vague they can't be acted on.
|
|
35
|
-
|
|
36
|
-
## Output Format
|
|
37
|
-
|
|
38
|
-
## Plan Review
|
|
39
|
-
|
|
40
|
-
**Status:** Approved | Issues Found
|
|
41
|
-
|
|
42
|
-
**Issues (if any):**
|
|
43
|
-
- [Task X, Step Y]: [specific issue] - [why it matters for implementation]
|
|
44
|
-
|
|
45
|
-
**Recommendations (advisory, do not block approval):**
|
|
46
|
-
- [suggestions for improvement]
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
**Reviewer returns:** Status, Issues (if any), Recommendations
|