---
description: Review and improve system architecture
category: team-collaboration
---

# Architecture Review Command

Review and improve system architecture

## Instructions

Perform a comprehensive architectural analysis following these steps:

1. **High-Level Architecture Analysis**
   - Map out the overall system architecture and components
   - Identify architectural patterns in use (MVC, MVP, Clean Architecture, etc.)
   - Review module boundaries and separation of concerns
   - Analyze the application's layered structure

2. **Design Patterns Assessment**
   - Identify design patterns used throughout the codebase
   - Check for proper implementation of common patterns
   - Look for anti-patterns and code smells
   - Assess pattern consistency across the application

3. **Dependency Management**
   - Review dependency injection and inversion of control
   - Analyze coupling between modules and components
   - Check for circular dependencies
   - Assess dependency direction and adherence to dependency rule

4. **Data Flow Architecture**
   - Trace data flow through the application
   - Review state management patterns and implementation
   - Analyze data persistence and storage strategies
   - Check for proper data validation and transformation

5. **Component Architecture**
   - Review component design and responsibilities
   - Check for single responsibility principle adherence
   - Analyze component composition and reusability
   - Assess interface design and abstraction levels

6. **Error Handling Architecture**
   - Review error handling strategy and consistency
   - Check for proper error propagation and recovery
   - Analyze logging and monitoring integration
   - Assess resilience and fault tolerance patterns

7. **Scalability Assessment**
   - Analyze horizontal and vertical scaling capabilities
   - Review caching strategies and implementation
   - Check for stateless design where appropriate
   - Assess performance bottlenecks and scaling limitations

8. **Security Architecture**
   - Review security boundaries and trust zones
   - Check authentication and authorization architecture
   - Analyze data protection and privacy measures
   - Assess security pattern implementation

9. **Testing Architecture**
   - Review test structure and organization
   - Check for testability in design
   - Analyze mocking and dependency isolation strategies
   - Assess test coverage across architectural layers

10. **Configuration Management**
    - Review configuration handling and environment management
    - Check for proper separation of config from code
    - Analyze feature flags and runtime configuration
    - Assess deployment configuration strategies

11. **Documentation & Communication**
    - Review architectural documentation and diagrams
    - Check for clear API contracts and interfaces
    - Assess code self-documentation and clarity
    - Analyze team communication patterns in code

12. **Future-Proofing & Extensibility**
    - Assess the architecture's ability to accommodate change
    - Review extension points and plugin architectures
    - Check for proper versioning and backward compatibility
    - Analyze migration and upgrade strategies

13. **Technology Choices**
    - Review technology stack alignment with requirements
    - Assess framework and library choices
    - Check for consistent technology usage
    - Analyze technical debt and modernization opportunities

14. **Performance Architecture**
    - Review caching layers and strategies
    - Analyze asynchronous processing patterns
    - Check for proper resource management
    - Assess monitoring and observability architecture

15. **Recommendations**
    - Provide specific architectural improvements
    - Suggest refactoring strategies for problem areas
    - Recommend patterns and practices for better design
    - Create a roadmap for architectural evolution

Focus on providing actionable insights with specific examples and clear rationale for recommendations.