<feed xmlns='http://www.w3.org/2005/Atom'>
<title>superpowers.git/hooks, branch fix/wave1-harness-adapters</title>
<subtitle>Agentic skills framework and development workflow
</subtitle>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/'/>
<entry>
<title>fix(hooks): return session-start's read comment to dev's text, correcting its || true clause</title>
<updated>2026-11-26T08:38:47+00:00</updated>
<author>
<name>Drew Ritter</name>
<email>drew@primeradiant.com</email>
</author>
<published>2026-11-26T08:38:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=3cad9e246314d52dcff002668cdbfceadd80a993'/>
<id>3cad9e246314d52dcff002668cdbfceadd80a993</id>
<content type='text'>
The POSIX rewrite replaced the whole three-line comment above the block
that reads using-superpowers/SKILL.md, though most of it is still true
of the new code: the content is read with the read builtin, with no cat
(for the same PATH-independence reason as dirname above) and no $(&lt; file)
subshell, read returns 1 at end of file, and the loop drops trailing
newlines as $(&lt; file) did. Only "hence || true" became false: the read
now sits in a while condition, and its || is || [ -n "$line" ], which
keeps a last line that has no trailing newline. Return dev's lines with
that one change, rewrapping the last line.

Checked: read returns 1 at end of file under bash, dash, zsh and /bin/sh,
including after reading a final line with no newline; and on skill files
with trailing blank lines, no final newline, or nothing at all, the hook
prints the same bytes as dev's. Comment-only: session-start's stdout
under bash is byte-identical before and after, and to dev's, for the
Cursor, Claude Code, Copilot CLI, Muse and no-platform branches.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The POSIX rewrite replaced the whole three-line comment above the block
that reads using-superpowers/SKILL.md, though most of it is still true
of the new code: the content is read with the read builtin, with no cat
(for the same PATH-independence reason as dirname above) and no $(&lt; file)
subshell, read returns 1 at end of file, and the loop drops trailing
newlines as $(&lt; file) did. Only "hence || true" became false: the read
now sits in a while condition, and its || is || [ -n "$line" ], which
keeps a last line that has no trailing newline. Return dev's lines with
that one change, rewrapping the last line.

