DauQuangThanh

architecture-design

2
2
# Install this skill:
npx skills add DauQuangThanh/hanoi-rainbow --skill "architecture-design"

Install specific skill from multi-skill repository

# Description

Designs comprehensive software solution architectures including system components, technology stacks, integration patterns, scalability strategies, and deployment models. Produces architecture diagrams, technical specifications, and implementation roadmaps. Use when planning new software systems, modernizing legacy applications, designing microservices, evaluating technology choices, creating architecture documentation, or when users mention system design, architecture patterns, scalability planning, or technical architecture decisions.

# SKILL.md


name: architecture-design
description: Designs comprehensive software solution architectures including system components, technology stacks, integration patterns, scalability strategies, and deployment models. Produces architecture diagrams, technical specifications, and implementation roadmaps. Use when planning new software systems, modernizing legacy applications, designing microservices, evaluating technology choices, creating architecture documentation, or when users mention system design, architecture patterns, scalability planning, or technical architecture decisions.


Architecture Design

Overview

This skill enables you to design comprehensive software solution architectures including system components, technology stacks, integration patterns, scalability strategies, and deployment models.

Core Capabilities

When activated, this skill provides:

  1. Requirements Analysis & Architecture Planning
  2. Analyze functional and non-functional requirements
  3. Identify architectural drivers (scalability, security, performance)
  4. Define system boundaries and constraints
  5. Establish architecture goals and success criteria

  6. System Architecture Design

  7. Design layered/tiered architectures
  8. Create microservices and domain-driven designs
  9. Design event-driven and message-based systems
  10. Plan serverless and cloud-native architectures
  11. Design monolithic, modular monolithic, or distributed systems

  12. Technology Stack Selection

  13. Evaluate and justify programming languages and frameworks
  14. Select databases with rationale (SQL, NoSQL, time-series, graph)
  15. Choose middleware and integration platforms (message queues, API gateways)
  16. Select infrastructure and cloud platforms (assess vendor lock-in)
  17. Recommend CI/CD and DevOps tools
  18. Document technology decisions in ADRs with alternatives considered
  19. Assess team skills and training needs for new technologies

  20. Architecture Patterns & Best Practices

  21. Apply design patterns (MVC, MVVM, Clean Architecture, Hexagonal)
  22. Implement integration patterns (REST, GraphQL, gRPC, message queues)
  23. Design for scalability (horizontal/vertical, caching, CDN)
  24. Implement security patterns (OAuth, JWT, zero-trust)
  25. Apply resilience patterns (circuit breakers, retries, bulkheads)

  26. Documentation & Deliverables

  27. Create C4 model diagrams in Mermaid format (Context, Container, Component, Code)
  28. Generate Mermaid diagrams (class, sequence, deployment)
  29. Produce architecture decision records (ADRs)
  30. Write technical specifications and API contracts
  31. Create implementation roadmaps and migration plans

Architecture Design Workflow

Follow this systematic process:

Step 1: Discovery & Requirements

  1. Gather Requirements
  2. Functional requirements (features, use cases)
  3. Non-functional requirements (performance, scalability, security)
  4. Business constraints (budget, timeline, compliance)
  5. Technical constraints (existing systems, team skills)

  6. Analyze Architecture Drivers

  7. Performance: latency, throughput targets
  8. Scalability: user growth, data volume projections
  9. Availability: uptime SLA, disaster recovery needs
  10. Security: authentication, authorization, compliance requirements
  11. Maintainability: testability, modularity goals

  12. Define System Context

  13. Identify stakeholders and their needs
  14. Map external systems and dependencies
  15. Define system boundaries
  16. Identify integration points

Step 2: Architecture Design

  1. Choose Architecture Style

Select based on requirements and constraints:

Monolithic

  • Use for: Simple applications, MVPs, small teams, tight deadlines
  • Benefits: Simple deployment, strong consistency, no network overhead
  • Trade-offs: Scaling limitations, technology lock-in

Modular Monolithic

  • Use for: Medium complexity, clear domain boundaries
  • Benefits: Better organization, some isolation, shared infrastructure
  • Trade-offs: Still single deployment, limited independent scaling

Microservices

  • Use for: Large scale, multiple teams, different tech stacks
  • Benefits: Independent scaling/deployment, technology flexibility
  • Trade-offs: Distributed complexity, network overhead, eventual consistency

Serverless

  • Use for: Event-driven, variable load, rapid development
  • Benefits: Auto-scaling, pay-per-use, no infrastructure management
  • Trade-offs: Cold starts, vendor lock-in, debugging complexity

Event-Driven

  • Use for: Real-time processing, loose coupling, high throughput
  • Benefits: Scalability, flexibility, asynchronous processing
  • Trade-offs: Complexity, eventual consistency, debugging challenges

  • Design System Components

Define key layers and components:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Presentation Layer            β”‚  UI, Controllers, APIs
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚   Application Layer             β”‚  Use Cases, Orchestration
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚   Domain Layer                  β”‚  Business Logic, Entities
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚   Data Layer                    β”‚  Databases, Caches
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚   Infrastructure Layer          β”‚  External APIs, Services
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. Define Data Architecture
  2. Design data models and schemas
  3. Choose database types (relational, document, graph, time-series)
  4. Plan data partitioning and sharding strategies
  5. Design caching layers (Redis, Memcached)
  6. Define data flows and ETL processes

  7. Design Integration Points

  8. API design (REST, GraphQL, gRPC)
  9. Message queues (Kafka, RabbitMQ, SQS)
  10. Event streaming architectures
  11. Authentication and authorization flows
  12. Rate limiting and throttling strategies

