skills/brainstorming/SKILL.md
Use when user has a new feature idea, rough concept, or unexplored approach. Include when planning before code, breaking a design into tasks, creating an implementation plan, laying out tasks and dependencies, exploring architectural options, or requirements are vague. User phrases like "I want to build X", "should we do this", "let's think through Y", "explore approaches", "break this into tasks", "make an implementation plan". Do NOT use for executing existing plans, fixing bugs, refactoring, or when requirements and an epic already exist.
npx skillsauth add joshsymonds/gambit 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.
Turn rough ideas into validated designs stored as epic Tasks with immutable requirements. Tasks are created iteratively as you learn, not upfront.
Core principle: Ask questions to understand, research before proposing, document decisions for future reference.
Announce at start: "I'm using gambit:brainstorming to refine your idea into a design."
HIGH FREEDOM - Adapt questioning to context. But always:
| Step | Action | Deliverable | |------|--------|-------------| | 1 | Scope-check, then ask clarifying questions | Right granularity + understanding | | 2 | Research codebase and patterns | Existing approaches | | 3 | Propose 2-3 approaches | Recommended option | | 4 | Present design (isolated units, YAGNI) | Validated architecture | | 5 | Create epic Task | Immutable requirements + anti-patterns | | 6 | Create ONLY first subtask | Ready for execution | | 7 | Apply task refinement | Corner cases covered | | 8 | Confirm immutable requirements with user | Contract locked | | 9 | Ask next step, invoke skill | Chain continues automatically |
Key: Epic = contract (immutable), Tasks = adaptive (created as you learn)
<HARD-GATE> Do NOT write any code, invoke any implementation skill, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY idea regardless of perceived simplicity. No exceptions. </HARD-GATE>Don't use for:
gambit:executing-plans)gambit:debugging first — it hands the root cause back here to design the fix)gambit:refactoring)Research existing context first:
Task
subagent_type: "Explore"
prompt: "Find existing [relevant] implementation patterns in this codebase"
Check scope before refining. If the request spans multiple independent subsystems (e.g., "a platform with chat, billing, and analytics"), STOP and decompose before asking detail questions — don't refine something that should be several epics. Identify the independent pieces, how they relate, and what order to build them. Then brainstorm the FIRST piece through the normal flow; each piece gets its own epic → tasks cycle. Refining an over-large project wastes questions and produces a brittle epic.
Then ask clarifying questions using AskUserQuestion tool.
Aim for 2-4 questions per round, 2-4 rounds total. Use multiple choice with recommended defaults. Stop when you understand scope, constraints, existing patterns, and scale.
AskUserQuestion
questions:
- question: "Where should OAuth tokens be stored?"
header: "Token storage"
options:
- label: "httpOnly cookies (Recommended)"
description: "Prevents XSS token theft, industry standard"
- label: "sessionStorage"
description: "Cleared on tab close, less persistent"
multiSelect: false
Do NOT print questions as text and wait — always use the AskUserQuestion tool.
Research before proposing:
Propose 2-3 approaches:
Based on [research findings], I recommend:
1. **[Approach A]** (recommended)
- Pros: [benefits, especially "matches existing pattern"]
- Cons: [drawbacks]
2. **[Approach B]**
- Pros: [benefits]
- Cons: [drawbacks]
I recommend option 1 because [specific reason].
Once approach is chosen, present in digestible sections. Ask "Does this look right?" after each. Cover: architecture, components, data flow, error handling, testing.
Decompose for isolation. Break the system into 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 say what it does, how to use it, and what it depends on — without reading its internals. If you can't change a unit's internals without breaking its consumers, the boundaries are wrong; rework them before locking the epic.
Apply YAGNI ruthlessly. Cut every feature, abstraction, and "we might want this later" the stated requirements don't demand. Unbuilt scope is the cheapest scope to remove — if the user wants it, they'll say so when you present.
After design is validated, create epic as immutable contract. See TEMPLATES.md for the full template with all sections.
Required epic sections:
| Section | Purpose | |---------|---------| | Requirements (IMMUTABLE) | Specific, testable conditions that must be true | | Success Criteria | Objective, checkable items including "all tests passing" | | Anti-Patterns (FORBIDDEN) | Explicitly forbidden patterns with reasoning | | Approach | 2-3 paragraph summary of chosen approach | | Approaches Considered | Rejected alternatives with DO NOT REVISIT conditions |
TaskCreate
subject: "Epic: [Feature Name]"
description: |
## Requirements (IMMUTABLE)
- Requirement 1: [concrete, testable]
## Success Criteria (MUST ALL BE TRUE)
- [ ] [objective criterion]
- [ ] All tests passing
## Anti-Patterns (FORBIDDEN)
- NO [pattern] (reason: [why])
## Approach
[2-3 paragraph summary]
## Approaches Considered
### [Rejected Approach] - REJECTED
REJECTED BECAUSE: [reason]
DO NOT REVISIT UNLESS: [condition]
activeForm: "Planning [feature name]"
Anti-patterns prevent requirement erosion. When implementation gets hard, there's pressure to water down requirements. Explicit forbidden patterns with reasoning prevent this.
One task, not a full tree. Subsequent tasks are created by executing-plans as you learn.
Do NOT set the first task as blocked by the epic. The epic is a documentation container for immutable requirements, not a workflow prerequisite. The Task API's blockedBy means "cannot start until the blocker completes" — since the epic only completes after all subtasks do, marking a subtask as blocked by the epic creates a deadlock. Subtasks are only blocked by other subtasks.
TaskCreate
subject: "Add [specific deliverable]"
description: |
## Goal
[One clear outcome]
## Implementation
1. Study existing code: [file.ts:line]
2. Write tests first (TDD)
3. Implementation:
- [ ] file.ts - function() - [what it does]
## Success Criteria
- [ ] [specific measurable outcome]
- [ ] Tests passing
- [ ] Pre-commit hooks passing
activeForm: "Adding [deliverable]"
Why only one? Each subsequent task reflects learnings from the previous one. Upfront task trees become brittle when assumptions change.
Before handoff, verify the first task passes these checks:
Corner cases to check:
Update the task with any missing details before proceeding.
Before announcing the plan to the user, run an inline self-review across the epic AND the first task. This takes 30 seconds and catches the same class of defects a subagent review pass would — immutable requirements that are actually vague, scope that silently expanded, contradictions between the epic's approach and the first task's implementation steps.
Scan for:
TBD, TODO, FIXME, XXX, [details above], "see requirements", <angle-bracket-placeholder>, or sentence that trails off without committing to a specific behaviorFix what you find by updating the epic or first task with TaskUpdate, then proceed. Do NOT present a plan that has items on this list.
Epic requirements are IMMUTABLE once execution starts — so the user reviews them BEFORE handoff, not after. Present the epic's Requirements, Success Criteria, and Anti-Patterns and ask for explicit confirmation:
"Here's the epic contract — these requirements lock once we start: [summary]. Good to lock, or change anything first?"
If they request changes, update the epic and re-run the self-review. Only proceed to handoff once they confirm.
REQUIRED: Use AskUserQuestion to offer next steps, then invoke the chosen skill directly.
AskUserQuestion
questions:
- question: "Epic and first task ready. How should we proceed?"
header: "Next step"
options:
- label: "Start executing (Recommended)"
description: "Begin implementing with gambit:executing-plans"
- label: "Set up worktree first"
description: "Create isolated workspace with gambit:using-worktrees"
- label: "Refine tasks first"
description: "Strengthen task quality with gambit:task-refinement"
multiSelect: false
After user responds, invoke the chosen skill directly using the Skill tool. Do not just tell the user to run it — load and follow the skill immediately.
Skill skill="gambit:executing-plans"Skill skill="gambit:using-worktrees" (then executing-plans after)Skill skill="gambit:task-refinement" (then executing-plans after)TaskCreate "Epic: Add OAuth"
TaskCreate "Task 1: Configure OAuth"
TaskCreate "Task 2: Implement token exchange"
TaskCreate "Task 3: Add refresh logic"
# Execute Task 1 → discover library handles refresh
# Task 3 is now wrong. Task tree is brittle.
TaskCreate "Epic: Add OAuth" [immutable requirements + anti-patterns]
TaskCreate "Task 1: Configure OAuth provider"
# Execute → learn library handles refresh automatically
TaskCreate "Task 2: Integrate with existing middleware"
# Created AFTER learning from Task 1 — reflects reality
TaskCreate subject: "Epic: OAuth"
## Requirements
- Users authenticate via Google OAuth2
- Tokens stored securely
# "Tokens stored securely" is vague
# No forbidden patterns → agent rationalizes localStorage when blocked
TaskCreate subject: "Epic: OAuth"
## Requirements (IMMUTABLE)
- Tokens stored in httpOnly cookies with Secure flag
## Anti-Patterns (FORBIDDEN)
- NO localStorage tokens (reason: XSS vulnerability)
- NO mocking OAuth in integration tests (reason: defeats purpose)
# Explicit reasoning prevents watering down under pressure
Common rationalizations (all mean STOP, follow the process):
Calls: Explore agent → AskUserQuestion → invokes one of:
gambit:executing-plans (default)gambit:using-worktrees (optional, before execution)gambit:task-refinement (optional, before execution)testing
Use when creating a new skill, modifying an existing skill, writing or rewriting a SKILL.md file, auditing a skill's description for discoverability, or when user mentions "create a skill", "write a skill", "new skill", "modify skill", "improve skill", "edit the skill".
development
Use before any completion claim, success statement, or marking a task done. Triggers when about to say "Great!", "Perfect!", "Done", "All set", "Ready to commit", before creating a PR, before moving to the next task, or when code has changed since the last test run.
data-ai
Use when starting an isolated feature branch, when working on multiple features simultaneously, when experimenting without affecting the main workspace, or when a clean workspace is needed before beginning implementation. User phrases like "start a new branch", "set up a worktree", "isolated workspace", "work on feature X separately".
development
Use at the start of every session before any response or action. Also invoke whenever uncertain which gambit skill applies, when about to implement / debug / refactor / test / plan / brainstorm, or when a user request could match any gambit skill even at 1% probability.