From superpowers-codex
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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/superpowers-codex:brainstormingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
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.
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.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:
docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md and commitSPEC_BASE before writing the spec; after committing, dispatch the structural-completeness reviewer (dispatch.sh task, spec-document-reviewer sidecar) and the design-soundness reviewer (dispatch.sh adversarial, adversarial-spec-review-focus.md) in parallel each round; fix ALL findings; loop until the structural-completeness reviewer returns Status: OKAY AND the design-soundness reviewer returns Verdict: approve in the same round (see below — do NOT do this inline)digraph brainstorming {
"Explore project context" [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\n+ capture SPEC_BASE" [shape=box];
"Spec review loop\n(structural-completeness: dispatch.sh task + design-soundness: dispatch.sh adversarial\nboth parallel, both must pass)" [shape=box];
"User reviews spec?" [shape=diamond];
"Invoke writing-plans skill" [shape=doublecircle];
"Explore project context" -> "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\n+ capture SPEC_BASE" [label="yes"];
"Write design doc\n+ capture SPEC_BASE" -> "Spec review loop\n(structural-completeness: dispatch.sh task + design-soundness: dispatch.sh adversarial\nboth parallel, both must pass)";
"Spec review loop\n(structural-completeness: dispatch.sh task + design-soundness: dispatch.sh adversarial\nboth parallel, both must pass)" -> "Spec review loop\n(structural-completeness: dispatch.sh task + design-soundness: dispatch.sh adversarial\nboth parallel, both must pass)" [label="any finding — fix all, re-dispatch both"];
"Spec review loop\n(structural-completeness: dispatch.sh task + design-soundness: dispatch.sh adversarial\nboth parallel, both must pass)" -> "User reviews spec?" [label="both OKAY + approve"];
"User reviews spec?" -> "Spec review loop\n(structural-completeness: dispatch.sh task + design-soundness: dispatch.sh adversarial\nboth parallel, both must pass)" [label="changes requested — re-run dual loop"];
"User reviews spec?" -> "Invoke writing-plans skill" [label="explicitly 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:
Documentation:
docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md
Spec Review Loop (Dual Reviewer, codex companion):
Do NOT perform inline self-review. After writing and committing the spec document, dispatch two reviewers in parallel using the codex companion. Both reviewers examine the same spec document; both must pass before proceeding.
Before writing the spec file, capture SPEC_BASE:
SPEC_BASE="$(git rev-parse HEAD)"
Store this value — it is the parent commit of the spec commit and must not change across rounds.
Structural Completeness reviewer (dispatch.sh task, read-only):
Checks: placeholder scan, internal consistency, scope check, ambiguity check, YAGNI. Returns Status: OKAY or Status: Issues Found.
Design Soundness reviewer (dispatch.sh adversarial):
Challenges design-level soundness: failure paths / partial failure / rollback, concurrency and ordering assumptions, boundary and empty states, compatibility / migration risk, unstated critical assumptions. Returns Verdict: approve or Verdict: needs-attention.
Parallel dispatch per round:
Both reviewers are launched simultaneously each round as separate background Bash calls (run_in_background: true). When a backgrounded dispatch finishes, Claude Code notifies you automatically — do NOT poll BashOutput in a loop or otherwise wait for the output to have a value. Wait for each reviewer's completion notification, then read that task's output once. Collect both outputs before evaluating results.
Dispatch mechanism (shared dispatch.sh, run from repo root). ${CLAUDE_PLUGIN_ROOT}
is inline-expanded inside this SKILL.md at load time; the spec path is repo-root-relative.
Each reviewer is a separate run_in_background: true Bash call (its own shell), so each
block invokes dispatch.sh directly via ${CLAUDE_PLUGIN_ROOT} (the skill is assumed to be
installed as a plugin).
Structural Completeness reviewer:
"${CLAUDE_PLUGIN_ROOT}/scripts/dispatch.sh" task \
--prompt "${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/spec-document-reviewer-prompt.md" \
--set SPEC_FILE_PATH=docs/superpowers/specs/<YYYY-MM-DD-topic>-design.md
Design Soundness reviewer. Fill <SPEC_BASE> with the SHA captured before the spec commit; substitute the value, do not run verbatim:
"${CLAUDE_PLUGIN_ROOT}/scripts/dispatch.sh" adversarial \
--base <SPEC_BASE> \
--focus "${CLAUDE_PLUGIN_ROOT}/skills/brainstorming/adversarial-spec-review-focus.md"
Round loop — zero tolerance:
while true:
[launch the structural-completeness and design-soundness reviewers in parallel, wait for both]
if structural_completeness == "Status: OKAY" AND design_soundness == "Verdict: approve":
break # both passed — exit loop
fix_all_findings(structural_completeness.issues + design_soundness.findings) # every finding — none skipped
# spec was edited — re-dispatch BOTH reviewers next round
# (both re-run together whenever any spec edit is made)
Any finding from either reviewer blocks the round. Fix everything before re-dispatching.
Git commit discipline: Before the first review round, commit the first version of the spec. After each round's fixes, commit again with a message noting the round (e.g. docs(spec): fix review round 2 - resolve ambiguity in auth flow). If the spec file is gitignored, skip the commit — NEVER use git add -f to force-add an ignored file. If the spec is gitignored, the design-soundness reviewer cannot diff the spec commit and must be skipped for that round (note the skip in output).
User Review Gate:
After the dual review loop reports both OKAY and approve, 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:
Only leave this gate and proceed to writing-plans once the user explicitly approves (e.g. "OK", "looks good", "start the plan"). Do not proceed on ambiguous or silent responses.
Implementation:
The mandatory workflow sequence is brainstorming → spec document → writing-plans → plan document → implementation, in strict order. Never jump from brainstorming straight to code, and never skip the spec or plan stages — even for "simple" tasks.
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub stu43005/superpowers-codex --plugin superpowers-codex