From sw
Multi-perspective ideation with cognitive lenses (Six Hats, SCAMPER, TRIZ), persistent idea trees, and handoff to sw:increment. Use for brainstorming, exploring alternatives, or comparing approaches.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sw:brainstorm <topic> [--depth quick|standard|deep] [--lens default|six-hats|scamper|triz|adjacent] [--resume] [--criteria c1,c2,c3]<topic> [--depth quick|standard|deep] [--lens default|six-hats|scamper|triz|adjacent] [--resume] [--criteria c1,c2,c3]opusThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- Skill memories loaded automatically -->
Expert ideation facilitator. Combines structured frameworks (Six Thinking Hats, SCAMPER, TRIZ) with engineering judgment. Goal: expand the solution space before committing to an implementation path.
Principles: Diverge before converging | Every approach gets fair hearing | Tables over essays | Feeds into sw:increment, never replaces it
Before any ideation work, register the brainstorm session:
mkdir -p .specweave/docs/brainstorms
mkdir -p .specweave/state
TIMESTAMP=$(date +%Y-%m-%d)
TOPIC_SLUG=$(echo "TOPIC" | tr ' ' '-' | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9-]//g' | head -c 40)
STATE_FILE=".specweave/state/brainstorm-${TIMESTAMP}-${TOPIC_SLUG}.json"
Write initial state:
{
"topic": "<topic>",
"depth": "<quick|standard|deep>",
"lenses": [],
"startedAt": "<ISO-8601>",
"phase": "frame",
"approaches": [],
"selectedApproach": null,
"handedOffTo": null
}
Follow this graph. Each node is a phase. Edges are conditional on depth mode.
digraph brainstorm {
rankdir=TB;
node [shape=box, style="rounded"];
start [label="START\nsw:brainstorm <topic>"];
resume_check [label="RESUME CHECK\n--resume flag?"];
step0 [label="STEP 0\nState Registration"];
parse [label="PARSE ARGS\n--depth, --lens, --criteria"];
resume_load [label="LOAD STATE\nRead previous session\nResume from last phase"];
frame [label="PHASE 1: FRAME\nProblem statement\nStarbursting (5W1H)\n1-2 questions"];
lens_select [label="LENS SELECTION\nAskUserQuestion\n(deep: multi-select)"];
diverge [label="PHASE 2: DIVERGE\nGenerate approaches\nvia selected lens"];
evaluate [label="PHASE 3: EVALUATE\nComparison matrix\n(default or custom criteria)\nRecommendation"];
deepen [label="PHASE 4: DEEPEN\nAbstraction laddering\nAnalogies + Pre-mortem"];
output [label="PHASE 5: OUTPUT\nSave brainstorm doc\nOffer handoff"];
done [label="DONE"];
start -> resume_check;
resume_check -> step0 [label="new session"];
resume_check -> resume_load [label="--resume"];
resume_load -> frame [label="phase was: frame"];
resume_load -> lens_select [label="phase was: diverge"];
resume_load -> evaluate [label="phase was: evaluate"];
resume_load -> output [label="phase was: complete\n(explore abandoned branches)"];
step0 -> parse;
parse -> frame;
frame -> evaluate [label="quick\n(3 inline approaches)"];
frame -> lens_select [label="standard / deep"];
lens_select -> diverge;
diverge -> evaluate;
evaluate -> output [label="quick / standard"];
evaluate -> deepen [label="deep"];
evaluate -> lens_select [label="user picks:\nrun more lenses"];
deepen -> output;
output -> done [label="user declines handoff"];
output -> done [label="user accepts → invoke sw:increment"];
}
Phase gating rules:
Parse the user's input for:
| Arg | Default | Values |
|---|---|---|
--depth | standard | quick, standard, deep |
--lens | default | default, six-hats, scamper, triz, adjacent |
--resume | false | Flag — resume a previous brainstorm session |
--criteria | (default set) | Comma-separated custom evaluation criteria |
Everything else is the topic (the problem statement to brainstorm about).
If no topic is provided, ask the user: "What would you like to brainstorm about?"
--resume)When --resume: find most recent state file (ls -t .specweave/state/brainstorm-*-${TOPIC_SLUG}*.json | head -1), read it, resume from last completed phase. If phase: "complete", offer to explore abandoned branches with a different lens. Enables iterative brainstorming: quick first, then --resume --depth deep.
--criteria)Override defaults: sw:brainstorm "topic" --criteria "perf,cost,complexity,risk". Preset sets auto-detected:
Token budget: ~1200 tokens max (raised 3× in SpecWeave 1.1.0; override via quality.tokenBudgets.frame).
Restate the user's topic as a clear, one-sentence problem statement. If the topic is vague, sharpen it.
Generate answers for each dimension:
| Dimension | Question |
|---|---|
| Who | Who is affected? Who benefits? Who decides? |
| What | What exactly needs to happen? What exists today? |
| When | When is this needed? Time constraints? Deadlines? |
| Where | Where in the system/product/codebase does this live? |
| Why | Why is this needed now? What pain does it solve? |
| How | How might we approach this? (high-level only) |
Ask 1-2 targeted questions using AskUserQuestion to resolve the biggest unknowns. Prefer structured choices over open-ended questions.
If --depth quick: generate 3 inline approaches immediately (no lens selection) and skip to Phase 3 (Evaluate).
Format each approach as:
### Approach [A/B/C]: [Name]
**Summary**: [2-3 sentences]
**Key trade-off**: [one sentence]
Update state: "phase": "evaluate".
Token budget: ~1800 tokens per approach (max ~10800 for 6 approaches; raised 3× in SpecWeave 1.1.0; override via quality.tokenBudgets.diverge).
Standard mode: Use the --lens argument or default to the default lens. Single lens, single thread.
Deep mode: Ask the user which lenses to apply via AskUserQuestion with multiSelect: true:
Which cognitive lenses should we apply?
Options:
- Default (parallel independent generation) (Recommended)
- Six Thinking Hats (6 perspectives: facts, feelings, caution, optimism, creativity, process)
- SCAMPER (7 transformations: substitute, combine, adapt, modify, repurpose, eliminate, reverse)
- TRIZ / Constraint Inversion (negate core assumptions)
- Adjacent Possible (what recently became feasible)
Standard mode (single thread): Generate 4-6 approaches using the selected lens inline.
Deep mode (parallel subagents): Dispatch each lens facet as a separate Agent() call:
Agent({
description: "[lens] [facet] perspective",
prompt: "You are generating ONE approach to: [problem statement].
Your perspective: [facet description].
Context: [frame summary].
Generate exactly ONE approach in this format:
## Approach: [Name]
**Perspective**: [facet name]
**Summary**: [2-3 sentences]
**Key steps**: [3-5 numbered steps]
**Strengths**: [2-3 bullets]
**Risks**: [2-3 bullets]
**Effort**: [Low/Medium/High]
Stay under 150 lines. Be concrete and specific.",
subagent_type: "general-purpose",
model: "sonnet"
})
Collect all subagent results and compile into a unified approaches list.
Each approach MUST have:
Update state: "phase": "evaluate", populate "approaches" array.
Token budget: ~1500 tokens max (raised 3× in SpecWeave 1.1.0; override via quality.tokenBudgets.evaluate).
Build a table scoring each approach on these criteria (1-5 scale):
| Criterion | Description |
|---|---|
| Complexity | How hard to implement (1=trivial, 5=very complex) |
| Time | How long to deliver (1=days, 5=months) |
| Risk | What could go wrong (1=safe, 5=high risk) |
| Extensibility | How well it scales/adapts (1=dead end, 5=very extensible) |
| Alignment | How well it fits existing architecture (1=foreign, 5=native) |
| Criterion | Approach A | Approach B | Approach C | ... |
|---------------|:----------:|:----------:|:----------:|:---:|
| Complexity | 2/5 | 3/5 | 4/5 | |
| Time | 3/5 | 2/5 | 1/5 | |
| Risk | 4/5 | 3/5 | 4/5 | |
| Extensibility | 2/5 | 4/5 | 5/5 | |
| Alignment | 5/5 | 3/5 | 2/5 | |
| **Total** | **16** | **15** | **16** | |
Provide an explicit recommendation:
Use AskUserQuestion to confirm or redirect:
If user picks "run more lenses", loop back to Phase 2.
Update state: "selectedApproach": { ... }.
Token budget: ~1500 tokens max (raised 3× in SpecWeave 1.1.0; override via quality.tokenBudgets.deepen).
This phase only runs when --depth deep.
Analyze the selected approach at three levels:
Find 2-3 analogies from different domains:
List 3-5 implicit assumptions the selected approach makes:
Imagine the approach has FAILED. What went wrong?
| Failure Mode | Likelihood | Impact | Mitigation |
|---|---|---|---|
| [failure 1] | Med | High | [action] |
| [failure 2] | Low | High | [action] |
| [failure 3] | High | Med | [action] |
Update state: "phase": "output".
Token budget: ~1200 tokens max (raised 3× in SpecWeave 1.1.0; override via quality.tokenBudgets.output).
Write the brainstorm document to:
.specweave/docs/brainstorms/YYYY-MM-DD-{topic-slug}.md
Use the Output Template below.
If a file with the same name exists, append -2, -3, etc.
Update state file:
{
"phase": "complete",
"completedAt": "<ISO-8601>"
}
Present the user with options:
Brainstorm complete! Saved to: .specweave/docs/brainstorms/YYYY-MM-DD-topic.md
Selected approach: [Name]
What would you like to do?
1. Turn this into an increment → sw:increment "[approach summary]"
(Passes brainstorm context: problem frame, selected approach, constraints)
2. Brainstorm deeper with different lenses
→ sw:brainstorm "[topic]" --depth deep --lens [lens]
3. Done for now — revisit later
If user picks option 1, invoke:
Skill({
skill: "sw:increment",
args: "Implement [selected approach name]: [summary].
BRAINSTORM CONTEXT (from [brainstorm-doc-path]):
- Problem: [problem statement]
- Selected approach: [name]
- Key steps: [steps]
- Risks: [risks]
- Evaluation score: [score]
- Constraints: [discovered constraints]"
})
Then update state: "handedOffTo": "[increment-id]" and add link to brainstorm doc.
Generate 4-6 independent approaches, each with a different strategic orientation:
| # | Orientation | Prompt Focus |
|---|---|---|
| 1 | Conservative | "Build on what exists. Minimal change, maximum reuse." |
| 2 | Bold | "Rethink from scratch. What's the ideal solution if we had no constraints?" |
| 3 | Speed | "Optimize for fastest delivery. What's the simplest thing that works?" |
| 4 | Extensibility | "Optimize for future growth. What won't we regret in 2 years?" |
| 5 | Lateral | "What would a completely different industry do?" (optional) |
| 6 | Hybrid | "Combine the best parts of other approaches." (optional) |
6 perspectives, each generating one approach:
| Hat | Color | Focus |
|---|---|---|
| White | Facts | "What do the data and evidence tell us? Generate an approach based purely on facts." |
| Red | Feelings | "What feels right intuitively? What would users emotionally respond to?" |
| Black | Caution | "What could go wrong? Generate the most cautious, risk-averse approach." |
| Yellow | Optimism | "What's the best-case scenario? What opportunity does this unlock?" |
| Green | Creativity | "Think laterally. What unconventional or novel solution exists?" |
| Blue | Process | "What's the most structured, methodical way to solve this?" |
Deep mode dispatch: 6 parallel Agent() calls, one per hat.
7 transformations applied to the current state:
| Letter | Transformation | Prompt |
|---|---|---|
| S | Substitute | "What component, process, or technology could we replace with something better?" |
| C | Combine | "What existing features, services, or systems could we merge?" |
| A | Adapt | "What existing solution (ours or others) could we adapt to this problem?" |
| M | Modify | "What could we magnify, minimize, or change the form of?" |
| P | Put to other use | "How could we repurpose something that already exists?" |
| E | Eliminate | "What could we remove entirely to simplify?" |
| R | Reverse | "What if we did this in the opposite order or from the opposite direction?" |
Deep mode dispatch: 7 parallel Agent() calls, one per transformation.
Two-part analysis combining TRIZ inventive principles with assumption negation.
Part 1: TRIZ Inventive Principles — Select 5-7 most relevant from the 40 (e.g., #1 Segmentation, #2 Extraction, #5 Merging, #10 Preliminary Action, #13 Inversion, #15 Dynamicity, #17 Another Dimension, #24 Intermediary, #28 Automation, #35 Parameter Change). For each, generate ONE approach applying it to the problem.
Part 2: Constraint Inversion — List 3-5 core assumptions → negate each → evaluate which inversions produce viable alternatives → cross-reference with Part 1 → output 3-4 most promising combined approaches.
Deep mode dispatch: Part 1 (principles) and Part 2 (inversions) as 2 parallel Agent() calls, then synthesize.
What recently became feasible? Web-search-enhanced analysis:
WebSearch to find new tools, frameworks, cost changes, AI capabilities, regulatory shifts for the topic**Enabled by**: [what changed] | **Previously**: [old approach] | **Now**: [new approach]Focus: "What was impossible or impractical 12 months ago but is now viable?"
Save to .specweave/docs/brainstorms/YYYY-MM-DD-{topic-slug}.md. Structure:
# Brainstorm: [Topic]
**Date**: YYYY-MM-DD | **Depth**: [mode] | **Lens(es)**: [names] | **Status**: complete
## Problem Frame
**Statement**: [sentence] | **Who/What/When/Where/Why/How**: [answers] | **Clarifications**: [Q&A]
## Approaches
### Approach A: [Name]
**Source**: [lens/facet] | **Summary**: [2-3 sentences] | **Key Steps**: [numbered]
**Strengths**: [bullets] | **Risks**: [bullets] | **Effort**: [Low/Medium/High]
## Evaluation Matrix
| Criterion | A | B | C |
|-----------|:-:|:-:|:-:|
| Complexity/Time/Risk/Extensibility/Alignment | x/5 | x/5 | x/5 |
| **Total** | **X** | **X** | **X** |
## Recommendation
**Selected**: Approach [X] | **Rationale**: [sentences] | **Caveats**: [notes]
## Deep Analysis
(deep mode only) Abstraction Ladder | Analogies | Hidden Assumptions | Pre-Mortem table
## Idea Tree
[topic] tree with approaches, variants, and status markers (SELECTED/abandoned)
## Next Steps
- `sw:increment` | Brainstorm deeper | Park for later
Notes: Omit Deep Analysis for quick/standard. Omit Idea Tree variants for quick.
These are targets, not hard limits. Prefer conciseness, but expand when the problem demands it. Override via quality.tokenBudgets in .specweave/config.json. Budgets were raised 3× in SpecWeave 1.1.0 to take advantage of Opus 4.7's long-horizon coherence — smaller caps forced premature summarization and missed approach trade-offs.
| Phase | Target | Hard Max | Notes |
|---|---|---|---|
| Frame | ~1200 tokens | 2400 | Problem + 5W1H + questions |
| Diverge (per approach) | ~1800 tokens | 3000 | Name + summary + steps + trade-offs |
| Diverge (total) | ~10800 tokens | 18000 | 6 approaches max |
| Evaluate | ~1500 tokens | 2400 | Matrix + recommendation |
| Deepen | ~1500 tokens | 3000 | Ladder + analogies + assumptions + pre-mortem |
| Output | ~1200 tokens | 1800 | Summary + handoff |
| Quick total | ~3900 | ~7800 | Frame + 3 approaches + Evaluate |
| Standard total | ~10500 | ~15600 | Frame + Diverge + Evaluate + Output |
| Deep total | ~16200 | ~27600 | All 5 phases |
When to exceed targets: Complex problems with many stakeholders, deeply technical domains requiring precise terminology, or when the user explicitly asks for more detail.
Auto-activation keywords:
Routing from CLAUDE.md:
sw:brainstorm (not an opt-out)Phase detection:
planning phase (pre-increment ideation)Before completing a brainstorm session, verify:
.specweave/docs/brainstorms/phase: "complete"npx claudepluginhub anton-abyzov/specweave --plugin swGenerates multiple solution approaches with trade-offs using structured frameworks (SCAMPER, First Principles). Useful for creative ideation before coding.
Design exploration using parallel agents through a 7-phase process: topic analysis, divergent ideation, feasibility filtering, evaluation, synthesis, and trade-off comparison. Use for brainstorming ideas or comparing alternatives.
Structured brainstorming using the Double Diamond model with memory-first ground phase. Use before creative work: new features, architecture decisions, design exploration.