Step 3: Document Architecture

  1. Create Architecture Diagrams

Use C4 model in Mermaid format for comprehensive documentation:

  • Context: System in environment with users and external systems (use Mermaid C4Context)
  • Container: High-level technology choices and communication (use Mermaid C4Container)
  • Component: Internal structure of containers (use Mermaid C4Component)
  • Code: Class diagrams for complex components (use Mermaid classDiagram)

All diagrams should use Mermaid syntax for easy versioning and rendering in markdown.

  1. Write Architecture Decision Records (ADRs)

Document all significant decisions using structured ADRs:

# ADR-001: [Decision Title]

## Status
Proposed | Accepted | Deprecated | Superseded

## Context
[Problem and constraints requiring decision]

## Decision
[Chosen solution and approach]

## Consequences
[Benefits and trade-offs]

Full ADR Template: See adr-template.md for complete structure with examples

  1. Produce Technical Specifications
  2. System overview and objectives
  3. Component descriptions and responsibilities
  4. API contracts and interfaces
  5. Data models and schemas
  6. Security and compliance measures
  7. Deployment and operations guidelines

Step 4: Validate & Review

  1. Quality Attributes Assessment
  2. Performance: Response time, throughput
  3. Scalability: Horizontal/vertical scaling capabilities
  4. Availability: Fault tolerance, disaster recovery
  5. Security: Authentication, authorization, encryption
  6. Maintainability: Code organization, testability
  7. Cost: Infrastructure and operational expenses

  8. Design Validation Checklist

Ensure architecture is review-ready:

  • [ ] All functional and non-functional requirements addressed
  • [ ] Architecture style justified with trade-offs documented
  • [ ] Scalability strategy defined (horizontal/vertical, capacity planning)
  • [ ] Security measures implemented (authentication, authorization, encryption)
  • [ ] Data architecture validated (storage, consistency, replication)
  • [ ] Integration patterns specified (sync/async, APIs, events)
  • [ ] Monitoring and observability planned (metrics, logs, traces, alerts)
  • [ ] Disaster recovery and backup strategy documented (RPO/RTO)
  • [ ] Cost estimates provided (infrastructure, operations, scaling)
  • [ ] Architecture Decision Records (ADRs) created for major decisions

Reference Files

Load reference files based on specific needs:

  • Architecture Design Process: See architecture-design-process.md when:
  • Need detailed step-by-step guidance for complex architectures
  • Working through each phase systematically
  • Require comprehensive checklists and considerations

  • Architecture Patterns: See architecture-patterns.md when:

  • Need detailed pattern descriptions with benefits and trade-offs
  • Comparing multiple architecture styles
  • Looking for specific pattern implementations and examples

  • Technology Stack Guide: See technology-stack-guide.md when:

  • Evaluating specific technologies or frameworks
  • Need recommendations for databases, languages, or cloud platforms
  • Comparing technology options for specific requirements

  • Best Practices: See best-practices.md when:

  • Need design principles and guidelines
  • Looking for API design standards
  • Require security or operational best practices

  • Design Considerations: See design-considerations.md when:

  • Evaluating quality attributes (performance, scalability, security)
  • Need guidance on specific architectural concerns
  • Planning for observability, resilience, or cost optimization

  • Common Anti-Patterns: See common-anti-patterns-to-avoid.md when:

  • Reviewing existing architectures for issues
  • Validating design decisions
  • Need examples of what NOT to do

  • Migration Patterns: See migration-patterns.md when:

  • Modernizing legacy applications
  • Planning migration strategies
  • Need patterns for phased migrations or strangler fig approaches

  • Examples: See examples.md when:

  • Need complete architecture examples for common scenarios
  • Looking for real-world reference implementations
  • Want to see how patterns are applied in practice

  • Resources and References: See resources-and-references.md when:

  • Need external documentation links
  • Looking for additional learning resources
  • Require specifications or standards references

Output Format

Produce clear, comprehensive architecture documentation:

  1. Architecture Overview
  2. System purpose and scope
  3. Key architecture decisions and rationale
  4. High-level component diagram

  5. Detailed Design

  6. Component descriptions and responsibilities
  7. Data models and schemas
  8. API specifications
  9. Integration patterns

  10. Diagrams (All in Mermaid format)

  11. C4 Context diagram (Mermaid C4Context)
  12. C4 Container diagram (Mermaid C4Container)
  13. Sequence diagrams for key flows (Mermaid sequenceDiagram)
  14. Deployment diagram (Mermaid flowchart or C4Deployment)

  15. Implementation Roadmap

  16. Phase breakdown with milestones
  17. Dependencies and sequencing
  18. Resource requirements
  19. Risk mitigation strategies

  20. Architecture Decision Records

  21. Document all significant decisions
  22. Include context, alternatives, and trade-offs

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.