Nw Architectural Styles Tradeoffs logo

Nw Architectural Styles Tradeoffs

Organization
nWave-ai
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.

Overview

PublishernWave-ai
RepositorynWave
Skill namenw-architectural-styles-tradeoffs
Stars
616
Forks
65
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by nWave-ai on GitHub. Read the source before you install it.

Installation

Install the Nw Architectural Styles Tradeoffs AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/nWave-ai/nWave/tree/main/nWave/skills/nw-architectural-styles-tradeoffs
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nWave-ai/nWave.git /tmp/nWave
mkdir -p .claude/skills
cp -r /tmp/nWave/nWave/skills/nw-architectural-styles-tradeoffs .claude/skills/nw-architectural-styles-tradeoffs
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Nw Architectural Styles Tradeoffs in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Nw Architectural Styles Tradeoffs on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Nw Architectural Styles Tradeoffs is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

StyleDep. DirectionOrganizationDeploymentBest ForTeam Size
Hexagonal/Clean/OnionInward (DIP)Ports + adaptersSingle processInfrastructure-agnostic domainsAny
Layered (N-Tier)Top-downHorizontal layersSingle/multi-tierSimple CRUD, rapid developmentSmall-medium
Vertical SlicePer-featureFeature foldersSingle processFeature-heavy, CQRS systemsMedium-large
MicroservicesPer-serviceService boundariesDistributedIndependent teams, polyglotLarge
Event-DrivenPub-subEvents + handlersDistributedAsync workflows, audit, decouplingMedium-large
CQRSRead/write splitCommand + query modelsSingle or distributedDifferent read/write scalingMedium
Pipe and FilterData flowSequential filtersSingle or distributedETL, data processingAny
Modular MonolithInward per moduleDomain modulesSingle processStructured monolith, future extractionSmall-medium

When-to-Use / When-NOT Decision Matrix

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

Use WhenAvoid When
Multiple client types consume same domain logicSimple CRUD with single data store
UI/DB technologies need periodic refreshLatency-critical paths (added indirection)
High testability required -- domain testable without infraSmall team where adapter overhead outweighs benefit
Alignment with DDD desiredApplication will never change infrastructure

Vertical Slice

Use WhenAvoid When
Teams understand code smells and refactoring patternsTeams unfamiliar with refactoring -- slices diverge
Feature-heavy apps where changes affect one featureHeavy cross-cutting concerns (shared validation, auth)
CQRS systems with independent commands/queriesEarly projects with poorly understood domain
Minimize cross-cutting changes on new featuresNeed strong architectural governance

Microservices

Use WhenAvoid When
Multiple teams need independent deployment cyclesSmall teams (operational overhead per service)
Different system parts need different tech stacksGreenfield with unclear boundaries -- start modular monolith
Independent scaling of capabilities adds valueStrong transactional consistency required across boundaries
Organization supports operational complexityRisk of "grains of sand" anti-pattern

Modular Monolith

Use WhenAvoid When
Greenfield with unclear domain boundariesIndependent deployment of components required
Non-trivial complexity benefiting from module isolationDifferent modules need different tech stacks
Module autonomy without distributed overheadTeam ready for microservices operational complexity
Microservice-like structure with monolith simplicity--

Event-Driven / CQRS

Use WhenAvoid When
Loose coupling between producers and consumersSimple 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 needsSimple CRUD where two models add unjustified overhead

Pipe and Filter

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

Combination Patterns

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

PatternRole in Combined Architecture
HexagonalFramework connecting external tools to the core
OnionOrganizes layers within the hexagon
DDDSupplies domain concepts and bounded contexts
CleanReinforces dependency inversion rules
CQRSSeparates commands from queries within each bounded context

Practical rule: hexagonal/clean/onion are the SAME pattern with different terminology. All enforce DIP with inward dependency flow. Pick one vocabulary and use it consistently.

Enforceable Structural Rules

Architecture rules are only real if they are enforced. Key rules by style:

Hexagonal

RuleEnforcement
Domain has zero imports from adapters/infraimport-linter (Python), ArchUnit (Java), ArchUnitTS (TS)
All external communication via port interfacesCode review + architecture tests
No adapter-to-adapter dependenciesPackage dependency check
All dependencies point inward toward domainLayer dependency rule

