superpowers-mcp 6.3.6 → 6.3.8
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.ja.md +56 -62
- package/README.ko.md +56 -64
- package/README.md +58 -65
- package/README.zh-TW.md +56 -64
- package/docs/maintainers/upstream-sync.md +42 -0
- package/docs/skill-compositions.ja.md +194 -0
- package/docs/skill-compositions.ko.md +194 -0
- package/docs/skill-compositions.md +216 -0
- package/docs/skill-compositions.zh-TW.md +194 -0
- package/out/server.js +105 -146
- package/out/setup-runner.js +16 -16
- package/out/setup.js +17 -17
- package/package.json +12 -6
- package/scripts/upstream-drift.js +346 -0
- package/skills/brainstorming/SKILL.md +125 -25
- package/skills/brainstorming/scripts/helper.js +1 -1
- package/skills/brainstorming/scripts/server.cjs +61 -6
- package/skills/brainstorming/scripts/start-server.ps1 +20 -1
- package/skills/brainstorming/scripts/start-server.sh +2 -2
- package/skills/executing-plans/SKILL.md +7 -1
- package/skills/finishing-a-development-branch/SKILL.md +15 -0
- package/skills/subagent-driven-development/SKILL.md +121 -36
- package/skills/subagent-driven-development/implementer-prompt.md +19 -0
- package/skills/subagent-driven-development/re-review-prompt.md +10 -4
- package/skills/subagent-driven-development/scripts/review-package +6 -0
- package/skills/subagent-driven-development/scripts/review-package.ps1 +7 -0
- package/skills/subagent-driven-development/scripts/sdd-workspace +11 -4
- package/skills/subagent-driven-development/scripts/sdd-workspace.ps1 +28 -3
- package/skills/subagent-driven-development/task-reviewer-prompt.md +28 -10
- package/skills/systematic-debugging/SKILL.md +1 -1
- package/skills/systematic-debugging/find-polluter.ps1 +7 -5
- package/skills/systematic-debugging/find-polluter.sh +11 -9
- package/skills/systematic-debugging/root-cause-tracing.md +2 -2
- package/skills/test-driven-development/SKILL.md +27 -3
- package/skills/test-driven-development/writing-good-tests.md +7 -0
- package/skills/using-git-worktrees/SKILL.md +12 -0
- package/skills/using-superpowers/SKILL.md +1 -1
- package/skills/verification-before-completion/SKILL.md +54 -1
- package/skills/writing-plans/SKILL.md +20 -5
- package/skills/writing-skills/SKILL.md +30 -0
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
# Single source of truth for the workspace location, so task-brief and
|
|
24
24
|
# review-package cannot drift to different directories.
|
|
25
25
|
#
|
|
26
|
+
# A greenfield plan's first task is often "create the repo", so there is no
|
|
27
|
+
# repo root to resolve yet: fall back to the current directory rather than
|
|
28
|
+
# failing, since that task is exactly the one needing a brief.
|
|
29
|
+
#
|
|
26
30
|
# Usage: sdd-workspace PLAN_FILE
|
|
27
31
|
set -euo pipefail
|
|
28
32
|
|
|
@@ -38,14 +42,17 @@ slug=$(basename -- "$plan" .md)
|
|
|
38
42
|
[ -n "$slug" ] && [ "$slug" != "." ] && [ "$slug" != ".." ] \
|
|
39
43
|
|| { echo "cannot derive a workspace name from: $plan" >&2; exit 2; }
|
|
40
44
|
|
|
41
|
-
root=$(git rev-parse --show-toplevel)
|
|
42
|
-
root=$
|
|
45
|
+
if ! root=$(git rev-parse --show-toplevel 2>/dev/null); then
|
|
46
|
+
root=$PWD
|
|
47
|
+
echo "sdd-workspace: no git repository yet, using $root/.superpowers/sdd until this plan's first task creates one" >&2
|
|
48
|
+
fi
|
|
49
|
+
root=$(CDPATH='' cd -- "$root" && pwd -P)
|
|
43
50
|
base="$root/.superpowers/sdd"
|
|
44
51
|
|
|
45
52
|
# Normalize the plan path (physical directory, so relative/absolute/../
|
|
46
53
|
# spellings of one plan compare equal) and express it as the marker value:
|
|
47
54
|
# repo-relative when the plan lives under the repo root, absolute otherwise.
|
|
48
|
-
plan_dir=$(CDPATH= cd -- "$(dirname -- "$plan")" && pwd -P)
|
|
55
|
+
plan_dir=$(CDPATH='' cd -- "$(dirname -- "$plan")" && pwd -P)
|
|
49
56
|
plan_abs="$plan_dir/$(basename -- "$plan")"
|
|
50
57
|
case "$plan_abs" in
|
|
51
58
|
"$root"/*) plan_id=${plan_abs#"$root"/} ;;
|
|
@@ -76,4 +83,4 @@ if ! owns "$dir"; then
|
|
|
76
83
|
fi
|
|
77
84
|
|
|
78
85
|
printf '*\n' > "$base/.gitignore"
|
|
79
|
-
CDPATH= cd -- "$dir" && pwd
|
|
86
|
+
CDPATH='' cd -- "$dir" && pwd
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
# plan in the same working tree can never read or overwrite another plan's
|
|
8
8
|
# artifacts.
|
|
9
9
|
#
|
|
10
|
+
# A greenfield plan's first task is often "create the repo", so there is no
|
|
11
|
+
# repo root to resolve yet: fall back to the current directory rather than
|
|
12
|
+
# failing, since that task is exactly the one needing a brief.
|
|
13
|
+
#
|
|
10
14
|
# Usage: ./sdd-workspace.ps1 PLAN_FILE
|
|
11
15
|
|
|
12
16
|
$ErrorActionPreference = "Stop"
|
|
@@ -28,8 +32,21 @@ if ([string]::IsNullOrEmpty($slug) -or $slug -eq "." -or $slug -eq "..") {
|
|
|
28
32
|
exit 2
|
|
29
33
|
}
|
|
30
34
|
|
|
31
|
-
$root =
|
|
32
|
-
|
|
35
|
+
$root = $null
|
|
36
|
+
try {
|
|
37
|
+
# Collect all output without an early-terminating pipeline: a
|
|
38
|
+
# Select-Object -First teardown can leave $LASTEXITCODE stale.
|
|
39
|
+
$rootOutput = @(& git rev-parse --show-toplevel 2>$null)
|
|
40
|
+
if ($LASTEXITCODE -eq 0 -and $rootOutput.Count -gt 0 -and -not [string]::IsNullOrWhiteSpace($rootOutput[0])) {
|
|
41
|
+
$root = ([string]$rootOutput[0]).Trim()
|
|
42
|
+
}
|
|
43
|
+
} catch {
|
|
44
|
+
$root = $null
|
|
45
|
+
}
|
|
46
|
+
if ([string]::IsNullOrWhiteSpace($root)) {
|
|
47
|
+
$root = (Get-Location).Path
|
|
48
|
+
[Console]::Error.WriteLine("sdd-workspace.ps1: no git repository yet, using $root/.superpowers/sdd until this plan's first task creates one")
|
|
49
|
+
}
|
|
33
50
|
|
|
34
51
|
function Get-PhysicalDirectoryPath($path) {
|
|
35
52
|
if (-not (Test-Path -LiteralPath $path)) { return $path }
|
|
@@ -59,6 +76,10 @@ if ([string]::IsNullOrEmpty($planParent)) { $planParent = "." }
|
|
|
59
76
|
|
|
60
77
|
$planDir = Get-PhysicalDirectoryPath $planParent
|
|
61
78
|
$rootPhys = Get-PhysicalDirectoryPath $root
|
|
79
|
+
# Build $base from the physical root so the greenfield fallback (cwd, which
|
|
80
|
+
# may be a symlinked path such as macOS /var) prints the same location as
|
|
81
|
+
# the later git-resolved call.
|
|
82
|
+
$base = Join-Path $rootPhys ".superpowers/sdd"
|
|
62
83
|
|
|
63
84
|
$planAbs = (Join-Path $planDir $planLeaf) -replace '\\', '/'
|
|
64
85
|
$rootNorm = $rootPhys -replace '\\', '/'
|
|
@@ -76,7 +97,11 @@ function Test-And-Claim-Workspace($targetDir, $id) {
|
|
|
76
97
|
return ($existingId -eq $id)
|
|
77
98
|
} else {
|
|
78
99
|
New-Item -ItemType Directory -Force -Path $targetDir | Out-Null
|
|
79
|
-
|
|
100
|
+
[System.IO.File]::WriteAllText(
|
|
101
|
+
$markerPath,
|
|
102
|
+
$id + [Environment]::NewLine,
|
|
103
|
+
[System.Text.UTF8Encoding]::new($false)
|
|
104
|
+
)
|
|
80
105
|
return $true
|
|
81
106
|
}
|
|
82
107
|
}
|
|
@@ -134,13 +134,27 @@ Subagent (general-purpose):
|
|
|
134
134
|
|
|
135
135
|
Your report should point at evidence: file:line references for every
|
|
136
136
|
finding and for any check you would otherwise answer with a bare
|
|
137
|
-
"yes." A tight report that cites lines gives the
|
|
138
|
-
it needs.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
"yes." A tight report that cites lines gives the fix subagent
|
|
138
|
+
everything it needs.
|
|
139
|
+
|
|
140
|
+
## Report Format
|
|
141
|
+
|
|
142
|
+
Write your full report to [REVIEW_FILE] using the Output Format
|
|
143
|
+
below: verdicts, strengths, every finding with file:line, and any
|
|
144
|
+
check you ran outside the diff. Fix subagents read this file — it is
|
|
145
|
+
the only place your detail survives.
|
|
146
|
+
|
|
147
|
+
Then report back with ONLY (under 15 lines — the detail lives in the
|
|
148
|
+
review file):
|
|
149
|
+
- **Spec:** ✅ | ❌ — if ❌, one line per missing/extra/misunderstood
|
|
150
|
+
item (file:line + summary)
|
|
151
|
+
- **⚠️ Cannot verify from diff:** [items the controller must resolve
|
|
152
|
+
itself — always in this message, never only in the file]
|
|
153
|
+
- **Quality:** Approved | Needs fixes
|
|
154
|
+
- One line per Critical/Important finding: file:line + what's wrong,
|
|
155
|
+
with any plan-mandated finding marked (the human adjudicates those)
|
|
156
|
+
- Minor findings: count only
|
|
157
|
+
- The review file path
|
|
144
158
|
|
|
145
159
|
## Calibration
|
|
146
160
|
|
|
@@ -158,7 +172,7 @@ Subagent (general-purpose):
|
|
|
158
172
|
Acknowledge what was done well before listing issues — accurate praise
|
|
159
173
|
helps the implementer trust the rest of the feedback.
|
|
160
174
|
|
|
161
|
-
## Output Format
|
|
175
|
+
## Output Format (the review file)
|
|
162
176
|
|
|
163
177
|
### Spec Compliance
|
|
164
178
|
|
|
@@ -202,6 +216,10 @@ Subagent (general-purpose):
|
|
|
202
216
|
- `[DIFF_FILE]` — REQUIRED: the path the controller wrote the review
|
|
203
217
|
package to (`scripts/review-package PLAN_FILE BASE HEAD`, or `scripts/review-package.ps1 PLAN_FILE BASE HEAD` on Windows PowerShell, prints the unique
|
|
204
218
|
path it wrote; the package never enters the controller's context)
|
|
219
|
+
- `[REVIEW_FILE]` — REQUIRED: the file the reviewer writes its full report
|
|
220
|
+
to; name it after the brief (brief `…/task-N-brief.md` → review
|
|
221
|
+
`…/task-N-review.md`). Re-reviews append to the same file.
|
|
205
222
|
|
|
206
|
-
**Reviewer returns:**
|
|
207
|
-
(
|
|
223
|
+
**Reviewer returns:** full report in `[REVIEW_FILE]`; final message under
|
|
224
|
+
15 lines — Spec verdict (✅/❌/⚠️), Quality verdict, Critical/Important
|
|
225
|
+
findings one line each, Minor count, review file path
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: systematic-debugging
|
|
3
|
-
description: Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
|
|
3
|
+
description: Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes - including when you say "systematic debug", "debug this properly", or "find the root cause first"; for driving new behavior test-first, use test-driven-development instead
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Systematic Debugging
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env pwsh
|
|
2
2
|
# Bisection script to find which test creates unwanted files/state.
|
|
3
|
-
# Usage: ./find-polluter.ps1 <file_or_dir_to_check> <test_pattern>
|
|
3
|
+
# Usage: ./find-polluter.ps1 <file_or_dir_to_check> <test_pattern> <test command and arguments>
|
|
4
4
|
|
|
5
5
|
$ErrorActionPreference = "Stop"
|
|
6
6
|
|
|
7
|
-
if ($args.Count -
|
|
8
|
-
Write-Output "Usage: ./find-polluter.ps1 <file_to_check> <test_pattern>"
|
|
9
|
-
Write-Output "Example: ./find-polluter.ps1 '.git' 'src/**/*.test.ts'"
|
|
7
|
+
if ($args.Count -lt 3) {
|
|
8
|
+
Write-Output "Usage: ./find-polluter.ps1 <file_to_check> <test_pattern> <test command and arguments>"
|
|
9
|
+
Write-Output "Example: ./find-polluter.ps1 '.git' 'src/**/*.test.ts' npx vitest run"
|
|
10
10
|
exit 1
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
$pollutionCheck = $args[0]
|
|
14
14
|
$testPattern = $args[1]
|
|
15
|
+
$testCommand = $args[2]
|
|
16
|
+
$testCommandArgs = if ($args.Count -gt 3) { @($args[3..($args.Count - 1)]) } else { @() }
|
|
15
17
|
|
|
16
18
|
Write-Output "Searching for test that creates: $pollutionCheck"
|
|
17
19
|
Write-Output "Test pattern: $testPattern"
|
|
@@ -53,7 +55,7 @@ foreach ($testFile in $testFiles) {
|
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
Write-Output "[$count/$total] Testing: $($testFile.FullName)"
|
|
56
|
-
&
|
|
58
|
+
& $testCommand @testCommandArgs $testFile.FullName *> $null
|
|
57
59
|
|
|
58
60
|
if (Test-Path -LiteralPath $pollutionCheck) {
|
|
59
61
|
Write-Output ""
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Bisection script to find which test creates unwanted files/state
|
|
3
|
-
# Usage: ./find-polluter.sh <file_or_dir_to_check> <test_pattern>
|
|
4
|
-
# Example: ./find-polluter.sh '.git' 'src/**/*.test.ts'
|
|
3
|
+
# Usage: ./find-polluter.sh <file_or_dir_to_check> <test_pattern> <test command ...>
|
|
4
|
+
# Example: ./find-polluter.sh '.git' 'src/**/*.test.ts' npx vitest run
|
|
5
5
|
|
|
6
6
|
set -e
|
|
7
7
|
|
|
8
|
-
if [ $# -
|
|
9
|
-
echo "Usage: $0 <file_to_check> <test_pattern>"
|
|
10
|
-
echo "Example: $0 '.git' 'src/**/*.test.ts'"
|
|
8
|
+
if [ $# -lt 3 ]; then
|
|
9
|
+
echo "Usage: $0 <file_to_check> <test_pattern> <test command ...>"
|
|
10
|
+
echo "Example: $0 '.git' 'src/**/*.test.ts' npx vitest run"
|
|
11
11
|
exit 1
|
|
12
12
|
fi
|
|
13
13
|
|
|
14
14
|
POLLUTION_CHECK="$1"
|
|
15
15
|
TEST_PATTERN="$2"
|
|
16
|
+
TEST_COMMAND=("${@:3}")
|
|
16
17
|
|
|
17
18
|
echo "🔍 Searching for test that creates: $POLLUTION_CHECK"
|
|
18
19
|
echo "Test pattern: $TEST_PATTERN"
|
|
@@ -24,7 +25,7 @@ TEST_PATTERN="${TEST_PATTERN#./}"
|
|
|
24
25
|
# find -path can't match '**/' against zero directory levels, so a pattern
|
|
25
26
|
# like src/**/*.test.ts would skip src/top.test.ts; also try the pattern
|
|
26
27
|
# with '**/' collapsed to cover files directly under the base directory.
|
|
27
|
-
TEST_FILES=$(find . \( -path "./$TEST_PATTERN" -o -path "./${TEST_PATTERN//\*\*\//}" \) | sort -u)
|
|
28
|
+
TEST_FILES=$(find . \( -path "./$TEST_PATTERN" -o -path "./${TEST_PATTERN//\*\*\//}" \) -print | sort -u)
|
|
28
29
|
if [ -z "$TEST_FILES" ]; then
|
|
29
30
|
TOTAL=0
|
|
30
31
|
else
|
|
@@ -35,7 +36,8 @@ echo "Found $TOTAL test files"
|
|
|
35
36
|
echo ""
|
|
36
37
|
|
|
37
38
|
COUNT=0
|
|
38
|
-
|
|
39
|
+
while IFS= read -r TEST_FILE; do
|
|
40
|
+
[ -n "$TEST_FILE" ] || continue
|
|
39
41
|
COUNT=$((COUNT + 1))
|
|
40
42
|
|
|
41
43
|
# Skip if pollution already exists
|
|
@@ -48,7 +50,7 @@ for TEST_FILE in $TEST_FILES; do
|
|
|
48
50
|
echo "[$COUNT/$TOTAL] Testing: $TEST_FILE"
|
|
49
51
|
|
|
50
52
|
# Run the test
|
|
51
|
-
|
|
53
|
+
"${TEST_COMMAND[@]}" "$TEST_FILE" > /dev/null 2>&1 || true
|
|
52
54
|
|
|
53
55
|
# Check if pollution appeared
|
|
54
56
|
if [ -e "$POLLUTION_CHECK" ]; then
|
|
@@ -65,7 +67,7 @@ for TEST_FILE in $TEST_FILES; do
|
|
|
65
67
|
echo " cat $TEST_FILE # Review test code"
|
|
66
68
|
exit 1
|
|
67
69
|
fi
|
|
68
|
-
done
|
|
70
|
+
done <<< "$TEST_FILES"
|
|
69
71
|
|
|
70
72
|
echo ""
|
|
71
73
|
echo "✅ No polluter found - all tests clean!"
|
|
@@ -101,10 +101,10 @@ 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
|
+
./find-polluter.sh '.git' 'src/**/*.test.ts' npx vitest run
|
|
105
105
|
|
|
106
106
|
# Windows PowerShell:
|
|
107
|
-
./find-polluter.ps1 '.git' 'src/**/*.test.ts'
|
|
107
|
+
./find-polluter.ps1 '.git' 'src/**/*.test.ts' npx vitest run
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
Runs tests one-by-one, stops at first polluter. See script for usage.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: test-driven-development
|
|
3
|
-
description: Use when implementing any feature or bugfix, before writing implementation code
|
|
3
|
+
description: Use when implementing any feature or bugfix, before writing implementation code - including when you say "tdd", "tdd workflow", "write the test first", or "red green refactor"; for diagnosing an existing defect, use systematic-debugging instead
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Test-Driven Development (TDD)
|
|
@@ -68,6 +68,27 @@ digraph tdd_cycle {
|
|
|
68
68
|
}
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
+
### Characterization Test for a Behavior-Preserving Refactor
|
|
72
|
+
|
|
73
|
+
This extends the [upstream characterization guidance](writing-good-tests.md#principle-1-name-the-break)
|
|
74
|
+
to behavior-preserving refactors of your own code.
|
|
75
|
+
|
|
76
|
+
Normal RED applies when behavior should change. If observable behavior must
|
|
77
|
+
remain unchanged, establish a characterization guard before refactoring:
|
|
78
|
+
|
|
79
|
+
1. Name the behavior and a relevant production mutation that should make the
|
|
80
|
+
test fail.
|
|
81
|
+
2. Write the test and observe the existing behavior pass.
|
|
82
|
+
3. Require `git diff HEAD -- <production-paths>` to be empty before mutating.
|
|
83
|
+
If those paths have existing changes, stop without discarding them.
|
|
84
|
+
Make the mutation and verify the expected failure. If the test still
|
|
85
|
+
passes, strengthen or replace it and repeat.
|
|
86
|
+
4. Restore only the mutated production paths from VCS with
|
|
87
|
+
`git restore --source=HEAD --worktree -- <production-paths>`. Require
|
|
88
|
+
`git diff --exit-code HEAD -- <production-paths>` to succeed with an empty
|
|
89
|
+
diff, then verify green with the characterization test retained.
|
|
90
|
+
5. Refactor while staying green.
|
|
91
|
+
|
|
71
92
|
### RED - Write Failing Test
|
|
72
93
|
|
|
73
94
|
Write one minimal test showing what should happen.
|
|
@@ -123,7 +144,10 @@ Confirm:
|
|
|
123
144
|
- Failure message is expected
|
|
124
145
|
- Fails because feature missing (not typos)
|
|
125
146
|
|
|
126
|
-
**Test passes?**
|
|
147
|
+
**Test passes?** If observable behavior must remain unchanged, follow the
|
|
148
|
+
[characterization guard](#characterization-test-for-a-behavior-preserving-refactor)
|
|
149
|
+
before refactoring. If behavior should change, you're testing existing
|
|
150
|
+
behavior. Fix test.
|
|
127
151
|
|
|
128
152
|
**Test errors?** Fix error, re-run until it fails correctly.
|
|
129
153
|
|
|
@@ -239,7 +263,7 @@ When writing or changing any test, read [writing-good-tests.md](writing-good-tes
|
|
|
239
263
|
|
|
240
264
|
- Code before test
|
|
241
265
|
- Test after implementation
|
|
242
|
-
- Test passes immediately
|
|
266
|
+
- Test for new or changed behavior passes immediately
|
|
243
267
|
- Can't explain why test failed
|
|
244
268
|
- Tests added "later"
|
|
245
269
|
- Rationalizing "just this once"
|
|
@@ -62,6 +62,10 @@ getters, constants, and trivial forwarding earn tests only when they
|
|
|
62
62
|
validate, normalize, default, derive, enforce, or cause side effects —
|
|
63
63
|
otherwise assert the first consumer-visible result that depends on them.
|
|
64
64
|
|
|
65
|
+
For a behavior-preserving refactor of your own code, establish the
|
|
66
|
+
[characterization guard](SKILL.md#characterization-test-for-a-behavior-preserving-refactor)
|
|
67
|
+
before changing production structure.
|
|
68
|
+
|
|
65
69
|
### Gate Function
|
|
66
70
|
|
|
67
71
|
```
|
|
@@ -156,6 +160,9 @@ process costs maintenance forever.
|
|
|
156
160
|
|
|
157
161
|
## The Mutation Check
|
|
158
162
|
|
|
163
|
+
For a pre-refactor characterization guard, run the actual mutation and
|
|
164
|
+
VCS restoration procedure in the TDD skill, including its empty-diff check.
|
|
165
|
+
|
|
159
166
|
Before finishing, mentally mutate the production code; at least one test
|
|
160
167
|
should fail for each realistic mutation:
|
|
161
168
|
|
|
@@ -93,10 +93,19 @@ git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/d
|
|
|
93
93
|
# Determine path based on chosen location
|
|
94
94
|
path="$LOCATION/$BRANCH_NAME"
|
|
95
95
|
|
|
96
|
+
# Basing on current HEAD:
|
|
96
97
|
git worktree add "$path" -b "$BRANCH_NAME"
|
|
98
|
+
# Basing on any other ref (origin/main, origin/production, a tag) —
|
|
99
|
+
# --no-track is REQUIRED, not optional:
|
|
100
|
+
git worktree add "$path" -b "$BRANCH_NAME" --no-track <base-ref>
|
|
97
101
|
cd "$path"
|
|
102
|
+
|
|
103
|
+
# REQUIRED final check: the new branch must track no shared branch
|
|
104
|
+
git branch -vv | grep -F "$BRANCH_NAME"
|
|
98
105
|
```
|
|
99
106
|
|
|
107
|
+
**If that check shows `[origin/<shared branch>]`** (e.g. `[origin/main]`, `[origin/production]`): run `git branch --unset-upstream` now, before any commit. Inherited upstream is a git default, not anyone's intent — a later plain `git push`, an editor auto-sync, or a future session will land this work directly on that shared branch. A feature branch tracking a shared branch is never the correct end state, and mentioning it in your report while leaving it set does not count as handling it.
|
|
108
|
+
|
|
100
109
|
**Sandbox fallback:** If `git worktree add` fails with a permission error (sandbox denial), tell the user the sandbox blocked worktree creation and you're working in the current directory instead. Then run setup and baseline tests in place.
|
|
101
110
|
|
|
102
111
|
## Step 2: Project Setup
|
|
@@ -152,6 +161,7 @@ Ready to implement <feature-name>
|
|
|
152
161
|
| Both exist | Use `.worktrees/` |
|
|
153
162
|
| Neither exists | Check instruction file, then default `.worktrees/` |
|
|
154
163
|
| Directory not ignored | Add to .gitignore + commit |
|
|
164
|
+
| New branch tracks a shared remote branch | `git branch --unset-upstream` before committing (Step 1b) |
|
|
155
165
|
| Permission error on create | Sandbox fallback, work in place |
|
|
156
166
|
| Tests fail during baseline | Report failures + ask |
|
|
157
167
|
| No package.json/Cargo.toml | Skip dependency install |
|
|
@@ -165,3 +175,5 @@ Ready to implement <feature-name>
|
|
|
165
175
|
| "The worktree directory is surely ignored already" | Run `git check-ignore`. An unignored worktree directory commits the whole tree into the repo. |
|
|
166
176
|
| "Any directory name works" | Explicit instructions beat an existing project-local directory, which beats the `.worktrees/` default. |
|
|
167
177
|
| "The workspace is fresh — baseline tests can wait" | A dirty baseline makes every later failure ambiguous. Run the tests now; proceeding past failures is your human partner's call. |
|
|
178
|
+
| "It tracks origin/production, but nobody is pushing today" | The trap outlives today: the next plain `git push`, editor auto-sync, or session lands work on the shared branch. `git branch --unset-upstream` now — a warning note in your report doesn't disarm it. |
|
|
179
|
+
| "Tracking the base ref is expected — I branched from it" | Inherited upstream is a git default, not an intent. Pass `--no-track` at creation, or `--unset-upstream` the moment the check shows a shared branch. |
|
|
@@ -32,7 +32,7 @@ When multiple skills apply, process skills come first — they set the approach,
|
|
|
32
32
|
|
|
33
33
|
## Skill Compositions & Pipelines
|
|
34
34
|
|
|
35
|
-
Complex engineering workflows chain multiple skills end-to-end
|
|
35
|
+
Complex engineering workflows chain multiple skills end-to-end. The complete published guide is available from the MCP resource `guide://superpowers/skill-compositions`:
|
|
36
36
|
|
|
37
37
|
- **Feature Pipeline:** `brainstorming` → `writing-plans` → `using-git-worktrees` → `subagent-driven-development` (with `test-driven-development`) → `verification-before-completion` → `requesting-code-review` → `finishing-a-development-branch`
|
|
38
38
|
- **Troubleshooting Pipeline:** `systematic-debugging` → `using-git-worktrees` → `dispatching-parallel-agents` → `test-driven-development` → `verification-before-completion` → `requesting-code-review`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: verification-before-completion
|
|
3
|
-
description: Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
|
|
3
|
+
description: Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; for work with no test command (reports, research, recipes, correspondence, audits) requires re-opening the artifact and accounting for every part of the request; evidence before assertions always
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Verification Before Completion
|
|
@@ -118,3 +118,56 @@ Skip any step = lying, not verifying
|
|
|
118
118
|
- Paraphrases and synonyms
|
|
119
119
|
- Implications of success
|
|
120
120
|
- ANY communication suggesting completion/correctness
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## When There Is No Test Command
|
|
125
|
+
|
|
126
|
+
### Why this section exists
|
|
127
|
+
|
|
128
|
+
Everything above assumes an external judge: a test suite, a linter, an exit code.
|
|
129
|
+
The machine says pass or fail and you cannot argue with it.
|
|
130
|
+
|
|
131
|
+
Most work has no such judge. Nothing can run a report, a recipe or a research
|
|
132
|
+
answer and return "correct". The rule does not change — **no completion claim
|
|
133
|
+
without evidence** — only what evidence means.
|
|
134
|
+
|
|
135
|
+
### The failure this stops
|
|
136
|
+
|
|
137
|
+
Reporting what you INTENDED to produce rather than what is actually on disk.
|
|
138
|
+
|
|
139
|
+
**If you have not re-opened the artifact in this message, you have not checked
|
|
140
|
+
it.** You are remembering your own intentions, which is exactly the state in
|
|
141
|
+
which things get missed.
|
|
142
|
+
|
|
143
|
+
### Two levels, in this order
|
|
144
|
+
|
|
145
|
+
#### 1. Prove whatever CAN be proven
|
|
146
|
+
|
|
147
|
+
Some things are as binary as a test suite:
|
|
148
|
+
|
|
149
|
+
| Claim | Evidence |
|
|
150
|
+
|---|---|
|
|
151
|
+
| Followed the required structure | Open the file. Name each required section and where it appears. |
|
|
152
|
+
| Sources cited | Every claim carries a reference, present and in the required format |
|
|
153
|
+
| Standing constraints held | Re-read start to finish. A constraint honoured in step 1 and dropped in step 8 is a failure. |
|
|
154
|
+
| Findings are real | Every finding points at a location — a line, a quoted span. A finding with no location was recalled, not read. |
|
|
155
|
+
| Data reconciles | Totals add up; numbers in the summary match numbers in the table |
|
|
156
|
+
| Nothing was truncated | The output ends where it should, not mid-section |
|
|
157
|
+
|
|
158
|
+
#### 2. For everything else, account for the request in full
|
|
159
|
+
|
|
160
|
+
- Break what was asked into its separate parts.
|
|
161
|
+
- Open what you actually produced.
|
|
162
|
+
- Confirm each part is addressed.
|
|
163
|
+
- **State plainly anything you did not do.**
|
|
164
|
+
|
|
165
|
+
Four of five things done is not "done". Say which four.
|
|
166
|
+
|
|
167
|
+
### What this does NOT claim
|
|
168
|
+
|
|
169
|
+
Confirming that work is complete, consistent and within spec does not make it
|
|
170
|
+
correct. A recipe can hang together perfectly and still taste wrong; a report can
|
|
171
|
+
follow its structure and still reach the wrong conclusion.
|
|
172
|
+
|
|
173
|
+
**Say which you verified: that the work is *complete*, not that it is *right*.**
|
|
@@ -179,15 +179,30 @@ If you find issues, fix them inline. No need to re-review — just fix and move
|
|
|
179
179
|
|
|
180
180
|
## Execution Handoff
|
|
181
181
|
|
|
182
|
-
After saving the plan,
|
|
182
|
+
After saving and self-reviewing the plan, link it for your human partner
|
|
183
|
+
to read. If they have already explicitly supplied an execution method, ask
|
|
184
|
+
them to review the plan and confirm it captures what they want; wait for that
|
|
185
|
+
review before implementation, then use the preserved method. Otherwise, ask
|
|
186
|
+
them to review the plan and choose an execution method before implementation.
|
|
183
187
|
|
|
184
|
-
**
|
|
188
|
+
**When no execution method has already been supplied:**
|
|
185
189
|
|
|
186
|
-
**
|
|
190
|
+
**"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Please review the plan. Two execution options:**
|
|
187
191
|
|
|
188
|
-
**
|
|
192
|
+
**1. Subagent-Driven** - fresh subagent per task, review between tasks, fast iteration
|
|
189
193
|
|
|
190
|
-
**
|
|
194
|
+
**2. Inline Execution** - tasks in a session via executing-plans, batched with checkpoints
|
|
195
|
+
|
|
196
|
+
**Recommended for this plan: [pick one] — [one-line why].** Then: **Does the plan capture what you want, and which approach should we use?"**
|
|
197
|
+
|
|
198
|
+
Pick the recommendation from the plan in front of you:
|
|
199
|
+
- **Subagent-driven** when tasks are largely independent, the plan is short-to-medium, and a cold executor could pick up each task from its own task block alone.
|
|
200
|
+
- **Inline** when tasks share interfaces/state, build heavily on each other, the plan is long, or you (the parent) already hold the spec/architecture context that a cold subagent would spend a spawn re-deriving each time.
|
|
201
|
+
Say which and why. Never default to one without looking.
|
|
202
|
+
|
|
203
|
+
**When an execution method has already been supplied:**
|
|
204
|
+
|
|
205
|
+
**"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Please review the plan. Does it capture what you want?"**
|
|
191
206
|
|
|
192
207
|
**If Subagent-Driven chosen:**
|
|
193
208
|
- **REQUIRED SUB-SKILL:** Use superpowers:subagent-driven-development
|
|
@@ -371,6 +371,35 @@ pptx/
|
|
|
371
371
|
```
|
|
372
372
|
When: Reference material too large for inline
|
|
373
373
|
|
|
374
|
+
### Moving Content Into a Skill
|
|
375
|
+
|
|
376
|
+
Relative paths mean nothing on their own - they resolve against the file holding them. Moving content to a different depth invalidates every relative reference inside it.
|
|
377
|
+
|
|
378
|
+
**Re-resolve links mechanically, never by counting `../` by eye:**
|
|
379
|
+
|
|
380
|
+
```bash
|
|
381
|
+
# From the moved file's directory, assert every relative target exists
|
|
382
|
+
d=$(dirname "$FILE")
|
|
383
|
+
grep -o ']([^)]*)' "$FILE" | sed 's/^](//;s/)$//' | while read -r l; do
|
|
384
|
+
case "$l" in http*|\#*|mailto:*|"") continue;; esac
|
|
385
|
+
[ -e "$d/${l%%#*}" ] || echo "DANGLING: $l"
|
|
386
|
+
done
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
A link that is one `../` short still renders as a link. The count is not something you verify by looking at it.
|
|
390
|
+
|
|
391
|
+
Read the output - this is a heuristic, not a parser, so `](` inside a fenced code block shows up as a false positive.
|
|
392
|
+
|
|
393
|
+
**Then grep the moved text for prose cross-references:**
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
grep -n 'above\|below\|earlier\|later' "$FILE"
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
"The section above" has no referent once that section lives in a different file. No link checker can catch this - only reading can.
|
|
400
|
+
|
|
401
|
+
**Why this matters:** a dangling link fails silently. The agent follows it, finds nothing, and proceeds without the context it was supposed to have. No error, no failing test.
|
|
402
|
+
|
|
374
403
|
## The Iron Law (Same as TDD)
|
|
375
404
|
|
|
376
405
|
```
|
|
@@ -660,6 +689,7 @@ Deploying untested skills = deploying untested code. It's a violation of quality
|
|
|
660
689
|
- [ ] Common mistakes section
|
|
661
690
|
- [ ] No narrative storytelling
|
|
662
691
|
- [ ] Supporting files only for tools or heavy reference
|
|
692
|
+
- [ ] Content moved from another file: every relative link re-resolved against the new location and verified to exist; prose cross-references (`above`, `below`, `earlier`, `later`) re-read for lost referents
|
|
663
693
|
|
|
664
694
|
**Deployment:**
|
|
665
695
|
- [ ] Commit skill to git and push to your fork (if configured)
|