Repository navigation
fix(brainstorming): use CLAUDE_PLUGIN_ROOT in visual companion script paths - #1264
jdavidrparra wants to merge 1 commit into
Conversation
… paths
Scripts were referenced as bare relative paths (scripts/start-server.sh)
which caused agents to look in the wrong directory. The server scripts
live in skills/brainstorming/scripts/ since the brainstorm-server was
moved there, so all references now use the full
${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/ prefix.
Fixes obra#1134
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
There was a problem hiding this comment.
Pull request overview
Updates the brainstorming visual companion guide to reference the correct on-disk locations for the companion server scripts after they moved under skills/brainstorming/scripts/, preventing agents from attempting to run non-existent top-level scripts/*.sh.
Changes:
- Replace
scripts/start-server.shinvocations with${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/start-server.shacross platform-specific launch examples. - Update cleanup instructions to call the corresponding
stop-server.shvia the same root. - Update reference links for
frame-template.htmlandhelper.jsto the new location.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```bash | ||
| # Start server with persistence (mockups saved to project) | ||
| scripts/start-server.sh --project-dir /path/to/project | ||
| ${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/start-server.sh --project-dir /path/to/project |
There was a problem hiding this comment.
The command paths use ${CLAUDE_PLUGIN_ROOT} unquoted. In bash, this will break if the plugin path contains spaces (a case already called out elsewhere in the repo). Wrap ${CLAUDE_PLUGIN_ROOT}/... in double quotes (and consider quoting --project-dir too if it may contain spaces).
| ${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/start-server.sh --project-dir /path/to/project | |
| "${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/start-server.sh" --project-dir "/path/to/project" |
| **Codex:** | ||
| ```bash | ||
| # Codex reaps background processes. The script auto-detects CODEX_CI and | ||
| # switches to foreground mode. Run it normally — no extra flags needed. | ||
| scripts/start-server.sh --project-dir /path/to/project | ||
| ${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/start-server.sh --project-dir /path/to/project | ||
| ``` | ||
|
|
||
| **Gemini CLI:** | ||
| ```bash | ||
| # Use --foreground and set is_background: true on your shell tool call | ||
| # so the process survives across turns | ||
| scripts/start-server.sh --project-dir /path/to/project --foreground | ||
| ${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/start-server.sh --project-dir /path/to/project --foreground | ||
| ``` |
There was a problem hiding this comment.
These Codex/Gemini examples now rely on ${CLAUDE_PLUGIN_ROOT}, but Codex install docs symlink skills into ~/.agents/skills/superpowers and don’t mention CLAUDE_PLUGIN_ROOT being set. If that env var isn’t present in those environments, the launch instructions will fail. Consider keeping ${CLAUDE_PLUGIN_ROOT} only for Claude Code, and using a Codex-safe path (e.g., ~/.agents/skills/superpowers/brainstorming/scripts/start-server.sh) and a Gemini-safe mechanism (documented extension root/env var) in their respective sections.
|
|
||
| ```bash | ||
| scripts/stop-server.sh $SESSION_DIR | ||
| ${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/stop-server.sh $SESSION_DIR |
There was a problem hiding this comment.
Cleanup command also hard-codes ${CLAUDE_PLUGIN_ROOT}. If you adjust start-server paths per platform (e.g., Codex/Gemini), this should be updated in parallel so stop-server is invokable in the same environments. Also quote the script path and $SESSION_DIR to avoid failures when paths contain spaces.
| ${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/stop-server.sh $SESSION_DIR | |
| PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:-${GEMINI_PLUGIN_ROOT}}}" | |
| "$PLUGIN_ROOT/skills/brainstorming/scripts/stop-server.sh" "$SESSION_DIR" |
| - Frame template (CSS reference): `${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/frame-template.html` | ||
| - Helper script (client-side): `${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/helper.js` |
There was a problem hiding this comment.
The reference paths now use ${CLAUDE_PLUGIN_ROOT}, which may not exist in non-Claude environments (Codex/Gemini). Since these are meant as file locations (not necessarily executable commands), consider using a platform-neutral relative path like skills/brainstorming/scripts/frame-template.html / .../helper.js, or documenting the equivalent root variable/path for each platform.
| - Frame template (CSS reference): `${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/frame-template.html` | |
| - Helper script (client-side): `${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/helper.js` | |
| - Frame template (CSS reference): `skills/brainstorming/scripts/frame-template.html` | |
| - Helper script (client-side): `skills/brainstorming/scripts/helper.js` |
|
We can't hardcode CLAUDE_PLUGIN_ROOT - that's Anthropic-only. Skill collateral is explicitly supposed to live relative to the skill. |
What problem are you trying to solve?
When an agent tries to start the visual companion server, it looks for
scripts/start-server.shrelative to an unspecified working directory. Since the scripts were moved fromlib/brainstorm-server/toskills/brainstorming/scripts/(per the agentskills.io spec), the barescripts/prefix no longer resolves correctly. Agents consistently try the top-levelscripts/directory (which only containsbump-version.shandsync-to-codex-plugin.sh), fail to findstart-server.sh, and give up — telling the user the visual companion is unavailable.This was reproduced on Claude Code (Windows + Git Bash) today and is tracked in issue #1134, which was filed the same day by another user experiencing the identical failure mode on macOS.
Exact failure sequence from both reports:
scripts/start-server.sh→ not foundls .../superpowers/5.0.7/scripts/→ sees only maintenance scriptsWhat does this PR change?
Replaces all bare
scripts/references invisual-companion.mdwith the full${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/path. Affectsstart-server.sh,stop-server.sh,frame-template.html, andhelper.jsreferences (9 lines total, 1 file).Is this change appropriate for the core library?
Yes. This is a documentation fix for a core skill that affects all users on all platforms. The bug causes a reliable failure for any agent following the visual companion guide as written.
What alternatives did you consider?
scripts/that delegates to the correct path — rejected, adds unnecessary indirection and a file to maintain.scripts/— rejected, the current location follows the agentskills.io spec and was an intentional architectural decision.visual-companion.mdwarning about the path — rejected, agents would still copy the wrong path from the code blocks below the note.Does this PR contain multiple unrelated changes?
No. Single file, single issue.
Existing PRs
Environment tested
Evaluation
start-server.sh${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/start-server.sh, server started correctly, session proceededRigor
superpowers:writing-skillsand completed adversarial pressure testing (paste results below)This is a path fix in code blocks, not behavior-shaping prose. No skill wording was changed.
Human review