From claude-skills
Structured brainstorming that produces an OpenSpec change folder (proposal, design, delta specs, tasks) before any code is written. Use before implementing features, components, or modifications.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-skills:brainstormThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Turn ideas into fully formed designs and an executable OpenSpec change through collaborative dialogue. Two phases — brainstorm (design the solution into the change folder) and planning (write deltas + tasks) — with one review gate (the change folder).
Turn ideas into fully formed designs and an executable OpenSpec change through collaborative dialogue. Two phases — brainstorm (design the solution into the change folder) and planning (write deltas + tasks) — with one review gate (the change folder).
The output of this skill is a complete openspec/changes/<name>/ folder containing:
proposal.md – why and what changesdesign.md – architecture, decisions, alternatives, risks, discovery findings (freeform OpenSpec design doc)specs/<capability>/spec.md – delta specs (ADDED / MODIFIED / REMOVED requirements with scenarios)tasks.md – the implementation plan as a checklist (this IS what /execute-plan consumes)$ARGUMENTS – Optional: description of the feature or idea to develop. Becomes the seed for the change name.Do not invoke any implementation skill, write any code, scaffold any project (other than the OpenSpec change folder itself), or take any implementation action until the change folder is complete and the user has approved it. This applies to every project regardless of perceived simplicity. A todo list, a single-function utility, a config change — all of them go through this process. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short, but you must produce the change folder and get approval.
! test -d openspec && echo "OPENSPEC_ENABLED=true" || echo "OPENSPEC_ENABLED=false"
! test -d openspec && openspec list --specs --json 2>/dev/null | head -200
! test -d openspec && openspec list --changes --json 2>/dev/null | head -200
! test -f CLAUDE.md && head -50 CLAUDE.md
This skill is OpenSpec-only. The target project MUST have an openspec/ directory. If it does not:
.specs file is present → suggest /migrate-to-openspec first.openspec init.Stop the skill until OpenSpec is initialized. Do not fall back to the legacy specs/ flow.
Work through these steps in order. Each step completes before the next begins.
Read the project before asking questions. Priority order:
*_review/ directory with summary.md or discussion.log related to the topic. If found, read the summary (and discussion log if needed). If the interview happened in this same session, the context is already in conversation history — do not re-read.openspec/specs/ has capabilities, read the relevant ones. Base specs are the source of truth; code is an implementation detail.openspec list --changes --json. If another in-flight change touches related capabilities, read its proposal and deltas so you don't propose conflicting work.Interview artifacts supplement but do not replace project exploration.
Present your understanding before diving into questions:
"Based on what I see, here are my assumptions:
- [assumption]
- [assumption]
- [assumption]
Correct me now or I'll proceed with these."
This front-loads alignment and often eliminates several clarifying questions.
Two assessments happen here.
After reading the project and surfacing assumptions, assess: does this topic require domain knowledge that isn't in the codebase?
Signs you need an interview first:
If the topic needs an interview, call AskUserQuestion:
If the user skips, proceed — they may know that the brainstorm questions will be enough.
If the topic is well-understood from the codebase and docs, skip this and proceed.
Assess the size of the change. If it looks small (localized, well-understood, low risk), call AskUserQuestion:
Behavior:
Only ask this for genuinely small changes. Medium and large changes always get the full process.
If upcoming questions will involve visual content (layouts, mockups, wireframes, diagrams, side-by-side comparisons), call AskUserQuestion as its own message — do not combine it with any other content:
If declined, proceed with text-only brainstorming. If accepted, read skills/brainstorm/visual-companion.md before continuing.
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?
Skip this step entirely if the topic has no visual dimension.
Ask questions one at a time. Prefer multiple choice when possible, but open-ended is fine too. Focus on purpose, constraints, and success criteria.
Before asking detailed questions, assess scope: if the request describes multiple independent subsystems, flag it immediately. Help decompose into sub-projects before refining details. Each sub-project gets its own brainstorm cycle and its own OpenSpec change.
Logjam breakers — deploy these frameworks when the conversation stalls:
After gathering enough context, silently assess: what could go wrong? How big is the blast radius?
AskUserQuestion:
Before proposing approaches, name the problem space out loud and ask: "what does this kind of problem usually look like, and what's the standard professional approach?"
If the user's framing skips a well-established solution — hashing for credential comparison, env vars for secrets, parameterized queries for SQL, tests for behavioral code, idempotency keys for retries, rate limiting for public endpoints, migrations for schema changes — surface it as an option even if they didn't ask for it. State the norm, state why it exists, then let the user choose knowingly.
Skip when the problem space has no relevant industry norm, or when the user has explicitly opted into a non-standard approach earlier in the conversation.
Present 2-3 approaches with trade-offs, informed by the norms surfaced in Step 7. Lead with your recommended option and explain why. Be opinionated. YAGNI ruthlessly.
Once you understand what you're building, present the design. Scale each section to its complexity. Cover as relevant: architecture, components, data flow, error handling, testing strategy.
Ask after each section whether it looks right so far via AskUserQuestion. Be ready to go back and revise.
Design for isolation and clarity:
Working in existing codebases:
Acceptance criteria per behavioral section:
For each design section that describes externally-observable behavior, propose acceptance criteria as one-line it should X statements. These will become OpenSpec scenarios in Phase 2 — write them in a form that maps cleanly to WHEN ... THEN ....
Rules:
If a section produces zero criteria and isn't pure architecture/rationale, that's a signal the section is too vague. Sharpen the section, not the criteria.
Derive a kebab-case change name from the topic (e.g. add-fitbit-mcp-server, granola-auto-record, fix-statusline-flicker). The name must:
openspec list --changes --json)add-, update-, remove-, fix-, refactor-)Run:
openspec new change <name> --description "<one-line summary>"
This creates openspec/changes/<name>/ with .openspec.yaml and README.md. Subsequent steps fill in the artifacts.
design.mdThe brainstorm doc IS openspec/changes/<name>/design.md. Fetch the OpenSpec design template:
openspec instructions design --change <name>
The native template covers Context / Goals / Non-Goals / Decisions / Risks / Trade-offs / Migration Plan / Open Questions. Use those headings for content that fits.
For content that doesn't fit OpenSpec's native template, add freeform ## ... headings under or alongside the native sections. Useful additions:
## Alternatives considered — the 2-3 approaches from Step 8 with trade-offs## Discovery findings — what you learned while exploring the codebase## Acceptance criteria — the per-section it should X criteria captured during Step 9, organized by sectionUse /spec-writer if available to produce structured prose (proposal/design/tasks/specs). Commit the file once the design is captured.
Design self-review — check the written doc with fresh eyes:
it should X criteria captured? Skip this check for topics with no testable behavior.Fix issues inline.
Optional spec document reviewer — for complex change folders (multiple capabilities, cross-cutting concerns, or significant architectural decisions), consider dispatching a reviewer subagent using the prompt template at skills/brainstorm/spec-document-reviewer-prompt.md.
User review offer — call AskUserQuestion:
openspec/changes/<name>/design.md and committed. Want to review it before I move to planning?"Behavior:
/plannotator-annotate on design.md. Address annotations (rewrite sections immediately for questions; discuss only if the annotation explicitly says so). Re-open in Plannotator until approved. Then proceed to Phase 2.Invoked automatically after design.md is approved.
design.mdRead the captured design as the input — not conversation history. The design is the captured intent.
proposal.mdFetch the OpenSpec proposal template:
openspec instructions proposal --change <name>
Fill in:
openspec/specs/<name>/spec.md once archived.openspec/specs/ whose requirements are changing. Cross-check against openspec list --specs --json. Leave empty if none.Commit proposal.md.
openspec/changes/<name>/specs/<capability>/spec.mdFor each capability listed in the proposal's Capabilities section, write a delta spec. Fetch the OpenSpec specs template:
openspec instructions specs --change <name>
Delta operations (use H2 headers):
## ADDED Requirements – for new behavior on a brand-new capability.## MODIFIED Requirements – for changed behavior. MUST include the FULL updated requirement (copy the entire block from the base spec at openspec/specs/<capability>/spec.md, then edit). Header text must match exactly.## REMOVED Requirements – for removals. MUST include **Reason** and **Migration** lines.## RENAMED Requirements – use FROM:/TO: format for name-only changes.Format inside each section:
### Requirement: <name> – use SHALL/MUST normative language, never should/may.#### Scenario: <name> – every requirement MUST have at least one scenario. Use exactly four hashtags. Body uses - **WHEN** ... and - **THEN** ....Map the per-section it should X acceptance criteria from design.md to scenarios verbatim where possible. Don't paraphrase; tighten WHEN/THEN structure but keep the behavior identical.
After writing all delta files, validate:
openspec validate <name> --strict
Fix any structural errors before continuing. Commit deltas.
tasks.md (the plan)tasks.md IS the implementation plan that /execute-plan consumes. Fetch the template:
openspec instructions tasks --change <name>
The OpenSpec tasks file uses checkbox format: - [ ] N.M Task description. Group related tasks under ## N. Group name headers. Each top-level group is one stage in /execute-plan's task graph.
Adapt the AI-RON staging conventions to OpenSpec checkbox layout:
## 1. Tests
- [ ] 1.1 Write failing tests from each scenario in `specs/<capability>/spec.md`
- [ ] 1.2 Confirm every `it should X` criterion has a failing test (Prove-It Pattern)
## 2. <First vertical slice>
**Depends on:** Stage 1
- [ ] 2.1 ...
- [ ] 2.2 ...
## 3. <Next vertical slice>
**Depends on:** Stage 1
- [ ] 3.1 ... <!-- parallel with stage 2 because both depend only on 1 -->
Key principles for stages:
**Depends on:** lines under each stage's H2 so /execute-plan can build a dependency graph. Stages with the same dependency can run in parallel.Add a **Design doc:** line at the top of tasks.md pointing at openspec/changes/<name>/design.md. The executing agent reads both.
Commit tasks.md.
Design consistency check: before committing the plan, compare tasks.md against design.md and the deltas. If any decision in the plan differs from the design — new architecture, changed flow, different technical approach — update design.md first to reflect the current decision, commit it, then update the deltas if needed, then commit tasks.md. The change folder is a living set of artifacts; they must agree at the moment of approval.
Validate the whole change:
openspec validate <name> --strict
Must pass before review.
This is the one real review gate in the entire workflow. The user reads the strategy and approves or requests changes.
After the change folder is fully written and validated, call EnterPlanMode and present the contents of tasks.md (plus a brief proposal.md + key delta excerpts) as the plan-mode content. ExitPlanMode becomes the user's approval signal.
Feedback that changes requirements: if plan review produces feedback that changes the design — architecture, data model, flows, technical approach — exit plan mode, update design.md first and commit, update the deltas to match and commit, amend tasks.md and commit, then re-enter plan mode for re-review. The artifacts must be consistent at approval.
After plan approval (ExitPlanMode accepted), call AskUserQuestion:
<name> approved and ready to execute. How do you want to proceed?"Behavior:
echo -n "/execute-plan <name>" | pbcopy and tell the user to run /clear and paste. Claude cannot execute /clear itself. The argument is the change NAME, not a path./execute-plan <name> here without clearing context (good for small changes or when current context is valuable).openspec/changes/<name>/.openspec validate <name> --strict must pass before approval – never present an invalid change folder for review.npx claudepluginhub anutron/aiCreates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.