Логотип Nw Architectural Styles Tradeoffs

Nw Architectural Styles Tradeoffs

Организация
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.

Обзор

ИздательnWave-ai
РепозиторийnWave
Название навыкаnw-architectural-styles-tradeoffs
Звёзды
616
Форки
65
Файлы в комплекте
Только инструкции
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Всё необходимое — в инструкциях

    Всё необходимое для модели содержится в инструкциях — никаких дополнительных файлов для синхронизации.

  • Открытый исходный код

    Издатель навыка на GitHub — nWave-ai. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Nw Architectural Styles Tradeoffs в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/nWave-ai/nWave/tree/main/nWave/skills/nw-architectural-styles-tradeoffs
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

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
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Nw Architectural Styles Tradeoffs в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Nw Architectural Styles Tradeoffs, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Nw Architectural Styles Tradeoffs не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

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.

Часто задаваемые вопросы

Что делает навык ИИ 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.

Зачем использовать Nw Architectural Styles Tradeoffs в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Nw Architectural Styles Tradeoffs — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Nw Architectural Styles Tradeoffs в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/nWave-ai/nWave/tree/main/nWave/skills/nw-architectural-styles-tradeoffs. TypingMind прочитает файл SKILL.md и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Nw Architectural Styles Tradeoffs?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Nw Architectural Styles Tradeoffs?

С любым количеством. В TypingMind вы можете использовать Nw Architectural Styles Tradeoffs с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Nw Architectural Styles Tradeoffs?

Да. Навык опубликован на GitHub по лицензии MIT. Издатель — nWave-ai. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