@jspg-ai/coding-bb 0.0.3-beta.1 → 0.0.3-beta.12

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 (99) hide show
  1. package/cbb/dev-standards/rules/cbb-ai-behavior.md +118 -116
  2. package/cbb/lib/install/claude-code.js +1 -3
  3. package/cbb/lib/install/codebuddy.js +30 -0
  4. package/cbb/lib/install/init.js +295 -119
  5. package/cbb/lib/install/opencode.js +35 -31
  6. package/cbb/lib/install/qoder.js +1 -3
  7. package/cbb/lib/install/rule-rewrite.js +27 -0
  8. package/cbb/lib/install/trae.js +33 -0
  9. package/cbb/lib/openspec/index.js +337 -554
  10. package/cbb/lib/superpowers/index.js +246 -265
  11. package/cbb/lib/utils/check-update.js +8 -1
  12. package/cbb/lib/utils/gitignore.js +2 -0
  13. package/cbb/lib/utils/settings.js +17 -4
  14. package/cbb/lib/utils/tar.js +92 -0
  15. package/cbb/lib/utils/upstream.js +90 -0
  16. package/cbb/worktrees/skills/cbb-worktree-close/SKILL.md +32 -23
  17. package/cbb/worktrees/skills/cbb-worktree-close/scripts/remove-worktrees.js +2 -2
  18. package/cbb/worktrees/skills/cbb-worktree-init/SKILL.md +36 -28
  19. package/cbb/worktrees/skills/cbb-worktree-init/scripts/create-worktrees.js +15 -37
  20. package/cbb/worktrees/skills/cbb-worktree-init/scripts/update-gitignore.js +25 -9
  21. package/cbb/worktrees/skills/cbb-worktree-push/SKILL.md +66 -30
  22. package/config/openspec/schemas/spec-driven/schema.yaml +29 -30
  23. package/config/openspec/schemas/spec-driven/templates/design.md +0 -18
  24. package/config/openspec/schemas/spec-driven/templates/proposal.md +4 -3
  25. package/config/upstream-mirrors.json +12 -0
  26. package/config/workspace-agents.sample.md +41 -39
  27. package/openspec/.version +2 -3
  28. package/openspec/commands/apply.md +189 -175
  29. package/openspec/commands/archive.md +237 -216
  30. package/openspec/commands/bulk-archive.md +355 -327
  31. package/openspec/commands/continue.md +116 -105
  32. package/openspec/commands/explore.md +230 -199
  33. package/openspec/commands/ff.md +115 -104
  34. package/openspec/commands/new.md +74 -63
  35. package/openspec/commands/onboard.md +557 -548
  36. package/openspec/commands/propose.md +161 -150
  37. package/openspec/commands/sync.md +277 -249
  38. package/openspec/commands/update.md +92 -80
  39. package/openspec/commands/verify.md +175 -162
  40. package/openspec/skills/openspec-apply-change/SKILL.md +20 -5
  41. package/openspec/skills/openspec-archive-change/SKILL.md +30 -8
  42. package/openspec/skills/openspec-bulk-archive-change/SKILL.md +36 -6
  43. package/openspec/skills/openspec-continue-change/SKILL.md +14 -2
  44. package/openspec/skills/openspec-explore/SKILL.md +21 -9
  45. package/openspec/skills/openspec-ff-change/SKILL.md +14 -2
  46. package/openspec/skills/openspec-new-change/SKILL.md +13 -1
  47. package/openspec/skills/openspec-onboard/SKILL.md +49 -39
  48. package/openspec/skills/openspec-propose/SKILL.md +15 -3
  49. package/openspec/skills/openspec-sync-specs/SKILL.md +31 -2
  50. package/openspec/skills/openspec-update-change/SKILL.md +27 -14
  51. package/openspec/skills/openspec-verify-change/SKILL.md +17 -3
  52. package/package.json +2 -2
  53. package/superpowers/.version +4 -4
  54. package/superpowers/skills/brainstorming/SKILL.md +47 -12
  55. package/superpowers/skills/brainstorming/scripts/frame-template.html +213 -213
  56. package/superpowers/skills/brainstorming/scripts/server.cjs +723 -723
  57. package/superpowers/skills/brainstorming/visual-companion.md +6 -6
  58. package/superpowers/skills/diagnosing-superpowers/SKILL.md +120 -0
  59. package/superpowers/skills/diagnosing-superpowers/prompts/analyst-common.md +38 -0
  60. package/superpowers/skills/diagnosing-superpowers/prompts/cost-and-time.md +28 -0
  61. package/superpowers/skills/diagnosing-superpowers/prompts/plan-adherence.md +29 -0
  62. package/superpowers/skills/diagnosing-superpowers/prompts/quality-evidence.md +26 -0
  63. package/superpowers/skills/diagnosing-superpowers/prompts/repeated-work.md +30 -0
  64. package/superpowers/skills/diagnosing-superpowers/prompts/request-conflicts.md +20 -0
  65. package/superpowers/skills/diagnosing-superpowers/prompts/scrub-audit.md +33 -0
  66. package/superpowers/skills/diagnosing-superpowers/prompts/scrub.md +29 -0
  67. package/superpowers/skills/diagnosing-superpowers/prompts/similar-session.md +38 -0
  68. package/superpowers/skills/diagnosing-superpowers/prompts/skill-timeline.md +30 -0
  69. package/superpowers/skills/diagnosing-superpowers/prompts/stumbles.md +28 -0
  70. package/superpowers/skills/diagnosing-superpowers/references/context-safety.md +22 -0
  71. package/superpowers/skills/diagnosing-superpowers/references/github-issues.md +47 -0
  72. package/superpowers/skills/diagnosing-superpowers/references/redaction-policy.md +34 -0
  73. package/superpowers/skills/diagnosing-superpowers/references/session-discovery.md +31 -0
  74. package/superpowers/skills/diagnosing-superpowers/templates/bundle-README.md +77 -0
  75. package/superpowers/skills/diagnosing-superpowers/templates/case.md +64 -0
  76. package/superpowers/skills/diagnosing-superpowers/templates/issue.md +51 -0
  77. package/superpowers/skills/diagnosing-superpowers/templates/report.md +82 -0
  78. package/superpowers/skills/executing-plans/SKILL.md +350 -41
  79. package/superpowers/skills/executing-plans/scripts/task-done +52 -0
  80. package/superpowers/skills/executing-plans/scripts/task-start +28 -0
  81. package/superpowers/skills/requesting-code-review/SKILL.md +1 -1
  82. package/superpowers/skills/requesting-code-review/code-reviewer.md +17 -0
  83. package/superpowers/skills/subagent-driven-development/SKILL.md +18 -18
  84. package/superpowers/skills/subagent-driven-development/re-review-prompt.md +1 -1
  85. package/superpowers/skills/subagent-driven-development/scripts/review-package +53 -46
  86. package/superpowers/skills/subagent-driven-development/scripts/sdd-workspace +82 -40
  87. package/superpowers/skills/subagent-driven-development/scripts/task-brief +43 -41
  88. package/superpowers/skills/subagent-driven-development/task-reviewer-prompt.md +2 -2
  89. package/superpowers/skills/systematic-debugging/root-cause-tracing.md +1 -1
  90. package/superpowers/skills/test-driven-development/SKILL.md +10 -0
  91. package/superpowers/skills/using-superpowers/SKILL.md +2 -0
  92. package/superpowers/skills/using-superpowers/references/claude-code-tools.md +29 -0
  93. package/superpowers/skills/using-superpowers/references/muse-tools.md +35 -0
  94. package/superpowers/skills/writing-plans/SKILL.md +30 -9
  95. package/superpowers/skills/writing-skills/SKILL.md +4 -2
  96. package/superpowers/skills/writing-skills/graphviz-conventions.dot +171 -171
  97. package/cbb/worktrees/commands/worktree-close.md +0 -64
  98. package/cbb/worktrees/commands/worktree-init.md +0 -51
  99. package/cbb/worktrees/commands/worktree-push.md +0 -42
