superpowers-mcp 6.3.9 → 6.4.1

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.
Files changed (53) hide show
  1. package/README.ja.md +43 -74
  2. package/README.ko.md +43 -74
  3. package/README.md +43 -74
  4. package/README.zh-TW.md +43 -74
  5. package/docs/skill-compositions.ja.md +6 -2
  6. package/docs/skill-compositions.ko.md +6 -2
  7. package/docs/skill-compositions.md +5 -1
  8. package/docs/skill-compositions.zh-TW.md +6 -2
  9. package/out/server.js +65 -60
  10. package/out/setup-runner.js +17 -16
  11. package/out/setup.js +17 -16
  12. package/package.json +2 -2
  13. package/skills/brainstorming/visual-companion.md +6 -6
  14. package/skills/diagnosing-superpowers/SKILL.md +120 -0
  15. package/skills/diagnosing-superpowers/prompts/analyst-common.md +38 -0
  16. package/skills/diagnosing-superpowers/prompts/cost-and-time.md +28 -0
  17. package/skills/diagnosing-superpowers/prompts/plan-adherence.md +29 -0
  18. package/skills/diagnosing-superpowers/prompts/quality-evidence.md +26 -0
  19. package/skills/diagnosing-superpowers/prompts/repeated-work.md +30 -0
  20. package/skills/diagnosing-superpowers/prompts/request-conflicts.md +20 -0
  21. package/skills/diagnosing-superpowers/prompts/scrub-audit.md +33 -0
  22. package/skills/diagnosing-superpowers/prompts/scrub.md +29 -0
  23. package/skills/diagnosing-superpowers/prompts/similar-session.md +38 -0
  24. package/skills/diagnosing-superpowers/prompts/skill-timeline.md +30 -0
  25. package/skills/diagnosing-superpowers/prompts/stumbles.md +28 -0
  26. package/skills/diagnosing-superpowers/references/context-safety.md +22 -0
  27. package/skills/diagnosing-superpowers/references/github-issues.md +47 -0
  28. package/skills/diagnosing-superpowers/references/redaction-policy.md +34 -0
  29. package/skills/diagnosing-superpowers/references/session-discovery.md +31 -0
  30. package/skills/diagnosing-superpowers/templates/bundle-README.md +77 -0
  31. package/skills/diagnosing-superpowers/templates/case.md +64 -0
  32. package/skills/diagnosing-superpowers/templates/issue.md +51 -0
  33. package/skills/diagnosing-superpowers/templates/report.md +82 -0
  34. package/skills/executing-plans/SKILL.md +405 -58
  35. package/skills/executing-plans/scripts/task-done +55 -0
  36. package/skills/executing-plans/scripts/task-done.ps1 +83 -0
  37. package/skills/executing-plans/scripts/task-start +30 -0
  38. package/skills/executing-plans/scripts/task-start.ps1 +38 -0
  39. package/skills/requesting-code-review/code-reviewer.md +18 -1
  40. package/skills/subagent-driven-development/SKILL.md +31 -26
  41. package/skills/subagent-driven-development/re-review-prompt.md +1 -1
  42. package/skills/subagent-driven-development/scripts/review-package +4 -0
  43. package/skills/subagent-driven-development/scripts/review-package.ps1 +2 -0
  44. package/skills/subagent-driven-development/scripts/sdd-workspace +9 -5
  45. package/skills/subagent-driven-development/scripts/sdd-workspace.ps1 +10 -0
  46. package/skills/subagent-driven-development/scripts/task-brief +2 -0
  47. package/skills/subagent-driven-development/task-reviewer-prompt.md +2 -2
  48. package/skills/systematic-debugging/root-cause-tracing.md +1 -1
  49. package/skills/using-superpowers/SKILL.md +2 -0
  50. package/skills/using-superpowers/references/claude-code-tools.md +29 -0
  51. package/skills/using-superpowers/references/muse-tools.md +35 -0
  52. package/skills/writing-plans/SKILL.md +23 -12
  53. package/skills/writing-skills/SKILL.md +4 -2
