Design features through brainstorming and make architectural decisions. Use when user wants to brainstorm, design approach, make architecture choices, or update PLAN.md.
Help users design features through structured brainstorming sessions and make architectural decisions that shape the project.
Activate when the user wants to design or brainstorm:
Flow's Core Principle: Design before implementation. Use structured brainstorming to explore options, make decisions, and document rationale before writing code.
Brainstorming Structure:
When user wants to brainstorm an iteration:
#### Brainstorming
**Status**: š§ IN PROGRESS
**Subjects to Discuss**:
1. ā³ [Subject Name] - [Question or decision]
2. ā³ [Subject Name] - [Question or decision]
When user wants to add a new subject:
N. ā³ Subject Name - Description
When user asks "what's next subject" or wants to discuss:
##### Subject N: [Name]
**Status**: ā
RESOLVED (2025-MM-DD)
**Question**: [What needed to be decided]
**Decision**: [What was decided and why]
**Resolution Type**: [A/B/C/D]
**Action Items** (if Type A or D):
- [ ] [Item 1]
- [ ] [Item 2]
When user asks "review brainstorming" or wants to check progress:
When user says "complete brainstorming" or ready to finish:
#### Pre-Implementation Tasks
**Status**: ā³ PENDING
These must be completed BEFORE starting main implementation:
- [ ] [Pre-task from Subject N]
- [ ] [Pre-task from Subject M]
#### Action Items
- [ ] [Main work from Subject X]
- [ ] [Main work from Subject Y]
**Status**: ā
COMPLETE (2025-MM-DD)**Status**: ā³ PENDING (must do pre-tasks first)**Status**: šØ READY (ready to implement)See RESOLUTION_TYPES.md for detailed explanation. Quick reference:
When: Small blocking code change needed BEFORE iteration starts
Criteria:
Examples: Fix interface, rename file, update enum
Outcome: Goes into "Pre-Implementation Tasks" section, must complete before main work
When: Architectural decision affecting system design
Criteria:
Examples: Design pattern choice, API contract, data model
Outcome: Update PLAN.md immediately during brainstorming (see PLAN_UPDATES.md)
When: Subject answered by another subject's decision
Criteria:
Examples: Implementation detail determined by architecture choice
Outcome: No action items, just note which subject resolved this
When: Substantial feature work that IS the iteration
Criteria:
Examples: Build API endpoint, implement validator, create service
Outcome: These become the iteration's implementation action items
When brainstorming reveals architectural decisions (Type B), update PLAN.md:
Always update for:
Don't update for:
See PLAN_UPDATES.md for detailed patterns. Quick guide:
Architecture Section Update:
### [Component/Feature Name]
**Decision**: [What was decided]
**Rationale**: [Why this approach]
**Trade-offs**:
- **Chosen**: [Approach X] because [reason]
- **Not chosen**: [Approach Y] because [reason]
DO/DON'T Guidelines:
**DO**:
- [Guideline from experience]
**DON'T**:
- [Anti-pattern to avoid]
Help users explore decisions:
Recommend Type A if:
Recommend Type B if:
Recommend Type C if:
Recommend Type D if:
User: "Let's brainstorm the retry logic for API calls"
AI Process:
1. Find current iteration in task file
2. Create brainstorming section with status š§ IN PROGRESS
3. Suggest initial subjects:
- Retry Strategy (exponential backoff vs fixed delay)
- Error Classification (which errors retry)
- Max Retry Attempts (how many before giving up)
- Existing Error Handler (need async support)
- Timeout Configuration (per-request vs total)
User provides input, AI adds subjects to list as ā³ PENDING
---
User: "What's the next subject?"
AI Response:
Subject 1: Retry Strategy
Let's discuss - what are the options?
- Exponential backoff (1s, 2s, 4s, 8s...)
- Fixed delay (1s between each retry)
- Linear backoff (1s, 2s, 3s, 4s...)
Which approach fits your needs?
User: "Exponential backoff with base delay 1 second"
AI Response:
This is Type D (Iteration Action Items) - the main feature work.
Creating resolution:
**Resolution Type**: D
**Action Items**:
- [ ] Create RetryPolicy class
- [ ] Implement exponential backoff algorithm (base: 1s, max: 32s)
- [ ] Add configuration for max retries (default: 3)
- [ ] Integrate with API client
- [ ] Add tests for retry scenarios
Marked Subject 1 as ā
RESOLVED. Next subject?
---
User: "Subject about error handler needing async support"
AI Response:
Subject 4: Existing Error Handler - Need Async Support
This sounds like a blocking prerequisite. Let me confirm:
ā
Is it blocking? YES - can't implement retry without async
ā
Is it small? YES - estimated 20-30 minutes
ā
Can be done independently? YES
This is Type A (Pre-Implementation Task).
**Resolution Type**: A
**Action Items**:
- [ ] Update ErrorHandler.ts to support async operations
- [ ] Add retryAsync() method
- [ ] Update 3 existing call sites
- [ ] Add tests for async error handling
This will go into "Pre-Implementation Tasks" - must complete BEFORE main implementation.
---
After all subjects resolved...
User: "Complete brainstorming"
AI Process:
1. Verify all 5 subjects ā
RESOLVED
2. Collect Type A subjects:
- Subject 4 action items ā Pre-Implementation Tasks section
3. Collect Type D subjects:
- Subject 1, 2, 3, 5 action items ā Iteration Action Items
4. Mark brainstorming ā
COMPLETE (2025-10-20)
5. Set iteration status: ā³ PENDING (pre-tasks exist)
AI Response:
ā
Brainstorming complete!
**Pre-Implementation Tasks** (4 items):
Must complete these BEFORE starting main implementation.
**Iteration Action Items** (12 items):
Main retry logic implementation.
**Next Steps**:
1. Complete pre-implementation tasks first
2. Then run implementation on this iteration
Iteration is now ā³ PENDING (will be šØ READY after pre-tasks done).
User: "Should we use REST or GraphQL for our API?"
AI Response:
This is a major architectural decision. Let's brainstorm:
**Subject**: API Technology Choice
**Options**:
- REST: Simple, well-understood, stateless
- GraphQL: Flexible queries, reduces over-fetching
What are your requirements? (data complexity, client needs, team experience)
User: "Team knows REST well, simple CRUD operations, mobile app needs specific fields"
AI Response:
Based on your context:
- Team experience: REST ā
- Use case: CRUD operations fit REST
- Mobile optimization: Could benefit from GraphQL, but REST + field selection achievable
**Recommendation**: REST with field selection query params
This is Type B (Immediate Documentation) - architectural decision.
**Resolution Type**: B
I'm updating PLAN.md Architecture section now:
**PLAN.md Update**:
```markdown
### API Architecture
**Decision**: RESTful API with field selection via query parameters
**Rationale**:
- Team has strong REST experience (faster development)
- CRUD operations map naturally to REST resources
- Field selection (`?fields=name,email`) addresses mobile bandwidth concerns
- Simpler stack (no GraphQL server/client overhead)
**Trade-offs**:
- **Chosen**: REST + field selection
- Pros: Simpler, team-ready, adequate for needs
- Cons: Less flexible than GraphQL for complex queries
- **Not chosen**: GraphQL
- Pros: Perfect field selection, great for evolving requirements
- Cons: Learning curve, additional infrastructure
**DO**:
- Use field selection query params for bandwidth optimization
- Follow RESTful resource naming conventions
- Version API endpoints (/v1/users)
**DON'T**:
- Return full objects when mobile clients need subsets
- Create custom endpoint for every use case (use field selection)
ā PLAN.md updated. Subject marked ā RESOLVED.
### Example 3: Auto-Resolved Subject (Type C)
User: "What about the retry delay calculation?"
AI Response: Subject 5: Retry Delay Calculation
Looking at previous decisions...
This was answered by Subject 1 (Retry Strategy):
Resolution Type: C (Auto-Resolved by Subject 1)
No additional action needed - implementation in Subject 1 covers this.
Subject marked ā RESOLVED.
## Files Read/Write
**READ**:
- `.flow/DASHBOARD.md` - Find current work (which iteration to brainstorm)
- `.flow/phase-N/task-M.md` - Current iteration, existing brainstorming
- `.flow/PLAN.md` - Current architecture, DO/DON'T guidelines
**WRITE**:
- `.flow/phase-N/task-M.md` - Add/update brainstorming section, subjects, resolutions
- `.flow/PLAN.md` - Update Architecture section, DO/DON'T guidelines, Technology Choices
## Validation Gates
- Before starting: Verify iteration exists in task file
- Before completing: Verify all subjects have ā
RESOLVED status
- Before marking iteration READY: Verify no pending pre-tasks (or mark PENDING if pre-tasks exist)
- After Type B resolution: Verify PLAN.md updated correctly
## References
- **Subject Resolution Types**: [RESOLUTION_TYPES.md](RESOLUTION_TYPES.md) - Detailed guide on A/B/C/D types
- **PLAN.md Updates**: [PLAN_UPDATES.md](PLAN_UPDATES.md) - How to update architecture documentation
- **Brainstorming Pattern**: .flow/framework/DEVELOPMENT_FRAMEWORK.md lines 1167-1797
- **Framework Reference**: .flow/framework/DEVELOPMENT_FRAMEWORK.md lines 1-353