@zhiman_innies/innies-codex 0.122.36 → 0.122.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/package.json +1 -29
  2. package/README.md +0 -350
  3. package/assets/innies-catalog.json +0 -969
  4. package/assets/superpowers/LICENSE +0 -21
  5. package/assets/superpowers/skills/brainstorming/SKILL.md +0 -174
  6. package/assets/superpowers/skills/brainstorming/scripts/frame-template.html +0 -214
  7. package/assets/superpowers/skills/brainstorming/scripts/helper.js +0 -88
  8. package/assets/superpowers/skills/brainstorming/scripts/server.cjs +0 -354
  9. package/assets/superpowers/skills/brainstorming/scripts/start-server.sh +0 -148
  10. package/assets/superpowers/skills/brainstorming/scripts/stop-server.sh +0 -56
  11. package/assets/superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +0 -49
  12. package/assets/superpowers/skills/brainstorming/visual-companion.md +0 -287
  13. package/assets/superpowers/skills/dispatching-parallel-agents/SKILL.md +0 -182
  14. package/assets/superpowers/skills/executing-plans/SKILL.md +0 -70
  15. package/assets/superpowers/skills/finishing-a-development-branch/SKILL.md +0 -200
  16. package/assets/superpowers/skills/receiving-code-review/SKILL.md +0 -213
  17. package/assets/superpowers/skills/requesting-code-review/SKILL.md +0 -105
  18. package/assets/superpowers/skills/requesting-code-review/code-reviewer.md +0 -146
  19. package/assets/superpowers/skills/subagent-driven-development/SKILL.md +0 -277
  20. package/assets/superpowers/skills/subagent-driven-development/code-quality-reviewer-prompt.md +0 -26
  21. package/assets/superpowers/skills/subagent-driven-development/implementer-prompt.md +0 -113
  22. package/assets/superpowers/skills/subagent-driven-development/spec-reviewer-prompt.md +0 -61
  23. package/assets/superpowers/skills/systematic-debugging/CREATION-LOG.md +0 -119
  24. package/assets/superpowers/skills/systematic-debugging/SKILL.md +0 -296
  25. package/assets/superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +0 -158
  26. package/assets/superpowers/skills/systematic-debugging/condition-based-waiting.md +0 -115
  27. package/assets/superpowers/skills/systematic-debugging/defense-in-depth.md +0 -122
  28. package/assets/superpowers/skills/systematic-debugging/find-polluter.sh +0 -63
  29. package/assets/superpowers/skills/systematic-debugging/root-cause-tracing.md +0 -169
  30. package/assets/superpowers/skills/systematic-debugging/test-academic.md +0 -14
  31. package/assets/superpowers/skills/systematic-debugging/test-pressure-1.md +0 -58
  32. package/assets/superpowers/skills/systematic-debugging/test-pressure-2.md +0 -68
  33. package/assets/superpowers/skills/systematic-debugging/test-pressure-3.md +0 -69
  34. package/assets/superpowers/skills/test-driven-development/SKILL.md +0 -371
  35. package/assets/superpowers/skills/test-driven-development/testing-anti-patterns.md +0 -299
  36. package/assets/superpowers/skills/using-git-worktrees/SKILL.md +0 -218
  37. package/assets/superpowers/skills/using-superpowers/SKILL.md +0 -123
  38. package/assets/superpowers/skills/using-superpowers/references/codex-tools.md +0 -104
  39. package/assets/superpowers/skills/using-superpowers/references/gemini-tools.md +0 -33
  40. package/assets/superpowers/skills/verification-before-completion/SKILL.md +0 -139
  41. package/assets/superpowers/skills/writing-plans/SKILL.md +0 -152
  42. package/assets/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
  43. package/assets/superpowers/skills/writing-skills/SKILL.md +0 -655
  44. package/assets/superpowers/skills/writing-skills/anthropic-best-practices.md +0 -1150
  45. package/assets/superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -189
  46. package/assets/superpowers/skills/writing-skills/graphviz-conventions.dot +0 -172
  47. package/assets/superpowers/skills/writing-skills/persuasion-principles.md +0 -187
  48. package/assets/superpowers/skills/writing-skills/render-graphs.js +0 -168
  49. package/assets/superpowers/skills/writing-skills/testing-skills-with-subagents.md +0 -384
  50. package/bin/codex.js +0 -216
  51. package/bin/innies-coding-runtime.js +0 -786
  52. package/bin/innies-config.js +0 -553
  53. package/bin/innies-init.js +0 -9
  54. package/bin/innies.js +0 -77
  55. package/bin/rg +0 -79
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Jesse Vincent
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,174 +0,0 @@
1
- ---
2
- name: brainstorming
3
- description: "Use this before explicit creative design or implementation work - creating features, building components, adding functionality, or modifying behavior. Do not use it for concept-only explanations."
4
- ---
5
-
6
- # Brainstorming Ideas Into Designs
7
-
8
- Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
9
-
10
- 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.
11
-
12
- <HARD-GATE>
13
- 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.
14
- </HARD-GATE>
15
-
16
- ## Anti-Pattern: "This Is Too Simple To Need A Design"
17
-
18
- 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.
19
-
20
- ## Applicability Boundary
21
-
22
- Use brainstorming when the user explicitly asks to design, build, create, implement, modify, or optimize something. Examples include "我要设计 / 我准备做 / 应该怎么设计 / 应该如何设计", "I want to design / let's build", "How should I design X", "help me build a workflow platform", or "optimize this architecture".
23
-
24
- Do not use brainstorming for concept-only explanation requests. Answer directly instead of entering brainstorming. If the user asks "what is X", "how does X work", "what is the difference between X and Y", "what is the difference between mutex and rwlock", "X 的机制/原理/是什么意思", or "AI大模型三层记忆架构如何实现", they are asking for an explanation of an existing concept, not collaborative design of a new system.
25
-
26
- If both signals appear, prefer the explicit action signal. For example, "我要设计AI三层记忆架构,我应该如何设计" should use brainstorming because the user says they want to design it.
27
-
28
- Positive Chinese design examples include "我准备做一个 RAG 检索系统,应该怎么设计" and "我们一起设计一个分布式任务调度系统". Do not classify these as concept-only explanation requests.
29
-
30
- ## Checklist
31
-
32
- You MUST create a task for each of these items and complete them in order:
33
-
34
- 1. **Explore project context** — check files, docs, recent commits
35
- 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.
36
- 3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
37
- 4. **Propose 2-3 approaches** — with trade-offs and your recommendation
38
- 5. **Present design** — in sections scaled to their complexity, get user approval after each section
39
- 6. **Write design doc** — save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` and commit
40
- 7. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope (see below)
41
- 8. **User reviews written spec** — ask user to review the spec file before proceeding
42
- 9. **Transition to implementation** — invoke writing-plans skill to create implementation plan
43
-
44
- ## Process Flow
45
-
46
- ```dot
47
- digraph brainstorming {
48
- "Explore project context" [shape=box];
49
- "Visual questions ahead?" [shape=diamond];
50
- "Offer Visual Companion\n(own message, no other content)" [shape=box];
51
- "Ask clarifying questions" [shape=box];
52
- "Propose 2-3 approaches" [shape=box];
53
- "Present design sections" [shape=box];
54
- "User approves design?" [shape=diamond];
55
- "Write design doc" [shape=box];
56
- "Spec self-review\n(fix inline)" [shape=box];
57
- "User reviews spec?" [shape=diamond];
58
- "Invoke writing-plans skill" [shape=doublecircle];
59
-
60
- "Explore project context" -> "Visual questions ahead?";
61
- "Visual questions ahead?" -> "Offer Visual Companion\n(own message, no other content)" [label="yes"];
62
- "Visual questions ahead?" -> "Ask clarifying questions" [label="no"];
63
- "Offer Visual Companion\n(own message, no other content)" -> "Ask clarifying questions";
64
- "Ask clarifying questions" -> "Propose 2-3 approaches";
65
- "Propose 2-3 approaches" -> "Present design sections";
66
- "Present design sections" -> "User approves design?";
67
- "User approves design?" -> "Present design sections" [label="no, revise"];
68
- "User approves design?" -> "Write design doc" [label="yes"];
69
- "Write design doc" -> "Spec self-review\n(fix inline)";
70
- "Spec self-review\n(fix inline)" -> "User reviews spec?";
71
- "User reviews spec?" -> "Write design doc" [label="changes requested"];
72
- "User reviews spec?" -> "Invoke writing-plans skill" [label="approved"];
73
- }
74
- ```
75
-
76
- **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.
77
-
78
- ## The Process
79
-
80
- **Understanding the idea:**
81
-
82
- - Check out the current project state first (files, docs, recent commits)
83
- - 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.
84
- - 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.
85
- - For appropriately-scoped projects, ask questions one at a time to refine the idea
86
- - Prefer multiple choice questions when possible, but open-ended is fine too
87
- - Only one question per message - if a topic needs more exploration, break it into multiple questions
88
- - Focus on understanding: purpose, constraints, success criteria
89
-
90
- **Exploring approaches:**
91
-
92
- - Propose 2-3 different approaches with trade-offs
93
- - Present options conversationally with your recommendation and reasoning
94
- - Lead with your recommended option and explain why
95
-
96
- **Presenting the design:**
97
-
98
- - Once you believe you understand what you're building, present the design
99
- - Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
100
- - Ask after each section whether it looks right so far
101
- - Cover: architecture, components, data flow, error handling, testing
102
- - Be ready to go back and clarify if something doesn't make sense
103
-
104
- **Design for isolation and clarity:**
105
-
106
- - Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
107
- - For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
108
- - 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.
109
- - 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.
110
-
111
- **Working in existing codebases:**
112
-
113
- - Explore the current structure before proposing changes. Follow existing patterns.
114
- - 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.
115
- - Don't propose unrelated refactoring. Stay focused on what serves the current goal.
116
-
117
- ## After the Design
118
-
119
- **Documentation:**
120
-
121
- - Write the validated design (spec) to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
122
- - (User preferences for spec location override this default)
123
- - Use elements-of-style:writing-clearly-and-concisely skill if available
124
- - Commit the design document to git
125
-
126
- **Spec Self-Review:**
127
- After writing the spec document, look at it with fresh eyes:
128
-
129
- 1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them.
130
- 2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions?
131
- 3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition?
132
- 4. **Ambiguity check:** Could any requirement be interpreted two different ways? If so, pick one and make it explicit.
133
-
134
- Fix any issues inline. No need to re-review — just fix and move on.
135
-
136
- **User Review Gate:**
137
- After the spec review loop passes, ask the user to review the written spec before proceeding:
138
-
139
- > "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."
140
-
141
- 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.
142
-
143
- **Implementation:**
144
-
145
- - Invoke the writing-plans skill to create a detailed implementation plan
146
- - Do NOT invoke any other skill. writing-plans is the next step.
147
-
148
- ## Key Principles
149
-
150
- - **One question at a time** - Don't overwhelm with multiple questions
151
- - **Multiple choice preferred** - Easier to answer than open-ended when possible
152
- - **YAGNI ruthlessly** - Remove unnecessary features from all designs
153
- - **Explore alternatives** - Always propose 2-3 approaches before settling
154
- - **Incremental validation** - Present design, get approval before moving on
155
- - **Be flexible** - Go back and clarify when something doesn't make sense
156
-
157
- ## Visual Companion
158
-
159
- 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.
160
-
161
- **Offering the companion:** When you anticipate that upcoming questions will involve visual content (mockups, layouts, diagrams), offer it once for consent:
162
- > "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)"
163
-
164
- **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.
165
-
166
- **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?**
167
-
168
- - **Use the browser** for content that IS visual — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
169
- - **Use the terminal** for content that is text — requirements questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions
170
-
171
- 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.
172
-
173
- If they agree to the companion, read the detailed guide before proceeding:
174
- `skills/brainstorming/visual-companion.md`
@@ -1,214 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <title>Superpowers Brainstorming</title>
6
- <style>
7
- /*
8
- * BRAINSTORM COMPANION FRAME TEMPLATE
9
- *
10
- * This template provides a consistent frame with:
11
- * - OS-aware light/dark theming
12
- * - Fixed header and selection indicator bar
13
- * - Scrollable main content area
14
- * - CSS helpers for common UI patterns
15
- *
16
- * Content is injected via placeholder comment in #claude-content.
17
- */
18
-
19
- * { box-sizing: border-box; margin: 0; padding: 0; }
20
- html, body { height: 100%; overflow: hidden; }
21
-
22
- /* ===== THEME VARIABLES ===== */
23
- :root {
24
- --bg-primary: #f5f5f7;
25
- --bg-secondary: #ffffff;
26
- --bg-tertiary: #e5e5e7;
27
- --border: #d1d1d6;
28
- --text-primary: #1d1d1f;
29
- --text-secondary: #86868b;
30
- --text-tertiary: #aeaeb2;
31
- --accent: #0071e3;
32
- --accent-hover: #0077ed;
33
- --success: #34c759;
34
- --warning: #ff9f0a;
35
- --error: #ff3b30;
36
- --selected-bg: #e8f4fd;
37
- --selected-border: #0071e3;
38
- }
39
-
40
- @media (prefers-color-scheme: dark) {
41
- :root {
42
- --bg-primary: #1d1d1f;
43
- --bg-secondary: #2d2d2f;
44
- --bg-tertiary: #3d3d3f;
45
- --border: #424245;
46
- --text-primary: #f5f5f7;
47
- --text-secondary: #86868b;
48
- --text-tertiary: #636366;
49
- --accent: #0a84ff;
50
- --accent-hover: #409cff;
51
- --selected-bg: rgba(10, 132, 255, 0.15);
52
- --selected-border: #0a84ff;
53
- }
54
- }
55
-
56
- body {
57
- font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
58
- background: var(--bg-primary);
59
- color: var(--text-primary);
60
- display: flex;
61
- flex-direction: column;
62
- line-height: 1.5;
63
- }
64
-
65
- /* ===== FRAME STRUCTURE ===== */
66
- .header {
67
- background: var(--bg-secondary);
68
- padding: 0.5rem 1.5rem;
69
- display: flex;
70
- justify-content: space-between;
71
- align-items: center;
72
- border-bottom: 1px solid var(--border);
73
- flex-shrink: 0;
74
- }
75
- .header h1 { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }
76
- .header .status { font-size: 0.7rem; color: var(--success); display: flex; align-items: center; gap: 0.4rem; }
77
- .header .status::before { content: ''; width: 6px; height: 6px; background: var(--success); border-radius: 50%; }
78
-
79
- .main { flex: 1; overflow-y: auto; }
80
- #claude-content { padding: 2rem; min-height: 100%; }
81
-
82
- .indicator-bar {
83
- background: var(--bg-secondary);
84
- border-top: 1px solid var(--border);
85
- padding: 0.5rem 1.5rem;
86
- flex-shrink: 0;
87
- text-align: center;
88
- }
89
- .indicator-bar span {
90
- font-size: 0.75rem;
91
- color: var(--text-secondary);
92
- }
93
- .indicator-bar .selected-text {
94
- color: var(--accent);
95
- font-weight: 500;
96
- }
97
-
98
- /* ===== TYPOGRAPHY ===== */
99
- h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; }
100
- h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
101
- .subtitle { color: var(--text-secondary); margin-bottom: 1.5rem; }
102
- .section { margin-bottom: 2rem; }
103
- .label { font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
104
-
105
- /* ===== OPTIONS (for A/B/C choices) ===== */
106
- .options { display: flex; flex-direction: column; gap: 0.75rem; }
107
- .option {
108
- background: var(--bg-secondary);
109
- border: 2px solid var(--border);
110
- border-radius: 12px;
111
- padding: 1rem 1.25rem;
112
- cursor: pointer;
113
- transition: all 0.15s ease;
114
- display: flex;
115
- align-items: flex-start;
116
- gap: 1rem;
117
- }
118
- .option:hover { border-color: var(--accent); }
119
- .option.selected { background: var(--selected-bg); border-color: var(--selected-border); }
120
- .option .letter {
121
- background: var(--bg-tertiary);
122
- color: var(--text-secondary);
123
- width: 1.75rem; height: 1.75rem;
124
- border-radius: 6px;
125
- display: flex; align-items: center; justify-content: center;
126
- font-weight: 600; font-size: 0.85rem; flex-shrink: 0;
127
- }
128
- .option.selected .letter { background: var(--accent); color: white; }
129
- .option .content { flex: 1; }
130
- .option .content h3 { font-size: 0.95rem; margin-bottom: 0.15rem; }
131
- .option .content p { color: var(--text-secondary); font-size: 0.85rem; margin: 0; }
132
-
133
- /* ===== CARDS (for showing designs/mockups) ===== */
134
- .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
135
- .card {
136
- background: var(--bg-secondary);
137
- border: 1px solid var(--border);
138
- border-radius: 12px;
139
- overflow: hidden;
140
- cursor: pointer;
141
- transition: all 0.15s ease;
142
- }
143
- .card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
144
- .card.selected { border-color: var(--selected-border); border-width: 2px; }
145
- .card-image { background: var(--bg-tertiary); aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; }
146
- .card-body { padding: 1rem; }
147
- .card-body h3 { margin-bottom: 0.25rem; }
148
- .card-body p { color: var(--text-secondary); font-size: 0.85rem; }
149
-
150
- /* ===== MOCKUP CONTAINER ===== */
151
- .mockup {
152
- background: var(--bg-secondary);
153
- border: 1px solid var(--border);
154
- border-radius: 12px;
155
- overflow: hidden;
156
- margin-bottom: 1.5rem;
157
- }
158
- .mockup-header {
159
- background: var(--bg-tertiary);
160
- padding: 0.5rem 1rem;
161
- font-size: 0.75rem;
162
- color: var(--text-secondary);
163
- border-bottom: 1px solid var(--border);
164
- }
165
- .mockup-body { padding: 1.5rem; }
166
-
167
- /* ===== SPLIT VIEW (side-by-side comparison) ===== */
168
- .split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
169
- @media (max-width: 700px) { .split { grid-template-columns: 1fr; } }
170
-
171
- /* ===== PROS/CONS ===== */
172
- .pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
173
- .pros, .cons { background: var(--bg-secondary); border-radius: 8px; padding: 1rem; }
174
- .pros h4 { color: var(--success); font-size: 0.85rem; margin-bottom: 0.5rem; }
175
- .cons h4 { color: var(--error); font-size: 0.85rem; margin-bottom: 0.5rem; }
176
- .pros ul, .cons ul { margin-left: 1.25rem; font-size: 0.85rem; color: var(--text-secondary); }
177
- .pros li, .cons li { margin-bottom: 0.25rem; }
178
-
179
- /* ===== PLACEHOLDER (for mockup areas) ===== */
180
- .placeholder {
181
- background: var(--bg-tertiary);
182
- border: 2px dashed var(--border);
183
- border-radius: 8px;
184
- padding: 2rem;
185
- text-align: center;
186
- color: var(--text-tertiary);
187
- }
188
-
189
- /* ===== INLINE MOCKUP ELEMENTS ===== */
190
- .mock-nav { background: var(--accent); color: white; padding: 0.75rem 1rem; display: flex; gap: 1.5rem; font-size: 0.9rem; }
191
- .mock-sidebar { background: var(--bg-tertiary); padding: 1rem; min-width: 180px; }
192
- .mock-content { padding: 1.5rem; flex: 1; }
193
- .mock-button { background: var(--accent); color: white; border: none; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.85rem; }
194
- .mock-input { background: var(--bg-primary); border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem; width: 100%; }
195
- </style>
196
- </head>
197
- <body>
198
- <div class="header">
199
- <h1><a href="https://github.com/obra/superpowers" style="color: inherit; text-decoration: none;">Superpowers Brainstorming</a></h1>
200
- <div class="status">Connected</div>
201
- </div>
202
-
203
- <div class="main">
204
- <div id="claude-content">
205
- <!-- CONTENT -->
206
- </div>
207
- </div>
208
-
209
- <div class="indicator-bar">
210
- <span id="indicator-text">Click an option above, then return to the terminal</span>
211
- </div>
212
-
213
- </body>
214
- </html>
@@ -1,88 +0,0 @@
1
- (function() {
2
- const WS_URL = 'ws://' + window.location.host;
3
- let ws = null;
4
- let eventQueue = [];
5
-
6
- function connect() {
7
- ws = new WebSocket(WS_URL);
8
-
9
- ws.onopen = () => {
10
- eventQueue.forEach(e => ws.send(JSON.stringify(e)));
11
- eventQueue = [];
12
- };
13
-
14
- ws.onmessage = (msg) => {
15
- const data = JSON.parse(msg.data);
16
- if (data.type === 'reload') {
17
- window.location.reload();
18
- }
19
- };
20
-
21
- ws.onclose = () => {
22
- setTimeout(connect, 1000);
23
- };
24
- }
25
-
26
- function sendEvent(event) {
27
- event.timestamp = Date.now();
28
- if (ws && ws.readyState === WebSocket.OPEN) {
29
- ws.send(JSON.stringify(event));
30
- } else {
31
- eventQueue.push(event);
32
- }
33
- }
34
-
35
- // Capture clicks on choice elements
36
- document.addEventListener('click', (e) => {
37
- const target = e.target.closest('[data-choice]');
38
- if (!target) return;
39
-
40
- sendEvent({
41
- type: 'click',
42
- text: target.textContent.trim(),
43
- choice: target.dataset.choice,
44
- id: target.id || null
45
- });
46
-
47
- // Update indicator bar (defer so toggleSelect runs first)
48
- setTimeout(() => {
49
- const indicator = document.getElementById('indicator-text');
50
- if (!indicator) return;
51
- const container = target.closest('.options') || target.closest('.cards');
52
- const selected = container ? container.querySelectorAll('.selected') : [];
53
- if (selected.length === 0) {
54
- indicator.textContent = 'Click an option above, then return to the terminal';
55
- } else if (selected.length === 1) {
56
- const label = selected[0].querySelector('h3, .content h3, .card-body h3')?.textContent?.trim() || selected[0].dataset.choice;
57
- indicator.innerHTML = '<span class="selected-text">' + label + ' selected</span> — return to terminal to continue';
58
- } else {
59
- indicator.innerHTML = '<span class="selected-text">' + selected.length + ' selected</span> — return to terminal to continue';
60
- }
61
- }, 0);
62
- });
63
-
64
- // Frame UI: selection tracking
65
- window.selectedChoice = null;
66
-
67
- window.toggleSelect = function(el) {
68
- const container = el.closest('.options') || el.closest('.cards');
69
- const multi = container && container.dataset.multiselect !== undefined;
70
- if (container && !multi) {
71
- container.querySelectorAll('.option, .card').forEach(o => o.classList.remove('selected'));
72
- }
73
- if (multi) {
74
- el.classList.toggle('selected');
75
- } else {
76
- el.classList.add('selected');
77
- }
78
- window.selectedChoice = el.dataset.choice;
79
- };
80
-
81
- // Expose API for explicit use
82
- window.brainstorm = {
83
- send: sendEvent,
84
- choice: (value, metadata = {}) => sendEvent({ type: 'choice', value, ...metadata })
85
- };
86
-
87
- connect();
88
- })();