specwright/templates/skills/architecture-decision/SKILL.md
Architecture pattern recommendation and decision documentation guidance
npx skillsauth add michsindlinger/specwright specwright/templates/skills/architecture-decisionInstall 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.
Project: [PROJECT_NAME] Generated: [DATE] Purpose: Guide for analyzing product complexity and recommending appropriate architecture patterns
This skill guides you when making architecture decisions for:
/plan-productScore each dimension (1-5):
| Dimension | 1 (Low) | 3 (Medium) | 5 (High) | |-----------|---------|------------|----------| | Domain Complexity | Simple CRUD, few entities | Moderate business rules, 10-20 entities | Rich domain logic, complex workflows, 50+ entities | | Business Rules | Straightforward validation | Conditional logic, state machines | Complex calculations, regulatory compliance | | External Integrations | 0-1 APIs | 2-4 APIs | 5+ APIs, payment, auth providers | | Team Size | 1-2 developers | 3-5 developers | 6+ developers, multiple teams | | Scalability | < 1K users | 1K-100K users | 100K+ users, high concurrency |
Total Score Ranges:
Layered (3-Tier)
Presentation → Business Logic → Data Access
MVC / MVVM
Model ↔ View ↔ Controller/ViewModel
Clean Architecture
Entities → Use Cases → Interface Adapters → Frameworks
Modular Monolith
Module A | Module B | Module C (shared database, clear boundaries)
Hexagonal (Ports & Adapters)
Core Domain ← Ports → Adapters (DB, API, UI)
Domain-Driven Design (DDD)
Bounded Contexts → Aggregates → Domain Events
Microservices
Service A ↔ Message Bus ↔ Service B (independent deployment)
Event-Driven Architecture
Producers → Event Bus → Consumers (async processing)
| Pattern | Best For | Key Trade-off | |---------|----------|--------------| | CQRS | Separate read/write models | Complexity vs. performance | | Serverless | Variable load, cost optimization | Vendor lock-in vs. ops simplicity | | JAMstack | Content sites + APIs | Static limitation vs. performance | | Micro-frontends | Independent frontend teams | Integration complexity vs. autonomy | | Plugin Architecture | Extensibility focus | Plugin API design vs. flexibility |
For each decision, document:
## Architecture Decision: [Pattern Name]
### Context
[What requirements drive this decision]
### Decision
[What pattern was chosen]
### Rationale
[Why this pattern fits the requirements]
### Consequences
**Positive:**
- [Benefit 1]
- [Benefit 2]
**Negative:**
- [Trade-off 1]
- [Trade-off 2]
**Risks:**
- [Risk 1 and mitigation]
### Alternatives Considered
| Alternative | Why Not Chosen |
|------------|---------------|
| [Pattern A] | [Reason] |
| [Pattern B] | [Reason] |
Interactive format:
Based on my analysis of your product:
**Complexity Score:** [X]/25
- Domain: [score] — [brief justification]
- Business Rules: [score] — [brief justification]
- Integrations: [score] — [brief justification]
- Team Size: [score] — [brief justification]
- Scale: [score] — [brief justification]
**Recommended Pattern:** [Pattern Name]
[2-3 sentences explaining why this pattern fits]
**Key Trade-offs:**
+ [Pro 1]
+ [Pro 2]
- [Con 1]
- [Con 2]
**Alternatives:**
- [Alternative 1]: [Why it could also work]
- [Alternative 2]: [Why it's less ideal]
Would you like to:
1. Approve this architecture
2. Discuss the alternative patterns
3. Adjust the complexity assessment
| Mistake | Better Approach | |---------|-----------------| | Microservices for a 2-person team | Start with modular monolith, extract later | | No architecture for complex domain | Invest in DDD or Clean Architecture upfront | | Choosing pattern because it's popular | Match to actual complexity and team | | Ignoring operational complexity | Factor in deployment, monitoring, debugging | | Over-engineering MVP | Simple layered is fine for validation phase |
Use template: specwright/templates/product/architecture-decision-template.md
Hybrid lookup:
specwright/templates/product/architecture-decision-template.md (project)~/.specwright/templates/product/architecture-decision-template.md (global)tools
Session Handoff: Erstellt eine vollständige Zusammenfassung der aktuellen Session für einen sauberen Kontextwechsel. NUR bei explizitem Aufruf (/session-handoff). NICHT automatisch auslösen. Geeignet wenn der User die Session resetten will, den Kontext aufräumen will, oder bei ~120k Tokens angelangt ist.
development
Pre-Mortem Risk Analysis: Strukturierte Prospective-Hindsight-Übung um launch-blocking Risiken vor Commitment aufzudecken. Team stellt sich vor, das Produkt sei 14 Tage nach Launch gefloppt, und arbeitet rückwärts. Klassifiziert Risiken in Tigers (echt), Paper Tigers (hypothetisch), Elephants (unausgesprochen). Nutze diesen Skill vor Build-Commitment, bei zu hoher Stakeholder-Confidence, vor Major-Releases, oder wenn das Team vage Sorgen nicht artikulieren kann. Trigger: /pre-mortem, 'pre-mortem', 'risk analysis', 'was könnte schiefgehen', 'risiken vor launch'.
testing
Six-Sigma Atomicity Validator for create-spec stories
tools
UX pattern definition guidance for navigation, user flows, interactions, and accessibility