Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions skills/brainstorming/visual-companion.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The server watches a directory for HTML files and serves the newest one to the b

```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

# Returns: {"type":"server-started","port":52341,"url":"http://localhost:52341",
# "screen_dir":"/path/to/project/.superpowers/brainstorm/12345-1706000000/content",
Expand All @@ -51,8 +51,8 @@ Save `screen_dir` and `state_dir` from the response. Tell user to open the URL.

**Claude Code:**
```bash
# Default mode works — the script backgrounds the server itself.
scripts/start-server.sh --project-dir /path/to/project
# Start server with persistence (mockups saved to project)
${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/start-server.sh --project-dir /path/to/project
```

On Windows, the script auto-detects and switches to foreground mode (which blocks the tool call). Use `run_in_background: true` on the Bash tool call so the server survives across conversation turns, then read `$STATE_DIR/server-info` on the next turn to get the URL and port.
Expand All @@ -61,30 +61,30 @@ On Windows, the script auto-detects and switches to foreground mode (which block
```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
```

**Copilot CLI:**
```bash
# Use --foreground and start the server via the bash tool with mode: "async"
# so the process survives across turns. Capture the returned shellId for
# read_bash / stop_bash if you need to interact with it later.
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
```

**Other environments:** The server must keep running in the background across conversation turns. If your environment reaps detached processes, use `--foreground` and launch the command with your platform's background execution mechanism.

If the URL is unreachable from your browser (common in remote/containerized setups), bind a non-loopback host:

```bash
scripts/start-server.sh \
${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/start-server.sh \
--project-dir /path/to/project \
--host 0.0.0.0 \
--url-host localhost
Expand Down Expand Up @@ -277,12 +277,12 @@ If `$STATE_DIR/events` doesn't exist, the user didn't interact with the browser
## Cleaning Up

```bash
scripts/stop-server.sh $SESSION_DIR
${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/scripts/stop-server.sh $SESSION_DIR
```

If the session used `--project-dir`, mockup files persist in `.superpowers/brainstorm/` for later reference. Only `/tmp` sessions get deleted on stop.

## Reference

- Frame template (CSS reference): `scripts/frame-template.html`
- Helper script (client-side): `scripts/helper.js`
- 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`