Skip to content

Commit 7e51643

Browse files
committed
Merge branch 'dev' for v5.0.5 release
2 parents 3cee13e + 8a0a5ca commit 7e51643

File tree

11 files changed

+402
-36
lines changed

11 files changed

+402
-36
lines changed

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{
1010
"name": "superpowers",
1111
"description": "Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques",
12-
"version": "5.0.4",
12+
"version": "5.0.5",
1313
"source": "./",
1414
"author": {
1515
"name": "Jesse Vincent",

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "superpowers",
33
"description": "Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques",
4-
"version": "5.0.4",
4+
"version": "5.0.5",
55
"author": {
66
"name": "Jesse Vincent",
77
"email": "jesse@fsck.com"

CHANGELOG.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
# Changelog
22

3-
## Unreleased
3+
## [5.0.5] - 2026-03-17
44

55
### Fixed
66

7-
- **Brainstorm server on Windows**: Auto-detect Windows/Git Bash (`OSTYPE=msys*`, `MSYSTEM`) and switch to foreground mode, fixing silent server failure caused by `nohup`/`disown` process reaping. Applies to all Windows shells (CMD, PowerShell, Git Bash) since they all route through Git Bash. ([#737](https://github.com/obra/superpowers/issues/737), based on [#740](https://github.com/obra/superpowers/pull/740))
8-
- **Portable shebangs**: Replace `#!/bin/bash` with `#!/usr/bin/env bash` in all 13 shell scripts. Fixes execution on NixOS, FreeBSD, and macOS with Homebrew bash where `/bin/bash` is outdated or missing. ([#700](https://github.com/obra/superpowers/pull/700), dupes: [#747](https://github.com/obra/superpowers/pull/747))
9-
- **POSIX-safe hook script**: Replace `${BASH_SOURCE[0]:-$0}` with `$0` in `hooks/session-start` and polyglot-hooks docs. Fixes 'Bad substitution' error on Ubuntu/Debian where `/bin/sh` is dash. ([#553](https://github.com/obra/superpowers/pull/553))
10-
- **Bash 5.3+ hook hang**: Replace heredoc (`cat <<EOF`) with `printf` in `hooks/session-start`. Fixes indefinite hang on macOS with Homebrew bash 5.3+ caused by a bash regression with large variable expansion in heredocs. ([#572](https://github.com/obra/superpowers/pull/572), [#571](https://github.com/obra/superpowers/issues/571))
11-
- **Cursor hooks support**: Add `hooks/hooks-cursor.json` with Cursor's camelCase format (`sessionStart`, `version: 1`) and update `.cursor-plugin/plugin.json` to reference it. Fix platform detection in `session-start` to check `CURSOR_PLUGIN_ROOT` first (Cursor may also set `CLAUDE_PLUGIN_ROOT`). (Based on [#709](https://github.com/obra/superpowers/pull/709))
7+
- **Brainstorm server ESM fix**: Renamed `server.js``server.cjs` so the brainstorming server starts correctly on Node.js 22+ where the root `package.json` `"type": "module"` caused `require()` to fail. ([PR #784](https://github.com/obra/superpowers/pull/784) by @sarbojitrana, fixes [#774](https://github.com/obra/superpowers/issues/774), [#780](https://github.com/obra/superpowers/issues/780), [#783](https://github.com/obra/superpowers/issues/783))
8+
- **Brainstorm owner-PID on Windows**: Skip `BRAINSTORM_OWNER_PID` lifecycle monitoring on Windows/MSYS2 where the PID namespace is invisible to Node.js. Prevents the server from self-terminating after 60 seconds. The 30-minute idle timeout remains as the safety net. ([#770](https://github.com/obra/superpowers/issues/770), docs from [PR #768](https://github.com/obra/superpowers/pull/768) by @lucasyhzhu-debug)
9+
- **stop-server.sh reliability**: Verify the server process actually died before reporting success. Waits up to 2 seconds for graceful shutdown, escalates to `SIGKILL`, and reports failure if the process survives. ([#723](https://github.com/obra/superpowers/issues/723))
1210

13-
### Already fixed on dev (closed PRs)
11+
### Changed
1412

15-
- **Windows hook quoting** ([#630](https://github.com/obra/superpowers/pull/630), [#529](https://github.com/obra/superpowers/issues/529)): `hooks.json` already uses escaped double quotes on dev.
16-
- **Windows symlink path** ([#539](https://github.com/obra/superpowers/pull/539)): Closed — the PR introduced a bug (literal `~` in path alongside `$env:USERPROFILE`). Current docs are correct.
17-
18-
### Known Issues
19-
20-
- **`BRAINSTORM_OWNER_PID` on Windows (main branch only)**: The main branch's `server.js` uses `process.kill(OWNER_PID, 0)` for lifecycle checks, but receives MSYS2 PIDs which are invisible to Node.js (different PID namespace). This causes the server to self-terminate after 60 seconds. Fix: resolve `OWNER_PID` via `/proc/$PPID/winpid` to get the Windows-native PID. The dev branch's `index.js` does not have this issue since it has no OWNER_PID lifecycle check.
13+
- **Execution handoff**: Restore user choice between subagent-driven-development and executing-plans after plan writing. Subagent-driven is recommended but no longer mandatory. (Reverts `5e51c3e`)

RELEASE-NOTES.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Superpowers Release Notes
22

3+
## v5.0.5 (2026-03-17)
4+
5+
### Bug Fixes
6+
7+
- **Brainstorm server ESM fix** — renamed `server.js``server.cjs` so the brainstorming server starts correctly on Node.js 22+ where the root `package.json` `"type": "module"` caused `require()` to fail. (PR #784 by @sarbojitrana, fixes #774, #780, #783)
8+
- **Brainstorm owner-PID on Windows** — skip PID lifecycle monitoring on Windows/MSYS2 where the PID namespace is invisible to Node.js, preventing the server from self-terminating after 60 seconds. (#770, docs from PR #768 by @lucasyhzlu-debug)
9+
- **stop-server.sh reliability** — verify the server process actually died before reporting success. SIGTERM + 2s wait + SIGKILL fallback. (#723)
10+
11+
### Changed
12+
13+
- **Execution handoff** — restore user choice between subagent-driven and inline execution after plan writing. Subagent-driven is recommended but no longer mandatory.
14+
315
## v5.0.4 (2026-03-16)
416

517
### Review Loop Refinements

skills/brainstorming/scripts/start-server.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,22 @@ if [[ -z "$OWNER_PID" || "$OWNER_PID" == "1" ]]; then
106106
OWNER_PID="$PPID"
107107
fi
108108

109+
# On Windows/MSYS2, the MSYS2 PID namespace is invisible to Node.js.
110+
# Skip owner-PID monitoring — the 30-minute idle timeout prevents orphans.
111+
case "${OSTYPE:-}" in
112+
msys*|cygwin*|mingw*) OWNER_PID="" ;;
113+
esac
114+
109115
# Foreground mode for environments that reap detached/background processes.
110116
if [[ "$FOREGROUND" == "true" ]]; then
111117
echo "$$" > "$PID_FILE"
112-
env BRAINSTORM_DIR="$SCREEN_DIR" BRAINSTORM_HOST="$BIND_HOST" BRAINSTORM_URL_HOST="$URL_HOST" BRAINSTORM_OWNER_PID="$OWNER_PID" node server.js
118+
env BRAINSTORM_DIR="$SCREEN_DIR" BRAINSTORM_HOST="$BIND_HOST" BRAINSTORM_URL_HOST="$URL_HOST" BRAINSTORM_OWNER_PID="$OWNER_PID" node server.cjs
113119
exit $?
114120
fi
115121

116122
# Start server, capturing output to log file
117123
# Use nohup to survive shell exit; disown to remove from job table
118-
nohup env BRAINSTORM_DIR="$SCREEN_DIR" BRAINSTORM_HOST="$BIND_HOST" BRAINSTORM_URL_HOST="$URL_HOST" BRAINSTORM_OWNER_PID="$OWNER_PID" node server.js > "$LOG_FILE" 2>&1 &
124+
nohup env BRAINSTORM_DIR="$SCREEN_DIR" BRAINSTORM_HOST="$BIND_HOST" BRAINSTORM_URL_HOST="$URL_HOST" BRAINSTORM_OWNER_PID="$OWNER_PID" node server.cjs > "$LOG_FILE" 2>&1 &
119125
SERVER_PID=$!
120126
disown "$SERVER_PID" 2>/dev/null
121127
echo "$SERVER_PID" > "$PID_FILE"

skills/brainstorming/visual-companion.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,25 @@ Save `screen_dir` from the response. Tell user to open the URL.
4848

4949
**Launching the server by platform:**
5050

51-
**Claude Code:**
51+
**Claude Code (macOS / Linux):**
5252
```bash
5353
# Default mode works — the script backgrounds the server itself
5454
scripts/start-server.sh --project-dir /path/to/project
5555
```
5656

57-
**Codex:**
57+
**Claude Code (Windows):**
5858
```bash
59-
# Codex reaps background processes. The script auto-detects CODEX_CI and
60-
# switches to foreground mode. Run it normally — no extra flags needed.
59+
# Windows auto-detects and uses foreground mode, which blocks the tool call.
60+
# Use run_in_background: true on the Bash tool call so the server survives
61+
# across conversation turns.
6162
scripts/start-server.sh --project-dir /path/to/project
6263
```
64+
When calling this via the Bash tool, set `run_in_background: true`. Then read `$SCREEN_DIR/.server-info` on the next turn to get the URL and port.
6365

64-
**Windows (Git Bash / CMD / PowerShell):**
66+
**Codex:**
6567
```bash
66-
# Windows/Git Bash reaps nohup background processes. The script auto-detects
67-
# this via OSTYPE/MSYSTEM and switches to foreground mode automatically.
68-
# No extra flags needed — all Windows shells route through Git Bash.
68+
# Codex reaps background processes. The script auto-detects CODEX_CI and
69+
# switches to foreground mode. Run it normally — no extra flags needed.
6970
scripts/start-server.sh --project-dir /path/to/project
7071
```
7172

skills/writing-plans/SKILL.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ This structure informs the task decomposition. Each task should produce self-con
4949
```markdown
5050
# [Feature Name] Implementation Plan
5151

52-
> **For agentic workers:** REQUIRED: Use superpowers:subagent-driven-development (if subagents available) or superpowers:executing-plans to implement this plan. Steps use checkbox (`- [ ]`) syntax for tracking.
52+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
5353
5454
**Goal:** [One sentence describing what this builds]
5555

@@ -126,17 +126,20 @@ After writing the complete plan:
126126

127127
## Execution Handoff
128128

129-
After saving the plan:
129+
After saving the plan, offer execution choice:
130130

131-
**"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Ready to execute?"**
131+
**"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Two execution options:**
132132

133-
**Execution path depends on harness capabilities:**
133+
**1. Subagent-Driven (recommended)** - I dispatch a fresh subagent per task, review between tasks, fast iteration
134134

135-
**If harness has subagents (Claude Code, etc.):**
136-
- **REQUIRED:** Use superpowers:subagent-driven-development
137-
- Do NOT offer a choice - subagent-driven is the standard approach
135+
**2. Inline Execution** - Execute tasks in this session using executing-plans, batch execution with checkpoints
136+
137+
**Which approach?"**
138+
139+
**If Subagent-Driven chosen:**
140+
- **REQUIRED SUB-SKILL:** Use superpowers:subagent-driven-development
138141
- Fresh subagent per task + two-stage review
139142

140-
**If harness does NOT have subagents:**
141-
- Execute plan in current session using superpowers:executing-plans
143+
**If Inline Execution chosen:**
144+
- **REQUIRED SUB-SKILL:** Use superpowers:executing-plans
142145
- Batch execution with checkpoints for review

tests/brainstorm-server/server.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const fs = require('fs');
1515
const path = require('path');
1616
const assert = require('assert');
1717

18-
const SERVER_PATH = path.join(__dirname, '../../skills/brainstorming/scripts/server.js');
18+
const SERVER_PATH = path.join(__dirname, '../../skills/brainstorming/scripts/server.cjs');
1919
const TEST_PORT = 3334;
2020
const TEST_DIR = '/tmp/brainstorm-test';
2121

0 commit comments

Comments
 (0)