feat(brainstorming): Alpine-driven interactive visual companion (SUP-215)#1639
Draft
arittr wants to merge 1 commit into
Draft
feat(brainstorming): Alpine-driven interactive visual companion (SUP-215)#1639arittr wants to merge 1 commit into
arittr wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem are you trying to solve?
The visual companion serves HTML mockups for brainstorming, but in practice it treats most screens as static visuals with optional
[data-choice]clicks. When the interaction itself is the design question — tabs, accordions, modals, wizard next/back, simple add/remove forms, lightweight validation — agents burn tokens hand-rolling JavaScript scaffolding inline, or punt and describe the interaction in prose. The brainstorming sessions where I've hit this most are UI flows where you can't really tell whether the layout works until you can poke at it. The mockups end up either over-elaborate (a full bespoke script per screen) or under-informative (a static screenshot of one tab).A specific example: working through a meal-planner mockup, agents wrote ~40 lines of vanilla JS each screen to wire up the tab switch between "Week" and "Grocery list" views, then re-wrote a near-identical block to manage an editable list. That's not surfacing design tradeoffs; it's framework code the agent is reinventing every screen.
What does this PR change?
Vendors Alpine.js 3.15.12 (MIT) into
skills/brainstorming/scripts/vendor/and wires the brainstorm server's frame template to auto-load it for content fragments (full-document screens are unchanged). Updatesvisual-companion.mdto teach agents when Alpine is and isn't appropriate, and to keep[data-choice]reserved for deliberate A/B/C selection events. Adds provenance + a third-party notice for the vendored artifact. Extends the codex-plugin sync script + its test fixture so vendored files flow into the mirrored plugin.Is this change appropriate for the core library?
This is the project's standing third-party rule (
Superpowers is a zero-dependency plugin by design) deliberately overridden for one local, browser-only vendored artifact in the visual companion runtime — approved as the V1 scope of SUP-215. The design doc atdocs/superpowers/specs/2026-05-08-visual-companion-alpine-design.mdcalls this out explicitly:Why this belongs in core rather than a plugin:
localhostinside the existing companion process.The PR is consciously cut from a clean branch (
origin/dev..HEADis exactly this one commit) per the design doc's instruction not to land SUP-215 alongside unrelated eval/migration changes.What alternatives did you consider?
From the design doc, in order of how seriously they were weighed:
data-toggle/data-tabdirectives. It quickly drifts into a Superpowers-specific mini-framework that agents must learn and that we have to evolve. We'd be reinventing Alpine, badly.Does this PR contain multiple unrelated changes?
No. One feature: Alpine support in the visual companion (SUP-215). Everything in the diff is either the vendored artifact, the server/template/skill changes that consume it, tests covering the new behavior, or the sync-script changes needed to ship the vendored file through the codex-plugin mirror.
Existing PRs
Reverts "Make visual-companion.md script paths skill-rooted, not plugin-rooted"is already indev.No prior attempt to add interactive mockups was found.
Environment tested
Both relevant test suites pass on macOS 25.4 (darwin arm64, bash 5 via homebrew for the codex-sync test):
tests/brainstorm-server/server.test.js— 34/34 pass, including new assertions: vendored Alpine provenance hash, frame wrap preserves Alpine attributes, waiting page does not inject Alpine, vendor route allowlist rejects non-allowlisted paths.tests/codex-plugin-sync/test-sync-to-codex-plugin.sh— all assertions pass, including new vendored-section assertions on the generated sync PR body (vendored Alpine path, package/version, approval artifact, license notice path, provenance path, SHA256) and round-trip preservation of vendored files in a clean no-op apply.The mockups themselves were exercised in a brainstorming session via Claude Code with Opus 4.7; tabs/toggles/forms/lists rendered and behaved correctly,
[data-choice]still produced selection events instate/events, and terminal feedback remained the source of truth.New harness support (required if this PR adds a new harness)
N/A. No new harness.
Notes for reviewers
||||||| parent of …block you may see referenced elsewhere is gone. An earlier rebase landed unresolved 3-way conflict markers intotests/codex-plugin-sync/test-sync-to-codex-plugin.sh. The committed file now resolves them by keeping both sides (hooks + vendor paths are independent additions). Both test suites pass against the resolved file.[data-choice]selection semantics are unchanged. Ordinary Alpine interactions (tabs, toggles, forms) are intentionally not recorded as choice events; terminal feedback remains primary. Skill text and example all reinforce this.