Architecture Patterns
Input: $ARGUMENTS
Interpretations
Before executing, identify which interpretation matches the user’s input:
Interpretation 1 — Greenfield architecture selection: The user is starting a new system or project and needs to evaluate and choose the right architectural pattern from scratch. Interpretation 2 — Architecture evolution: The user has an existing system that’s hitting scaling, complexity, or maintainability limits and needs to evaluate whether and how to change the architecture. Interpretation 3 — Architecture decision documentation: The user has already made or is near making an architectural choice and wants to formally document it with rationale, tradeoffs, and an ADR.
If ambiguous, ask: “I can help with choosing architecture for a new system, evolving an existing architecture, or documenting an architectural decision — which fits?” If clear from context, proceed with the matching interpretation.
Overview
Procedure for evaluating, choosing, and implementing software architecture patterns
Steps
Step 1: Understand requirements and constraints
Gather the context needed for architectural decisions:
- Document business requirements and drivers
- Identify quality attribute requirements
- Understand current state (if evolving existing system)
- Document constraints (budget, timeline, skills)
- Identify stakeholders and their concerns
- Understand scale and growth projections
Step 2: Identify candidate architectures
Identify architectural patterns that could work:
- Review common patterns (monolith, microservices, etc.)
- Consider hybrid approaches
- Research how similar problems are solved
- Consider team experience and preferences
- Document 2-4 viable candidates
Step 3: Evaluate candidates against requirements
Systematically evaluate each candidate:
- Score each candidate against quality attributes
- Evaluate against team capability
- Assess operational requirements
- Consider total cost of ownership
- Evaluate flexibility and reversibility
- Document tradeoffs for each option
Step 4: Select architecture
Make the architectural decision:
- Review evaluation results
- Discuss with stakeholders
- Consider reversibility and evolution
- Make decision and document rationale
- Identify risks and mitigation strategies
- Get stakeholder buy-in
Step 5: Create Architecture Decision Record
Document the decision formally:
- Write ADR with context and decision
- Document alternatives considered
- Explain consequences and tradeoffs
- Link to supporting analysis
- Get formal approval if needed
- Add to architectural documentation
Step 6: Design component architecture
Design the detailed architecture:
- Identify main components and their responsibilities
- Define interfaces between components
- Design data architecture
- Plan integration patterns
- Address cross-cutting concerns
- Create architecture diagrams
Step 7: Plan implementation roadmap
Create plan to implement the architecture:
- Identify implementation phases
- Define key milestones
- Plan for incremental delivery
- Identify dependencies and sequences
- Plan risk mitigation
- Create timeline
When to Use
- Starting a new project and choosing initial architecture
- Evaluating whether to break apart a monolith
- Scaling challenges require architectural changes
- Adding major new capability to existing system
- Technical debt is causing architectural problems
- Team debating architectural approaches
- Documenting architectural decisions (ADRs)
- Reviewing and evolving existing architecture
Verification
- Architecture addresses key quality requirements
- Decision is documented with rationale
- Tradeoffs are explicitly acknowledged
- Team has skills to implement
- Plan is realistic given constraints
- Stakeholders are aligned
- Architecture can evolve over time