plugins/superpowers/skills/brainstorming/SKILL.md
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.
npx skillsauth add primatrix/skills brainstormingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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>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.
You MUST create a task for each of these items and complete them in order:
primatrix/wiki via GitHub API: determine next RFC number, ask user to select GitHub Project, create branch + RFC file + PR, associate with Projectdigraph 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];
"Publish RFC to wiki" [shape=box];
"Spec review loop" [shape=box];
"Spec review passed?" [shape=diamond];
"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?" -> "Publish RFC to wiki" [label="yes"];
"Publish RFC to wiki" -> "Spec review loop";
"Spec review loop" -> "Spec review passed?";
"Spec review passed?" -> "Spec review loop" [label="issues found,\nfix and re-dispatch"];
"Spec review passed?" -> "User reviews spec?" [label="approved"];
"User reviews spec?" -> "Publish RFC to wiki" [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.
Understanding the idea:
Exploring approaches:
Presenting the design:
Design for isolation and clarity:
Working in existing codebases:
Publish RFC to wiki:
Determine next RFC number:
gh api repos/primatrix/wiki/contents/docs/rfc --jq '[.[].name | select(test("^[0-9]{4}-"))] | sort | (last // "0000-") | split("-") | .[0] | tonumber + 1'
Format as zero-padded 4-digit number (e.g., 0002).
Select GitHub Project:
Run gh project list --owner primatrix and present interactive choice to user via AskUserQuestion. Store the selected project number.
Create branch:
MAIN_SHA=$(gh api repos/primatrix/wiki/git/ref/heads/main --jq '.object.sha')
# Check if branch already exists
if gh api repos/primatrix/wiki/git/ref/heads/rfc/NNNN-<topic> >/dev/null 2>&1; then
echo "Branch rfc/NNNN-<topic> already exists. Using existing branch."
else
gh api repos/primatrix/wiki/git/refs -f ref="refs/heads/rfc/NNNN-<topic>" -f sha="$MAIN_SHA"
fi
Create RFC file (docs/rfc/NNNN-<topic>.md):
Use the design spec content as-is (current brainstorming output format). Encode as base64 and push:
CONTENT=$(printf '%s' "$SPEC_CONTENT" | base64 | tr -d '\n')
gh api repos/primatrix/wiki/contents/docs/rfc/NNNN-<topic>.md \
-X PUT -f message="docs: add RFC NNNN <topic>" \
-f content="$CONTENT" -f branch="rfc/NNNN-<topic>"
Update docs/rfc/index.md:
Fetch current content, add a new row to the RFC table, push update to the same branch.
Update docs/.vitepress/config.ts:
Fetch current content, add new sidebar entry to the RFC items array, push update to the same branch.
Create PR:
gh pr create --repo primatrix/wiki --head "rfc/NNNN-<topic>" \
--title "RFC NNNN: <topic>" --body-file <(echo "<spec summary>")
Associate with Project:
gh project item-add <project-number> --owner primatrix --url <pr-url>
RFC_NUMBER, RFC_BRANCH (e.g., rfc/NNNN-<topic>), RFC_PATH (e.g., docs/rfc/NNNN-<topic>.md), RFC_PR_URL. Downstream skills access these via the same session context.Spec Review Loop: After publishing the RFC:
gh api repos/primatrix/wiki/contents/docs/rfc/NNNN-<topic>.md \
-H "Accept: application/vnd.github.raw" -f ref="rfc/NNNN-<topic>"
User Review Gate: After the spec review loop passes, ask the user to review the RFC before proceeding:
"RFC published as PR:
<PR_URL>. Please review the RFC 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 (push updates to the RFC branch) and re-run the spec review loop. Only proceed once the user approves.
Implementation:
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?
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
development
Use when analyzing TPU pretraining HBM occupancy from a profile directory — locates the static HBM peak (the same number TensorBoard's Memory Viewer shows), enumerates every buffer alive at the peak schedule moment with size / HLO instruction / opcode / op_name, and rolls the alive set up by opcode and op_name. Reads compile-time `*.hlo_proto.pb` (BufferAssignmentProto) as the primary source; runtime `*.xplane.pb` allocator events are a secondary, often-truncated signal.
testing
Use when analyzing TPU pretraining compute efficiency from xplane.pb — produces source-line-aggregated HLO duration tables, layer-scoped breakdowns, non-compute (padding/cast/copy) audits, and v7x roofline shortfall vs theoretical peak. Reads schema documented by profile-anatomy.
tools
--- name: comm-analysis description: Use when analyzing communication on a TPU pretraining profile — extracts every comm primitive (async + sync, TC + SparseCore), attributes axes via HLO replica_groups, computes per-row NCCL bus BW vs per-axis peak ICI BW (peak_link × k_torus_dims × directions_per_dim; TPUv7x: 200 GB/s bidir per link on a 3D torus; util% requires `--mesh-spec` with topology), and reports per-step compute/comm overlap. Builds on profile-anatomy. --- # Communication Analysis **
documentation
Use when reading TPU pretraining profiles (xplane.pb, trace.json.gz) — describes the on-disk layout, the XSpace/XPlane/XLine/XEvent/XStat hierarchy, and provides reference scripts that future tpu-perf skills can read as schema documentation.