Skip to content
Development
Skill

/nw-architectural-styles-tradeoffs

Architectural style selection decision matrices, trade-off analysis, structural enforcement rules, and combination patterns. Load when choosing or evaluating architecture styles.

From plugin
nwave
628151 skills34 agents27 commands

Claude Code

$ npx -y skills add nWave-ai/nWave --skill nw-architectural-styles-tradeoffs --agent claude-code

SKILL.md

nw-architectural-styles-tradeoffs.SKILL.md
name: nw-architectural-styles-tradeoffs
description: Architectural style selection decision matrices, trade-off analysis, structural enforcement rules, and combination patterns. Load when choosing or evaluating architecture styles.
user-invocable: false
disable-model-invocation: true

Architectural Styles: Selection and Trade-offs

Style Selection Decision Tree

Start here. Answer the dominant driver, follow to recommended style.

Is the domain complex with rich business rules?
  YES -> Do you need infrastructure independence and high testability?
    YES -> Hexagonal / Clean / Onion (functionally equivalent, different terminology)
    NO  -> Is the domain well-understood with clear module boundaries?
      YES -> Modular Monolith (single deployment, structured boundaries)
      NO  -> Layered Architecture (simple, well-known, fast to start)
  NO -> Is this a feature-heavy application with independent feature teams?
    YES -> Vertical Slice (per-feature organization, CQRS-friendly)
    NO  -> Do you need independent deployment and scaling per capability?
      YES -> Can the team handle distributed system operational complexity?
        YES -> Microservices
        NO  -> Modular Monolith (extract to services later)
      NO  -> Is the primary concern async workflows or event-driven processing?
        YES -> Event-Driven Architecture
        NO  -> Is this a data processing pipeline?
          YES -> Pipe and Filter
          NO  -> Layered Architecture (sensible default)

Cross-Cutting Comparison Matrix

| Style | Dep. Direction | Organization | Deployment | Best For | Team Size | |-------|---------------|-------------|------------|----------|-----------| | Hexagonal/Clean/Onion | Inward (DIP) | Ports + adapters | Single process | Infrastructure-agnostic domains | Any | | Layered (N-Tier) | Top-down | Horizontal layers | Single/multi-tier | Simple CRUD, rapid development | Small-medium | | Vertical Slice | Per-feature | Feature folders | Single process | Feature-heavy, CQRS systems | Medium-large | | Microservices | Per-service | Service boundaries | Distributed | Independent teams, polyglot | Large | | Event-Driven | Pub-sub | Events + handlers | Distributed | Async workflows, audit, decoupling | Medium-large | | CQRS | Read/write split | Command + query models | Single or distributed | Different read/write scaling | Medium | | Pipe and Filter | Data flow | Sequential filters | Single or distributed | ETL, data processing | Any | | Modular Monolith | Inward per module | Domain modules | Single process | Structured monolith, future extraction | Small-medium |

When-to-Use / When-NOT Decision Matrix

Hexagonal / Clean / Onion (equivalent patterns, different names)

| Use When | Avoid When | |----------|-----------| | Multiple client types consume same domain logic | Simple CRUD with single data store | | UI/DB technologies need periodic refresh | Latency-critical paths (added indirection) | | High testability required -- domain testable without infra | Small team where adapter overhead outweighs benefit | | Alignment with DDD desired | Application will never change infrastructure |

Vertical Slice

| Use When | Avoid When | |----------|-----------| | Teams understand code smells and refactoring patterns | Teams unfamiliar with refactoring -- slices diverge | | Feature-heavy apps where changes affect one feature | Heavy cross-cutting concerns (shared validation, auth) | | CQRS systems with independent commands/queries | Early projects with poorly understood domain | | Minimize cross-cutting changes on new features | Need strong architectural governance |

Microservices

| Use When | Avoid When | |----------|-----------| | Multiple teams need independent deployment cycles | Small teams (operational overhead per service) | | Different system parts need different tech stacks | Greenfield with unclear boundaries -- start modular monolith | | Independent scaling of capabilities adds value | Strong transactional consistency required across boundaries | | Organization supports operational complexity | Risk of "grains of sand" anti-pattern |

Modular Monolith

| Use When | Avoid When | |----------|-----------| | Greenfield with unclear domain boundaries | Independent deployment of components required | | Non-trivial complexity benefiting from module isolation | Different modules need different tech stacks | | Module autonomy without distributed overhead | Team ready for microservices operational complexity | | Microservice-like structure with monolith simplicity | -- |

Event-Driven / CQRS

| Use When | Avoid When | |----------|-----------| | Loose coupling between producers and consumers | Simple request-response applications | | Workflows spanning multiple services (eventual consistency) | Strong immediate consistency required | | Complete audit trails needed (event sourcing) | Team unfamiliar with eventual consistency | | Read/write workloads have very different scaling needs | Simple CRUD where two models add unjustified overhead |

Pipe and Filter

| Use When | Avoid When | |----------|-----------| | Processing decomposes into independent, reorderable steps | Request-response requiring synchronous completion | | Steps have different scalability requirements | Steps must execute as single transaction | | Flexibility to add/remove/reorder steps needed | Steps require significant shared state | | ETL, image processing, compiler pipelines | -- |

Combination Patterns

Styles are composable. The "Explicit Architecture" approach (Herberto Graca) combines:

| Pattern | Role in Combined Architecture | |---------|-------------------------------| | Hexagonal | Framework connecting external tools to the core | | Onion | Organizes layers within the hexagon | | DDD | Supplies domain concepts and bounded contexts | | Clean | Reinforces dependency inversion rules | | CQRS | Separates commands from queries within each bounded context |

Practical rule:

Read more
@nwave-ai
Ships withnwave

AI agents that guide you from idea to working code, with human judgment at every gate. nWave runs inside Claude Code. It breaks feature delivery into seven waves (discover, diverge, discuss, design, devops, distill, deliver).

628151 skills34 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
628
Star history of nWave-ai/nWave on GitHub, a chart by star-history.com

Other skills on nwave.

nw-ad-critique-dimensions

nw-ad-critique-dimensi…

Review dimensions for acceptance test quality - happy path bias, GWT compliance, business language purity, coverage completeness,…

@nwave-ai@nwave-aiInstall Skill
nw-agent-testing

nw-agent-testing

5-layer testing approach for agent validation including adversarial testing, security validation, and prompt injection resistance

@nwave-ai@nwave-aiInstall Skill
nw-architecture-patterns

nw-architecture-patter…

Comprehensive architecture patterns, methodologies, quality frameworks, and evaluation methods for solution architects. Load when…

@nwave-ai@nwave-aiInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about nw-architectural-styles-tradeoffs.

Which coding agents can use nw-architectural-styles-tradeoffs?
nw-architectural-styles-tradeoffs installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.