--- name: brainstorming version: 0.2.0 description: "Turn vague ideas into a validated design/spec through structured brainstorming. Use before any creative work - new features, UI/components, behavior changes, refactors, architecture decisions. Trigger whenever a user asks to brainstorm, define requirements, propose approaches, write a design doc, or says something like 'I want to build X' or 'how should we approach Y'. Even seemingly simple tasks benefit from a quick design pass." --- # Brainstorming Ideas Into Designs 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. ## Anti-Pattern: "This Is Too Simple To Need A Design" 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. ## Checklist You MUST create a task for each of these items and complete them in order: 1. **Explore project context** — check files, docs, recent commits 2. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria 3. **Propose 2-3 approaches** — with trade-offs and your recommendation 4. **Present design** — in sections scaled to complexity, get user approval after each section 5. **Write design doc** — save to `docs/plans/YYYY-MM-DD--design.md` and commit 6. **Spec self-review** — check for placeholders, contradictions, ambiguity, scope (see below) 7. **User reviews written spec** — ask user to review the spec file before proceeding 8. **Transition to implementation** — create a concrete implementation plan ## Process Flow ```dot 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" [shape=box]; "Spec self-review\n(fix inline)" [shape=box]; "User reviews spec?" [shape=diamond]; "Create implementation plan" [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" [label="yes"]; "Write design doc" -> "Spec self-review\n(fix inline)"; "Spec self-review\n(fix inline)" -> "User reviews spec?"; "User reviews spec?" -> "Write design doc" [label="changes requested"]; "User reviews spec?" -> "Create implementation plan" [label="approved"]; } ``` ## The Process **Understanding the idea:** - Check out the current project state first (files, docs, recent commits). - 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. - 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. - For appropriately-scoped projects, ask questions one at a time to refine the idea. - Prefer multiple choice questions when possible — faster to answer and reduces ambiguity. - Only one question per message. If a topic needs more exploration, break it into multiple questions. - Focus on understanding: purpose, constraints, success criteria, non-goals. **Exploring approaches:** - Propose 2-3 different approaches with trade-offs. - Lead with your recommended option and explain why. - Present options conversationally with your recommendation and reasoning. **Presenting the design:** - Once you believe you understand what you're building, present the design. - Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced. - Ask after each section whether it looks right so far. - Cover: architecture, components, data flow, error handling, testing. - Be ready to go back and clarify if something doesn't make sense. **Design for isolation and clarity:** - Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently. - For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on? - 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. - Smaller, well-bounded units are also easier to work with — you reason better about code you can hold in context at once, and edits are more reliable when files are focused. **Working in existing codebases:** - Explore the current structure before proposing changes. Follow existing patterns. - 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. - Don't propose unrelated refactoring. Stay focused on what serves the current goal. ## After the Design **Documentation:** - Write the validated design (spec) to `docs/plans/YYYY-MM-DD--design.md`. - User preferences for spec location override this default. - Commit the design document to git. **Spec Self-Review:** After writing the spec document, look at it with fresh eyes: 1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them. 2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions? 3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition? 4. **Ambiguity check:** Could any requirement be interpreted two different ways? If so, pick one and make it explicit. Fix any issues inline. No need to re-review — just fix and move on. **User Review Gate:** After the spec review loop passes, ask the user to review the written spec before proceeding: > "Spec written and committed to ``. Please review it and let me know if you want to make any changes before we move to the implementation plan." 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. **Implementation:** - Create a concrete implementation plan before writing any code. - If a writing-plans skill is available, invoke it. Otherwise, produce a step-by-step plan inline. ## Key Principles - **One question at a time** — Don't overwhelm with multiple questions. - **Multiple choice preferred** — Easier to answer than open-ended when possible. - **YAGNI ruthlessly** — Remove unnecessary features from all designs. - **Explore alternatives** — Always propose 2-3 approaches before settling. - **Incremental validation** — Present design, get approval before moving on. - **Be flexible** — Go back and clarify when something doesn't make sense.