Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
7d126f3
feat: add chat history loading skeleton
Waterkyuu Apr 8, 2026
8877e29
feat: collapse tool call details by default
Waterkyuu Apr 8, 2026
7f674d8
feat: add data workspace panel and file analysis pipeline
Waterkyuu Apr 9, 2026
ce52b52
feat: add cleaned dataset export flow
Waterkyuu Apr 9, 2026
326eb0a
feat: persist chart artifacts from analysis
Waterkyuu Apr 9, 2026
af87cfe
fix: fix zh.json
Waterkyuu Apr 10, 2026
781c20f
refactor: extract chat agent prompts and tools
Waterkyuu Apr 10, 2026
074d158
chore: delete unused code
Waterkyuu Apr 10, 2026
df3cad5
fix: keep home uploads for first chat message
Waterkyuu Apr 10, 2026
2ace3a8
feat: show message attachments in chat workspace
Waterkyuu Apr 10, 2026
f69d892
refactor: use Record lookup instead of if-else for tool state icon an…
Waterkyuu Apr 10, 2026
c273f65
refactor(chat): split message item into dedicated components
Waterkyuu Apr 11, 2026
1133f58
fix: fix user message postion
Waterkyuu Apr 11, 2026
3bce9f1
style(chat): vertically center content in assistant message bubbles
Waterkyuu Apr 11, 2026
3a0c931
refactor: render assistant message parts in original order instead of…
Waterkyuu Apr 11, 2026
776efb3
feat(chat): add markdown rendering for assistant message content
Waterkyuu Apr 11, 2026
87ddda5
fix: persist chat attachment metadata
Waterkyuu Apr 11, 2026
8cafc45
refactor(api): update route handlers to use proper NextRequest type
Waterkyuu Apr 11, 2026
3f05f09
feat: improve chat auto scroll behavior
Waterkyuu Apr 11, 2026
9bcad06
perf: throttle streaming chat renders
Waterkyuu Apr 11, 2026
0f4cb16
perf: defer markdown updates while streaming
Waterkyuu Apr 11, 2026
35e444a
feat(skill): add skill
Waterkyuu Apr 11, 2026
b3e7092
feat: add skill system with load_skill tool and Typst skill injection
Waterkyuu Apr 11, 2026
cc8be79
test: add unit tests for skill loader
Waterkyuu Apr 11, 2026
8c42f62
refactor: extract DatasetPanel, ChartPanel, FileInfoPanel into separa…
Waterkyuu Apr 11, 2026
16de8d6
perf: add virtual list to DatasetPanel via @tanstack/react-virtual
Waterkyuu Apr 11, 2026
84fcb00
feat: integrate typst preview panel into workspace
Waterkyuu Apr 11, 2026
7d0ade1
refactor: simplify effectiveView logic with data-driven approach
Waterkyuu Apr 11, 2026
5ea519a
refactor: refactor typst panel
Waterkyuu Apr 11, 2026
b82f7d7
feat: implement multi-agent pipeline architecture
Waterkyuu Apr 11, 2026
d6734d5
test: add unit tests for parsePlanFromText in orchestrator
Waterkyuu Apr 12, 2026
a2342ca
fix: handle truncated JSON in parsePlanFromText regex fallback
Waterkyuu Apr 12, 2026
9e9a9a0
feat(agent): add report & resume expert skills, improve pipeline docs
Waterkyuu Apr 13, 2026
93b4029
style: fix import ordering and object property order
Waterkyuu Apr 14, 2026
6320a06
docs(agents): add loading interaction requirement to guidelines
Waterkyuu Apr 17, 2026
393811a
chore: delete video
Waterkyuu Apr 17, 2026
fc65a13
docs(agents): correct project tree indentation and add infra directory
Waterkyuu Apr 17, 2026
b832cf4
chore(infra): remove unused jwks.ts file
Waterkyuu Apr 17, 2026
69d131e
fix: harden pipeline agent execution
Waterkyuu Apr 17, 2026
124a746
docs: add firework-tech-graph skill
Waterkyuu Apr 17, 2026
337830c
feat(agent): implement multi-agent pipeline system
Waterkyuu Apr 17, 2026
b84d152
refactor: replace debug panel with step status
Waterkyuu Apr 17, 2026
72e567c
docs: clarify export style rule
Waterkyuu Apr 17, 2026
4c429f2
feat(chat): add pipeline step status panel component
Waterkyuu Apr 17, 2026
3e2f1ab
refactor: separate type exports from value exports
Waterkyuu Apr 17, 2026
b9e9a07
fix: improve home submit and chat loading states
Waterkyuu Apr 17, 2026
32ba14f
refactor: add emoji step banners
Waterkyuu Apr 17, 2026
09582df
fix: prevent assistant message overflow
Waterkyuu Apr 17, 2026
ff91b0e
refactor: update chat avatars
Waterkyuu Apr 17, 2026
136fb37
feat: collapse long assistant messages
Waterkyuu Apr 17, 2026
412ab0c
refactor(shared): update avatar component and project readme
Waterkyuu Apr 17, 2026
c90267d
feat: add collapse toggle for assistant messages
Waterkyuu Apr 17, 2026
e494257
fix: scope assistant collapse state per message
Waterkyuu Apr 17, 2026
d091179
fix: collapse assistant text parts independently
Waterkyuu Apr 17, 2026
03193e8
fix: show loading immediately for home pipeline handoff
Waterkyuu Apr 17, 2026
7ced1ac
fix: preserve home handoff loading and attachments
Waterkyuu Apr 17, 2026
871fb15
fix: guide agents to use synced sandbox file paths
Waterkyuu Apr 17, 2026
99d3549
refactor: centralize agent sandbox path helpers
Waterkyuu Apr 17, 2026
8107de3
refactor: reorganize lib agent entrypoints
Waterkyuu Apr 17, 2026
0823ce5
feat(atoms): add pipeline state management atoms
Waterkyuu Apr 17, 2026
099c5b1
fix: clear stale upload state in chat composer
Waterkyuu Apr 17, 2026
1a3b86c
refactor: extract duplicated inline append adapter into named useCall…
Waterkyuu Apr 17, 2026
1ad6d0a
docs(agents): update git commit workflow guidelines
Waterkyuu Apr 17, 2026
8c78549
refactor(chat): replace table with flex layout for dataset preview
Waterkyuu Apr 17, 2026
7b45fca
fix: harden data agent code execution
Waterkyuu Apr 17, 2026
29cbed6
style(pipeline): update agent step title formatting
Waterkyuu Apr 17, 2026
89a57a9
fix: harden chart artifact rendering and paths
Waterkyuu Apr 17, 2026
b5646da
fix(docs): fix AGENTS.md
Waterkyuu Apr 18, 2026
2e689ee
fix(pipeline): harden data step JSON output handling
Waterkyuu Apr 18, 2026
fa59d13
fix(docs): fix AGENTS.md
Waterkyuu Apr 18, 2026
f51a8f1
docs: add more info in AGENTS.md
Waterkyuu Apr 18, 2026
817a0b4
fix(pipeline): harden chart step JSON fallback
Waterkyuu Apr 18, 2026
bc1e5ec
docs(agent): add comments for complex pipeline logic
Waterkyuu Apr 18, 2026
ae9cf90
docs(agents): reorder comment guideline in code style list
Waterkyuu Apr 18, 2026
7964f36
docs(agent): annotate step and pipeline execution flow
Waterkyuu Apr 18, 2026
69ca84a
refactor: extract firstDefined/firstNonEmpty helpers to simplify reso…
Waterkyuu Apr 18, 2026
ffad37b
refactor: extract output-resolver.ts from executor.ts to separate str…
Waterkyuu Apr 18, 2026
bba80b1
feat: add tool-call stream event to notify frontend of tool invocations
Waterkyuu Apr 18, 2026
c0671a7
feat: expose all intermediate tool calls, results, errors and reasoni…
Waterkyuu Apr 18, 2026
a616081
fix(agent): expose real sandbox and tool error details
Waterkyuu Apr 18, 2026
4b48886
refactor(agent): reorganize shared utilities into dedicated utils dir…
Waterkyuu Apr 18, 2026
7567669
fix(chart-agent): enforce English-only chart labels
Waterkyuu Apr 18, 2026
16e4e07
refactor(sandbox): relocate e2b implementation into agent module hier…
Waterkyuu Apr 18, 2026
91433fd
feat: render cleaned dataset as clickable FileCard in assistant message
Waterkyuu Apr 18, 2026
944f9f1
fix: remove focus border/ring from input-group component
Waterkyuu Apr 18, 2026
2960f8e
feat(skills): add design-taste-frontend agent skill
Waterkyuu Apr 18, 2026
b2ec300
fix(chat): render step panel from orchestrator plan
Waterkyuu Apr 18, 2026
851a302
fix(chat): remove hardcoded default steps from step panel
Waterkyuu Apr 18, 2026
49dedda
feat(chat): add session-scoped workspace hydration and round artifacts
Waterkyuu Apr 18, 2026
6953777
fix(test): relax UIMessage typing for artifact test parts
Waterkyuu Apr 18, 2026
6255059
feat(skills): add karpathy coding guidelines agent skill
Waterkyuu Apr 19, 2026
36cd89e
refactor(chat): encapsulate markdown renderer in text block
Waterkyuu Apr 19, 2026
0c77a76
refactor(chat): extract text markdown into standalone component
Waterkyuu Apr 19, 2026
dbcc44b
refactor(chat): remove unnecessary use client directive from markdown…
Waterkyuu Apr 19, 2026
3c6e565
feat(agent): enforce typst skill loading order for report writer
Waterkyuu Apr 19, 2026
61ca918
fix(file-store): update temp root directory name to refract-files
Waterkyuu Apr 21, 2026
bbf6b4c
docs(agents): refine comment guidance in coding standards
Waterkyuu Apr 21, 2026
03eb1ef
refactor(home): remove unnecessary client directives and memo wrapper
Waterkyuu Apr 21, 2026
6fac5f3
feat(lib): add dataset file utilities and document agent tool helpers
Waterkyuu Apr 21, 2026
08ac0c1
docs(agents): add build check step to commit workflow
Waterkyuu Apr 21, 2026
fa01bfe
feat: switch artifacts to url-based preview and on-demand dataset fetch
Waterkyuu Apr 21, 2026
9929b8d
feat: use url-first artifacts and shared dataset virtual list
Waterkyuu Apr 21, 2026
d15c166
fix: stop canceled toast spam on dataset panel load
Waterkyuu Apr 21, 2026
6989440
docs(agents): add rule forbidding void before function calls
Waterkyuu Apr 21, 2026
cbfd3e6
refactor(pipeline-chat): remove agent suffix from step titles
Waterkyuu Apr 21, 2026
3e7dd93
refactor: remove preview from workspace and artifact contracts
Waterkyuu Apr 21, 2026
2a32413
fix(dataset-panel): refetch preview on dataset switch
Waterkyuu Apr 21, 2026
992dd80
fix(chat): unify assistant artifact file card details
Waterkyuu Apr 21, 2026
8eeea4a
fix(chat): update completed reasoning status
Waterkyuu Apr 21, 2026
4f9241c
fix(chart): stop rendering raw chart payloads
Waterkyuu Apr 21, 2026
da7f306
fix(workspace): preserve selected tab while streaming
Waterkyuu Apr 21, 2026
331e14a
fix(chat): preserve per-message thinking times
Waterkyuu Apr 21, 2026
b85135e
fix(chart): auto-persist generated chart artifacts
Waterkyuu Apr 21, 2026
d34dcd5
docs(readme): add multi-provider deployment buttons
Waterkyuu Apr 21, 2026
2511a79
docs(readme): remove project demo status warning banner
Waterkyuu Apr 23, 2026
71455f8
fix(chart-agent): require immediate chart persistence
Waterkyuu Apr 24, 2026
6af11ff
fix(chat): preserve per-reasoning thinking times
Waterkyuu Apr 24, 2026
f11bc8a
refactor(chat): lift pipeline part types to module scope
Waterkyuu Apr 24, 2026
3411489
refactor(chat): extract assistant thinking state from message area
Waterkyuu Apr 25, 2026
26e6585
docs(skill): add skill
Waterkyuu Apr 25, 2026
94370db
refactor: migrate middleware.ts to Next.js 16 proxy.ts
Waterkyuu Apr 25, 2026
14d3962
chore: add .agents/ to biome ignore list
Waterkyuu Apr 25, 2026
636f700
fix: configure undici proxy agent to resolve Neon Auth 502 timeout
Waterkyuu Apr 25, 2026
0f163db
docs(agents): add pnpm test step to agent workflow instructions
Waterkyuu Apr 25, 2026
5c632b9
fix: restrict proxy agent to development only
Waterkyuu Apr 25, 2026
22f3d13
fix(chat): replace in-place tool part mutation with new objects to fi…
Waterkyuu Apr 25, 2026
a380023
feat(chart): support multiple chart images with persistAllCharts and …
Waterkyuu Apr 25, 2026
b0d98e7
fix(chart): rewrite prompt to enforce inline rendering and allow subp…
Waterkyuu Apr 25, 2026
50cb203
feat(settings): add settings page with connections, skills, and syste…
Waterkyuu Apr 25, 2026
c3cc585
fix(auth): add error handling for auth session fetch in middleware
Waterkyuu Apr 25, 2026
33431c0
refactor(settings): replace connection service icons with svg assets
Waterkyuu Apr 25, 2026
39d3008
feat(settings): enhance button styles with rounded corners and add he…
Waterkyuu Apr 25, 2026
e1e2267
feat(avatar): add link to settings in dropdown menu
Waterkyuu Apr 25, 2026
8ac0e69
feat(agent): add new optimization and rag modules for caching, compre…
Waterkyuu Apr 25, 2026
93dc8d5
refactor: extract createWorkspaceFieldAtom factory to reduce atom boi…
Waterkyuu Apr 25, 2026
38d1130
feat(skills): add examples to skill name and description placeholders
Waterkyuu Apr 25, 2026
2f1735a
fix(chart): use persistAllCharts instead of persistLatestChart in res…
Waterkyuu Apr 25, 2026
d2199ec
feat(chat): add chart handling in ChatPage and remove obsolete messag…
Waterkyuu Apr 25, 2026
93863ad
feat(file-card): display different icons based on file extension
Waterkyuu Apr 25, 2026
bdffd8e
fix(file-store): detect GBK/GB18030 encoding in CSV and convert to UT…
Waterkyuu Apr 25, 2026
be3d19d
style(chat): change text from Pipeline Steps to Plans
Waterkyuu Apr 26, 2026
c13e12d
fix(chart): enrich phantom codeInterpreter chart artifacts with persi…
Waterkyuu Apr 26, 2026
8232813
fix(chart): restructure prompt to ensure persistAllCharts is always c…
Waterkyuu Apr 26, 2026
e101829
docs(i18n): update example format in skill placeholders
Waterkyuu Apr 26, 2026
588b863
feat(pipeline): extract typst code from report agent and display in p…
Waterkyuu Apr 26, 2026
6b433d9
test(chat): update test to reflect UI text change from Pipeline Steps…
Waterkyuu Apr 26, 2026
b130d4d
refactor(pipeline): strip codeInterpreter/persistCodeFile from report…
Waterkyuu Apr 26, 2026
5dc3df7
refactor(pipeline): simplify report agent to output-only
Waterkyuu Apr 26, 2026
d7a777b
feat: add compact context button
Waterkyuu Apr 26, 2026
893d0a5
feat(report): increase maxSteps to 10 and add debug logging for repor…
Waterkyuu Apr 26, 2026
8e8df5d
fix(pipeline): persist typst content in message parts so workspace pr…
Waterkyuu Apr 26, 2026
576b98a
feat: implement context compression
Waterkyuu Apr 26, 2026
3dcfe47
fix(typst): resolve WASM URLs using self.location.origin in Worker scope
Waterkyuu Apr 26, 2026
c24bd60
feat: add learn memories storage
Waterkyuu Apr 26, 2026
602de01
feat: add backend typst compiler
Waterkyuu Apr 26, 2026
bef9848
feat: repair typst reports before preview
Waterkyuu Apr 26, 2026
d077267
feat: learn typst repair memories
Waterkyuu Apr 26, 2026
c7d2ada
chore(git): add docs/superpowers to gitignore
Waterkyuu Apr 26, 2026
1249d50
docs: add agent orchestration architecture diagram
Waterkyuu Apr 26, 2026
a385c27
chore: add drizzle scripts
Waterkyuu Apr 26, 2026
1df178c
feat(env): add .env.example file with configuration templates
Waterkyuu Apr 26, 2026
f5a19d4
deps: add iconv-lite dependency
Waterkyuu Apr 26, 2026
5296ef8
feat(db): update drizzle scripts to use dotenv-cli
Waterkyuu Apr 26, 2026
4256cb4
fix(report): enforce Typst text fallback
Waterkyuu Apr 27, 2026
1c3d206
docs(typst-expert): add syntax highlighting and fallback to Typst exa…
Waterkyuu Apr 27, 2026
3496911
docs(typst-expert): improve documentation formatting and example code
Waterkyuu Apr 27, 2026
8bfd5d3
fix(typst): load CJK fonts in backend compiler
Waterkyuu Apr 27, 2026
ac0d84e
fix(typst): load CJK fonts in preview worker
Waterkyuu Apr 27, 2026
3fbf675
Merge branch 'main' into feat/general
Waterkyuu Apr 27, 2026
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
164 changes: 164 additions & 0 deletions .agents/skills/brainstorming/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
---
name: brainstorming
description: "You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation."
---

