| Age | Commit message (Collapse) | Author |
|
The two "does NOT send reload" tests waited for the barrier file's
screen-added line on stdout, then counted reloads on the WebSocket. The
server logs and broadcasts in the same tick, but stdout and the socket
are separate channels, and on Linux stdout usually won: the socket had
0 reloads when the barrier fired and 1 reload 300ms later, so the tests
failed in 8 of 10 runs.
They now ping the server after the barrier and wait for the pong. The
server writes it on the same socket after the reload, so every reload
sent before it has arrived. 30 consecutive clean runs; with the server's
.html filter removed, both tests still fail.
|
|
fix(systematic-debugging): ship pressure scenarios under tests/, not in the skill (#2277)
|
|
fix(codex): accept linked git worktrees in the package and sync scripts
|
|
fix(brainstorming): resolve a relative --project-dir before start-server.sh cds (#2524)
|
|
skills(sdd, executing-plans): run helpers by absolute path from the working tree (#2429, #2525)
|
|
fix(sdd): helpers act on the current directory's repo like git, with -C to override (#2429)
|
|
fix(sdd): task-brief refuses a brief that an unclosed code fence would run to EOF (#2436)
|
|
fix(sdd): task-brief finds alphanumeric task IDs and explains non-English headings (#2459, #2496)
|
|
fix(sdd): print a Windows-readable workspace path (#2307)
|
|
Drew requested resolution of the merge conflict in obra/superpowers PR
#2601. Merge current dev into the existing PR branch without rewriting its
history.
Resolve the V2 bootstrap hunk by keeping #2601's shared handler registered
on context, compaction, and generate, and incorporating #2600's exact
BOOTSTRAP_MARKER prefix guard. This preserves injection for prompts that
merely mention EXTREMELY_IMPORTANT while preventing duplicate bootstrap
parts. All other dev changes merge without manual edits.
Validation: bash tests/opencode/run-tests.sh passed all five suites,
including hook registration, tag-mention regression coverage, child-session
suppression, caching, and skill registration. git diff --cached --check
passed and the index contains no unresolved paths. Live OpenCode
integration sessions were not rerun for this conflict-only repair.
Tracking: PRI-3674
|
|
fix(opencode): don't mistake a prompt that mentions EXTREMELY_IMPORTANT for the bootstrap
|
|
fix(opencode): tell the model skill ids are bare names (#2583)
|
|
fix(hermes): skip the controller bootstrap for delegate_task children (#2536)
|
|
skill (#2277)
systematic-debugging installed CREATION-LOG.md and four pressure-test
scenarios next to SKILL.md. Nothing in the skill links them, but agents
read and grep installed skill directories, and the scenarios open with
"This is a real scenario. You must choose and act".
Move all five, unchanged, to tests/systematic-debugging/pressure-scenarios/,
and add tests/skill-layout/test-no-dev-files-in-skills.sh, which fails if
any skill directory ships a CREATION-LOG.md or a test-*.md file.
|
|
package-codex-plugin.sh and sync-to-codex-plugin.sh checked for a
checkout with [[ -d .git ]]. In a linked worktree .git is a file, so
both scripts died with "not a git checkout" there, and
tests/codex/test-package-codex-plugin.sh failed 9 checks when run from
any worktree. Test that .git exists instead: it covers both layouts
and still requires the path to be the root of a checkout, which
matters for sync's user-supplied --local path. The scripts' later git
commands already work in worktrees.
Regression tests run the package script from a linked worktree of the
repo, and a sync preview from a linked upstream worktree into a linked
destination worktree. The package test is adapted from #1910.
Co-authored-by: tianma-if <tianma-if@users.noreply.github.com>
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
start-server.sh built SESSION_DIR, PID_FILE, LOG_FILE and BRAINSTORM_DIR
from --project-dir as given, then ran `cd "$SCRIPT_DIR"` before using
them. A relative project dir like `.` was re-rooted at the scripts
directory, so the log and pid redirects failed and the server never
reported server-started: "Server failed to start within 5 seconds".
Resolve the project dir to an absolute path with `mkdir -p` + `cd && pwd`
right before deriving the session paths. mkdir -p keeps the existing
behavior of creating a project dir that doesn't exist yet (the Windows
lifecycle test relies on it), CDPATH is cleared so a relative name can't
resolve to some other directory, and `--` covers names starting with a
dash. Works on bash 3.2 without realpath or readlink -f.
Fixes #2524.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
task-brief ignores Task headings inside fenced code blocks by toggling a
flag on every ``` line. When a plan leaves a fence open (an edit deletes a
closing fence), the flag stays set for the rest of the file, every later
Task heading is invisible, and the requested task's brief runs to EOF.
The script then reported success: #2436 saw a 177-line task come back as
a 1159-line brief holding tasks 6 through 10, handed to an implementer as
its requirements.
The awk now notes whether a Task heading line appears inside the fence
that is still open at EOF. If one does while the requested task is being
captured, the task's end cannot be found, so task-brief deletes the
partial output and exits 4, naming the line where the fence opened. If
the open fence hides the requested heading itself, it names the fence
before the existing not-found error (exit 3), and suppresses the
"use the English word Task" hint, which would otherwise blame the
plan's English headings for what the fence did.
A fence left open that hides no Task heading changes nothing about the
brief, so it is still written, with a warning on stderr. Real plans do
this: in a corpus of 1,288 plans, refusing on any fence left open at EOF
blocked three correct briefs in two plans, each ending in a stray ``` that
hides no task. With this rule every brief in that corpus matches dev's.
An unclosed fence in a later task leaves an earlier task's brief alone.
The plan path reaches awk through the environment rather than -v, which
would interpret the backslashes of a Windows path as escapes. The fence
rule itself is unchanged, so this composes with #2304's CommonMark fence
tracking: a correct parser still cannot close a fence the author never
closed.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
task-brief recognizes only the English word `Task` in a task heading.
writing-plans' template shows `### Task N:` but never says the word is
machine-read, so a model writing a plan in Spanish writes `## Tarea 1:`.
task-brief and task-start then report "task 1 not found in plan-es.md
(no heading matching 'Task 1')", which reads as "this plan has no task 1"
and sends the controller looking for a task that is on line 3 (#2496).
When a plan has no Task headings at all, task-brief now prints, before the
existing not-found line, that task headings must use the English word
"Task" whatever the plan's language, and lists up to five headings shaped
like tasks (`<word> <id-with-a-digit>`). A plan that has Task headings,
just not the requested one, still gets only the not-found line, so asking
for Task 9 of an eight-task plan stays quiet.
This deliberately does not accept other words. Plans commonly carry
`Phase 1`, `Chunk 2` and `Step 1` headings, and a word-agnostic rule
would turn them into tasks. Keeping the word fixed in the plans
themselves is a writing-plans wording change, which needs evals.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
task-brief only treated `Task` followed by digits as a task heading, and
found the requested task by splicing TASK_NUMBER into a regex followed
by `([^0-9]|$)`. Plans that number tasks by lane (`### Task A1`,
`### Task B2`) could not be extracted at all: `task-brief plan.md A1`
exits 3 "task A1 not found" (#2459). Among 1,288 distinct plans in Jesse's
own repositories, 19 plans have such headings (262 headings, IDs like A1,
M3a, F.2, W0), and none of those tasks could be briefed.
The same splice made the match a prefix match: Task 6 also took a sibling
Task 6b (#2175), Task 1 took Task 1.1 and 1.2, Task 2.1 took Task 201
because `.` is any character, and an ID like `6(` crashed awk (#2405).
A task heading is now `Task` followed by an ID made of letters and digits,
optionally dot-separated, that contains at least one digit. The digit is
what keeps `## Task Overview` or `#### Task notes` from becoming a task
boundary. awk extracts the heading's ID and compares it to TASK_NUMBER as
a whole string, so TASK_NUMBER never reaches awk as a regex.
A deeper Task heading whose ID extends the requested one with a letter or
dot is a sub-task and stays in the parent's brief, as the prefix match
happened to do before: plans in that corpus nest `#### Task 1a` under
`### Task 1`, and a Task 1 brief without its sub-tasks would lose most of
its requirements. A sub-task's own brief ends at its next sibling. Depth
alone is not the test, because plans also drift from `## Task 1` to
`### Task 2`, and those are siblings.
The heading word stays the English literal `Task`, which is what
writing-plans' template uses. Widening it to any word would turn the
`Phase 1`, `Chunk 2` and `Step 1` headings that plans commonly carry
(308, 182 and 56 of them in the same corpus) into tasks.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
The SKILL.md change left skill-relative helper calls elsewhere under
skills/: final-review.md (the final whole-branch review package and its
re-review), fix-loop.md (the scoped re-review), the reviewer prompt
templates' placeholder descriptions, and executing-plans' task-start and
task-done. Each now carries the same qualifier: run the script by its
absolute path, from the working tree you're executing in. Nothing else
in those files changes.
tests/sdd-helper-paths/test-sdd-helper-paths.sh is a structural test
that fails when any skills/ markdown names a helper (sdd-workspace,
task-brief, review-package, task-start, task-done) by a relative
scripts/ path without "by its absolute path" within the next few lines.
It failed on 8 references before this change and passes on all 14
after.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
sdd-repo ran git with stderr discarded, so every git failure became
"must run from inside the git working tree ... run 'git init'". Where
git refuses a working tree the caller is actually inside (dubious
ownership on another owner's, FAT, network or WSL /mnt/c checkout; git
missing from PATH; the cwd inside .git), that message is false, points
at git init in an existing project, and hides the one line naming the
real fix. dev printed git's fatal, so this was a diagnostic regression.
The shared message stays, and git's first stderr line from whichever
check failed now always follows it as "git said: <line>", with no
per-case branches:
SDD scripts must run from inside the git working tree ... then rerun.
git said: fatal: detected dubious ownership in repository at '/r'
Tests: every no-repo assertion now requires the second line (a plain
non-repo dir gives "git said: fatal: not a git repository"), and a new
test simulates dubious ownership with git's GIT_TEST_ASSUME_DIFFERENT_OWNER
knob (no root or second uid needed; it skips if the installed git
ignores the knob).
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
sdd-repo fell back to the plan file's repository when the current
directory was outside any repository. That made the plugin-cache case
silently succeed somewhere: an agent that cd'd into the skill directory
and passed an absolute plan path got whichever checkout that path
pointed into. With the plan in the main checkout (where writing-plans
leaves it) and execution in a linked worktree, that is the #2429
wrong-worktree bug again, with exit 0. A real session (sdd-cwd-eval
sdd-A-5) took exactly this path and only landed in the right place
because its plan path happened to be the worktree's.
The SDD and executing-plans helpers now pick their repository the way
git does: the current directory's working tree, or DIR when given -C
DIR. Outside any working tree, sdd-workspace, task-brief,
review-package, task-start and task-done all stop with the shared
message and write nothing, even when the plan's absolute path is inside
a repository. sdd-repo no longer takes PLAN_FILE, since the plan has no
say.
The two "outside any repository ... uses the plan's repository" tests
and the task-start/task-done fallback tests become assertions that the
shared message comes out and nothing is written, in the cwd or the
plan's repository.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
sdd-repo's no-repository message told every caller to run 'git init'.
That is the right fix for a new project, but the other way to reach it
is standing in the wrong directory, such as the plugin's own skill
directory after reading "from this skill's directory" literally. There,
'git init' would turn the plugin cache into a repository and hide the
real mistake.
task-start and task-done were worse. They still read HEAD and BASE in
the bare cwd while the brief and ledger went through sdd-repo. From a
non-repo cwd with the plan in a repo that has commits, task-start wrote
the brief into the plan's repo, then printed git's fatal plus "HEAD has
no commit yet ... make an initial commit first" and exited 2. task-done
printed git's fatal. review-package in a repo with no commit said
"bad BASE: HEAD~1".
Every helper that can hit this (sdd-workspace, task-brief,
review-package, task-start, task-done) now stops with the same message
from sdd-repo, naming the current directory and offering init-and-commit
only as the new-project case:
SDD scripts must run from inside the git working tree you're
executing in, with at least one commit (current directory: <PWD>).
If this is a new project, run 'git init' and make a first commit,
then rerun.
sdd-repo gains --with-commit, which also refuses a repository whose HEAD
has no commit. review-package, task-start and task-done pass it because
they need HEAD as a BASE or a review range; sdd-workspace and task-brief
do not, so a brief can still be written right after git init.
task-start and task-done now read HEAD and BASE with git -C in the
repository sdd-repo names. Resolution is otherwise unchanged: the cwd's
repo, else the plan's, else exit 2. sdd-repo is now executable like its
siblings.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
missing repo
The SDD helpers found their repository with a bare
`git rev-parse --show-toplevel` in the caller's cwd, and review-package ran
every git command there too. Three reports trace back to that one line:
- #2429: outside any repository (the skill's own directory in a 7.0
package has no .git), sdd-workspace fed `cd` an empty path. bash 5.2
treats that as a no-op and wrote the workspace into the cwd after
printing git's bare fatal; Git Bash failed with "cd: null directory".
A controller working on worktree B from worktree A had no way to name B.
- #1799: the only way to aim review-package at a worktree was a
`cd <worktree> ; review-package ...` compound, which harnesses cannot
allowlist because the path and BASE change on every run.
- #2242: in a greenfield directory with no repository, task-brief and
sdd-workspace printed git's fatal and then carried on in the cwd (or
crashed, depending on bash), review-package said "bad BASE: HEAD~1", and
task-start printed an empty BASE with exit 0.
A new sdd-repo helper is the single place that picks the repository:
the cwd's working tree (or -C DIR's), exactly as git does. Anywhere else
it stops with exit 2 and one shared message.
sdd-workspace and review-package both use it, so they cannot disagree.
The cwd still wins over the plan's location on purpose: writing-plans
leaves the plan uncommitted in the main checkout, so an executor working
in a linked worktree passes the main checkout's plan path, and its
workspace and commits belong to the worktree. Resolving from PLAN_FILE
first (draft #2439) breaks exactly that flow: review-package then diffs
the main checkout and fails with "empty commit range".
sdd-workspace, task-brief and review-package take an optional leading
`-C DIR` that runs them as if started in DIR, as git -C does, so a caller
can name another worktree in one allowlistable command. Each script
resolves its own directory before the cd, so the documented
`bash scripts/review-package` form from the skill directory keeps
working with -C. PR #1809's version cd's first and then fails to find
sdd-workspace (exit 127) in that form.
task-start now refuses (exit 2) to print a BASE when HEAD has no commit,
instead of printing "base: HEAD" or "base: " with exit 0.
Co-authored-by: citizen204 <citizen204@users.noreply.github.com>
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
On Windows, sdd-workspace printed the workspace in MSYS form
(/c/Users/... or /tmp/...). Every helper path derives from that line:
task-brief's "wrote", review-package's diff path, executing-plans'
task-start "brief:". PowerShell resolves /c/Users/x as C:\c\Users\x, so
Test-Path and Get-Content on any of them failed. That is the shell an
agent gets from Claude Code's PowerShell tool and from Copilot CLI on
Windows. Reproduced on Windows 11 from PowerShell and from Claude Code
2.1.308's PowerShell tool.
When cygpath is present (Git Bash, MSYS2, Cygwin), print the path
through `cygpath -m`, which gives C:/Users/.... PowerShell, cmd and
Claude Code's Read tool all accept that form, and so does bash, so the
sibling scripts that build file names on top of it keep working.
Elsewhere the output is unchanged.
Only the printed line changes. The plan-path markers keep pwd -P's
spelling, so workspaces created before this change, including absolute
markers for out-of-repo plans, still match their plans. PR #2369
converted root and the plan path too, which would rewrite those
absolute markers and orphan existing workspaces for out-of-repo plans.
Tests: physical_path in both suites now spells paths the way the
scripts print them, and test-sdd-workspace adds a check that PowerShell
can open the printed workspace and brief paths. That check runs on
Windows and is a no-op elsewhere. On Windows the suites failed 10 and 1
assertions before the fix, and both pass after.
Co-authored-by: hzxxxx <hhuihihiux@users.noreply.github.com>
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
The pi extension cleared injectBootstrap on agent_end, assuming it marked
the end of a session. pi emits agent_end at the end of every agent run,
which is once per user prompt, so from the second prompt on no provider
request carried the using-superpowers bootstrap.
The messages a context handler returns are sent to the provider but are
not written to session history, so the bootstrap is never in
event.messages on a later call and the existing marker check cannot see
an earlier injection. The bootstrap therefore has to be injected into
every provider request. Removing the agent_end disarm does exactly that,
one copy per request at a stable position at the start of the messages.
Observed against pi 0.85.1 with a local stub OpenAI-compatible provider,
one session of three prompts (the second makes a tool call): before, only
request 1 of 4 carried the bootstrap; after, all 4 carry exactly one copy.
The test that asserted the disarm as intended behaviour is replaced by
one that drives pi's per-prompt lifecycle events across several prompts
and provider requests. The porting guide described the agent_end reset
as the pattern to copy and now describes the failure instead.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
the bootstrap
Both bootstrap injectors skip a first user message whose text parts
include the substring 'EXTREMELY_IMPORTANT', to avoid injecting twice
into the same message. Any user prompt that names the tag matches too,
so the bootstrap is silently dropped for that session.
That is what #2197 hit. The reporter's probe was
opencode run "Is there an 'EXTREMELY_IMPORTANT' block in your context? ..."
and the prompt itself tripped the guard. `opencode run` is not the
cause: with the real hosts (V1 1.18.21 path and git-package forms,
V1 1.19.4, V2 2.1.2, V2 2.1.3) and a request-recording stub model, the
reporter's prompt reaches the model without the bootstrap on every
host, and a neutral prompt gets the bootstrap on every host.
Match the bootstrap's own opening line at the start of a part instead.
The injected part always starts with it (the template now uses the same
constant), so the double-injection guard keeps working, and a prompt
that only mentions the tag no longer suppresses the bootstrap.
Fixes #2197
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
The V2 plugin registered its bootstrap injector only on
ctx.session.hook('context'). OpenCode 2 prepares each model request kind
through its own hook: normal agent turns through `context`, the
compaction (summary) request through `compaction`, and session-scoped
one-shot generation through `generate`
(packages/core/src/session/model-request.ts). Every built-in V2 plugin
registers its handler on all three, and the upstream V1 migration guide
says to do the same when a transform must apply to every request kind.
So the compaction request's first user message lacked the bootstrap
that every prior turn carried, and the prompt diverged right after
system + tools. On a provider with prefix caching that is a cold
re-prefill of the whole session on its largest request (#2391).
Reproduced on real OpenCode 2.1.2 and 2.1.3 with a scripted stub model
that pushes the session over the compaction ceiling: before, the
compaction request shares 26.5k of 30.8k serialized chars with the
previous agent request and differs at the first user message; after,
the previous request is a full prefix of the compaction request.
The handler body is unchanged (child-session skip, idempotence guard,
checkpoint-only append), lifted into a named function and registered on
all three hooks, each in its own try/catch. Based on PR #2409.
Fixes #2391
Co-authored-by: Aashish <145881415+aashish254@users.noreply.github.com>
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
fix(pi): stop resources_discover from bypassing package skill filters
|
|
fix(hooks): fall back to zsh, or exit quietly, when bash is missing on Unix (#2503)
|
|
fix(hooks): start no child processes in the SessionStart hook (#2081)
|
|
(#2503)
On a Unix system without bash, the harness can't honour shell:"bash" and
runs run-hook.cmd with zsh or sh. $BASH is unset there, so the wrapper's
exec "${BASH:-bash}" fails with "command not found: bash" (zsh) or
"exec: bash: not found" (sh), the hook exits 127, and the bootstrap is
lost on every session start.
Keep $BASH first, so the empty-PATH case from #2310 still works, then look
for bash on PATH, then zsh, which runs session-start unchanged (its output
is byte-identical to bash's, including for a SKILL.md full of backslashes,
quotes, tabs and CRs). With neither shell, exit 0 quietly, as the Windows
half already does.
Reproduced with Claude Code 2.1.308 in an alpine container with zsh and no
bash: the hook exited 127 and no bootstrap reached the model before the
change; after it the hook exits 0 and the bootstrap arrives.
Tests run the wrapper under real zsh and under a non-bash sh with a PATH
that holds only zsh, and under that sh with neither shell. They skip where
zsh is absent or sh is bash (Git Bash, macOS).
Co-authored-by: Twot <twotnguyen@users.noreply.github.com>
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
On Windows, Git Bash emulates fork(), so every command substitution and
pipe costs tens of milliseconds. The SessionStart hook runs on every
startup, /clear and compaction, and on dev it forked six times: the
$(cd ... && pwd) in run-hook.cmd and twice in session-start,
$(escape_for_json ...), and printf | cat.
Resolve paths with parameter expansion, read the skill with the read
builtin, have escape_for_json assign a variable, and absorb EPIPE with
trap '' PIPE plus printf 2>/dev/null || true instead of piping through
cat. The cat pipe also turned an early-closed stdout into exit 141 under
pipefail; the new emit_json exits 0 there.
Measured on Windows 11 (VM, Git Bash 5.2), 21 interleaved runs of
run-hook.cmd session-start: median 116 ms before, 46 ms after, against a
25 ms floor for one bash start (the wrapper starts two). Claude Code
2.1.308 logged the hook at 181-421 ms before and 137-146 ms after. Output
is byte-identical to dev across all five output shapes, two working
directories, normal and empty PATH, direct and through the wrapper (40/40
on Linux), and its sha256 matches on Windows.
Tests: the cat-stub case, which asserted the pipe, is replaced by a
closed-stdout case, and a new case counts process creations with strace
on Linux (5 in session-start and 6 through the wrapper on dev, 0 after).
Co-authored-by: willow <willowite@users.noreply.github.com>
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
Skills name each other with the Claude Code plugin namespace
(`superpowers:brainstorming`), and the using-superpowers bootstrap that
the OpenCode plugin injects says "Let's build X -> superpowers:brainstorming
first". OpenCode registers superpowers skills under bare ids
(`brainstorming`) on both flavors and its `skill` tool does an exact
lookup, so a model that copies the namespaced form gets
"Unable to load skill superpowers:brainstorming" (V2) or
`Skill "superpowers:brainstorming" not found` (V1) and carries on
without the skill. The OpenCode tool mapping said only "Invoke a skill
-> OpenCode's native skill tool" and never stated the id convention.
Reproduced on real hosts (OpenCode 2.1.2 and opencode-ai 1.19.4) with a
scripted stub provider: the namespaced call fails, the bare id loads.
Add the convention to the "Invoke a skill" line of both mappings, with
each flavor's real skill parameter (V1 `name`, V2 `id`), and mirror it
in docs/README.opencode.md. Skill prose keeps the prefix, which is
correct on Claude Code; the translation belongs in the harness mapping,
the same way the Hermes reference shows bare `skill_view("brainstorming")`.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
Windows (#2189)
GitHub Copilot on Windows (Copilot CLI and VS Code Copilot) runs a hook's
command through PowerShell and ignores shell:"bash". PowerShell parses
"<root>/hooks/run-hook.cmd" session-start as a string expression followed
by a bareword, fails with "Unexpected token 'session-start'", and the
using-superpowers bootstrap never reaches the session.
Copilot prefers a hook's powershell key over command when it is present, so
add one that runs the same wrapper with the & call operator. Claude Code
ignores the key and keeps dispatching command through Git Bash.
Verified on Windows 11 in a VM: Copilot CLI 1.0.103 logged the ParserError
and sent no bootstrap before the change, and ran the hook and sent the
bootstrap after it. Claude Code 2.1.308 ran the hook and sent the bootstrap
both before and after.
The new test in test-run-hook-cmd-windows.sh runs the hooks.json powershell
value through powershell.exe against a plugin root with a space in its path.
Co-authored-by: Tugrul Guner <tugrulguner@users.noreply.github.com>
Co-authored-by: Serge ARADJ <orty@users.noreply.github.com>
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
pre_llm_call returned the using-superpowers bootstrap whenever
is_first_turn was true. Hermes computes is_first_turn from an empty
conversation history, and a delegate_task child always starts empty, so
every child's first turn got the same 5.7k-char controller bootstrap as
the parent and had to rely on <SUBAGENT-STOP> to ignore it. Live Hermes
delegations on #2536 show children opening with skill_view / read_file on
Superpowers skills instead of their assigned work.
Hermes builds delegate_task children with platform="subagent"
(tools/delegate_tool.py) and forwards that as the hook's platform
argument, so gate injection on it. parent_session_id is not a safe
signal: Hermes also sets it on the continuation session it creates on
context compression.
Verified against a real Hermes install (hermes-agent 484de065) by running
its plugin discovery and agent.turn_context._collect_pre_llm_call_context
for a parent and a subagent first turn: 5757/5757 chars before, 5757/0
after.
Co-authored-by: Twot <twotnguyen@users.noreply.github.com>
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
The pi extension registered a resources_discover handler that returned
the whole skills/ directory. pi applies a package's `skills` filter
(the one `pi config` writes) only to manifest-declared resources;
paths an extension contributes are merged afterwards, unfiltered. So
with `"skills": []` or an allowlist on the superpowers package entry,
pi 0.85.1 still loaded all 15 skills, every one attributed to
extension:superpowers.
package.json already declares `pi.skills: ["./skills"]`, and pi loads
that with the user's filter applied, so the handler was redundant for
package installs, including the README's `pi -e /path/to/superpowers`.
Remove it. The bootstrap handlers are unchanged. The porting guide now
names the manifest as pi's discovery mechanism.
Verified against the real pi 0.85.1 CLI (RPC get_commands, no model
call): skills [] loads 0 (was 15), an allowlist of using-superpowers
loads 1 (was 15), no filter loads 15, `pi -e <checkout>` loads 15.
Fixes #2394
Co-authored-by: m2dumpling <224757904+m2dumpling@users.noreply.github.com>
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
|
|
On macOS, fs.watch (FSEvents) delivered events anywhere from ~100ms to
2.4s after the write on Node 26.10 / Darwin 27, and sometimes held an
event back to deliver it in a batch with a later one. The file-watching
tests slept a fixed 500ms, so they failed when an event came late, and a
late event from one test could trigger a reload or clear state/events
during another. Six tests failed on v7.0.0 and on dev, a different six
each run.
The tests now poll for the outcome with a 5s timeout, wait until the
server logs the exact screen event they caused, and drain in-flight
events with a barrier file before asserting that nothing reloaded or
that state/events survived. 15 consecutive runs pass; dropping the
server's .html/dotfile filter still fails both negative tests.
|
|
SKILL.md survives compaction (#2565)
After a compaction, Claude Code re-attaches each invoked skill truncated to
20,000 characters (#2481). SDD was 32,358, so everything from the fix loop
on (the five-round cap, the breaker, the ledger round line, the final
review's single fix wave, Finish) was gone for the rest of a long session.
One reported task ran 18 fix rounds after that.
Content SDD only needs at particular moments now lives in references/,
behind a pointer at the step that needs it: fix-loop.md (read before every
round), final-review.md (with Finish), handling-reports.md (non-DONE
statuses), resuming.md (an existing ledger), preflight.md (the conflict
scan before Task 1), batching.md, and cannot-verify.md. Those reads come
fresh from disk, so they don't depend on what survived compaction. The
Process graph shows the fix loop and final review as pointer nodes, and
the illustrative Example Workflow is gone. SKILL.md is 19,506 bytes.
tests/skill-size/test-skill-size.sh fails when any SKILL.md reaches 20,000
bytes. It still fails for writing-skills and executing-plans.
Claude-Session: https://claude.ai/code/session_01EgKgPPzKtNA2okiCmqb11F
|
|
- RELEASE-NOTES.md: v7.0.0 section covering everything on dev since v6.4.2,
led by the brainstorming rebuild (#2463, #2482, #2483)
- Bump all 11 declared manifests to 7.0.0; OpenCode pin examples point at #v7.0.0
- bump-version.sh --audit matches whole version strings only, so 7.0.0 no
longer matches inside 127.0.0.1
- test-render-graphs.sh resolves the real node binary so its empty-PATH case
works under version-manager shims (mise, asdf)
|
|
Add .antigravity-plugin/plugin.json with the Marketplace fields
(displayName, logo, suggestedPrompts, version, author), a logo rendered
from the Superpowers mark by scripts/render-antigravity-logo.sh, and a
.version-bump.json entry. The Codex sync excludes the manifest and logo.
With the native manifest, agy installs Superpowers as an Antigravity
plugin. Before, `agy plugin install <repo>` fell back to importing the
repo as a Gemini CLI extension and rejected the copied Claude-format hooks
file on every session.
Superpowers bootstraps through skill discovery: agy lists each installed
skill's description, and using-superpowers' "Use when starting any
conversation" gets the model to load it. agy has no session-start hook
event; a rules/ file would also load in Cursor, which reads plugin rules
from the same repo root; a PreInvocation hook runs on every model call.
Verified on agy 1.3.1 (Gemini 3.8 Flash) across 15 clean sessions:
brainstorming or systematic-debugging loads before any code.
|
|
Hermes lists plugin skills (skills_list) with the description given to
register_skill, which defaults to "". The plugin registered only a
name and path, so all fourteen superpowers skills appeared with blank
descriptions and the model had nothing to choose on. Read each
SKILL.md's description and pass it through.
From #2284 by @pepijn-blom.
Co-authored-by: pepijn-blom <322216308+pepijn-blom@users.noreply.github.com>
|
|
on Git Bash
|
|
On Windows, git rev-parse --show-toplevel prints C:/Users/... while
the script (and pwd) print /tmp/..., so nine assertions compared two
spellings of the same directory and failed. The script itself was
correct. Normalize the expected paths the same way the script's output
is produced.
From #2149 by @t0domanh.
Co-authored-by: t0domanh <3890425+t0domanh@users.noreply.github.com>
|
|
The lifecycle tests ran their helpers with `bash -lc`, so anything a
login profile prints landed in captured output (a path from mktemp,
the newest session dir) and broke the test. Plain `bash -c` keeps the
helpers independent of the user's shell setup. Fixes #2190.
From #2192 by @tugrulguner.
Co-authored-by: tugrulguner <47668043+tugrulguner@users.noreply.github.com>
|
|
Based on #2161. Also quotes the empty CDPATH so shellcheck passes (SC1007).
Co-authored-by: aruizcu1989 <192807317+aruizcu1989@users.noreply.github.com>
|
|
current directory, keeps exit codes (#2393)
Combines and supersedes #1864 and #2365. Fixes #1863.
Co-authored-by: citizen204 <161211652+citizen204@users.noreply.github.com>
Co-authored-by: KaiyiQuan <156817180+KaiyiQuan@users.noreply.github.com>
|
|
(#2349)
* fix(hooks): make SessionStart hooks resolve without external PATH lookups
SessionStart:startup hooks can run before Claude Code's PATH is repaired
(anthropics/claude-code#43127), or ahead of a sibling PATH-fixing hook in
the same startup batch. hooks/session-start and the Unix half of
hooks/run-hook.cmd both shelled out to dirname, cat, and a PATH lookup for
bash itself, so an empty PATH made every SessionStart hook fail outright:
hooks/session-start: line 7: dirname: command not found
hooks/session-start: line 44: cat: command not found
None of those external calls are necessary:
- ${0%/*} replaces $(dirname "$0") for both scripts.
- ${BASH:-bash} replaces a bare 'bash' in run-hook.cmd's exec — bash always
sets $BASH to its own absolute path once running, so no PATH lookup is
needed to re-invoke it.
- $(<file) (a bash builtin) replaces 'cat file' for reading the skill body.
- The trailing '| cat' after each printf branch was a no-op pass-through
through another external binary; removed.
Adds a regression test in tests/hooks/test-session-start.sh that invokes
both hooks under an empty PATH.
Fixes #2310.
* Split $0 on / or \ so cmd-dispatched hooks find the plugin root
run-hook.cmd's Windows half starts bash with a backslash path
(C:\...\hooks\session-start). ${0%/*} found no slash there, so
session-start resolved the wrong plugin root and injected 'Error
reading using-superpowers skill' instead of the skill. MSYS dirname
handled backslashes, so dev was fine. Seen on Windows 11 + Git Bash
5.2.37 via cmd /c run-hook.cmd session-start.
---------
Co-authored-by: Jesse Vincent <jesse@primeradiant.com>
|
|
nothing (#2388)
Under `set -euo pipefail`, task-done extracted the ledger's test-result
field with:
last=$(grep -v '^[[:space:]]*$' "$log" | tail -n 1)
When the test command passes but the log is empty or blank-only, `grep -v`
matches no lines and exits 1; pipefail propagates that through the
pipeline, and set -e aborts the assignment before the ledger line is
written. A passing task is then silently not recorded: exit 1, no stderr,
no ledger entry — indistinguishable from the failure path the guard exists
to produce.
Make the no-match case non-fatal, falling back to a literal placeholder for
the ledger field:
last=$(grep -v '^[[:space:]]*$' "$log" | tail -n 1) || last="(no output)"
The failure guard above this line (recording nothing when the test command
itself exits non-zero) is untouched.
Fixes #2385.
|
|
process.exit(1) ran inside the try, so the finally that kills the
spawned server never ran. The leftover server held port 3334 and the
next run died with 'preferred port is in use'. Set process.exitCode
instead so teardown runs.
|