一键导入
architecture-patterns
Use when selecting architecture patterns (MVC, hexagonal, clean, microservices) for a new project.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when selecting architecture patterns (MVC, hexagonal, clean, microservices) for a new project.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Enhanced planning system combining UltraPlan's 6-phase pipeline with Clear Thought's 11 structured thinking frameworks. Takes a plain-English idea and produces a complete, AI-executable implementation plan with rigorous thinking at every phase.
Use when defining API endpoints, designing request/response schemas, or establishing API contracts during framework planning.
Use when documenting architectural decisions, comparing technology options, or recording rationale for framework choices.
Use when creating or updating blueprint files in .framework-blueprints/ directory.
Use when designing CI/CD pipelines or creating GitHub Actions / GitLab CI configuration.
Use when planning testing strategy, creating contract tests, or designing integration test plans.
| name | architecture-patterns |
| description | Use when selecting architecture patterns (MVC, hexagonal, clean, microservices) for a new project. |
| allowed-tools | Read, Write, WebSearch |
This skill guides the selection of appropriate architecture patterns during Phase 2, providing decision criteria, trade-offs, and implementation guidance.
| Pattern | Best For | Team Size | Complexity | Scalability |
|---|---|---|---|---|
| MVC | Simple CRUD apps | 1-3 | Low | Medium |
| Layered | Traditional enterprise | 3-10 | Medium | Medium |
| Hexagonal | Domain-focused apps | 3-15 | Medium-High | High |
| Clean | Complex business logic | 5-20 | High | High |
| Microservices | Large distributed systems | 10+ | Very High | Very High |
| Modular Monolith | Growing apps, unclear boundaries | 3-10 | Medium | Medium-High |
┌─────────────────────────────────────┐
│ Controller │
│ (Handles requests, routes) │
└────────────┬───────────┬────────────┘
│ │
▼ ▼
┌──────────┐ ┌──────────┐
│ Model │ │ View │
│ (Data) │ │ (UI) │
└──────────┘ └──────────┘
When to Use:
Pros:
Cons:
Example Structure:
src/
├── controllers/
│ ├── userController.ts
│ └── taskController.ts
├── models/
│ ├── User.ts
│ └── Task.ts
└── views/
└── (templates or React components)
┌─────────────────────────────────────┐
│ Presentation Layer │
│ (Controllers, Views, DTOs) │
└─────────────────┬───────────────────┘
│
┌─────────────────▼───────────────────┐
│ Business Layer │
│ (Services, Domain Logic) │
└─────────────────┬───────────────────┘
│
┌─────────────────▼───────────────────┐
│ Data Access Layer │
│ (Repositories, ORM) │
└─────────────────┬───────────────────┘
│
┌─────────────────▼───────────────────┐
│ Database │
└─────────────────────────────────────┘
When to Use:
Pros:
Cons:
┌─────────────────┐
│ REST API │
│ (Adapter) │
└────────┬────────┘
│
┌─────────────┐ ┌─────────▼─────────┐ ┌─────────────┐
│ CLI │◄───│ │───►│ PostgreSQL │
│ (Adapter) │ │ DOMAIN CORE │ │ (Adapter) │
└─────────────┘ │ │ └─────────────┘
│ (Business │
┌─────────────┐ │ Logic) │ ┌─────────────┐
│ Message │◄───│ │───►│ Redis │
│ Queue │ │ [Ports define │ │ (Adapter) │
│ (Adapter) │ │ interfaces] │ └─────────────┘
└─────────────┘ └───────────────────┘
When to Use:
Pros:
Cons:
Example Structure: See references/pattern-examples.md for the complete directory structure showing domain (entities, services, ports) and adapters (primary/driving and secondary/driven) with dependency injection configuration.
See references/pattern-examples.md for the complete layer diagram. Clean Architecture uses concentric circles with dependencies pointing inward: Frameworks & Drivers (outermost) → Interface Adapters → Application Business (Use Cases) → Enterprise Business (Entities, innermost).
When to Use:
Pros:
Cons:
┌──────────┐ ┌──────────┐ ┌──────────┐
│ User │ │ Order │ │ Payment │
│ Service │ │ Service │ │ Service │
└────┬─────┘ └────┬─────┘ └────┬─────┘
│ │ │
└──────┬──────┴──────┬──────┘
│ │
┌────▼────┐ ┌────▼────┐
│API GW │ │Event Bus│
└─────────┘ └─────────┘
When to Use:
Pros:
Cons:
When NOT to Use:
See references/pattern-examples.md for the structure diagram. Single deployable with independent modules (Users, Orders, Payment) each containing domain logic and API layer, sharing common infrastructure while maintaining clear boundaries.
When to Use:
Pros:
Cons:
START
│
▼
Is the domain complex?
│
├─ NO → Is it a simple CRUD app?
│ │
│ ├─ YES → MVC
│ └─ NO → Layered Architecture
│
└─ YES → Do you need independent deployments?
│
├─ YES → Do you have 10+ developers?
│ │
│ ├─ YES → Microservices
│ └─ NO → Modular Monolith
│
└─ NO → Need to swap infrastructure easily?
│
├─ YES → Hexagonal
└─ NO → Clean Architecture
For each pattern considered:
### Pattern Research: [Name]
**Official Sources:**
- [URL to authoritative source]
**Pros for Our Project:**
- [Specific benefit]
**Cons for Our Project:**
- [Specific drawback]
**Team Familiarity:** Low | Medium | High
**Verdict:** SUITABLE | NOT SUITABLE | NEEDS DISCUSSION
During Phase 2: