summaryrefslogtreecommitdiff
path: root/lib/brainstorm-server
AgeCommit message (Collapse)Author
2026-01-17Use semantic filenames for visual companion screensJesse Vincent
Server now watches directory for new .html files instead of a single screen file. Claude writes to semantically named files like platform.html, style.html, layout.html - each screen is a new file. Benefits: - No need to read before write (files are always new) - Semantic filenames describe what's on screen - History preserved in directory for debugging - Server serves newest file by mtime automatically Updated: index.js, start-server.sh, and all documentation.
2026-01-17refactor: simplify visual companion workflow, improve guidanceJesse Vincent
Scripts: - Rename show-and-wait.sh -> wait-for-feedback.sh (just waits, no HTML piping) - Remove wait-for-event.sh (used hanging tail -f) - Workflow now: Write tool for HTML, wait-for-feedback.sh to block Documentation rewrite: - Broader "when to use" (UI, architecture, complex choices, spatial) - Always ask user first before starting - Scale fidelity to the question being asked - Explain the question on each page - Iterate before moving on - validate changes address feedback - Use real content (Unsplash images) when it matters
2026-01-17feat: add show-and-wait.sh helper, fix race conditionJesse Vincent
- New show-and-wait.sh combines write + wait into one command - Uses polling instead of tail -f (which hangs on macOS) - Docs updated: start watcher BEFORE writing screen to avoid race - Reduces terminal noise by consolidating operations
2026-01-17fix: session isolation and blocking wait for visual companionJesse Vincent
- Each session gets unique temp directory (/tmp/brainstorm-{pid}-{timestamp}) - Server outputs screen_dir and screen_file in startup JSON - stop-server.sh takes screen_dir arg and cleans up session directory - Document blocking TaskOutput pattern: 10-min timeouts, retry up to 3x, then prompt user "let me know when you want to continue"
2026-01-17feat: add visual companion for brainstorming skillJesse Vincent
Adds browser-based mockup display to replace ASCII art during brainstorming sessions. Key components: - Frame template with OS-aware light/dark theming - CSS helpers for options, cards, mockups, split views - Server lifecycle scripts (start/stop with random high port) - Event watcher using tail+grep for feedback loop - Claude instructions for using the visual companion The skill now asks users if they want browser mockups and only runs in Claude Code environments.
2026-01-17feat: add sendToClaude helper and wait-for-event toolJesse Vincent
- Add sendToClaude() function to browser helper that shows confirmation - Add wait-for-event.sh script for watching server output (tail -f | grep -m 1) - Enables clean event-driven loop: background bash waits for event, completion triggers Claude's turn
2026-01-17fix: preserve original event type, use source field for wrapperJesse Vincent
2026-01-17fix: ensure user-event type is preserved in WebSocket message outputJesse Vincent
The spread operator order was causing incoming event types to overwrite the user-event type marker.
2026-01-17feat: add browser helper library for event captureJesse Vincent
2026-01-17feat: add brainstorm server foundationJesse Vincent
Create the initial server for the visual brainstorming companion: - Express server with WebSocket support for browser communication - File watcher (chokidar) to detect screen.html changes - Auto-injects helper.js into served HTML for event capture - Binds to localhost only (127.0.0.1) for security - Outputs JSON events to stdout for Claude consumption