Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

archetypes

Architecture paradigm selection and implementation planning.

Overview

Archetypes helps you choose the right architecture for your system. It provides an interactive paradigm selector and detailed implementation guides for 13 architectural patterns.

Installation

/plugin install archetypes@claude-night-market

Skills

Orchestrator

SkillDescriptionWhen to Use
architecture-paradigmsInteractive paradigm selectorChoosing architecture for new systems

Paradigm Guides

SkillArchitectureBest For
architecture-paradigm-layeredN-tierSimple web apps, internal tools
architecture-paradigm-hexagonalPorts & AdaptersInfrastructure independence
architecture-paradigm-microservicesDistributed servicesLarge-scale enterprise
architecture-paradigm-event-drivenAsync communicationReal-time processing
architecture-paradigm-serverlessFunction-as-a-ServiceEvent-driven with minimal infra
architecture-paradigm-pipelinePipes-and-filtersETL, media processing
architecture-paradigm-cqrs-esCQRS + Event SourcingAudit trails, event replay
architecture-paradigm-microkernelPlugin-basedMinimal core with extensions
architecture-paradigm-modular-monolithInternal boundariesModule separation without distribution
architecture-paradigm-space-basedData-gridHigh-scale stateful workloads
architecture-paradigm-service-basedCoarse-grained SOAModular without microservices
architecture-paradigm-functional-coreFunctional Core, Imperative ShellSuperior testability
architecture-paradigm-client-serverClient-serverClear client/server responsibilities

Usage Examples

Interactive Selection

Skill(archetypes:architecture-paradigms)

# Claude will:
# 1. Ask about your requirements
# 2. Evaluate trade-offs
# 3. Recommend paradigms
# 4. Provide implementation guidance

Direct Paradigm Access

# Get specific paradigm details
Skill(archetypes:architecture-paradigm-hexagonal)

# Returns:
# - Core concepts
# - When to use
# - Implementation patterns
# - Example code
# - Trade-offs

Paradigm Comparison

By Complexity

LevelParadigms
LowLayered, Client-Server
MediumModular Monolith, Service-Based, Functional Core
HighMicroservices, Event-Driven, CQRS-ES, Space-Based

By Team Size

TeamRecommended
1-3Layered, Functional Core, Modular Monolith
4-10Hexagonal, Service-Based, Pipeline
10+Microservices, Event-Driven

By Scalability Need

NeedParadigms
Single serverLayered, Modular Monolith
HorizontalMicroservices, Serverless
ExtremeSpace-Based, Event-Driven

Selection Criteria

The paradigm selector evaluates:

  1. Team size and structure
  2. Scalability requirements
  3. Deployment constraints
  4. Data consistency needs
  5. Development velocity priorities
  6. Operational maturity

Example Output

Hexagonal Architecture

## Hexagonal Architecture (Ports & Adapters)

### Core Concepts
- Domain logic at center
- Ports define interfaces
- Adapters implement ports
- Infrastructure is pluggable

### When to Use
- Need to swap databases/frameworks
- Test-driven development focus
- Long-lived applications
- Multiple integration points

### Structure
src/
├── domain/           # Pure business logic
│   ├── models/
│   └── services/
├── ports/            # Interface definitions
│   ├── inbound/
│   └── outbound/
└── adapters/         # Implementations
    ├── web/
    ├── persistence/
    └── external/

### Trade-offs
+ Easy testing via port mocking
+ Framework-agnostic domain
+ Clear dependency direction
- More initial structure
- Learning curve

Best Practices

  1. Start Simple: Begin with layered, evolve as needed
  2. Match Team: Don’t use microservices with a small team
  3. Consider Ops: Complex architectures need operational maturity
  4. Plan Evolution: Design for change, not perfection

Decision Tree

Start
  |
  v
Simple CRUD? --> Yes --> Layered
  |
  No
  |
  v
Need testability? --> Yes --> Functional Core or Hexagonal
  |
  No
  |
  v
High scale? --> Yes --> Event-Driven or Space-Based
  |
  No
  |
  v
Multiple teams? --> Yes --> Microservices or Service-Based
  |
  No
  |
  v
Modular Monolith
  • pensive: Architecture review complements paradigm selection
  • spec-kit: Use after paradigm selection for implementation planning