Modular Monolith

RuleEnforcement
No cross-module database accessSchema ownership tests
Interface-only communication between modulesModule independence contract
No circular dependencies between modulesCycle detection
Module internals inaccessible from outsidePackage/import visibility rules

Vertical Slice

RuleEnforcement
Slices must not import from other slicesIndependence contract
All code for a feature resides within its sliceContainment check
Cross-slice communication via events/contracts onlyImport rules

Architecture Enforcement Tooling

LanguageToolApproach
Java/KotlinArchUnitFluent API unit tests, predefined architecture rules
TypeScript/JSArchUnitTSFile-based dependency rules, Jest/Vitest integration
TypeScript/JSdependency-cruiserComprehensive dependency analysis, JSON/dot/HTML reports, .dependency-cruiser.js config, widely adopted
Pythonimport-linterConfig-based contracts (forbidden, layers, independence)
PythonPyTestArchpytest-based architecture tests
Pythonpytest-archonpytest-native architecture tests, modern alternative to import-linter, decorator-based rules
.NETNetArchTestNUnit/xUnit architecture rules
Gogo-arch-lintYAML-based dependency rules

Python Example (import-linter)

ini
[importlinter:contract:hexagonal-domain]
name = Domain must not import from infrastructure
type = forbidden
source_modules = myapp.domain
forbidden_modules = myapp.infrastructure, myapp.adapters

[importlinter:contract:module-independence]
name = Feature modules must be independent
type = independence
modules =
    myapp.modules.orders
    myapp.modules.billing
    myapp.modules.shipping

Run lint-imports in CI as first-stage fast check (analyzes imports, no I/O).

Common Anti-Patterns

Anti-PatternStyleSignalFix
Shared databaseMicroservicesServices query each other's tablesDatabase per service; API contracts
Distributed monolithMicroservicesServices deploy togetherRe-evaluate boundaries; consider modular monolith
Grains of sandMicroservicesToo-fine-grained services, constant coordinationMerge into coarser services aligned to bounded contexts
Anemic domain modelLayeredEntities are data bags, logic in servicesMove behavior into entities/value objects
Big ball of mudModular MonolithModule boundaries violated, cross-importsAdd architecture tests, enforce with CI
Pass-through layersCleanLayers that add no value, just forward callsRemove unnecessary layers; keep only those adding behavior

Annotating for Software Crafter

When the architecture document specifies an architectural style, include an enforcement annotation so the software-crafter knows which tooling to set up during DELIVER.

What to Include in the Design Document

  1. Style chosen and the key structural rules that apply (from the Enforceable Structural Rules section above)
  2. Recommended enforcement tool appropriate for the project's language (from the Architecture Enforcement Tooling table)
  3. Specific rules to enforce expressed as constraints the tool can verify

Annotation Format

markdown
## Architecture Enforcement

Style: [Hexagonal | Modular Monolith | Vertical Slice | ...]
Language: [Python | Java | TypeScript | ...]
Tool: [tool name from table above]

Rules to enforce:
- [Rule 1 from Enforceable Structural Rules, e.g., "Domain has zero imports from adapters/infra"]
- [Rule 2, e.g., "No cross-module database access"]

This annotation flows through acceptance-designer to software-crafter, who implements the architecture tests during the GREEN phase alongside the first component that establishes the structural boundary.

Frequently asked questions

What does the Nw Architectural Styles Tradeoffs AI skill do?

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

Why use Nw Architectural Styles Tradeoffs on TypingMind?

Because you install it once and use it with any model. Nw Architectural Styles Tradeoffs is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Nw Architectural Styles Tradeoffs in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/nWave-ai/nWave/tree/main/nWave/skills/nw-architectural-styles-tradeoffs. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Nw Architectural Styles Tradeoffs?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Nw Architectural Styles Tradeoffs?

As many as you like. As long as a model supports skills, you can use Nw Architectural Styles Tradeoffs with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Nw Architectural Styles Tradeoffs AI skill free?

Yes. It is published on GitHub by nWave-ai under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