@@ -1,46 +1,53 @@
1
- #!/usr/bin/env bash
2
- # Generate a review package: commit list, stat summary, and the net
3
- # diff with extended context, written to a file the reviewer reads in one
4
- # call. Using the recorded per-task BASE (not HEAD~1) keeps multi-commit
5
- # tasks intact.
6
- #
7
- # Usage: review-package PLAN_FILE BASE HEAD [OUTFILE]
8
- # Default OUTFILE: <repo-root>/.superpowers/sdd/<plan-basename>/review-<base7>..<head7>.diff
9
- # (named per range, so a re-review after fixes gets a distinct fresh file).
10
- set -euo pipefail
11
-
12
- if [ $# -lt 3 ] || [ $# -gt 4 ]; then
13
- echo "usage: review-package PLAN_FILE BASE HEAD [OUTFILE]" >&2
14
- exit 2
15
- fi
16
-
17
- plan=$1
18
- base=$2
19
- head=$3
20
- [ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }
21
-
22
- git rev-parse --verify --quiet "$base" >/dev/null || { echo "bad BASE: $base" >&2; exit 2; }
23
- git rev-parse --verify --quiet "$head" >/dev/null || { echo "bad HEAD: $head" >&2; exit 2; }
24
-
25
- if [ $# -eq 4 ]; then
26
- out=$4
27
- else
28
- dir=$("$(cd "$(dirname "$0")" && pwd)/sdd-workspace" "$plan")
29
- out="$dir/review-$(git rev-parse --short "$base")..$(git rev-parse --short "$head").diff"
30
- fi
31
-
32
- {
33
- echo "# Review package: ${base}..${head}"
34
- echo
35
- echo "## Commits"
36
- git log --oneline "${base}..${head}"
37
- echo
38
- echo "## Files changed"
39
- git diff --stat "${base}..${head}"
40
- echo
41
- echo "## Diff"
42
- git diff -U10 "${base}..${head}"
43
- } > "$out"
44
-
45
- commits=$(git rev-list --count "${base}..${head}")
46
- echo "wrote ${out}: ${commits} commit(s), $(wc -c < "$out" | tr -d ' ') bytes"
1
+ #!/usr/bin/env bash
2
+ # Generate a review package: commit list, stat summary, and the net
3
+ # diff with extended context, written to a file the reviewer reads in one
4
+ # call. Using the recorded per-task BASE (not HEAD~1) keeps multi-commit
5
+ # tasks intact.
6
+ #
7
+ # Usage: review-package PLAN_FILE BASE HEAD [OUTFILE]
8
+ # Default OUTFILE: <repo-root>/.superpowers/sdd/<plan-basename>/review-<base7>..<head7>.diff
9
+ # (named per range, so a re-review after fixes gets a distinct fresh file).
10
+ set -euo pipefail
11
+
12
+ if [ $# -lt 3 ] || [ $# -gt 4 ]; then
13
+ echo "usage: review-package PLAN_FILE BASE HEAD [OUTFILE]" >&2
14
+ exit 2
15
+ fi
16
+
17
+ plan=$1
18
+ base=$2
19
+ head=$3
20
+ [ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }
21
+
22
+ git rev-parse --verify --quiet "$base" >/dev/null || { echo "bad BASE: $base" >&2; exit 2; }
23
+ git rev-parse --verify --quiet "$head" >/dev/null || { echo "bad HEAD: $head" >&2; exit 2; }
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
+
30
+ if [ $# -eq 4 ]; then
31
+ out=$4
32
+ else
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")
36
+ out="$dir/review-$(git rev-parse --short "$base")..$(git rev-parse --short "$head").diff"
37
+ fi
38
+
39
+ {
40
+ echo "# Review package: ${base}..${head}"
41
+ echo
42
+ echo "## Commits"
43
+ git log --oneline "${base}..${head}"
44
+ echo
45
+ echo "## Files changed"
46
+ git diff --stat "${base}..${head}"
47
+ echo
48
+ echo "## Diff"
49
+ git diff -U10 "${base}..${head}"
50
+ } > "$out"
51
+
52
+ commits=$(git rev-list --count "${base}..${head}")
53
+ echo "wrote ${out}: ${commits} commit(s), $(wc -c < "$out" | tr -d ' ') bytes"
@@ -1,40 +1,82 @@
1
- #!/usr/bin/env bash
2
- # Resolve and ensure the working-tree directory SDD uses for one plan's
3
- # short-lived artifacts: task briefs, implementer reports, review packages,
4
- # and the progress ledger. Print the plan directory's absolute path.
5
- #
6
- # One directory per plan (.superpowers/sdd/<plan-basename>/) so a follow-up
7
- # plan in the same working tree can never read or overwrite another plan's
8
- # artifacts. A stale ledger misread as current progress makes controllers
9
- # skip whole task sequences — plan-scoping removes that failure structurally.
10
- #
11
- # The workspace lives in the working tree (not under .git/) because Claude Code
12
- # treats .git/ as a protected path and denies agent writes there — which blocks
13
- # an implementer subagent from writing its report file. A self-ignoring
14
- # .gitignore at .superpowers/sdd/ keeps every plan's workspace out of
15
- # `git status` and out of accidental commits without modifying any tracked file.
16
- #
17
- # Single source of truth for the workspace location, so task-brief and
18
- # review-package cannot drift to different directories.
19
- #
20
- # Usage: sdd-workspace PLAN_FILE
21
- set -euo pipefail
22
-
23
- if [ $# -ne 1 ]; then
24
- echo "usage: sdd-workspace PLAN_FILE" >&2
25
- exit 2
26
- fi
27
-
28
- plan=$1
29
- [ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }
30
-
31
- slug=$(basename "$plan" .md)
32
- [ -n "$slug" ] && [ "$slug" != "." ] && [ "$slug" != ".." ] \
33
- || { echo "cannot derive a workspace name from: $plan" >&2; exit 2; }
34
-
35
- root=$(git rev-parse --show-toplevel)
36
- base="$root/.superpowers/sdd"
37
- dir="$base/$slug"
38
- mkdir -p "$dir"
39
- printf '*\n' > "$base/.gitignore"
40
- cd "$dir" && pwd
1
+ #!/usr/bin/env bash
2
+ # Resolve and ensure the working-tree directory SDD uses for one plan's
3
+ # short-lived artifacts: task briefs, implementer reports, review packages,
4
+ # and the progress ledger. Print the plan directory's absolute path.
5
+ #
6
+ # One directory per plan (.superpowers/sdd/<plan-basename>/) so a follow-up
7
+ # plan in the same working tree can never read or overwrite another plan's
8
+ # artifacts. A stale ledger misread as current progress makes controllers
9
+ # skip whole task sequences — plan-scoping removes that failure structurally.
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
+ #
21
+ # The workspace lives in the working tree (not under .git/) because Claude Code
22
+ # treats .git/ as a protected path and denies agent writes there — which blocks
23
+ # an implementer subagent from writing its report file. A self-ignoring
24
+ # .gitignore at .superpowers/sdd/ keeps every plan's workspace out of
25
+ # `git status` and out of accidental commits without modifying any tracked file.
26
+ #
27
+ # Single source of truth for the workspace location, so task-brief and
28
+ # review-package cannot drift to different directories.
29
+ #
30
+ # Usage: sdd-workspace PLAN_FILE
31
+ set -euo pipefail
32
+
33
+ if [ $# -ne 1 ]; then
34
+ echo "usage: sdd-workspace PLAN_FILE" >&2
35
+ exit 2
36
+ fi
37
+
38
+ plan=$1
39
+ [ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }
40
+
41
+ slug=$(basename "$plan" .md)
42
+ [ -n "$slug" ] && [ "$slug" != "." ] && [ "$slug" != ".." ] \
43
+ || { echo "cannot derive a workspace name from: $plan" >&2; exit 2; }
44
+
45
+ root=$(git rev-parse --show-toplevel)
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
+
70
+ dir="$base/$slug"
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
+
81
+ printf '*\n' > "$base/.gitignore"
82
+ CDPATH= cd -- "$dir" && pwd
@@ -1,41 +1,43 @@
1
- #!/usr/bin/env bash
2
- # Extract one task's full text from an implementation plan into a file the
3
- # implementer reads in one call, so the task text never has to be pasted
4
- # through the controller's context.
5
- #
6
- # Usage: task-brief PLAN_FILE TASK_NUMBER [OUTFILE]
7
- # Default OUTFILE: <repo-root>/.superpowers/sdd/<plan-basename>/task-<N>-brief.md
8
- # (per plan and per worktree; concurrent runs of the SAME plan in the same
9
- # working tree share it).
10
- set -euo pipefail
11
-
12
- if [ $# -lt 2 ] || [ $# -gt 3 ]; then
13
- echo "usage: task-brief PLAN_FILE TASK_NUMBER [OUTFILE]" >&2
14
- exit 2
15
- fi
16
-
17
- plan=$1
18
- n=$2
19
- [ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }
20
-
21
- if [ $# -eq 3 ]; then
22
- out=$3
23
- else
24
- dir=$("$(cd "$(dirname "$0")" && pwd)/sdd-workspace" "$plan")
25
- out="$dir/task-${n}-brief.md"
26
- fi
27
-
28
- awk -v n="$n" '
29
- /^```/ { infence = !infence }
30
- !infence && /^#+[ \t]+Task[ \t]+[0-9]+/ {
31
- intask = ($0 ~ ("^#+[ \t]+Task[ \t]+" n "([^0-9]|$)"))
32
- }
33
- intask { print }
34
- ' "$plan" > "$out"
35
-
36
- if [ ! -s "$out" ]; then
37
- echo "task ${n} not found in ${plan} (no heading matching 'Task ${n}')" >&2
38
- exit 3
39
- fi
40
-
41
- echo "wrote ${out}: $(wc -l < "$out" | tr -d ' ') lines"
1
+ #!/usr/bin/env bash
2
+ # Extract one task's full text from an implementation plan into a file the
3
+ # implementer reads in one call, so the task text never has to be pasted
4
+ # through the controller's context.
5
+ #
6
+ # Usage: task-brief PLAN_FILE TASK_NUMBER [OUTFILE]
7
+ # Default OUTFILE: <repo-root>/.superpowers/sdd/<plan-basename>/task-<N>-brief.md
8
+ # (per plan and per worktree; concurrent runs of the SAME plan in the same
9
+ # working tree share it).
10
+ set -euo pipefail
11
+
12
+ if [ $# -lt 2 ] || [ $# -gt 3 ]; then
13
+ echo "usage: task-brief PLAN_FILE TASK_NUMBER [OUTFILE]" >&2
14
+ exit 2
15
+ fi
16
+
17
+ plan=$1
18
+ n=$2
19
+ [ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }
20
+
21
+ if [ $# -eq 3 ]; then
22
+ out=$3
23
+ else
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")
27
+ out="$dir/task-${n}-brief.md"
28
+ fi
29
+
30
+ awk -v n="$n" '
31
+ /^```/ { infence = !infence }
32
+ !infence && /^#+[ \t]+Task[ \t]+[0-9]+/ {
33
+ intask = ($0 ~ ("^#+[ \t]+Task[ \t]+" n "([^0-9]|$)"))
34
+ }
35
+ intask { print }
36
+ ' "$plan" > "$out"
37
+
38
+ if [ ! -s "$out" ]; then
39
+ echo "task ${n} not found in ${plan} (no heading matching 'Task ${n}')" >&2
40
+ exit 3
41
+ fi
42
+
43
+ echo "wrote ${out}: $(wc -l < "$out" | tr -d ' ') lines"
@@ -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`.
@@ -76,6 +76,18 @@ naming and copy rules, platform requirements — one line each, with exact
76
76
  values copied verbatim from the spec. Every task's requirements implicitly
77
77
  include this section.]
78
78
 
79
+ ## Review Focus
80
+
81
+ [The five input classes or failure modes the spec implies but no task's
82
+ tests exercise that are most likely to bite a person using this software
83
+ — one line each, naming the input or condition and the behavior a
84
+ reasonable person would expect, most likely first. The spec is a vision
85
+ document: it says what the software must do, not everything it will
86
+ meet, and its silence on an input is not permission for that input to
87
+ break the program. Write the list here, once, with the spec in front of
88
+ you. Then, for each line, add the test that pins it to the task that
89
+ owns the code, in that task's own step style.]
90
+
79
91
  ---
80
92
  ```
81
93
 
@@ -148,24 +160,33 @@ After writing the complete plan, look at the spec with fresh eyes and check the
148
160
 
149
161
  **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
162
 
163
+ **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.
164
+
151
165
  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
166
 
153
167
  ## Execution Handoff
154
168
 
155
- After saving the plan, offer execution choice:
169
+ After saving and self-reviewing the plan, link it for your human partner
170
+ to read. If they have already explicitly supplied an execution method, ask
171
+ them to review the plan and confirm it captures what they want; wait for that
172
+ review before implementation, then use the preserved method. Otherwise, ask
173
+ them to review the plan and choose an execution method before implementation.
174
+
175
+ **When no execution method has already been supplied:**
176
+
177
+ **"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Please review the plan. Which execution approach would you prefer?**
156
178
 
157
- **"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Two execution options:**
179
+ - **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.
180
+ - **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
181
 
159
- **1. Subagent-Driven (recommended)** - I dispatch a fresh subagent per task, review between tasks, fast iteration
182
+ **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
183
 
161
- **2. Inline Execution** - Execute tasks in this session using executing-plans, batch execution with checkpoints
184
+ **When an execution method has already been supplied:**
162
185
 
163
- **Which approach?"**
186
+ **"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Please review the plan. Does it capture what you want?"**
164
187
 
165
- **If Subagent-Driven chosen:**
188
+ **If Subagent-driven chosen:**
166
189
  - **REQUIRED SUB-SKILL:** Use superpowers:subagent-driven-development
167
- - Fresh subagent per task + two-stage review
168
190
 
169
- **If Inline Execution chosen:**
191
+ **If Native chosen:**
170
192
  - **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
  ```