@jspg-ai/coding-bb 0.0.1 → 0.0.2-beta.22

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 (145) hide show
  1. package/cbb/bin/cbb.js +6 -0
  2. package/cbb/bin/cbbm.js +6 -0
  3. package/cbb/dev-standards/rules/cbb-ai-behavior.md +103 -103
  4. package/cbb/dev-standards/rules/cbb-priority.md +55 -55
  5. package/cbb/lib/install/claude-code.js +2 -0
  6. package/cbb/lib/install/init.js +496 -290
  7. package/cbb/lib/install/opencode.js +31 -0
  8. package/cbb/lib/install/qoder.js +2 -0
  9. package/cbb/lib/install/workspaces.js +53 -13
  10. package/cbb/lib/openspec/index.js +3 -3
  11. package/cbb/lib/superpowers/index.js +1 -1
  12. package/cbb/lib/utils/check-update.js +16 -14
  13. package/cbb/lib/utils/gitignore.js +2 -1
  14. package/cbb/lib/utils/output.js +92 -4
  15. package/cbb/lib/utils/version.js +2 -31
  16. package/cbb/lib/wiki/cli.js +25 -25
  17. package/cbb/lib/wiki/index.js +16 -16
  18. package/cbb/tools/cbb-design-to-wiki/SKILL.md +14 -14
  19. package/cbb/tools/cbb-wiki-ops/SKILL.md +22 -22
  20. package/cbb/worktrees/_shared/scripts/find-target-worktree.js +2 -2
  21. package/cbb/worktrees/_shared/scripts/find-workspace-root.js +7 -7
  22. package/cbb/worktrees/_shared/scripts/push-core.js +18 -0
  23. package/cbb/worktrees/commands/{close.md → worktree-close.md} +8 -8
  24. package/cbb/worktrees/commands/{init.md → worktree-init.md} +9 -9
  25. package/cbb/worktrees/commands/{push.md → worktree-push.md} +3 -3
  26. package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-close}/SKILL.md +20 -20
  27. package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-close}/scripts/check-env.js +4 -4
  28. package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-close}/scripts/check-unarchived.js +1 -1
  29. package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-close}/scripts/delete-branches.js +3 -3
  30. package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-close}/scripts/discover-apps.js +6 -6
  31. package/cbb/worktrees/skills/{openspec-extend-worktree → cbb-worktree-close}/scripts/find-target-worktree.js +2 -2
  32. package/cbb/worktrees/skills/{openspec-push-worktrees → cbb-worktree-close}/scripts/find-workspace-root.js +7 -7
  33. package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-close}/scripts/remove-worktrees.js +4 -4
  34. package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-close}/scripts/safety-check.js +4 -4
  35. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/SKILL.md +81 -107
  36. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/auto-open.js +1 -1
  37. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/check-env-deep.js +4 -4
  38. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/check-env.js +6 -6
  39. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/check-repos.js +4 -4
  40. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/create-branches.js +4 -4
  41. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/create-worktrees.js +8 -7
  42. package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-init}/scripts/find-workspace-root.js +7 -7
  43. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/install-ai.js +33 -33
  44. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/parse-config.js +7 -7
  45. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/push-branches.js +9 -7
  46. package/cbb/worktrees/skills/{openspec-extend-worktree → cbb-worktree-init}/scripts/push-core.js +18 -0
  47. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/sync-repos.js +10 -12
  48. package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-init}/scripts/update-gitignore.js +19 -6
  49. package/cbb/worktrees/skills/{openspec-push-worktrees → cbb-worktree-push}/SKILL.md +16 -16
  50. package/cbb/worktrees/skills/{openspec-push-worktrees → cbb-worktree-push}/scripts/commit-worktrees.js +2 -2
  51. package/cbb/worktrees/skills/{openspec-push-worktrees → cbb-worktree-push}/scripts/find-target-worktree.js +2 -2
  52. package/cbb/worktrees/skills/{openspec-extend-worktree → cbb-worktree-push}/scripts/find-workspace-root.js +7 -7
  53. package/cbb/worktrees/skills/{openspec-push-worktrees → cbb-worktree-push}/scripts/push-core.js +18 -0
  54. package/cbb/worktrees/skills/{openspec-push-worktrees → cbb-worktree-push}/scripts/push-worktrees.js +7 -5
  55. package/config/workspace-config.sample.json +18 -0
  56. package/config/workspaces.json +11 -6
  57. package/openspec/.version +6 -6
  58. package/openspec/commands/apply.md +7 -7
  59. package/openspec/commands/archive.md +7 -7
  60. package/openspec/commands/bulk-archive.md +7 -7
  61. package/openspec/commands/continue.md +7 -7
  62. package/openspec/commands/explore.md +7 -7
  63. package/openspec/commands/ff.md +7 -7
  64. package/openspec/commands/new.md +7 -7
  65. package/openspec/commands/onboard.md +7 -7
  66. package/openspec/commands/propose.md +7 -7
  67. package/openspec/commands/sync.md +7 -7
  68. package/openspec/commands/update.md +7 -7
  69. package/openspec/commands/verify.md +7 -7
  70. package/openspec/skills/openspec-apply-change/SKILL.md +187 -187
  71. package/openspec/skills/openspec-archive-change/SKILL.md +181 -181
  72. package/openspec/skills/openspec-bulk-archive-change/SKILL.md +338 -338
  73. package/openspec/skills/openspec-continue-change/SKILL.md +117 -117
  74. package/openspec/skills/openspec-explore/SKILL.md +342 -342
  75. package/openspec/skills/openspec-ff-change/SKILL.md +116 -116
  76. package/openspec/skills/openspec-new-change/SKILL.md +76 -76
  77. package/openspec/skills/openspec-onboard/SKILL.md +560 -560
  78. package/openspec/skills/openspec-propose/SKILL.md +162 -162
  79. package/openspec/skills/openspec-sync-specs/SKILL.md +261 -261
  80. package/openspec/skills/openspec-update-change/SKILL.md +90 -90
  81. package/openspec/skills/openspec-verify-change/SKILL.md +174 -174
  82. package/package.json +4 -3
  83. package/superpowers/.version +6 -6
  84. package/superpowers/skills/brainstorming/SKILL.md +250 -250
  85. package/superpowers/skills/brainstorming/scripts/helper.js +167 -167
  86. package/superpowers/skills/brainstorming/scripts/start-server.sh +209 -209
  87. package/superpowers/skills/brainstorming/scripts/stop-server.sh +120 -120
  88. package/superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +49 -49
  89. package/superpowers/skills/brainstorming/visual-companion.md +299 -299
  90. package/superpowers/skills/dispatching-parallel-agents/SKILL.md +167 -167
  91. package/superpowers/skills/executing-plans/SKILL.md +64 -64
  92. package/superpowers/skills/finishing-a-development-branch/SKILL.md +225 -225
  93. package/superpowers/skills/receiving-code-review/SKILL.md +205 -205
  94. package/superpowers/skills/requesting-code-review/SKILL.md +95 -95
  95. package/superpowers/skills/requesting-code-review/code-reviewer.md +181 -181
  96. package/superpowers/skills/subagent-driven-development/SKILL.md +568 -568
  97. package/superpowers/skills/subagent-driven-development/implementer-prompt.md +154 -154
  98. package/superpowers/skills/subagent-driven-development/re-review-prompt.md +115 -115
  99. package/superpowers/skills/subagent-driven-development/task-reviewer-prompt.md +207 -207
  100. package/superpowers/skills/systematic-debugging/CREATION-LOG.md +119 -119
  101. package/superpowers/skills/systematic-debugging/SKILL.md +283 -283
  102. package/superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +158 -158
  103. package/superpowers/skills/systematic-debugging/condition-based-waiting.md +115 -115
  104. package/superpowers/skills/systematic-debugging/defense-in-depth.md +122 -122
  105. package/superpowers/skills/systematic-debugging/find-polluter.sh +72 -72
  106. package/superpowers/skills/systematic-debugging/root-cause-tracing.md +169 -169
  107. package/superpowers/skills/systematic-debugging/test-academic.md +14 -14
  108. package/superpowers/skills/systematic-debugging/test-pressure-1.md +58 -58
  109. package/superpowers/skills/systematic-debugging/test-pressure-2.md +68 -68
  110. package/superpowers/skills/systematic-debugging/test-pressure-3.md +69 -69
  111. package/superpowers/skills/test-driven-development/SKILL.md +320 -320
  112. package/superpowers/skills/test-driven-development/writing-good-tests.md +198 -198
  113. package/superpowers/skills/using-git-worktrees/SKILL.md +167 -167
  114. package/superpowers/skills/using-superpowers/SKILL.md +63 -63
  115. package/superpowers/skills/using-superpowers/references/antigravity-tools.md +23 -23
  116. package/superpowers/skills/using-superpowers/references/codex-tools.md +108 -108
  117. package/superpowers/skills/using-superpowers/references/gemini-tools.md +63 -63
  118. package/superpowers/skills/using-superpowers/references/hermes-tools.md +56 -56
  119. package/superpowers/skills/using-superpowers/references/pi-tools.md +16 -16
  120. package/superpowers/skills/verification-before-completion/SKILL.md +120 -120
  121. package/superpowers/skills/writing-plans/SKILL.md +171 -171
  122. package/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +49 -49
  123. package/superpowers/skills/writing-skills/SKILL.md +679 -679
  124. package/superpowers/skills/writing-skills/anthropic-best-practices.md +1150 -1150
  125. package/superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -189
  126. package/superpowers/skills/writing-skills/persuasion-principles.md +187 -187
  127. package/superpowers/skills/writing-skills/render-graphs.js +169 -169
  128. package/superpowers/skills/writing-skills/testing-skills-with-subagents.md +384 -384
  129. package/cbb/worktrees/commands/extend.md +0 -65
  130. package/cbb/worktrees/skills/openspec-close-worktree/scripts/find-target-worktree.js +0 -96
  131. package/cbb/worktrees/skills/openspec-extend-worktree/SKILL.md +0 -390
  132. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/check-env.js +0 -95
  133. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/check-repos.js +0 -98
  134. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/create-branches-and-worktrees.js +0 -135
  135. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/install-ai.js +0 -150
  136. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/list-available-apps.js +0 -88
  137. package/cbb/worktrees/skills/openspec-extend-worktree/scripts/sync-repos.js +0 -93
  138. package/cbb/worktrees/skills/openspec-init-worktree/scripts/find-workspace-root.js +0 -67
  139. package/cbb/worktrees/skills/openspec-init-worktree/scripts/generate-app-options.js +0 -93
  140. package/cbb/worktrees/skills/openspec-init-worktree/scripts/push-core.js +0 -136
  141. package/cbb/worktrees/skills/openspec-push-worktrees/scripts/silence-popup.js +0 -23
  142. package/config/config.sample.json +0 -16
  143. /package/cbb/worktrees/skills/{openspec-close-worktree → cbb-worktree-close}/scripts/silence-popup.js +0 -0
  144. /package/cbb/worktrees/skills/{openspec-extend-worktree → cbb-worktree-init}/scripts/silence-popup.js +0 -0
  145. /package/cbb/worktrees/skills/{openspec-init-worktree → cbb-worktree-push}/scripts/silence-popup.js +0 -0
