From 48f6de841016fde7a1d1aacae3fb923698bc7da4 Mon Sep 17 00:00:00 2001 From: "ci[bot]" Date: Wed, 18 Mar 2026 16:02:32 +0000 Subject: [PATCH] :package: deps(skills): sync superpowers --- .../scripts/{server.js => server.cjs} | 0 .../brainstorming/scripts/start-server.sh | 10 +++++++-- .../skills/brainstorming/visual-companion.md | 19 +++++++++-------- codex/skills/writing-plans/SKILL.md | 21 +++++++++++-------- 4 files changed, 30 insertions(+), 20 deletions(-) rename codex/skills/brainstorming/scripts/{server.js => server.cjs} (100%) diff --git a/codex/skills/brainstorming/scripts/server.js b/codex/skills/brainstorming/scripts/server.cjs similarity index 100% rename from codex/skills/brainstorming/scripts/server.js rename to codex/skills/brainstorming/scripts/server.cjs diff --git a/codex/skills/brainstorming/scripts/start-server.sh b/codex/skills/brainstorming/scripts/start-server.sh index a60025c..a0ef299 100755 --- a/codex/skills/brainstorming/scripts/start-server.sh +++ b/codex/skills/brainstorming/scripts/start-server.sh @@ -106,16 +106,22 @@ if [[ -z "$OWNER_PID" || "$OWNER_PID" == "1" ]]; then OWNER_PID="$PPID" fi +# On Windows/MSYS2, the MSYS2 PID namespace is invisible to Node.js. +# Skip owner-PID monitoring — the 30-minute idle timeout prevents orphans. +case "${OSTYPE:-}" in + msys*|cygwin*|mingw*) OWNER_PID="" ;; +esac + # Foreground mode for environments that reap detached/background processes. if [[ "$FOREGROUND" == "true" ]]; then echo "$$" > "$PID_FILE" - env BRAINSTORM_DIR="$SCREEN_DIR" BRAINSTORM_HOST="$BIND_HOST" BRAINSTORM_URL_HOST="$URL_HOST" BRAINSTORM_OWNER_PID="$OWNER_PID" node server.js + env BRAINSTORM_DIR="$SCREEN_DIR" BRAINSTORM_HOST="$BIND_HOST" BRAINSTORM_URL_HOST="$URL_HOST" BRAINSTORM_OWNER_PID="$OWNER_PID" node server.cjs exit $? fi # Start server, capturing output to log file # Use nohup to survive shell exit; disown to remove from job table -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 & +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 & SERVER_PID=$! disown "$SERVER_PID" 2>/dev/null echo "$SERVER_PID" > "$PID_FILE" diff --git a/codex/skills/brainstorming/visual-companion.md b/codex/skills/brainstorming/visual-companion.md index 2c35d5d..537ed3c 100644 --- a/codex/skills/brainstorming/visual-companion.md +++ b/codex/skills/brainstorming/visual-companion.md @@ -48,12 +48,21 @@ Save `screen_dir` from the response. Tell user to open the URL. **Launching the server by platform:** -**Claude Code:** +**Claude Code (macOS / Linux):** ```bash # Default mode works — the script backgrounds the server itself scripts/start-server.sh --project-dir /path/to/project ``` +**Claude Code (Windows):** +```bash +# Windows auto-detects and uses foreground mode, which blocks the tool call. +# Use run_in_background: true on the Bash tool call so the server survives +# across conversation turns. +scripts/start-server.sh --project-dir /path/to/project +``` +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. + **Codex:** ```bash # Codex reaps background processes. The script auto-detects CODEX_CI and @@ -61,14 +70,6 @@ scripts/start-server.sh --project-dir /path/to/project scripts/start-server.sh --project-dir /path/to/project ``` -**Windows (Git Bash / CMD / PowerShell):** -```bash -# Windows/Git Bash reaps nohup background processes. The script auto-detects -# this via OSTYPE/MSYSTEM and switches to foreground mode automatically. -# No extra flags needed — all Windows shells route through Git Bash. -scripts/start-server.sh --project-dir /path/to/project -``` - **Gemini CLI:** ```bash # Use --foreground and set is_background: true on your shell tool call diff --git a/codex/skills/writing-plans/SKILL.md b/codex/skills/writing-plans/SKILL.md index 26bae9a..60f9834 100644 --- a/codex/skills/writing-plans/SKILL.md +++ b/codex/skills/writing-plans/SKILL.md @@ -49,7 +49,7 @@ This structure informs the task decomposition. Each task should produce self-con ```markdown # [Feature Name] Implementation Plan -> **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. +> **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. **Goal:** [One sentence describing what this builds] @@ -126,17 +126,20 @@ After writing the complete plan: ## Execution Handoff -After saving the plan: +After saving the plan, offer execution choice: -**"Plan complete and saved to `docs/superpowers/plans/.md`. Ready to execute?"** +**"Plan complete and saved to `docs/superpowers/plans/.md`. Two execution options:** -**Execution path depends on harness capabilities:** +**1. Subagent-Driven (recommended)** - I dispatch a fresh subagent per task, review between tasks, fast iteration -**If harness has subagents (Claude Code, etc.):** -- **REQUIRED:** Use superpowers:subagent-driven-development -- Do NOT offer a choice - subagent-driven is the standard approach +**2. Inline Execution** - Execute tasks in this session using executing-plans, batch execution with checkpoints + +**Which approach?"** + +**If Subagent-Driven chosen:** +- **REQUIRED SUB-SKILL:** Use superpowers:subagent-driven-development - Fresh subagent per task + two-stage review -**If harness does NOT have subagents:** -- Execute plan in current session using superpowers:executing-plans +**If Inline Execution chosen:** +- **REQUIRED SUB-SKILL:** Use superpowers:executing-plans - Batch execution with checkpoints for review