@@ -0,0 +1,83 @@
1
+ #!/usr/bin/env pwsh
2
+ # Close one task of an inline plan execution in a single call: run the task's
3
+ # test command, keep its full output in the workspace, print the tail, and —
4
+ # only if the command succeeded — append the completion line to the ledger.
5
+ # A failing command records nothing: the task is not complete.
6
+ #
7
+ # Usage: ./task-done.ps1 PLAN_FILE TASK_NUMBER BASE -- TEST_COMMAND [ARGS...]
8
+ # BASE is the SHA task-start printed; the completion line records BASE..HEAD.
9
+ # Exit: the test command's exit status.
10
+
11
+ $ErrorActionPreference = "Stop"
12
+
13
+ if ($args.Count -lt 4) {
14
+ [Console]::Error.WriteLine("usage: task-done.ps1 PLAN_FILE TASK_NUMBER BASE -- TEST_COMMAND [ARGS...]")
15
+ exit 2
16
+ }
17
+
18
+ $plan = $args[0]
19
+ $n = $args[1]
20
+ $base = $args[2]
21
+ # PowerShell consumes an unquoted `--` as its own end-of-parameters marker,
22
+ # so the documented `... BASE -- CMD` arrives here WITHOUT the separator; a
23
+ # quoted "--" survives and is skipped below. Unlike the sh twin, this port
24
+ # therefore cannot reject a call that genuinely omits the separator.
25
+ $cmdArgs = @($args[3..($args.Count - 1)])
26
+ if ($cmdArgs[0] -eq "--") {
27
+ if ($cmdArgs.Count -lt 2) {
28
+ [Console]::Error.WriteLine("usage: task-done.ps1 PLAN_FILE TASK_NUMBER BASE -- TEST_COMMAND [ARGS...]")
29
+ exit 2
30
+ }
31
+ $cmdArgs = @($cmdArgs[1..($cmdArgs.Count - 1)])
32
+ }
33
+ $sdd = Join-Path $PSScriptRoot "../../subagent-driven-development/scripts"
34
+
35
+ & git rev-parse --verify --quiet $base >$null 2>&1
36
+ if ($LASTEXITCODE -ne 0) {
37
+ [Console]::Error.WriteLine("bad BASE: $base")
38
+ exit 2
39
+ }
40
+
41
+ $dir = (& (Join-Path $sdd "sdd-workspace.ps1") $plan | Select-Object -First 1).Trim()
42
+ $log = Join-Path $dir "task-$n-tests.log"
43
+ $ledger = Join-Path $dir "progress.md"
44
+
45
+ # Render the command the way a person would type it, for the ledger line.
46
+ $parts = foreach ($a in [string[]]$cmdArgs) {
47
+ if ($a -match '[\s";|&]') { "'$a'" } else { $a }
48
+ }
49
+ $cmd = $parts -join ' '
50
+
51
+ $rc = 0
52
+ try {
53
+ $exe = $cmdArgs[0]
54
+ $rest = @()
55
+ if ($cmdArgs.Count -gt 1) { $rest = $cmdArgs[1..($cmdArgs.Count - 1)] }
56
+ & $exe @rest > $log 2>&1
57
+ $rc = $LASTEXITCODE
58
+ } catch {
59
+ $rc = 127
60
+ if (-not (Test-Path -LiteralPath $log -PathType Leaf)) {
61
+ [System.IO.File]::WriteAllText($log, ($_.Exception.Message + [Environment]::NewLine), [System.Text.UTF8Encoding]::new($false))
62
+ }
63
+ }
64
+
65
+ if (Test-Path -LiteralPath $log -PathType Leaf) {
66
+ Get-Content -LiteralPath $log -Tail 5
67
+ }
68
+ if ($rc -ne 0) {
69
+ [Console]::Error.WriteLine("task-done: test command exited $rc; Task $n NOT recorded (full output: $log)")
70
+ exit $rc
71
+ }
72
+
73
+ $last = Get-Content -LiteralPath $log | Where-Object { $_ -match '\S' } | Select-Object -Last 1
74
+ if ([string]::IsNullOrWhiteSpace($last)) { $last = "(no output)" }
75
+ $utf8NoBom = [System.Text.UTF8Encoding]::new($false)
76
+ if (-not (Test-Path -LiteralPath $ledger -PathType Leaf)) {
77
+ [System.IO.File]::WriteAllText($ledger, "# SDD ledger — plan: $plan" + [Environment]::NewLine, $utf8NoBom)
78
+ }
79
+ $base7 = (& git rev-parse --short=7 $base).Trim()
80
+ $head7 = (& git rev-parse --short=7 HEAD).Trim()
81
+ $line = "Task ${n}: complete (commits $base7..$head7, tests: $cmd → $last)"
82
+ [System.IO.File]::AppendAllText($ledger, $line + [Environment]::NewLine, $utf8NoBom)
83
+ Write-Output "ledger: $line"
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env bash
2
+ # Begin one task of an inline plan execution in a single call: extract the
3
+ # task's brief (via subagent-driven-development's task-brief, so both skills
4
+ # share one workspace) and record BASE, the commit the task's review range is
5
+ # cut from. One tool call instead of two, because every call in an inline
6
+ # session is a turn that re-reads the whole context.
7
+ #
8
+ # Usage: task-start PLAN_FILE TASK_NUMBER
9
+ # Prints:
10
+ # brief: <path to the task's brief file>
11
+ # base: <full SHA of HEAD>
12
+ set -euo pipefail
13
+
14
+ if [ $# -ne 2 ]; then
15
+ echo "usage: task-start PLAN_FILE TASK_NUMBER" >&2
16
+ exit 2
17
+ fi
18
+
19
+ plan=$1
20
+ n=$2
21
+ sdd="$(cd "$(dirname "$0")/../../subagent-driven-development/scripts" && pwd)"
22
+
23
+ # Invoke via bash rather than direct exec: some extractors (Python zipfile)
24
+ # strip Unix exec bits when unpacking marketplace packages (#2040).
25
+ out=$("${BASH:-bash}" "$sdd/task-brief" "$plan" "$n")
26
+ brief=$(printf '%s\n' "$out" | sed -n 's/^wrote \(.*\): [0-9][0-9]* lines$/\1/p')
27
+ [ -n "$brief" ] || { echo "task-brief did not report a path: $out" >&2; exit 1; }
28
+
29
+ echo "brief: $brief"
30
+ echo "base: $(git rev-parse HEAD)"
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env pwsh
2
+ # Begin one task of an inline plan execution in a single call: extract the
3
+ # task's brief (via subagent-driven-development's task-brief, so both skills
4
+ # share one workspace) and record BASE, the commit the task's review range is
5
+ # cut from. One tool call instead of two, because every call in an inline
6
+ # session is a turn that re-reads the whole context.
7
+ #
8
+ # Usage: ./task-start.ps1 PLAN_FILE TASK_NUMBER
9
+ # Prints:
10
+ # brief: <path to the task's brief file>
11
+ # base: <full SHA of HEAD>
12
+
13
+ $ErrorActionPreference = "Stop"
14
+
15
+ if ($args.Count -ne 2) {
16
+ [Console]::Error.WriteLine("usage: task-start.ps1 PLAN_FILE TASK_NUMBER")
17
+ exit 2
18
+ }
19
+
20
+ $plan = $args[0]
21
+ $n = $args[1]
22
+ $sdd = Join-Path $PSScriptRoot "../../subagent-driven-development/scripts"
23
+
24
+ $out = @(& (Join-Path $sdd "task-brief.ps1") $plan $n)
25
+ if ($LASTEXITCODE -ne 0) {
26
+ exit $LASTEXITCODE
27
+ }
28
+ $brief = $null
29
+ foreach ($line in $out) {
30
+ if ($line -match '^wrote (.*): [0-9][0-9]* lines$') { $brief = $Matches[1] }
31
+ }
32
+ if ([string]::IsNullOrEmpty($brief)) {
33
+ [Console]::Error.WriteLine("task-brief did not report a path: $($out -join [Environment]::NewLine)")
34
+ exit 1
35
+ }
36
+
37
+ Write-Output "brief: $brief"
38
+ Write-Output "base: $((& git rev-parse HEAD).Trim())"
@@ -30,6 +30,23 @@ Subagent (general-purpose):
30
30
  git diff [BASE_SHA]..[HEAD_SHA]
31
31
  ```
32
32
 
33
+ ## The spec is a vision document
34
+
35
+ The spec says what the software must do. It does not enumerate every
36
+ input, environment, or condition the software will meet. For behavior
37
+ the spec is silent on, judge by what a reasonable person using this
38
+ software would expect: a reasonable person's expectation is a
39
+ requirement, and a spec's silence is not permission. Grade such
40
+ findings by their effect on that person, not by whether the spec
41
+ mentions the trigger.
42
+
43
+ ## Declined to judge
44
+
45
+ Before your verdict, list every behavior you considered and set aside
46
+ as outside the plan or spec, one line each, with the reason. The
47
+ executor rules on each line; nothing you set aside is dropped
48
+ silently. An empty list means you set nothing aside.
49
+
33
50
  ## Read-Only Review
34
51
 
35
52
  Your review is read-only on this checkout. Do not mutate the working tree, the index, HEAD, or branch state in any way. Use tools like `git show`, `git diff`, and `git log` to inspect history. If you need a working copy of a different revision, check it out into a separate temporary directory (e.g. `git worktree add /tmp/review-[SHA] [SHA]`) — never move HEAD on this checkout.
@@ -140,7 +157,7 @@ Subagent (general-purpose):
140
157
  - `[BASE_SHA]` — starting commit
141
158
  - `[HEAD_SHA]` — ending commit
142
159
 
143
- **Reviewer returns:** Strengths, Issues (Critical / Important / Minor), Recommendations, Assessment
160
+ **Reviewer returns:** Strengths, Declined to judge, Issues (Critical / Important / Minor), Recommendations, Assessment
144
161
 
145
162
  ## Example Output
146
163
 
@@ -36,25 +36,25 @@ stop and ask.
36
36
  digraph when_to_use {
37
37
  "Have implementation plan?" [shape=diamond];
38
38
  "Tasks mostly independent?" [shape=diamond];
39
- "Stay in this session?" [shape=diamond];
39
+ "Partner chose inline, or no subagent tool?" [shape=diamond];
40
40
  "subagent-driven-development" [shape=box];
41
41
  "executing-plans" [shape=box];
42
42
  "Manual execution or brainstorm first" [shape=box];
43
43
 
44
44
  "Have implementation plan?" -> "Tasks mostly independent?" [label="yes"];
45
45
  "Have implementation plan?" -> "Manual execution or brainstorm first" [label="no"];
46
- "Tasks mostly independent?" -> "Stay in this session?" [label="yes"];
46
+ "Tasks mostly independent?" -> "Partner chose inline, or no subagent tool?" [label="yes"];
47
47
  "Tasks mostly independent?" -> "Manual execution or brainstorm first" [label="no - tightly coupled"];
48
- "Stay in this session?" -> "subagent-driven-development" [label="yes"];
49
- "Stay in this session?" -> "executing-plans" [label="no - parallel session"];
48
+ "Partner chose inline, or no subagent tool?" -> "executing-plans" [label="yes"];
49
+ "Partner chose inline, or no subagent tool?" -> "subagent-driven-development" [label="no"];
50
50
  }
51
51
  ```
52
52
 
53
- **vs. Executing Plans (parallel session):**
54
- - Same session (no context switch)
55
- - Fresh subagent per task (no context pollution)
56
- - Review after each task (spec compliance + code quality), broad review at the end
57
- - Faster iteration (no human-in-loop between tasks)
53
+ **vs. Executing Plans (inline):**
54
+ - Fresh subagent per task (no context pollution) instead of one context doing every task
55
+ - Review after each task (spec compliance + code quality) instead of only at the end
56
+ - Costs a fresh context per task and per review; inline costs one context plus one final reviewer
57
+ - Both run in this session, share the same plan workspace and ledger, and never pause between tasks
58
58
 
59
59
  ## The Process
60
60
 
@@ -136,8 +136,8 @@ sequences — the single most expensive failure observed. Track progress in
136
136
  a ledger file, not only in todos.
137
137
 
138
138
  - Each plan owns a workspace: at skill start, run this skill's
139
- `scripts/sdd-workspace PLAN_FILE` — it prints the plan's git-ignored
140
- directory (`<repo-root>/.superpowers/sdd/<plan-basename>/`), home to
139
+ `bash scripts/sdd-workspace PLAN_FILE` — it prints the plan's git-ignored
140
+ directory (under `<repo-root>/.superpowers/sdd/`), home to
141
141
  every artifact for THIS plan: ledger, briefs, reports, review packages.
142
142
  Another plan's directory is never yours to read or write.
143
143
  - Check for this plan's ledger at `<workspace>/progress.md`. If its first
@@ -273,7 +273,7 @@ Record BASE (`git rev-parse HEAD`) before dispatching — the review package
273
273
  and fix-round diffs need it.
274
274
 
275
275
  - **Task brief:** before dispatching an implementer, run this skill's
276
- `scripts/task-brief PLAN_FILE N` (or `scripts/task-brief.ps1 PLAN_FILE N` on
276
+ `bash scripts/task-brief PLAN_FILE N` (or `scripts/task-brief.ps1 PLAN_FILE N` on
277
277
  Windows PowerShell) — it extracts the task's full text to a
278
278
  uniquely named file and prints the path. Compose the dispatch so the
279
279
  brief stays the single source of
@@ -344,7 +344,7 @@ Template: [implementer-prompt.md](implementer-prompt.md)
344
344
 
345
345
  Implementer subagents report one of four statuses. Handle each appropriately:
346
346
 
347
- **DONE:** Generate the review package (`scripts/review-package PLAN_FILE BASE HEAD`, or `scripts/review-package.ps1 PLAN_FILE BASE HEAD` on Windows PowerShell, from this skill's directory — it prints the unique file path it wrote; BASE is the commit you recorded before dispatching the implementer — never `HEAD~1`, which silently drops all but the last commit of a multi-commit task), then dispatch the task reviewer with the printed path.
347
+ **DONE:** Generate the review package (`bash scripts/review-package PLAN_FILE BASE HEAD`, or `scripts/review-package.ps1 PLAN_FILE BASE HEAD` on Windows PowerShell, from this skill's directory — it prints the unique file path it wrote; BASE is the commit you recorded before dispatching the implementer — never `HEAD~1`, which silently drops all but the last commit of a multi-commit task), then dispatch the task reviewer with the printed path.
348
348
 
349
349
  **DONE_WITH_CONCERNS:** The implementer completed the work but flagged doubts. Read the concerns before proceeding. If the concerns are about correctness or scope, address them before review. If they're observations (e.g., "this file is getting large"), note them and proceed to review.
350
350
 
@@ -371,7 +371,7 @@ required. Implementer self-review never replaces the task review; both are
371
371
  needed.
372
372
 
373
373
  - Hand the reviewer its diff as a file: run this skill's
374
- `scripts/review-package PLAN_FILE BASE HEAD` (or
374
+ `bash scripts/review-package PLAN_FILE BASE HEAD` (or
375
375
  `scripts/review-package.ps1 PLAN_FILE BASE HEAD` on Windows PowerShell) and
376
376
  pass the reviewer the file path
377
377
  it prints (or, without bash: `git log --oneline`, `git diff --stat`,
@@ -464,7 +464,7 @@ output; dispatch the re-review once all three are present. Name the
464
464
  covering test files in the fix message — a one-line fix does not need the
465
465
  whole suite.
466
466
 
467
- **The re-review is scoped.** Run `scripts/review-package PLAN_FILE FIX_BASE HEAD`
467
+ **The re-review is scoped.** Run `bash scripts/review-package PLAN_FILE FIX_BASE HEAD`
468
468
  (or `scripts/review-package.ps1 PLAN_FILE FIX_BASE HEAD` on Windows PowerShell)
469
469
  where FIX_BASE is the head the previous review saw, and dispatch
470
470
  [re-review-prompt.md](re-review-prompt.md) with the findings list, the
@@ -552,7 +552,7 @@ parked-with-ruling at the cap.
552
552
  ## Final Review
553
553
 
554
554
  The final whole-branch review gets a package too: run
555
- `scripts/review-package PLAN_FILE MERGE_BASE HEAD` (or
555
+ `bash scripts/review-package PLAN_FILE MERGE_BASE HEAD` (or
556
556
  `scripts/review-package.ps1 PLAN_FILE MERGE_BASE HEAD` on Windows PowerShell;
557
557
  MERGE_BASE = the commit the branch started from, e.g. `git merge-base main HEAD`)
558
558
  and include the
@@ -562,14 +562,19 @@ on the most capable available model (see Model Selection), using
562
562
  superpowers:requesting-code-review's
563
563
  [code-reviewer.md](../requesting-code-review/code-reviewer.md). Point it at
564
564
  the ledger's deferred-minor and parked lines so it can triage which must be
565
- fixed before merge.
565
+ fixed before merge. Rule on its "Declined to judge" list before the fix
566
+ dispatch: every line there is a ruling you make and ledger —
567
+ `Final: Ruling: <behavior the reviewer set aside> — <what a reasonable
568
+ person using this software gets, and why that stands or why it is now a
569
+ finding> — <cost if wrong>`. Nothing the reviewer set aside is dropped
570
+ silently.
566
571
 
567
572
  If the final whole-branch review returns findings, dispatch ONE fix subagent
568
573
  with the complete findings list — not one fixer per finding.
569
574
  Per-finding fixers each rebuild context and re-run suites; a real
570
575
  session's final-review fix wave cost more than all its tasks combined.
571
576
  Then run exactly one scoped re-review of the fix wave
572
- (`scripts/review-package PLAN_FILE FIX_BASE HEAD`, or
577
+ (`bash scripts/review-package PLAN_FILE FIX_BASE HEAD`, or
573
578
  `scripts/review-package.ps1 PLAN_FILE FIX_BASE HEAD` on Windows PowerShell,
574
579
  over the fix range,
575
580
  [re-review-prompt.md](re-review-prompt.md)).
@@ -596,7 +601,7 @@ carry them, because git records what was done. So export them before
596
601
  anything is deleted: grep the progress ledger for its three finding tags
597
602
 
598
603
  ```bash
599
- grep -E 'Ruling:|^(Task [0-9]+: )?(minor \(deferred\)|parked)' <workspace>/progress.md
604
+ grep -E 'Ruling:|^(Task [0-9]+: |Final: )?(minor \(deferred\)|parked)' <workspace>/progress.md
600
605
  ```
601
606
 
602
607
  and carry every matching line, verbatim, into a durable, human-reachable
@@ -650,12 +655,12 @@ You: I'm using Subagent-Driven Development to execute this plan.
650
655
 
651
656
  [Setup: worktree verified]
652
657
  [Read plan file once: docs/superpowers/plans/feature-plan.md]
653
- [Resolve workspace: scripts/sdd-workspace docs/superpowers/plans/feature-plan.md — no ledger inside, fresh start]
658
+ [Resolve workspace: bash scripts/sdd-workspace docs/superpowers/plans/feature-plan.md — no ledger inside, fresh start]
654
659
  [Create todos for all tasks]
655
660
 
656
661
  Task 1: Hook installation script
657
662
 
658
- [Run task-brief for Task 1; dispatch implementer with brief + report paths + context]
663
+ [bash scripts/task-brief PLAN_FILE 1; dispatch implementer with brief + report paths + context]
659
664
 
660
665
  Implementer: "Before I begin - should the hook be installed at user or system level?"
661
666
 
@@ -667,7 +672,7 @@ Implementer: [Later]
667
672
  - Self-review: Found I missed --force flag, added it
668
673
  - Committed
669
674
 
670
- [Run review-package PLAN_FILE BASE HEAD; dispatch task reviewer with the printed path + review file]
675
+ [bash scripts/review-package PLAN_FILE BASE HEAD; dispatch task reviewer with the printed path + review file]
671
676
  Task reviewer: Spec ✅. Quality: Approved. Minor: 0.
672
677
  Full report: task-1-review.md
673
678
 
@@ -676,14 +681,14 @@ Task reviewer: Spec ✅. Quality: Approved. Minor: 0.
676
681
 
677
682
  Task 2: Recovery modes
678
683
 
679
- [Run task-brief for Task 2; dispatch implementer with brief + report paths + context]
684
+ [bash scripts/task-brief PLAN_FILE 2; dispatch implementer with brief + report paths + context]
680
685
 
681
686
  Implementer: [No questions]
682
687
  - Added verify/repair modes
683
688
  - 8/8 tests passing
684
689
  - Committed
685
690
 
686
- [Run review-package PLAN_FILE BASE HEAD; dispatch task reviewer with the printed path + review file]
691
+ [bash scripts/review-package PLAN_FILE BASE HEAD; dispatch task reviewer with the printed path + review file]
687
692
  Task reviewer: Spec ❌:
688
693
  - Missing: Progress reporting (spec says "report every 100 items")
689
694
  Important: Magic number (100). Minor: 0. Full report: task-2-review.md
@@ -692,7 +697,7 @@ Task reviewer: Spec ❌:
692
697
  Implementer: Added progress reporting, extracted PROGRESS_INTERVAL constant.
693
698
  Re-ran test/recovery.test.js — 10/10 passing. Fix report appended.
694
699
 
695
- [Run review-package PLAN_FILE FIX_BASE HEAD; dispatch scoped re-review with the review file to append to]
700
+ [bash scripts/review-package PLAN_FILE FIX_BASE HEAD; dispatch scoped re-review with the review file to append to]
696
701
  Re-reviewer: Missing progress reporting — ADDRESSED (src/recovery.js:41).
697
702
  Magic number — ADDRESSED (src/recovery.js:7). New breakage: none.
698
703
  Verdict: all findings addressed.
@@ -704,7 +709,7 @@ Re-reviewer: Missing progress reporting — ADDRESSED (src/recovery.js:41).
704
709
  ...
705
710
 
706
711
  [After all tasks]
707
- [Run review-package PLAN_FILE MERGE_BASE HEAD; dispatch final code-reviewer, most capable model]
712
+ [bash scripts/review-package PLAN_FILE MERGE_BASE HEAD; dispatch final code-reviewer, most capable model]
708
713
  Final reviewer: All requirements met. Deferred minors triaged: none block merge.
709
714
 
710
715
  [Use superpowers:finishing-a-development-branch — Option 2: push and create PR]
@@ -114,7 +114,7 @@ Subagent (general-purpose):
114
114
  review `…/task-N-review.md`); append this round's verdicts to it
115
115
  - `[FIX_BASE_SHA]` — the head the previous review saw
116
116
  - `[HEAD_SHA]` — current commit
117
- - `[DIFF_FILE]` — the path `scripts/review-package PLAN_FILE FIX_BASE HEAD` printed
117
+ - `[DIFF_FILE]` — the path `bash scripts/review-package PLAN_FILE FIX_BASE HEAD` printed
118
118
 
119
119
  **Re-reviewer returns:** per-finding verdicts (ADDRESSED / NOT ADDRESSED),
120
120
  new breakage in the fix diff, out-of-scope observations, and a round verdict —
@@ -28,6 +28,8 @@ git rev-parse --git-dir >/dev/null 2>&1 || {
28
28
  git rev-parse --verify --quiet "$base" >/dev/null || { echo "bad BASE: $base" >&2; exit 2; }
29
29
  git rev-parse --verify --quiet "$head" >/dev/null || { echo "bad HEAD: $head" >&2; exit 2; }
30
30
 
31
+ # Range guards (exit 3): a wrong-branch HEAD yields a range that is empty or
32
+ # not rooted at BASE; either would silently produce a bogus review package.
31
33
  git merge-base --is-ancestor "$base" "$head" || {
32
34
  echo "HEAD ($head) is not a descendant of BASE ($base)" >&2
33
35
  exit 3
@@ -41,6 +43,8 @@ fi
41
43
  if [ $# -eq 4 ]; then
42
44
  out=$4
43
45
  else
46
+ # Invoke via bash rather than direct exec: some extractors (Python zipfile)
47
+ # strip Unix exec bits when unpacking marketplace packages (#2040).
44
48
  dir=$("${BASH:-bash}" "$(cd "$(dirname "$0")" && pwd)/sdd-workspace" "$plan")
45
49
  out="$dir/review-$(git rev-parse --short "$base")..$(git rev-parse --short "$head").diff"
46
50
  fi
@@ -38,6 +38,8 @@ if ($LASTEXITCODE -ne 0) {
38
38
  exit 2
39
39
  }
40
40
 
41
+ # Range guards (exit 3): a wrong-branch HEAD yields a range that is empty or
42
+ # not rooted at BASE; either would silently produce a bogus review package.
41
43
  & git merge-base --is-ancestor $base $head *> $null
42
44
  if ($LASTEXITCODE -ne 0) {
43
45
  [Console]::Error.WriteLine("HEAD ($head) is not a descendant of BASE ($base)")
@@ -3,16 +3,20 @@
3
3
  # short-lived artifacts: task briefs, implementer reports, review packages,
4
4
  # and the progress ledger. Print the plan directory's absolute path.
5
5
  #
6
- # One directory per plan (.superpowers/sdd/<plan-slug>/) so a follow-up
6
+ # One directory per plan (.superpowers/sdd/<plan-basename>/) so a follow-up
7
7
  # plan in the same working tree can never read or overwrite another plan's
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
- # Ownership markers (plan-path file in the workspace directory) disambiguate
12
- # same-basename plans (e.g. docs/alpha/plan.md vs docs/beta/plan.md) by appending
13
- # the parent-directory name, then a counter. A workspace with no marker
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
14
16
  # predates the marker scheme and is adopted for the current plan so in-flight
15
- # workspaces keep resolving.
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.
16
20
  #
17
21
  # The workspace lives in the working tree (not under .git/) because Claude Code
18
22
  # treats .git/ as a protected path and denies agent writes there — which blocks
@@ -7,6 +7,16 @@
7
7
  # plan in the same working tree can never read or overwrite another plan's
8
8
  # artifacts.
9
9
  #
10
+ # Basename slugs collide when two plans share a filename (docs/alpha/plan.md
11
+ # vs docs/beta/plan.md), so each workspace records its owning plan's path in
12
+ # a plan-path marker (repo-relative in-repo, absolute outside). A workspace
13
+ # owned by a different plan is skipped and the slug disambiguated with the
14
+ # plan's parent-directory name, then a counter. A workspace with no marker
15
+ # predates the marker scheme and is adopted for the current plan so in-flight
16
+ # workspaces keep resolving — which means the first collision on such a
17
+ # legacy workspace adopts instead of detecting; acceptable, marker-less
18
+ # workspaces age out as plans finish.
19
+ #
10
20
  # A greenfield plan's first task is often "create the repo", so there is no
11
21
  # repo root to resolve yet: fall back to the current directory rather than
12
22
  # failing, since that task is exactly the one needing a brief.
@@ -21,6 +21,8 @@ n=$2
21
21
  if [ $# -eq 3 ]; then
22
22
  out=$3
23
23
  else
24
+ # Invoke via bash rather than direct exec: some extractors (Python zipfile)
25
+ # strip Unix exec bits when unpacking marketplace packages (#2040).
24
26
  dir=$("${BASH:-bash}" "$(cd "$(dirname "$0")" && pwd)/sdd-workspace" "$plan")
25
27
  out="$dir/task-${n}-brief.md"
26
28
  fi
@@ -203,7 +203,7 @@ Subagent (general-purpose):
203
203
 
204
204
  **Placeholders:**
205
205
  - `[MODEL]` — REQUIRED: reviewer model per SKILL.md Model Selection
206
- - `[BRIEF_FILE]` — REQUIRED: the task brief file (`scripts/task-brief PLAN N`, or `scripts/task-brief.ps1 PLAN N` on Windows PowerShell,
206
+ - `[BRIEF_FILE]` — REQUIRED: the task brief file (`bash scripts/task-brief PLAN N`, or `scripts/task-brief.ps1 PLAN N` on Windows PowerShell,
207
207
  prints the path; same file the implementer worked from)
208
208
  - `[GLOBAL_CONSTRAINTS]` — the binding requirements copied verbatim from
209
209
  the plan's Global Constraints section or the spec: exact values, formats,
@@ -214,7 +214,7 @@ Subagent (general-purpose):
214
214
  - `[BASE_SHA]` — commit before this task
215
215
  - `[HEAD_SHA]` — current commit
216
216
  - `[DIFF_FILE]` — REQUIRED: the path the controller wrote the review
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
217
+ package to (`bash scripts/review-package PLAN_FILE BASE HEAD`, or `scripts/review-package.ps1 PLAN_FILE BASE HEAD` on Windows PowerShell, prints the unique
218
218
  path it wrote; the package never enters the controller's context)
219
219
  - `[REVIEW_FILE]` — REQUIRED: the file the reviewer writes its full report
220
220
  to; name it after the brief (brief `…/task-N-brief.md` → review
@@ -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' npx vitest run
104
+ bash ./find-polluter.sh '.git' 'src/**/*.test.ts' npx vitest run
105
105
 
106
106
  # Windows PowerShell:
107
107
  ./find-polluter.ps1 '.git' 'src/**/*.test.ts' npx vitest run
@@ -62,10 +62,12 @@ These thoughts mean STOP—you're rationalizing:
62
62
 
63
63
  If your harness appears here, read its reference file for special instructions:
64
64
 
65
+ - Claude Code: `references/claude-code-tools.md`
65
66
  - Codex: `references/codex-tools.md`
66
67
  - Pi: `references/pi-tools.md`
67
68
  - Antigravity: `references/antigravity-tools.md`
68
69
  - Hermes Agent: `references/hermes-tools.md`
70
+ - Muse: `references/muse-tools.md`
69
71
  - Devin CLI: `references/devin-tools.md`
70
72
  - OpenCode: `references/opencode-tools.md`
71
73
 
@@ -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`.
@@ -100,6 +100,18 @@ naming and copy rules, platform requirements — one line each, with exact
100
100
  values copied verbatim from the spec. Every task's requirements implicitly
101
101
  include this section.]
102
102
 
103
+ ## Review Focus
104
+
105
+ [The five input classes or failure modes the spec implies but no task's
106
+ tests exercise that are most likely to bite a person using this software
107
+ — one line each, naming the input or condition and the behavior a
108
+ reasonable person would expect, most likely first. The spec is a vision
109
+ document: it says what the software must do, not everything it will
110
+ meet, and its silence on an input is not permission for that input to
111
+ break the program. Write the list here, once, with the spec in front of
112
+ you. Then, for each line, add the test that pins it to the task that
113
+ owns the code, in that task's own step style.]
114
+
103
115
  ---
104
116
  ```
105
117
 
@@ -175,6 +187,8 @@ After writing the complete plan, look at the spec with fresh eyes and check the
175
187
 
176
188
  **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.
177
189
 
190
+ **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.
191
+
178
192
  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.
179
193
 
180
194
  ## Execution Handoff
@@ -187,27 +201,24 @@ them to review the plan and choose an execution method before implementation.
187
201
 
188
202
  **When no execution method has already been supplied:**
189
203
 
190
- **"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Please review the plan. Two execution options:**
191
-
192
- **1. Subagent-Driven** - fresh subagent per task, review between tasks, fast iteration
204
+ **"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Please review the plan. Two execution options: which execution approach would you prefer?**
193
205
 
194
- **2. Inline Execution** - tasks in a session via executing-plans, batched with checkpoints
206
+ - **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.
207
+ - **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.
195
208
 
196
- **Recommended for this plan: [pick one] — [one-line why].** Then: **Does the plan capture what you want, and which approach should we use?"**
209
+ **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?"**
197
210
 
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.
211
+ **Recommended for this plan: [pick one]** — Subagent-driven or Native (Inline), picked from the plan in front of you:
212
+ - **Subagent-driven** when your partner wants a review gate on every task, when the plan is long enough that its later tasks would run on a compacted context inline, or when tasks need a fresh pair of eyes per task.
213
+ - **Native (Inline)** when the plan is short-to-medium, tasks are mostly independent — the same precondition as Subagent-driven — and cheapest-and-fastest single-context execution is preferred. It shines when you already hold the spec/architecture context that a cold subagent would spend a spawn re-deriving each time.
201
214
  Say which and why. Never default to one without looking.
202
215
 
203
216
  **When an execution method has already been supplied:**
204
217
 
205
218
  **"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Please review the plan. Does it capture what you want?"**
206
219
 
207
- **If Subagent-Driven chosen:**
220
+ **If Subagent-driven chosen:**
208
221
  - **REQUIRED SUB-SKILL:** Use superpowers:subagent-driven-development
209
- - Fresh subagent per task + two-stage review
210
222
 
211
- **If Inline Execution chosen:**
223
+ **If Native chosen:**
212
224
  - **REQUIRED SUB-SKILL:** Use superpowers:executing-plans
213
- - Batch execution with checkpoints for review