Checked: read returns 1 at end of file under bash, dash, zsh and /bin/sh,
including after reading a final line with no newline; and on skill files
with trailing blank lines, no final newline, or nothing at all, the hook
prints the same bytes as dev's. Comment-only: session-start's stdout
under bash is byte-identical before and after, and to dev's, for the
Cursor, Claude Code, Copilot CLI, Muse and no-platform branches.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(hooks): restore session-start's output comments and keep heredocs out of the hooks</title>
<updated>2026-11-25T08:41:51+00:00</updated>
<author>
<name>Drew Ritter</name>
<email>drew@primeradiant.com</email>
</author>
<published>2026-11-25T08:41:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=64dbc15cf25a16564e61139dd07d97b0735bd4f8'/>
<id>64dbc15cf25a16564e61139dd07d97b0735bd4f8</id>
<content type='text'>
The POSIX rewrite cut the comment block above emit_json to one line,
though the code under it did not change. The block says why each
platform gets exactly one field, why output is built with printf rather
than a heredoc (#571), and why emit_json absorbs EPIPE (#1612); that last
part exists because contributors kept removing the guard as noise.
Restore dev's block with three corrections: the Muse line names the
nested form the Muse branch emits, the heredoc hang starts at bash 5.1
rather than 5.3, and the script runs under set -eu, not set -euo
pipefail.

Nothing else kept a heredoc out of either hook file. Add heredocs to the
hook-author Avoid list in polyglot-hooks.md, and a test that fails if
run-hook.cmd or session-start has `&lt;&lt;` on a line that is not a # or REM
comment. The test fails against dev's run-hook.cmd.

session-start prints the same bytes as on dev under bash for the Cursor,
Claude Code, Copilot CLI, Muse and no-platform branches.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The POSIX rewrite cut the comment block above emit_json to one line,
though the code under it did not change. The block says why each
platform gets exactly one field, why output is built with printf rather
than a heredoc (#571), and why emit_json absorbs EPIPE (#1612); that last
part exists because contributors kept removing the guard as noise.
Restore dev's block with three corrections: the Muse line names the
nested form the Muse branch emits, the heredoc hang starts at bash 5.1
rather than 5.3, and the script runs under set -eu, not set -euo
pipefail.

Nothing else kept a heredoc out of either hook file. Add heredocs to the
hook-author Avoid list in polyglot-hooks.md, and a test that fails if
run-hook.cmd or session-start has `&lt;&lt;` on a line that is not a # or REM
comment. The test fails against dev's run-hook.cmd.

session-start prints the same bytes as on dev under bash for the Cursor,
Claude Code, Copilot CLI, Muse and no-platform branches.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(hooks): return the wrapper's REM comments, the fork note and four doc passages to dev's text where no issue requires a change</title>
<updated>2026-11-25T08:40:03+00:00</updated>
<author>
<name>Drew Ritter</name>
<email>drew@primeradiant.com</email>
</author>
<published>2026-11-25T08:40:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=59c1f8472a18c42f6ec605c41201b7a903629abc'/>
<id>59c1f8472a18c42f6ec605c41201b7a903629abc</id>
<content type='text'>
Removing the heredoc and adding the POSIX sh fallback need none of these
edits:

- hooks/run-hook.cmd: every REM block below @echo off returns, so the
  batch half reads as it does on dev; each block still describes the
  batch code beside it. The pointer line that replaced the header goes
  with them. Only the four :; lines sit above @echo off.
- hooks/session-start: the note on forks returns, with "in this script"
  narrowed to "under bash", because the non-bash path now forks once to
  get a carriage return.
- docs/porting-to-a-new-harness.md: the Windows sentence of Part 7
  returns. Only the Unix sentence, false once the heredoc is gone, keeps
  the new text.
- docs/windows/polyglot-hooks.md: the WSL-launcher sentence, the "Silent
  exit on no-bash" row, the hook-script sentence and the backticks bullet
  return. The for-variable modifier fact from the wrapper's REM block
  follows the launcher sentence as a sentence of its own.

session-start prints the same bytes as on dev under bash for the Cursor,
Claude Code, Copilot CLI, Muse and no-platform branches.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removing the heredoc and adding the POSIX sh fallback need none of these
edits:

- hooks/run-hook.cmd: every REM block below @echo off returns, so the
  batch half reads as it does on dev; each block still describes the
  batch code beside it. The pointer line that replaced the header goes
  with them. Only the four :; lines sit above @echo off.
- hooks/session-start: the note on forks returns, with "in this script"
  narrowed to "under bash", because the non-bash path now forks once to
  get a carriage return.
- docs/porting-to-a-new-harness.md: the Windows sentence of Part 7
  returns. Only the Unix sentence, false once the heredoc is gone, keeps
  the new text.
- docs/windows/polyglot-hooks.md: the WSL-launcher sentence, the "Silent
  exit on no-bash" row, the hook-script sentence and the backticks bullet
  return. The for-variable modifier fact from the wrapper's REM block
  follows the launcher sentence as a sentence of its own.

session-start prints the same bytes as on dev under bash for the Cursor,
Claude Code, Copilot CLI, Muse and no-platform branches.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(hooks): remove run-hook.cmd heredoc and support POSIX sh/ash in session-start</title>
<updated>2026-11-24T23:58:12+00:00</updated>
<author>
<name>Drew Ritter</name>
<email>drew@primeradiant.com</email>
</author>
<published>2026-11-24T23:58:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=744f8620d357ceb122d4b05e07a2123f0aa7f7d8'/>
<id>744f8620d357ceb122d4b05e07a2123f0aa7f7d8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #2594 from obra/fix/2503-run-hook-no-bash</title>
<updated>2026-10-22T22:05:26+00:00</updated>
<author>
<name>Drew Ritter</name>
<email>drew@ritter.dev</email>
</author>
<published>2026-10-22T22:05:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=7e2e91942b26418f0e1bb506f952288f4187c70b'/>
<id>7e2e91942b26418f0e1bb506f952288f4187c70b</id>
<content type='text'>
fix(hooks): fall back to zsh, or exit quietly, when bash is missing on Unix (#2503)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix(hooks): fall back to zsh, or exit quietly, when bash is missing on Unix (#2503)</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #2593 from obra/fix/2081-session-start-forks</title>
<updated>2026-10-22T22:04:15+00:00</updated>
<author>
<name>Drew Ritter</name>
<email>drew@ritter.dev</email>
</author>
<published>2026-10-22T22:04:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=4a2a185a37ddf186e79749b4a95b4f11242be882'/>
<id>4a2a185a37ddf186e79749b4a95b4f11242be882</id>
<content type='text'>
fix(hooks): start no child processes in the SessionStart hook (#2081)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix(hooks): start no child processes in the SessionStart hook (#2081)</pre>
</div>
</content>
</entry>
<entry>
<title>fix(hooks): fall back to zsh, or exit quietly, when bash is missing on Unix (#2503)</title>
<updated>2026-10-22T21:19:08+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2026-10-22T21:19:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=3cbe5575758e409ac083c694cfc45ccfde50c0cd'/>
<id>3cbe5575758e409ac083c694cfc45ccfde50c0cd</id>
<content type='text'>
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 &lt;twotnguyen@users.noreply.github.com&gt;
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;twotnguyen@users.noreply.github.com&gt;
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(hooks): start no child processes in the SessionStart hook (#2081)</title>
<updated>2026-10-22T21:16:09+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2026-10-22T21:16:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=328685babd94e11910516025dee12e32a6d49de1'/>
<id>328685babd94e11910516025dee12e32a6d49de1</id>
<content type='text'>
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 ... &amp;&amp; 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&gt;/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 &lt;willowite@users.noreply.github.com&gt;
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 ... &amp;&amp; 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&gt;/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 &lt;willowite@users.noreply.github.com&gt;
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(hooks): add a powershell form of the SessionStart command for Copilot on Windows (#2189)</title>
<updated>2026-10-22T20:56:46+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2026-10-22T20:56:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=0a4d60db4faf3628abc3e6be4fc3e1a0697c69de'/>
<id>0a4d60db4faf3628abc3e6be4fc3e1a0697c69de</id>
<content type='text'>
GitHub Copilot on Windows (Copilot CLI and VS Code Copilot) runs a hook's
command through PowerShell and ignores shell:"bash". PowerShell parses
"&lt;root&gt;/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 &amp; 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 &lt;tugrulguner@users.noreply.github.com&gt;
Co-authored-by: Serge ARADJ &lt;orty@users.noreply.github.com&gt;
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GitHub Copilot on Windows (Copilot CLI and VS Code Copilot) runs a hook's
command through PowerShell and ignores shell:"bash". PowerShell parses
"&lt;root&gt;/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 &amp; 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 &lt;tugrulguner@users.noreply.github.com&gt;
Co-authored-by: Serge ARADJ &lt;orty@users.noreply.github.com&gt;
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(hooks): run-hook.cmd finds per-user Git, skips WSL launchers and the current directory, keeps exit codes (#2393)</title>
<updated>2026-09-26T20:14:36+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@primeradiant.com</email>
</author>
<published>2026-09-26T20:14:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=35ce9493c912e8981cb5b76ffa7ceba5aed74530'/>
<id>35ce9493c912e8981cb5b76ffa7ceba5aed74530</id>
<content type='text'>
Combines and supersedes #1864 and #2365. Fixes #1863.

Co-authored-by: citizen204 &lt;161211652+citizen204@users.noreply.github.com&gt;
Co-authored-by: KaiyiQuan &lt;156817180+KaiyiQuan@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Combines and supersedes #1864 and #2365. Fixes #1863.

Co-authored-by: citizen204 &lt;161211652+citizen204@users.noreply.github.com&gt;
Co-authored-by: KaiyiQuan &lt;156817180+KaiyiQuan@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
</feed>