@@ -1,250 +1,250 @@
1
- ---
2
- name: brainstorming
3
- 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."
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 classifying how much process the request needs, then work
11
- through your path: understand the context, refine the idea, present a
12
- design, and get your human partner's approval.
13
-
14
- <HARD-GATE>
15
- Do NOT invoke any implementation skill, write any code, scaffold any
16
- project, or take any implementation action until you have told your
17
- human partner what you intend and they have approved it. This applies
18
- to EVERY task on EVERY path below — the ceremony scales with the task;
19
- the approval gate never does.
20
- </HARD-GATE>
21
-
22
- ## Three Paths
23
-
24
- Before your first question, classify the request and say the
25
- classification out loud — "this looks bounded, so I'll present a short
26
- design here rather than write a spec" — so your human partner can
27
- override it:
28
-
29
- - **Spike** — a feasibility question ("can we...", "is it possible...",
30
- "quick and dirty is fine") whose output is an answer, not code you
31
- keep. Present the question and what you'll try in 2-3 sentences, get
32
- a nod, then find out as cheaply as correctness allows. No design
33
- doc, no spec file. Report findings as a recommendation; anything you
34
- built stays labeled throwaway.
35
- - **Bounded** — a well-scoped change to code that already exists in
36
- this repo: a new flag, a small endpoint, a one-file fix.
37
- Understanding the kind of app is not enough — bounded means the flow
38
- you are changing is already here to read. If there is no existing
39
- flow to change, the task is not bounded. Ask the clarifying
40
- questions that matter, present a short design IN CHAT (a few
41
- sentences to a few short paragraphs), and STOP. Implementation
42
- starts only after your human partner says yes to that design — a
43
- bounded task's approval is as hard a gate as an architectural
44
- one. No spec file, no implementation plan document.
45
- - **Architectural** — new projects, new subsystems, changes that
46
- restructure how components fit together or alter interfaces others
47
- depend on. Follow the full process: questions, approaches, sectioned
48
- design, written spec, then the writing-plans skill.
49
-
50
- When in doubt between two paths, take the heavier one. The ratchet is
51
- one-way: hidden complexity discovered mid-task upgrades the path —
52
- stop, say so, and step up. Nothing downgrades mid-task.
53
-
54
- ## Anti-Pattern: "Too Simple To Need Approval"
55
-
56
- Every path ends with your human partner approving your intent before
57
- implementation. A todo list, a single-function utility, a config
58
- change — the design may be two sentences in chat, but you MUST present
59
- it and get approval. "Simple" tasks are where unexamined assumptions
60
- cause the most wasted work. What scales with simplicity is the
61
- artifact, never the approval.
62
-
63
- ## Red Flags
64
-
65
- | Thought | Reality |
66
- |---------|---------|
67
- | "This is too simple to need a design" | Simple means a short design, not no design. Two sentences in chat, then approval. |
68
- | "I'll call it bounded and skip the spec" | Reaching for a label to skip work IS the doubt — take the heavier path. |
69
- | "It's bounded and the design is obvious — I'll start while they read it" | The gate is the approval, not the design's length. Present, then stop until you hear yes. |
70
- | "I understand this kind of app, so it's bounded" | Bounded measures the repo, not your familiarity. A new project has no existing flow — it is architectural. |
71
- | "The spike works, so I'll keep the code" | A spike's output is an answer. Keeping the code is a new request — classify it. |
72
- | "It grew, but I'm almost done — no need to re-classify" | Hidden complexity upgrades the path mid-task. Stop and say so. |
73
- | "They approved the spike, so the follow-up change is approved too" | Each task gets its own classification and its own approval. |
74
-
75
- ## Checklist
76
-
77
- Classify first, announce the path, then create a task for each item on
78
- your path and complete them in order.
79
-
80
- **Spike:**
81
- 1. **Explore project context** — enough to frame the probe
82
- 2. **Present question + probe plan** — 2-3 sentences
83
- 3. **Get approval** — a nod is enough
84
- 4. **Investigate** — as cheaply as correctness allows
85
- 5. **Report findings** — a recommendation; label anything built as throwaway
86
-
87
- **Bounded:**
88
- 1. **Explore project context** — check files, docs, recent commits
89
- 2. **Ask clarifying questions** — one at a time, the ones that matter
90
- 3. **Present short design in chat** — approach, files touched, testing
91
- 4. **Get approval** — STOP and wait for an explicit yes; presenting the design and starting in the same breath is skipping the gate
92
- 5. **Implement** — proceed with the normal development workflow (TDD applies); no plan document
93
-
94
- **Architectural:**
95
- 1. **Explore project context** — check files, docs, recent commits
96
- 2. **Offer the visual companion just-in-time** — NOT upfront. The first time a question would genuinely be clearer shown than described, offer it then (its own message); on approval its browser tab opens for you. If no visual question ever arises, never offer it. See the Visual Companion section below.
97
- 3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
98
- 4. **Propose 2-3 approaches** — with trade-offs and your recommendation
99
- 5. **Present design** — in sections scaled to their complexity, get user approval after each section
100
- 6. **Write design doc** — save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` and commit
101
- 7. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope (see below)
102
- 8. **User reviews written spec** — ask user to review the spec file before proceeding
103
- 9. **Transition to implementation** — invoke writing-plans skill to create implementation plan
104
-
105
- ## Process Flow
106
-
107
- ```dot
108
- digraph brainstorming {
109
- "Classify: spike / bounded / architectural" [shape=diamond];
110
- "Present question + probe (2-3 sentences)" [shape=box];
111
- "Ask clarifying questions (bounded)" [shape=box];
112
- "Present short design in chat" [shape=box];
113
- "Human approves?" [shape=diamond];
114
- "Investigate; report recommendation" [shape=doublecircle];
115
- "Implement via normal workflow (no plan doc)" [shape=doublecircle];
116
- "Explore project context" [shape=box];
117
- "Ask clarifying questions" [shape=box];
118
- "Propose 2-3 approaches" [shape=box];
119
- "Present design sections" [shape=box];
120
- "User approves design?" [shape=diamond];
121
- "Write design doc" [shape=box];
122
- "Spec self-review\n(fix inline)" [shape=box];
123
- "User reviews spec?" [shape=diamond];
124
- "Invoke writing-plans skill" [shape=doublecircle];
125
- "Hidden complexity? Upgrade path" [shape=box];
126
-
127
- "Classify: spike / bounded / architectural" -> "Present question + probe (2-3 sentences)" [label="spike"];
128
- "Classify: spike / bounded / architectural" -> "Ask clarifying questions (bounded)" [label="bounded"];
129
- "Classify: spike / bounded / architectural" -> "Explore project context" [label="architectural"];
130
- "Present question + probe (2-3 sentences)" -> "Human approves?";
131
- "Ask clarifying questions (bounded)" -> "Present short design in chat";
132
- "Present short design in chat" -> "Human approves?";
133
- "Human approves?" -> "Investigate; report recommendation" [label="spike: yes"];
134
- "Human approves?" -> "Implement via normal workflow (no plan doc)" [label="bounded: yes"];
135
- "Hidden complexity? Upgrade path" -> "Classify: spike / bounded / architectural";
136
- "Explore project context" -> "Ask clarifying questions";
137
- "Ask clarifying questions" -> "Propose 2-3 approaches";
138
- "Propose 2-3 approaches" -> "Present design sections";
139
- "Present design sections" -> "User approves design?";
140
- "User approves design?" -> "Present design sections" [label="no, revise"];
141
- "User approves design?" -> "Write design doc" [label="yes"];
142
- "Write design doc" -> "Spec self-review\n(fix inline)";
143
- "Spec self-review\n(fix inline)" -> "User reviews spec?";
144
- "User reviews spec?" -> "Write design doc" [label="changes requested"];
145
- "User reviews spec?" -> "Invoke writing-plans skill" [label="approved"];
146
- }
147
- ```
148
-
149
- **Terminal states are path-bound.** Architectural: the ONLY skill you
150
- invoke after brainstorming is writing-plans — never frontend-design,
151
- mcp-builder, or any other implementation skill. Bounded: after
152
- approval, implementation proceeds directly through the normal
153
- development workflow; no plan document. Spike: the terminal state is a
154
- reported recommendation.
155
-
156
- ## The Process
157
-
158
- The subsections below serve the bounded and architectural paths (a
159
- spike stops at "present the probe, get a nod"). Sections from
160
- **Exploring approaches** onward are architectural-path depth — for
161
- bounded work, context plus a few questions plus a short in-chat design
162
- is the whole process.
163
-
164
- **Understanding the idea:**
165
-
166
- - Check out the current project state first (files, docs, recent commits)
167
- - 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.
168
- - 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.
169
- - For appropriately-scoped projects, ask questions one at a time to refine the idea
170
- - Prefer multiple choice questions when possible, but open-ended is fine too
171
- - Only one question per message - if a topic needs more exploration, break it into multiple questions
172
- - Focus on understanding: purpose, constraints, success criteria
173
-
174
- **Exploring approaches:**
175
-
176
- - Propose 2-3 different approaches with trade-offs
177
- - Present options conversationally with your recommendation and reasoning
178
- - Lead with your recommended option and explain why
179
- - YAGNI ruthlessly - remove unnecessary features from every approach and design
180
-
181
- **Presenting the design:**
182
-
183
- - Once you believe you understand what you're building, present the design
184
- - Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
185
- - Ask after each section whether it looks right so far
186
- - Cover: architecture, components, data flow, error handling, testing
187
- - Be ready to go back and clarify if something doesn't make sense
188
-
189
- **Design for isolation and clarity:**
190
-
191
- - Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
192
- - For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
193
- - 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.
194
- - 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.
195
-
196
- **Working in existing codebases:**
197
-
198
- - Explore the current structure before proposing changes. Follow existing patterns.
199
- - 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.
200
- - Don't propose unrelated refactoring. Stay focused on what serves the current goal.
201
-
202
- ## After the Design (architectural path)
203
-
204
- **Documentation:**
205
-
206
- - Write the validated design (spec) to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
207
- - (User preferences for spec location override this default)
208
- - Use elements-of-style:writing-clearly-and-concisely skill if available
209
- - Commit the design document to git
210
-
211
- **Spec Self-Review:**
212
- After writing the spec document, look at it with fresh eyes:
213
-
214
- 1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them.
215
- 2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions?
216
- 3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition?
217
- 4. **Ambiguity check:** Could any requirement be interpreted two different ways? If so, pick one and make it explicit.
218
-
219
- Fix any issues inline. No need to re-review — just fix and move on.
220
-
221
- **User Review Gate:**
222
- After the spec review loop passes, ask the user to review the written spec before proceeding:
223
-
224
- > "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."
225
-
226
- 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.
227
-
228
- **Implementation:**
229
-
230
- - Invoke the writing-plans skill to create a detailed implementation plan
231
- - Do NOT invoke any other skill. writing-plans is the next step.
232
-
233
- ## Visual Companion
234
-
235
- 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.
236
-
237
- **Offering the companion (just-in-time):** Do NOT offer it upfront. Wait until a question would genuinely be clearer shown than told — a real mockup / layout / diagram question, not merely a UI *topic*. The first time that happens, offer it then, as its own message:
238
- > "This next part might be easier if I show you — I can put together mockups, diagrams, and comparisons in a browser tab as we go. It's still new and can be token-intensive. Want me to? I'll open it for you."
239
-
240
- **This offer MUST be its own message.** Only the offer — no clarifying question, summary, or other content. Wait for the user's response. If they accept, start the server with `--open` so their browser opens to the first screen automatically. If they decline, continue text-only and don't offer again unless they raise it.
241
-
242
- **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?**
243
-
244
- - **Use the browser** for content that IS visual — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
245
- - **Use the terminal** for content that is text — requirements questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions
246
-
247
- 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.
248
-
249
- If they agree to the companion, read the detailed guide before proceeding:
250
- `skills/brainstorming/visual-companion.md`
1
+ ---
2
+ name: brainstorming
3
+ 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."
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 classifying how much process the request needs, then work
11
+ through your path: understand the context, refine the idea, present a
12
+ design, and get your human partner's approval.
13
+
14
+ <HARD-GATE>
15
+ Do NOT invoke any implementation skill, write any code, scaffold any
16
+ project, or take any implementation action until you have told your
17
+ human partner what you intend and they have approved it. This applies
18
+ to EVERY task on EVERY path below — the ceremony scales with the task;
19
+ the approval gate never does.
20
+ </HARD-GATE>
21
+
22
+ ## Three Paths
23
+
24
+ Before your first question, classify the request and say the
25
+ classification out loud — "this looks bounded, so I'll present a short
26
+ design here rather than write a spec" — so your human partner can
27
+ override it:
28
+
29
+ - **Spike** — a feasibility question ("can we...", "is it possible...",
30
+ "quick and dirty is fine") whose output is an answer, not code you
31
+ keep. Present the question and what you'll try in 2-3 sentences, get
32
+ a nod, then find out as cheaply as correctness allows. No design
33
+ doc, no spec file. Report findings as a recommendation; anything you
34
+ built stays labeled throwaway.
35
+ - **Bounded** — a well-scoped change to code that already exists in
36
+ this repo: a new flag, a small endpoint, a one-file fix.
37
+ Understanding the kind of app is not enough — bounded means the flow
38
+ you are changing is already here to read. If there is no existing
39
+ flow to change, the task is not bounded. Ask the clarifying
40
+ questions that matter, present a short design IN CHAT (a few
41
+ sentences to a few short paragraphs), and STOP. Implementation
42
+ starts only after your human partner says yes to that design — a
43
+ bounded task's approval is as hard a gate as an architectural
44
+ one. No spec file, no implementation plan document.
45
+ - **Architectural** — new projects, new subsystems, changes that
46
+ restructure how components fit together or alter interfaces others
47
+ depend on. Follow the full process: questions, approaches, sectioned
48
+ design, written spec, then the writing-plans skill.
49
+
50
+ When in doubt between two paths, take the heavier one. The ratchet is
51
+ one-way: hidden complexity discovered mid-task upgrades the path —
52
+ stop, say so, and step up. Nothing downgrades mid-task.
53
+
54
+ ## Anti-Pattern: "Too Simple To Need Approval"
55
+
56
+ Every path ends with your human partner approving your intent before
57
+ implementation. A todo list, a single-function utility, a config
58
+ change — the design may be two sentences in chat, but you MUST present
59
+ it and get approval. "Simple" tasks are where unexamined assumptions
60
+ cause the most wasted work. What scales with simplicity is the
61
+ artifact, never the approval.
62
+
63
+ ## Red Flags
64
+
65
+ | Thought | Reality |
66
+ |---------|---------|
67
+ | "This is too simple to need a design" | Simple means a short design, not no design. Two sentences in chat, then approval. |
68
+ | "I'll call it bounded and skip the spec" | Reaching for a label to skip work IS the doubt — take the heavier path. |
69
+ | "It's bounded and the design is obvious — I'll start while they read it" | The gate is the approval, not the design's length. Present, then stop until you hear yes. |
70
+ | "I understand this kind of app, so it's bounded" | Bounded measures the repo, not your familiarity. A new project has no existing flow — it is architectural. |
71
+ | "The spike works, so I'll keep the code" | A spike's output is an answer. Keeping the code is a new request — classify it. |
72
+ | "It grew, but I'm almost done — no need to re-classify" | Hidden complexity upgrades the path mid-task. Stop and say so. |
73
+ | "They approved the spike, so the follow-up change is approved too" | Each task gets its own classification and its own approval. |
74
+
75
+ ## Checklist
76
+
77
+ Classify first, announce the path, then create a task for each item on
78
+ your path and complete them in order.
79
+
80
+ **Spike:**
81
+ 1. **Explore project context** — enough to frame the probe
82
+ 2. **Present question + probe plan** — 2-3 sentences
83
+ 3. **Get approval** — a nod is enough
84
+ 4. **Investigate** — as cheaply as correctness allows
85
+ 5. **Report findings** — a recommendation; label anything built as throwaway
86
+
87
+ **Bounded:**
88
+ 1. **Explore project context** — check files, docs, recent commits
89
+ 2. **Ask clarifying questions** — one at a time, the ones that matter
90
+ 3. **Present short design in chat** — approach, files touched, testing
91
+ 4. **Get approval** — STOP and wait for an explicit yes; presenting the design and starting in the same breath is skipping the gate
92
+ 5. **Implement** — proceed with the normal development workflow (TDD applies); no plan document
93
+
94
+ **Architectural:**
95
+ 1. **Explore project context** — check files, docs, recent commits
96
+ 2. **Offer the visual companion just-in-time** — NOT upfront. The first time a question would genuinely be clearer shown than described, offer it then (its own message); on approval its browser tab opens for you. If no visual question ever arises, never offer it. See the Visual Companion section below.
97
+ 3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
98
+ 4. **Propose 2-3 approaches** — with trade-offs and your recommendation
99
+ 5. **Present design** — in sections scaled to their complexity, get user approval after each section
100
+ 6. **Write design doc** — save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` and commit
101
+ 7. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope (see below)
102
+ 8. **User reviews written spec** — ask user to review the spec file before proceeding
103
+ 9. **Transition to implementation** — invoke writing-plans skill to create implementation plan
104
+
105
+ ## Process Flow
106
+
107
+ ```dot
108
+ digraph brainstorming {
109
+ "Classify: spike / bounded / architectural" [shape=diamond];
110
+ "Present question + probe (2-3 sentences)" [shape=box];
111
+ "Ask clarifying questions (bounded)" [shape=box];
112
+ "Present short design in chat" [shape=box];
113
+ "Human approves?" [shape=diamond];
114
+ "Investigate; report recommendation" [shape=doublecircle];
115
+ "Implement via normal workflow (no plan doc)" [shape=doublecircle];
116
+ "Explore project context" [shape=box];
117
+ "Ask clarifying questions" [shape=box];
118
+ "Propose 2-3 approaches" [shape=box];
119
+ "Present design sections" [shape=box];
120
+ "User approves design?" [shape=diamond];
121
+ "Write design doc" [shape=box];
122
+ "Spec self-review\n(fix inline)" [shape=box];
123
+ "User reviews spec?" [shape=diamond];
124
+ "Invoke writing-plans skill" [shape=doublecircle];
125
+ "Hidden complexity? Upgrade path" [shape=box];
126
+
127
+ "Classify: spike / bounded / architectural" -> "Present question + probe (2-3 sentences)" [label="spike"];
128
+ "Classify: spike / bounded / architectural" -> "Ask clarifying questions (bounded)" [label="bounded"];
129
+ "Classify: spike / bounded / architectural" -> "Explore project context" [label="architectural"];
130
+ "Present question + probe (2-3 sentences)" -> "Human approves?";
131
+ "Ask clarifying questions (bounded)" -> "Present short design in chat";
132
+ "Present short design in chat" -> "Human approves?";
133
+ "Human approves?" -> "Investigate; report recommendation" [label="spike: yes"];
134
+ "Human approves?" -> "Implement via normal workflow (no plan doc)" [label="bounded: yes"];
135
+ "Hidden complexity? Upgrade path" -> "Classify: spike / bounded / architectural";
136
+ "Explore project context" -> "Ask clarifying questions";
137
+ "Ask clarifying questions" -> "Propose 2-3 approaches";
138
+ "Propose 2-3 approaches" -> "Present design sections";
139
+ "Present design sections" -> "User approves design?";
140
+ "User approves design?" -> "Present design sections" [label="no, revise"];
141
+ "User approves design?" -> "Write design doc" [label="yes"];
142
+ "Write design doc" -> "Spec self-review\n(fix inline)";
143
+ "Spec self-review\n(fix inline)" -> "User reviews spec?";
144
+ "User reviews spec?" -> "Write design doc" [label="changes requested"];
145
+ "User reviews spec?" -> "Invoke writing-plans skill" [label="approved"];
146
+ }
147
+ ```
148
+
149
+ **Terminal states are path-bound.** Architectural: the ONLY skill you
150
+ invoke after brainstorming is writing-plans — never frontend-design,
151
+ mcp-builder, or any other implementation skill. Bounded: after
152
+ approval, implementation proceeds directly through the normal
153
+ development workflow; no plan document. Spike: the terminal state is a
154
+ reported recommendation.
155
+
156
+ ## The Process
157
+
158
+ The subsections below serve the bounded and architectural paths (a
159
+ spike stops at "present the probe, get a nod"). Sections from
160
+ **Exploring approaches** onward are architectural-path depth — for
161
+ bounded work, context plus a few questions plus a short in-chat design
162
+ is the whole process.
163
+
164
+ **Understanding the idea:**
165
+
166
+ - Check out the current project state first (files, docs, recent commits)
167
+ - 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.
168
+ - 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.
169
+ - For appropriately-scoped projects, ask questions one at a time to refine the idea
170
+ - Prefer multiple choice questions when possible, but open-ended is fine too
171
+ - Only one question per message - if a topic needs more exploration, break it into multiple questions
172
+ - Focus on understanding: purpose, constraints, success criteria
173
+
174
+ **Exploring approaches:**
175
+
176
+ - Propose 2-3 different approaches with trade-offs
177
+ - Present options conversationally with your recommendation and reasoning
178
+ - Lead with your recommended option and explain why
179
+ - YAGNI ruthlessly - remove unnecessary features from every approach and design
180
+
181
+ **Presenting the design:**
182
+
183
+ - Once you believe you understand what you're building, present the design
184
+ - Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
185
+ - Ask after each section whether it looks right so far
186
+ - Cover: architecture, components, data flow, error handling, testing
187
+ - Be ready to go back and clarify if something doesn't make sense
188
+
189
+ **Design for isolation and clarity:**
190
+
191
+ - Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
192
+ - For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
193
+ - 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.
194
+ - 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.
195
+
196
+ **Working in existing codebases:**
197
+
198
+ - Explore the current structure before proposing changes. Follow existing patterns.
199
+ - 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.
200
+ - Don't propose unrelated refactoring. Stay focused on what serves the current goal.
201
+
202
+ ## After the Design (architectural path)
203
+
204
+ **Documentation:**
205
+
206
+ - Write the validated design (spec) to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
207
+ - (User preferences for spec location override this default)
208
+ - Use elements-of-style:writing-clearly-and-concisely skill if available
209
+ - Commit the design document to git
210
+
211
+ **Spec Self-Review:**
212
+ After writing the spec document, look at it with fresh eyes:
213
+
214
+ 1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them.
215
+ 2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions?
216
+ 3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition?
217
+ 4. **Ambiguity check:** Could any requirement be interpreted two different ways? If so, pick one and make it explicit.
218
+
219
+ Fix any issues inline. No need to re-review — just fix and move on.
220
+
221
+ **User Review Gate:**
222
+ After the spec review loop passes, ask the user to review the written spec before proceeding:
223
+
224
+ > "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."
225
+
226
+ 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.
227
+
228
+ **Implementation:**
229
+
230
+ - Invoke the writing-plans skill to create a detailed implementation plan
231
+ - Do NOT invoke any other skill. writing-plans is the next step.
232
+
233
+ ## Visual Companion
234
+
235
+ 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.
236
+
237
+ **Offering the companion (just-in-time):** Do NOT offer it upfront. Wait until a question would genuinely be clearer shown than told — a real mockup / layout / diagram question, not merely a UI *topic*. The first time that happens, offer it then, as its own message:
238
+ > "This next part might be easier if I show you — I can put together mockups, diagrams, and comparisons in a browser tab as we go. It's still new and can be token-intensive. Want me to? I'll open it for you."
239
+
240
+ **This offer MUST be its own message.** Only the offer — no clarifying question, summary, or other content. Wait for the user's response. If they accept, start the server with `--open` so their browser opens to the first screen automatically. If they decline, continue text-only and don't offer again unless they raise it.
241
+
242
+ **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?**
243
+
244
+ - **Use the browser** for content that IS visual — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
245
+ - **Use the terminal** for content that is text — requirements questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions
246
+
247
+ 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.
248
+
249
+ If they agree to the companion, read the detailed guide before proceeding:
250
+ `skills/brainstorming/visual-companion.md`