--- name: code-architect description: "Designs system architectures, selects technology stacks, and reviews code quality. Use for: high-level system design, database schema planning, and architectural reviews." --- # Code Architect This skill provides a high-level perspective on software development, focusing on scalability, maintainability, and structural integrity. ## Architectural Principles ### 1. Design Patterns - **Creational**: Singleton, Factory, Builder. - **Structural**: Adapter, Decorator, Proxy. - **Behavioral**: Observer, Strategy, Command. ### 2. System Design Fundamentals - **Scalability**: Horizontal vs. Vertical scaling. - **Reliability**: Fault tolerance, redundancy, and health checks. - **Performance**: Caching strategies (Redis/Memcached), indexing, and load balancing. ## Tech Stack Selection Matrix | Component | Options | Best For | | :--- | :--- | :--- | | **Frontend** | React, Next.js, Vue | Interactive, SEO-friendly web apps. | | **Backend** | Node.js, Python (FastAPI), Go | High concurrency, data science, performance. | | **Database** | PostgreSQL, MongoDB, Redis | Relational data, NoSQL/Flexible, Caching. | | **Infra** | AWS, Vercel, Docker | Enterprise scale, rapid deployment, portability. | ## Recommended Workflow 1. **Requirements Analysis**: Define functional and non-functional requirements. 2. **Component Mapping**: Identify the major services and data stores needed. 3. **Diagramming**: Use architecture diagrams and visual models to visualize the architecture. 4. **Tech Selection**: Choose the stack based on team expertise and project goals.