# Brainstorming Ideas Into Designs

Help turn ideas into fully formed designs and specs through natural collaborative dialogue.

Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.

<HARD-GATE>
Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
</HARD-GATE>

## Anti-Pattern: "This Is Too Simple To Need A Design"

Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.

## Checklist

You MUST create a task for each of these items and complete them in order:

1. **Explore project context** — check files, docs, recent commits
2. **Offer visual companion** (if topic will involve visual questions) — this is its own message, not combined with a clarifying question. See the Visual Companion section below.
3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
4. **Propose 2-3 approaches** — with trade-offs and your recommendation
5. **Present design** — in sections scaled to their complexity, get user approval after each section
6. **Write design doc** — save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` and commit
7. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope (see below)
8. **User reviews written spec** — ask user to review the spec file before proceeding
9. **Transition to implementation** — invoke writing-plans skill to create implementation plan

## Process Flow

```dot
digraph brainstorming {
"Explore project context" [shape=box];
"Visual questions ahead?" [shape=diamond];
"Offer Visual Companion\n(own message, no other content)" [shape=box];
"Ask clarifying questions" [shape=box];
"Propose 2-3 approaches" [shape=box];
"Present design sections" [shape=box];
"User approves design?" [shape=diamond];
"Write design doc" [shape=box];
"Spec self-review\n(fix inline)" [shape=box];
"User reviews spec?" [shape=diamond];
"Invoke writing-plans skill" [shape=doublecircle];

"Explore project context" -> "Visual questions ahead?";
"Visual questions ahead?" -> "Offer Visual Companion\n(own message, no other content)" [label="yes"];
"Visual questions ahead?" -> "Ask clarifying questions" [label="no"];
"Offer Visual Companion\n(own message, no other content)" -> "Ask clarifying questions";
"Ask clarifying questions" -> "Propose 2-3 approaches";
"Propose 2-3 approaches" -> "Present design sections";
"Present design sections" -> "User approves design?";
"User approves design?" -> "Present design sections" [label="no, revise"];
"User approves design?" -> "Write design doc" [label="yes"];
"Write design doc" -> "Spec self-review\n(fix inline)";
"Spec self-review\n(fix inline)" -> "User reviews spec?";
"User reviews spec?" -> "Write design doc" [label="changes requested"];
"User reviews spec?" -> "Invoke writing-plans skill" [label="approved"];
}
```

**The terminal state is invoking writing-plans.** Do NOT invoke frontend-design, mcp-builder, or any other implementation skill. The ONLY skill you invoke after brainstorming is writing-plans.

## The Process

**Understanding the idea:**

- Check out the current project state first (files, docs, recent commits)
- Before asking detailed questions, assess scope: if the request describes multiple independent subsystems (e.g., "build a platform with chat, file storage, billing, and analytics"), flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
- If the project is too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order should they be built? Then brainstorm the first sub-project through the normal design flow. Each sub-project gets its own spec → plan → implementation cycle.
- For appropriately-scoped projects, ask questions one at a time to refine the idea
- Prefer multiple choice questions when possible, but open-ended is fine too
- Only one question per message - if a topic needs more exploration, break it into multiple questions
- Focus on understanding: purpose, constraints, success criteria

**Exploring approaches:**

- Propose 2-3 different approaches with trade-offs
- Present options conversationally with your recommendation and reasoning
- Lead with your recommended option and explain why

**Presenting the design:**

- Once you believe you understand what you're building, present the design
- Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
- Ask after each section whether it looks right so far
- Cover: architecture, components, data flow, error handling, testing
- Be ready to go back and clarify if something doesn't make sense

**Design for isolation and clarity:**

- Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
- For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
- Can someone understand what a unit does without reading its internals? Can you change the internals without breaking consumers? If not, the boundaries need work.
- Smaller, well-bounded units are also easier for you to work with - you reason better about code you can hold in context at once, and your edits are more reliable when files are focused. When a file grows large, that's often a signal that it's doing too much.

**Working in existing codebases:**

- Explore the current structure before proposing changes. Follow existing patterns.
- Where existing code has problems that affect the work (e.g., a file that's grown too large, unclear boundaries, tangled responsibilities), include targeted improvements as part of the design - the way a good developer improves code they're working in.
- Don't propose unrelated refactoring. Stay focused on what serves the current goal.

## After the Design

**Documentation:**

- Write the validated design (spec) to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
- (User preferences for spec location override this default)
- Use elements-of-style:writing-clearly-and-concisely skill if available
- Commit the design document to git

**Spec Self-Review:**
After writing the spec document, look at it with fresh eyes:

1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them.
2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions?
3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition?
4. **Ambiguity check:** Could any requirement be interpreted two different ways? If so, pick one and make it explicit.

Fix any issues inline. No need to re-review — just fix and move on.

**User Review Gate:**
After the spec review loop passes, ask the user to review the written spec before proceeding:

> "Spec written and committed to `<path>`. Please review it and let me know if you want to make any changes before we start writing out the implementation plan."

Wait for the user's response. If they request changes, make them and re-run the spec review loop. Only proceed once the user approves.

**Implementation:**

- Invoke the writing-plans skill to create a detailed implementation plan
- Do NOT invoke any other skill. writing-plans is the next step.

## Key Principles

- **One question at a time** - Don't overwhelm with multiple questions
- **Multiple choice preferred** - Easier to answer than open-ended when possible
- **YAGNI ruthlessly** - Remove unnecessary features from all designs
- **Explore alternatives** - Always propose 2-3 approaches before settling
- **Incremental validation** - Present design, get approval before moving on
- **Be flexible** - Go back and clarify when something doesn't make sense

## Visual Companion

A browser-based companion for showing mockups, diagrams, and visual options during brainstorming. Available as a tool — not a mode. Accepting the companion means it's available for questions that benefit from visual treatment; it does NOT mean every question goes through the browser.

**Offering the companion:** When you anticipate that upcoming questions will involve visual content (mockups, layouts, diagrams), offer it once for consent:
> "Some of what we're working on might be easier to explain if I can show it to you in a web browser. I can put together mockups, diagrams, comparisons, and other visuals as we go. This feature is still new and can be token-intensive. Want to try it? (Requires opening a local URL)"

**This offer MUST be its own message.** Do not combine it with clarifying questions, context summaries, or any other content. The message should contain ONLY the offer above and nothing else. Wait for the user's response before continuing. If they decline, proceed with text-only brainstorming.

**Per-question decision:** Even after the user accepts, decide FOR EACH QUESTION whether to use the browser or the terminal. The test: **would the user understand this better by seeing it than reading it?**

- **Use the browser** for content that IS visual — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
- **Use the terminal** for content that is text — requirements questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions

A question about a UI topic is not automatically a visual question. "What does personality mean in this context?" is a conceptual question — use the terminal. "Which wizard layout works better?" is a visual question — use the browser.

If they agree to the companion, read the detailed guide before proceeding:
`skills/brainstorming/visual-companion.md`
214 changes: 214 additions & 0 deletions .agents/skills/brainstorming/scripts/frame-template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Superpowers Brainstorming</title>
<style>
/*
* BRAINSTORM COMPANION FRAME TEMPLATE
*
* This template provides a consistent frame with:
* - OS-aware light/dark theming
* - Fixed header and selection indicator bar
* - Scrollable main content area
* - CSS helpers for common UI patterns
*
* Content is injected via placeholder comment in #claude-content.
*/

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }

/* ===== THEME VARIABLES ===== */
:root {
--bg-primary: #f5f5f7;
--bg-secondary: #ffffff;
--bg-tertiary: #e5e5e7;
--border: #d1d1d6;
--text-primary: #1d1d1f;
--text-secondary: #86868b;
--text-tertiary: #aeaeb2;
--accent: #0071e3;
--accent-hover: #0077ed;
--success: #34c759;
--warning: #ff9f0a;
--error: #ff3b30;
--selected-bg: #e8f4fd;
--selected-border: #0071e3;
}

@media (prefers-color-scheme: dark) {
:root {
--bg-primary: #1d1d1f;
--bg-secondary: #2d2d2f;
--bg-tertiary: #3d3d3f;
--border: #424245;
--text-primary: #f5f5f7;
--text-secondary: #86868b;
--text-tertiary: #636366;
--accent: #0a84ff;
--accent-hover: #409cff;
--selected-bg: rgba(10, 132, 255, 0.15);
--selected-border: #0a84ff;
}
}

body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
display: flex;
flex-direction: column;
line-height: 1.5;
}

/* ===== FRAME STRUCTURE ===== */
.header {
background: var(--bg-secondary);
padding: 0.5rem 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.header h1 { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }
.header .status { font-size: 0.7rem; color: var(--success); display: flex; align-items: center; gap: 0.4rem; }
.header .status::before { content: ''; width: 6px; height: 6px; background: var(--success); border-radius: 50%; }

.main { flex: 1; overflow-y: auto; }
#claude-content { padding: 2rem; min-height: 100%; }

.indicator-bar {
background: var(--bg-secondary);
border-top: 1px solid var(--border);
padding: 0.5rem 1.5rem;
flex-shrink: 0;
text-align: center;
}
.indicator-bar span {
font-size: 0.75rem;
color: var(--text-secondary);
}
.indicator-bar .selected-text {
color: var(--accent);
font-weight: 500;
}

/* ===== TYPOGRAPHY ===== */
h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; }
h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
.subtitle { color: var(--text-secondary); margin-bottom: 1.5rem; }
.section { margin-bottom: 2rem; }
.label { font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }

/* ===== OPTIONS (for A/B/C choices) ===== */
.options { display: flex; flex-direction: column; gap: 0.75rem; }
.option {
background: var(--bg-secondary);
border: 2px solid var(--border);
border-radius: 12px;
padding: 1rem 1.25rem;
cursor: pointer;
transition: all 0.15s ease;
display: flex;
align-items: flex-start;
gap: 1rem;
}
.option:hover { border-color: var(--accent); }
.option.selected { background: var(--selected-bg); border-color: var(--selected-border); }
.option .letter {
background: var(--bg-tertiary);
color: var(--text-secondary);
width: 1.75rem; height: 1.75rem;
border-radius: 6px;
display: flex; align-items: center; justify-content: center;
font-weight: 600; font-size: 0.85rem; flex-shrink: 0;
}
.option.selected .letter { background: var(--accent); color: white; }
.option .content { flex: 1; }
.option .content h3 { font-size: 0.95rem; margin-bottom: 0.15rem; }
.option .content p { color: var(--text-secondary); font-size: 0.85rem; margin: 0; }

/* ===== CARDS (for showing designs/mockups) ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.card {
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 12px;
overflow: hidden;
cursor: pointer;
transition: all 0.15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.card.selected { border-color: var(--selected-border); border-width: 2px; }
.card-image { background: var(--bg-tertiary); aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; }
.card-body { padding: 1rem; }
.card-body h3 { margin-bottom: 0.25rem; }
.card-body p { color: var(--text-secondary); font-size: 0.85rem; }

/* ===== MOCKUP CONTAINER ===== */
.mockup {
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 12px;
overflow: hidden;
margin-bottom: 1.5rem;
}
.mockup-header {
background: var(--bg-tertiary);
padding: 0.5rem 1rem;
font-size: 0.75rem;
color: var(--text-secondary);
border-bottom: 1px solid var(--border);
}
.mockup-body { padding: 1.5rem; }

/* ===== SPLIT VIEW (side-by-side comparison) ===== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 700px) { .split { grid-template-columns: 1fr; } }

/* ===== PROS/CONS ===== */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.pros, .cons { background: var(--bg-secondary); border-radius: 8px; padding: 1rem; }
.pros h4 { color: var(--success); font-size: 0.85rem; margin-bottom: 0.5rem; }
.cons h4 { color: var(--error); font-size: 0.85rem; margin-bottom: 0.5rem; }
.pros ul, .cons ul { margin-left: 1.25rem; font-size: 0.85rem; color: var(--text-secondary); }
.pros li, .cons li { margin-bottom: 0.25rem; }

/* ===== PLACEHOLDER (for mockup areas) ===== */
.placeholder {
background: var(--bg-tertiary);
border: 2px dashed var(--border);
border-radius: 8px;
padding: 2rem;
text-align: center;
color: var(--text-tertiary);
}

/* ===== INLINE MOCKUP ELEMENTS ===== */
.mock-nav { background: var(--accent); color: white; padding: 0.75rem 1rem; display: flex; gap: 1.5rem; font-size: 0.9rem; }
.mock-sidebar { background: var(--bg-tertiary); padding: 1rem; min-width: 180px; }
.mock-content { padding: 1.5rem; flex: 1; }
.mock-button { background: var(--accent); color: white; border: none; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.85rem; }
.mock-input { background: var(--bg-primary); border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem; width: 100%; }
</style>
</head>
<body>
<div class="header">
<h1><a href="https://github.com/obra/superpowers" style="color: inherit; text-decoration: none;">Superpowers Brainstorming</a></h1>
<div class="status">Connected</div>
</div>

<div class="main">
<div id="claude-content">
<!-- CONTENT -->
</div>
</div>

<div class="indicator-bar">
<span id="indicator-text">Click an option above, then return to the terminal</span>
</div>

</body>
</html>
Loading
Loading