---
description: Brainstorm solutions with or without task constraints
argument-hint: "[task-id or topic]"
agent: oracle
---

# Brainstorm: $ARGUMENTS

## For Free Brainstorming (No Task)

**Proceed if:**

- General ideation on a topic
- Exploring multiple approaches
- No task structure needed

Steps:

1. Define problem/topic
2. Generate ideas without constraints
3. Evaluate approaches
4. Document findings
5. Share results

---

## For Task-Constrained Brainstorming (With Task Files)

## Phase 1: Task Validation

### Check Task Exists

Check task exists via backlog_task_view({ id: "$ARGUMENTS" }), then verify files in `@backlog/tasks/$ARGUMENTS/`: prd.md + spec.md

**If missing:** Create with `/task-with-spec "$ARGUMENTS"` first.

### Load Brainstorming Boundaries

From PRD:

- Goal
- Scope (in-scope/out-of-scope)
- Success criteria

From Spec:

- Constraints
- Edge cases

## Phase 2: Task-Context Discovery

### Brainstorm Only Within Task Requirements

**Task Goal:** [From PRD goal section]
**Task Scope:** [From PRD scope section]
**Task Constraints:** [From spec constraints section]
**Success Criteria:** [From PRD success criteria]

### Discovery Questions (Task-Focused):

1. **Goal Clarification**: What specific aspect of task goal needs brainstorming?
2. **Scope Boundaries**: What within task scope should we explore?
3. **Constraint Challenges**: What constraints make this difficult?
4. **Success Metrics**: How do we measure success for this task?

### Forbidden Brainstorming Areas:

- ❌ Features outside PRD scope
- ❌ Approaches violating spec constraints
- ❌ Solutions not serving success criteria
- ❌ Ideas requiring forbidden dependencies

## Phase 3: Constrained Solution Exploration

### Task-Bounded Brainstorming Process

```
Brainstorm solutions for task $ARGUMENTS

ANTI-HALLUCINATION BRAINSTORM REQUIREMENTS:
1. Read $TASK_DIR/prd.md and spec.md FIRST
2. Brainstorm only within PRD scope boundaries
3. Generate only solutions that respect spec constraints
4. Focus ideas on achieving PRD success criteria
5. Reject any approach that violates task boundaries
6. Document all brainstorming in review.md
7. Stay within task-defined problem space

BRAINSTORM BOUNDARIES:
- Goal: [From PRD goal]
- Scope: [From PRD scope]
- Constraints: [From spec constraints]
- Success: [From PRD success criteria]

NO EXCEPTIONS: Brainstorming must serve task requirements only
```

### Solution Evaluation (Task-Aligned):

- **Feasibility**: Can this work within task constraints?
- **Scope Compliance**: Does this stay within PRD boundaries?
- **Constraint Adherence**: Does this follow spec requirements?
- **Success Alignment**: Does this achieve success criteria?

## Phase 4: Task-Focused Solution Analysis

### Brutal Honesty (Within Constraints)

For each solution, evaluate:

- **YAGNI**: Is this needed for task success?
- **KISS**: Is this the simplest approach within constraints?
- **DRY**: Does this follow task patterns without duplication?

### Rejection Criteria:

- ❌ Violates PRD scope
- ❌ Breaks spec constraints
- ❌ Doesn't achieve success criteria
- ❌ Over-engineered for task needs

### Acceptance Criteria:

- ✅ Stays within task scope
- ✅ Respects all constraints
- ✅ Achieves success criteria
- ✅ Simplest viable approach

## Phase 5: Task-Bounded Documentation

### Brainstorming Summary (Task-Only)

Document in review.md:

- Task context (goal, scope, constraints)
- Solutions considered
- Solution analysis against constraints
- Recommended approach
- Rationale

### Next Steps:

```
/research-and-implement $ARGUMENTS
# Use task-bounded brainstorming for implementation
```

---

**ANTI-HALLUCINATION: Task brainstorming serves constraints; free brainstorming is unrestricted**
