Software Architecture Brainstorming
Overview
Collaborative brainstorming skill for software architecture and design decisions. Focuses on applying design patterns (Gang of Four), SOLID principles, TDD, DRY, YAGNI, and other best practices to create well-architected solutions. Produces design documents with architecture diagrams, not code implementations.
Core Philosophy:
- Conversational and collaborative approach
- Work toward the simplest solution that meets actual needs
- Apply principles and patterns when they add value, not dogmatically
- Question assumptions and explore alternatives
- Create comprehensive design documents as output
When to Use This Skill
Invoke this skill when:
- Designing new features or systems from scratch
- Refactoring existing architecture
- Evaluating architectural decisions and trade-offs
- Learning or applying design patterns
- Creating design documentation
- Discussing how to structure code without writing implementation
- Exploring multiple approaches to a problem
Do NOT use this skill when:
- Implementing code (use normal coding workflow)
- Debugging existing code
- Making trivial changes that don't require architectural thinking
- User explicitly wants quick code without design discussion
Collaborative Brainstorming Process
1. Understand the Problem
Begin by understanding what the developer is trying to accomplish through open-ended discovery.
Ask clarifying questions:
- What problem are you trying to solve?
- What are you building this for?
- Who will use this?
- What are the core requirements?
- What constraints exist (performance, scale, technology, team)?
Understand context:
- What exists today?
- What pain points exist?
- What's the expected timeline?
- What's the risk tolerance?
Document understanding:
- Summarize the problem clearly
- Confirm understanding before proceeding
- Identify any assumptions being made
2. Explore Requirements
Work with the developer to clarify functional and non-functional requirements.
Functional requirements:
- What must the system do?
- What are the user workflows?
- What are the edge cases?
- What's in scope vs. out of scope?
Non-functional requirements:
- Performance needs (throughput, latency)
- Scalability expectations
- Reliability/availability targets
- Security and compliance
- Maintainability and testability
- Integration points
Apply YAGNI rigorously:
- Focus on actual needs, not "might need someday"
- Challenge speculative requirements
- Defer complexity until it's truly needed
- Ask: "What's the simplest thing that could work?"
3. Propose Initial Approach
Present a high-level approach that addresses the requirements simply and clearly.
Start with simplest solution:
- What's the most straightforward way to solve this?
- Avoid premature optimization or over-engineering
- Focus on core functionality first
Identify key components:
- What are the main responsibilities?
- How do they interact?
- What are the boundaries?
Sketch architecture:
- Use architecture/component diagrams to show structure
- Keep it high-level initially
- Show major components and their relationships
4. Iterate and Refine
Collaborate with the developer to refine the design through discussion.
Discuss design patterns:
- When appropriate, consult
references/design-patterns.md for applicable GoF patterns
- Explain which patterns might apply and why
- Discuss trade-offs of each pattern
- Don't force patterns where they don't fit
Apply SOLID principles:
- When appropriate, consult
references/solid-principles.md for guidance
- Evaluate design against SRP, OCP, LSP, ISP, DIP
- Explain which principles are relevant and why
- Show how principles improve the design
Consider other principles:
- When appropriate, consult
references/other-principles.md for TDD, DRY, YAGNI guidance
- Discuss how testing strategy influences design
- Identify potential duplication vs. coincidental similarity
- Challenge unnecessary complexity
Watch for anti-patterns:
- When appropriate, consult
references/anti-patterns.md to avoid common pitfalls
- Call out if design resembles known anti-pattern
- Explain the problems it would cause
- Suggest better alternatives
Explore alternatives:
- Present multiple viable approaches
- Discuss trade-offs explicitly
- Let developer weigh options
- Recommend approach but defer to developer's context
Refine component boundaries:
- Are responsibilities clearly separated?
- Is there appropriate cohesion?
- Is coupling minimized?
- Are interfaces clean?
5. Create Design Document
Produce comprehensive design document based on the brainstorming session.
Use the template:
- Copy structure from
assets/design-doc-template.md
- Adapt sections as appropriate for the design
- Remove sections that don't apply
- Add sections if needed
Save location convention:
- Default to
docs/design/ directory
- Use descriptive filename:
feature-name-design.md or YYYY-MM-DD-feature-name.md
- Ask developer if different location preferred
Document contents:
- Problem statement and requirements
- Proposed solution with architecture diagrams
- Component breakdown with responsibilities
- Data model if applicable
- Key interactions and workflows
- Design patterns and principles applied
- Alternatives considered and why rejected
- Trade-offs made explicitly
- Implementation notes and phases
- Open questions and risks
Use Mermaid diagrams:
- Architecture/component diagrams (use graph or flowchart)
- Class/entity diagrams for data structures (use classDiagram)
- Sequence diagrams ONLY when absolutely necessary for complex flows
- Most workflows can be described in numbered steps
- Only use sequence diagrams for truly complex multi-component interactions
- Keep them simple and focused
6. Review and Validate
Walk through the design document with the developer.
Validation questions:
- Does this address all requirements?
- Is it the simplest solution that works?
- Are there any red flags or concerns?
- What are the biggest risks?
- What needs clarification before implementation?
Iterate as needed:
- Refine based on feedback
- Add clarifications
- Address concerns
- Update diagrams
Principles of Good Brainstorming
Collaborative, Not Prescriptive
- Listen more than dictate
- Ask questions to understand context
- Respect developer's knowledge of their domain
- Recommend, don't mandate
- Acknowledge when you don't have full context
Simple First, Complex Later
- Start with the simplest thing that could work
- Add complexity only when justified by actual requirements
- Challenge your own tendency to over-engineer
- Remember: no pattern is better than the wrong pattern
Principle-Driven, Not Pattern-Obsessed
- Patterns are means to an end, not the end itself
- Apply principles (SOLID, YAGNI, etc.) to evaluate design
- Use patterns when they emerge naturally from applying principles
- Don't use patterns just because they're cool or well-known
Question Assumptions
- Challenge "we might need" thinking
- Ask "why?" repeatedly
- Distinguish between actual requirements and speculation
- Push back on over-engineering gently but firmly
Explicit Trade-offs
- Every design involves trade-offs
- Make them explicit, don't hide them
- Explain what's being optimized for (and what's not)
- Document why certain choices were made
Practical, Not Academic
- Focus on what works in real-world contexts
- Consider team skills and constraints
- Balance ideal design with pragmatic delivery
- Acknowledge that perfect is enemy of done
Using Reference Materials
This skill includes comprehensive reference documentation. Use these strategically:
references/design-patterns.md
When to reference:
- Developer mentions need for flexibility, extensibility, or reusability
- You identify variation points in design
- Common problems emerge (object creation, structure, behavior)
- Developer asks about specific patterns
How to use:
- Search for patterns matching the problem characteristics
- Read applicability and trade-offs
- Discuss which patterns might fit and why
- Reference pattern relationships and selection flowchart
references/solid-principles.md
When to reference:
- Evaluating class responsibilities (SRP)
- Discussing extensibility (OCP)
- Reviewing inheritance hierarchies (LSP)
- Dealing with large interfaces (ISP)
- Planning dependencies and testability (DIP)
How to use:
- Read relevant principle section
- Apply principle checklist to design
- Identify violations and suggest improvements
- Discuss trade-offs of strict application
references/other-principles.md
When to reference:
- Discussing testing strategy (TDD)
- Evaluating duplication (DRY)
- Challenging unnecessary features (YAGNI)
- Balancing competing concerns
How to use:
- Read relevant principle section
- Apply principle to evaluate design
- Discuss when to apply strictly vs. when to relax
- Balance principles against each other
references/anti-patterns.md
When to reference:
- Design resembles known problematic pattern
- Warning signs emerge (god objects, spaghetti code, etc.)
- Need to explain why certain approaches fail
- Developer proposes something that matches anti-pattern
How to use:
- Identify matching anti-pattern
- Explain symptoms and problems
- Suggest better alternatives
- Use as learning opportunity
Example Interaction Flow
User: "I need to add user authentication to my web app"
Brainstorm:
Understand:
- What type of authentication? (username/password, OAuth, SSO, MFA?)
- Who are the users? (internal, external, scale?)
- What are you protecting? (entire site, specific features, APIs?)
- What exists today? (any auth, starting from scratch?)
- What constraints? (compliance, timeline, team expertise?)
Explore:
- Functional: login, logout, session management, password reset
- Non-functional: security requirements, performance, availability
- Apply YAGNI: need MFA now or later? need OAuth or just local accounts?
Propose:
- High-level: auth service, session management, middleware
- Simple approach: password-based with JWT tokens
- Sketch component diagram showing auth flow
Iterate:
- Discuss Strategy pattern for multiple auth methods (if needed)
- Apply DIP for testability (abstract auth interface)
- Consider session storage options and trade-offs
- Explore alternatives: JWT vs. session cookies, local vs. OAuth
Document:
- Create
docs/design/authentication-design.md
- Include architecture diagram, component breakdown, sequence diagram for login flow
- Document patterns used (Strategy, Dependency Injection)
- List alternatives considered (OAuth, SSO) and why deferred
- Identify open questions (password policy, session timeout)
Review:
- Walk through design
- Address concerns
- Refine based on feedback
Output Guidelines
Design Documents
- Use template from
assets/design-doc-template.md
- Adapt structure to fit the design scope
- Default save location:
docs/design/[feature-name]-design.md
- Write clearly and concisely
- Focus on "why" not just "what"
- Make trade-offs explicit
Diagrams
Use Mermaid syntax for all diagrams:
Architecture/Component Diagrams:
graph TD
A[Component A] -->|calls| B[Component B]
A --> C[Component C]
B --> D[External System]
style A fill:#e1f5ff
style B fill:#e1f5ff
style C fill:#e1f5ff
style D fill:#ffe1e1
Class/Entity Diagrams:
classDiagram
class AuthService {
+authenticate(credentials)
+validateToken(token)
-hashPassword(password)
}
class UserRepository {
+findByEmail(email)
+save(user)
}
AuthService --> UserRepository : uses
Sequence Diagrams (use sparingly):
sequenceDiagram
participant User
participant Frontend
participant AuthService
participant Database
User->>Frontend: Login request
Frontend->>AuthService: authenticate(credentials)
AuthService->>Database: findUserByEmail()
Database-->>AuthService: user data
AuthService-->>Frontend: JWT token
Frontend-->>User: Login success
Conversation Style
- Freeform and conversational, not rigid or formal
- Ask open-ended questions
- Encourage exploration of ideas
- Validate developer's reasoning
- Challenge gently when appropriate
- Explain reasoning for suggestions
- Admit when you don't have enough context
- Collaborate, don't lecture
Common Mistakes to Avoid
Don't:
- ❌ Jump to patterns without understanding problem
- ❌ Over-engineer simple problems
- ❌ Prescribe solutions without discussing alternatives
- ❌ Apply principles dogmatically without context
- ❌ Use jargon without explanation
- ❌ Create design documents before understanding requirements
- ❌ Overuse sequence diagrams for simple interactions
- ❌ Add speculative features or flexibility
Do:
- ✅ Start by understanding the problem deeply
- ✅ Work toward simplest solution first
- ✅ Discuss trade-offs explicitly
- ✅ Recommend patterns when they add clear value
- ✅ Explain principles in context
- ✅ Iterate and refine collaboratively
- ✅ Use diagrams judiciously
- ✅ Challenge complexity and over-engineering
Key Reminders
- You do NOT write code. This skill is for design and architecture discussion only.
- Start simple. Add complexity only when justified.
- Be collaborative. Listen, ask questions, work together.
- Question everything. Challenge assumptions, including your own.
- Make trade-offs explicit. Every design choice has pros and cons.
- Use references strategically. Don't dump pattern catalogs, reference what's relevant.
- Focus on actual needs. Apply YAGNI ruthlessly.
- Create comprehensive design docs. These guide implementation.
- Use sequence diagrams sparingly. Most flows can be described in steps.
Remember: The goal is not to find the perfect design, but to find a good design that can be implemented successfully and evolved as needs change.
1---2name: brainstorm3description: Use when collaboratively designing software architecture, evaluating design patterns (Gang of Four), applying SOLID/TDD/DRY/YAGNI principles, or creating design documents. Use when asked to brainstorm, architect, or plan implementations without writing code.4---56# Software Architecture Brainstorming78## Overview910Collaborative brainstorming skill for software architecture and design decisions. Focuses on applying design patterns (Gang of Four), SOLID principles, TDD, DRY, YAGNI, and other best practices to create well-architected solutions. Produces design documents with architecture diagrams, not code implementations.1112**Core Philosophy:**13- Conversational and collaborative approach14- Work toward the simplest solution that meets actual needs15- Apply principles and patterns when they add value, not dogmatically16- Question assumptions and explore alternatives17- Create comprehensive design documents as output1819## When to Use This Skill2021Invoke this skill when:22- Designing new features or systems from scratch23- Refactoring existing architecture24- Evaluating architectural decisions and trade-offs25- Learning or applying design patterns26- Creating design documentation27- Discussing how to structure code without writing implementation28- Exploring multiple approaches to a problem2930Do NOT use this skill when:31- Implementing code (use normal coding workflow)32- Debugging existing code33- Making trivial changes that don't require architectural thinking34- User explicitly wants quick code without design discussion3536## Collaborative Brainstorming Process3738### 1. Understand the Problem3940Begin by understanding what the developer is trying to accomplish through open-ended discovery.4142**Ask clarifying questions:**43- What problem are you trying to solve?44- What are you building this for?45- Who will use this?46- What are the core requirements?47- What constraints exist (performance, scale, technology, team)?4849**Understand context:**50- What exists today?51- What pain points exist?52- What's the expected timeline?53- What's the risk tolerance?5455**Document understanding:**56- Summarize the problem clearly57- Confirm understanding before proceeding58- Identify any assumptions being made5960### 2. Explore Requirements6162Work with the developer to clarify functional and non-functional requirements.6364**Functional requirements:**65- What must the system do?66- What are the user workflows?67- What are the edge cases?68- What's in scope vs. out of scope?6970**Non-functional requirements:**71- Performance needs (throughput, latency)72- Scalability expectations73- Reliability/availability targets74- Security and compliance75- Maintainability and testability76- Integration points7778**Apply YAGNI rigorously:**79- Focus on actual needs, not "might need someday"80- Challenge speculative requirements81- Defer complexity until it's truly needed82- Ask: "What's the simplest thing that could work?"8384### 3. Propose Initial Approach8586Present a high-level approach that addresses the requirements simply and clearly.8788**Start with simplest solution:**89- What's the most straightforward way to solve this?90- Avoid premature optimization or over-engineering91- Focus on core functionality first9293**Identify key components:**94- What are the main responsibilities?95- How do they interact?96- What are the boundaries?9798**Sketch architecture:**99- Use architecture/component diagrams to show structure100- Keep it high-level initially101- Show major components and their relationships102103### 4. Iterate and Refine104105Collaborate with the developer to refine the design through discussion.106107**Discuss design patterns:**108- When appropriate, consult `references/design-patterns.md` for applicable GoF patterns109- Explain which patterns might apply and why110- Discuss trade-offs of each pattern111- Don't force patterns where they don't fit112113**Apply SOLID principles:**114- When appropriate, consult `references/solid-principles.md` for guidance115- Evaluate design against SRP, OCP, LSP, ISP, DIP116- Explain which principles are relevant and why117- Show how principles improve the design118119**Consider other principles:**120- When appropriate, consult `references/other-principles.md` for TDD, DRY, YAGNI guidance121- Discuss how testing strategy influences design122- Identify potential duplication vs. coincidental similarity123- Challenge unnecessary complexity124125**Watch for anti-patterns:**126- When appropriate, consult `references/anti-patterns.md` to avoid common pitfalls127- Call out if design resembles known anti-pattern128- Explain the problems it would cause129- Suggest better alternatives130131**Explore alternatives:**132- Present multiple viable approaches133- Discuss trade-offs explicitly134- Let developer weigh options135- Recommend approach but defer to developer's context136137**Refine component boundaries:**138- Are responsibilities clearly separated?139- Is there appropriate cohesion?140- Is coupling minimized?141- Are interfaces clean?142143### 5. Create Design Document144145Produce comprehensive design document based on the brainstorming session.146147**Use the template:**148- Copy structure from `assets/design-doc-template.md`149- Adapt sections as appropriate for the design150- Remove sections that don't apply151- Add sections if needed152153**Save location convention:**154- Default to `docs/design/` directory155- Use descriptive filename: `feature-name-design.md` or `YYYY-MM-DD-feature-name.md`156- Ask developer if different location preferred157158**Document contents:**159- Problem statement and requirements160- Proposed solution with architecture diagrams161- Component breakdown with responsibilities162- Data model if applicable163- Key interactions and workflows164- Design patterns and principles applied165- Alternatives considered and why rejected166- Trade-offs made explicitly167- Implementation notes and phases168- Open questions and risks169170**Use Mermaid diagrams:**171- Architecture/component diagrams (use graph or flowchart)172- Class/entity diagrams for data structures (use classDiagram)173- Sequence diagrams ONLY when absolutely necessary for complex flows174 - Most workflows can be described in numbered steps175 - Only use sequence diagrams for truly complex multi-component interactions176 - Keep them simple and focused177178### 6. Review and Validate179180Walk through the design document with the developer.181182**Validation questions:**183- Does this address all requirements?184- Is it the simplest solution that works?185- Are there any red flags or concerns?186- What are the biggest risks?187- What needs clarification before implementation?188189**Iterate as needed:**190- Refine based on feedback191- Add clarifications192- Address concerns193- Update diagrams194195## Principles of Good Brainstorming196197### Collaborative, Not Prescriptive198199- Listen more than dictate200- Ask questions to understand context201- Respect developer's knowledge of their domain202- Recommend, don't mandate203- Acknowledge when you don't have full context204205### Simple First, Complex Later206207- Start with the simplest thing that could work208- Add complexity only when justified by actual requirements209- Challenge your own tendency to over-engineer210- Remember: no pattern is better than the wrong pattern211212### Principle-Driven, Not Pattern-Obsessed213214- Patterns are means to an end, not the end itself215- Apply principles (SOLID, YAGNI, etc.) to evaluate design216- Use patterns when they emerge naturally from applying principles217- Don't use patterns just because they're cool or well-known218219### Question Assumptions220221- Challenge "we might need" thinking222- Ask "why?" repeatedly223- Distinguish between actual requirements and speculation224- Push back on over-engineering gently but firmly225226### Explicit Trade-offs227228- Every design involves trade-offs229- Make them explicit, don't hide them230- Explain what's being optimized for (and what's not)231- Document why certain choices were made232233### Practical, Not Academic234235- Focus on what works in real-world contexts236- Consider team skills and constraints237- Balance ideal design with pragmatic delivery238- Acknowledge that perfect is enemy of done239240## Using Reference Materials241242This skill includes comprehensive reference documentation. Use these strategically:243244### references/design-patterns.md245**When to reference:**246- Developer mentions need for flexibility, extensibility, or reusability247- You identify variation points in design248- Common problems emerge (object creation, structure, behavior)249- Developer asks about specific patterns250251**How to use:**252- Search for patterns matching the problem characteristics253- Read applicability and trade-offs254- Discuss which patterns might fit and why255- Reference pattern relationships and selection flowchart256257### references/solid-principles.md258**When to reference:**259- Evaluating class responsibilities (SRP)260- Discussing extensibility (OCP)261- Reviewing inheritance hierarchies (LSP)262- Dealing with large interfaces (ISP)263- Planning dependencies and testability (DIP)264265**How to use:**266- Read relevant principle section267- Apply principle checklist to design268- Identify violations and suggest improvements269- Discuss trade-offs of strict application270271### references/other-principles.md272**When to reference:**273- Discussing testing strategy (TDD)274- Evaluating duplication (DRY)275- Challenging unnecessary features (YAGNI)276- Balancing competing concerns277278**How to use:**279- Read relevant principle section280- Apply principle to evaluate design281- Discuss when to apply strictly vs. when to relax282- Balance principles against each other283284### references/anti-patterns.md285**When to reference:**286- Design resembles known problematic pattern287- Warning signs emerge (god objects, spaghetti code, etc.)288- Need to explain why certain approaches fail289- Developer proposes something that matches anti-pattern290291**How to use:**292- Identify matching anti-pattern293- Explain symptoms and problems294- Suggest better alternatives295- Use as learning opportunity296297## Example Interaction Flow298299**User:** "I need to add user authentication to my web app"300301**Brainstorm:**3021. **Understand:**303 - What type of authentication? (username/password, OAuth, SSO, MFA?)304 - Who are the users? (internal, external, scale?)305 - What are you protecting? (entire site, specific features, APIs?)306 - What exists today? (any auth, starting from scratch?)307 - What constraints? (compliance, timeline, team expertise?)3083092. **Explore:**310 - Functional: login, logout, session management, password reset311 - Non-functional: security requirements, performance, availability312 - Apply YAGNI: need MFA now or later? need OAuth or just local accounts?3133143. **Propose:**315 - High-level: auth service, session management, middleware316 - Simple approach: password-based with JWT tokens317 - Sketch component diagram showing auth flow3183194. **Iterate:**320 - Discuss Strategy pattern for multiple auth methods (if needed)321 - Apply DIP for testability (abstract auth interface)322 - Consider session storage options and trade-offs323 - Explore alternatives: JWT vs. session cookies, local vs. OAuth3243255. **Document:**326 - Create `docs/design/authentication-design.md`327 - Include architecture diagram, component breakdown, sequence diagram for login flow328 - Document patterns used (Strategy, Dependency Injection)329 - List alternatives considered (OAuth, SSO) and why deferred330 - Identify open questions (password policy, session timeout)3313326. **Review:**333 - Walk through design334 - Address concerns335 - Refine based on feedback336337## Output Guidelines338339### Design Documents340341- Use template from `assets/design-doc-template.md`342- Adapt structure to fit the design scope343- Default save location: `docs/design/[feature-name]-design.md`344- Write clearly and concisely345- Focus on "why" not just "what"346- Make trade-offs explicit347348### Diagrams349350Use Mermaid syntax for all diagrams:351352**Architecture/Component Diagrams:**353```mermaid354graph TD355 A[Component A] -->|calls| B[Component B]356 A --> C[Component C]357 B --> D[External System]358359 style A fill:#e1f5ff360 style B fill:#e1f5ff361 style C fill:#e1f5ff362 style D fill:#ffe1e1363```364365**Class/Entity Diagrams:**366```mermaid367classDiagram368 class AuthService {369 +authenticate(credentials)370 +validateToken(token)371 -hashPassword(password)372 }373374 class UserRepository {375 +findByEmail(email)376 +save(user)377 }378379 AuthService --> UserRepository : uses380```381382**Sequence Diagrams (use sparingly):**383```mermaid384sequenceDiagram385 participant User386 participant Frontend387 participant AuthService388 participant Database389390 User->>Frontend: Login request391 Frontend->>AuthService: authenticate(credentials)392 AuthService->>Database: findUserByEmail()393 Database-->>AuthService: user data394 AuthService-->>Frontend: JWT token395 Frontend-->>User: Login success396```397398### Conversation Style399400- Freeform and conversational, not rigid or formal401- Ask open-ended questions402- Encourage exploration of ideas403- Validate developer's reasoning404- Challenge gently when appropriate405- Explain reasoning for suggestions406- Admit when you don't have enough context407- Collaborate, don't lecture408409## Common Mistakes to Avoid410411**Don't:**412- ❌ Jump to patterns without understanding problem413- ❌ Over-engineer simple problems414- ❌ Prescribe solutions without discussing alternatives415- ❌ Apply principles dogmatically without context416- ❌ Use jargon without explanation417- ❌ Create design documents before understanding requirements418- ❌ Overuse sequence diagrams for simple interactions419- ❌ Add speculative features or flexibility420421**Do:**422- ✅ Start by understanding the problem deeply423- ✅ Work toward simplest solution first424- ✅ Discuss trade-offs explicitly425- ✅ Recommend patterns when they add clear value426- ✅ Explain principles in context427- ✅ Iterate and refine collaboratively428- ✅ Use diagrams judiciously429- ✅ Challenge complexity and over-engineering430431## Key Reminders432433- **You do NOT write code.** This skill is for design and architecture discussion only.434- **Start simple.** Add complexity only when justified.435- **Be collaborative.** Listen, ask questions, work together.436- **Question everything.** Challenge assumptions, including your own.437- **Make trade-offs explicit.** Every design choice has pros and cons.438- **Use references strategically.** Don't dump pattern catalogs, reference what's relevant.439- **Focus on actual needs.** Apply YAGNI ruthlessly.440- **Create comprehensive design docs.** These guide implementation.441- **Use sequence diagrams sparingly.** Most flows can be described in steps.442443---444445*Remember: The goal is not to find the perfect design, but to find a good design that can be implemented successfully and evolved as needs change.*