Fix live server startup: read port/token from PID file after background start

The server is started with & (backgrounded), so its stdout output isn't
captured by the agent's Bash tool. The skill reference now tells the
agent to sleep 2s then cat the PID file (/tmp/impeccable-live.json) to
get the port and token. The PID file is written by the server as soon
as it starts listening.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Paul Bakaus
2026-04-13 10:37:45 -07:00
co-authored by Claude Opus 4.6
parent 0a1e5614e9
commit 4b52756edd
12 changed files with 48 additions and 24 deletions
@@ -7,11 +7,13 @@ Launch interactive live variant mode: select elements in the browser, pick a des
## Start the Server
1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation.
2. Start the live variant server:
2. Start the live variant server and read its connection info:
```bash
node {{scripts_path}}/live-server.mjs &
sleep 2
cat /tmp/impeccable-live.json
```
3. Note the **port** and **token** printed to stdout.
The JSON contains `port` and `token`. Use the port for the script tag below.
## Inject the Browser Script