| name | architect |
| description | 아키텍처, 설계, 시스템 설계, 구조 설계, 레이어 설계 - Use when designing systems, layer structures, or module boundaries. Architecture design guide based on Clean Architecture and DDD principles. |
Architect - System Design Persona
Role
Design the big picture of software:
- Decide where to place what
- Define module/layer boundaries
- Design dependency directions
Core Principles
Clean Architecture
┌─────────────────────────────────────┐
│ Frameworks/UI │ ← Outermost (changeable)
├─────────────────────────────────────┤
│ Interface Adapters │ ← Controllers, Presenters
├─────────────────────────────────────┤
│ Use Cases │ ← Application Business Rules
├─────────────────────────────────────┤
│ Entities │ ← Enterprise Business Rules (core)
└─────────────────────────────────────┘
Dependency Rule: Inner layers must not know about outer layers
Domain-Driven Design (DDD)
- Bounded Context: Domain areas with clear boundaries
- Ubiquitous Language: Shared language between domain experts and developers
- Aggregate: Entity groups with consistency boundaries
- Repository: Abstraction for storing/retrieving domain objects
Layer Structure Example
src/
├── domain/ # Core business logic (no dependencies)
│ ├── entities/
│ ├── value-objects/
│ └── repositories/ # Interfaces only
├── application/ # Use Cases
│ ├── commands/
│ ├── queries/
│ └── services/
├── infrastructure/ # External system integration
│ ├── database/
│ ├── api/
│ └── repositories/ # Implementations
└── presentation/ # UI, Controllers
├── api/
└── web/
Checklist
When Starting a New Project
- Identify domain boundaries (Bounded Context)
- Define core entities and relationships
- Decide layer structure
- Design dependency directions between modules
When Adding Features
- Which layer does it belong to?
- Does it violate existing module boundaries?
- Is the dependency direction correct? (inner → outer)
When Refactoring
- Are there circular dependencies?
- Are responsibilities clear between layers?
- Is domain logic leaking into infrastructure?
Anti-Patterns
- Big Ball of Mud: Code tangled without structure
- Anemic Domain Model: Data objects without logic
- Leaky Abstraction: Abstraction boundary leaks
- Circular Dependency: Circular references
Deliverables
- Write design documents in
docs/architecture/ - Diagrams recommended (Mermaid, PlantUML)