Skip to content
Skillpedia
APIs & servers (backend)7.1k Β· #13506

evolutionary-modular-architecture

What it does

This skill guides the AI through designing a platform that is one application with strong internal boundaries. It covers domain design, protecting the code from outside vendors, and handling failures. It is for teams building a new backend who want to avoid premature microservices.

When to use it

  • βœ“When you are designing a new platform or backend from scratch.
  • βœ“When you need to connect to an outside vendor without tying your code to it.
  • βœ“When you are choosing between a single application, a modular monolith and microservices.

Skill link

https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(architecture)/evolutionary-modular-architecture/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(architecture)/evolutionary-modular-architecture/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œHelp me design the architecture for our new platform, keeping it as one app but with clean internal boundaries.”

5 new skills a week. 1 minute to read.

How it works

It sets rules for splitting the system into bounded contexts, adding a protective layer around external systems, and using events and retries that fail safely.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Evolutionary Modular Architecture

Design and build platforms as an evolutionary modular monolith: strong logical boundaries from day one (DDD bounded contexts, flat-by-aggregate modules, an Anti-Corruption Layer around every external system, event-driven communication, resilience by default) while keeping physical boundaries (separate deploys, separate databases) as a later, optional step. Start simple, evolve granularity only when the product and the team justify it β€” never reverse-engineer microservices from hype.

When to use this skill

  • Designing a new platform, backend, or service from scratch.
  • Defining bounded contexts and a context map for a domain.
  • Deciding how to organize a module's folders and files.
  • Choosing between monolith, modular monolith, and microservices.
  • Integrating with (or decoupling from) an external vendor: ERP, ticketing, storage, payment, AI, identity, durable-workflow engine.
  • Making external/inter-module calls resilient.
  • Adding real-time server-to-client updates.
  • Picking a modern (2026) full-stack TypeScript stack.

When NOT to use it

  • Simple CRUD with a handful of endpoints β€” framework defaults are enough.
  • Deep, NestJS-specific implementation detail β€” prefer nestjs-modular-monolith.
  • Reviewing or refactoring a single domain model for anemia β€” prefer tactical-ddd.

The one rule that governs everything

Separate the logical boundary (always strong) from the physical boundary (evolutionary). Modules, contracts, state ownership, and the Anti-Corruption Layer are non-negotiable from day one. Whether a module is its own deploy or its own database is an operational decision made later β€” never a structural prerequisite. This is what lets the system start as one deploy and grow without a rewrite.

A useful mental image: the house has well-divided rooms (modules). Inside each room things sit out in the open, grouped by what they are for (flat-by-aggregate) β€” not buried in nested drawers (technical-layer folders). The floor plan (boundaries) is what matters most.


Core model (load the matching reference when you go deep)

Topic What it covers Reference
Principles 10 modular (P1–P10) + 9 structural (P11–P19) + conflict hierarchy references/principles.md
DDD Strategic (subdomains, context map, integration patterns) + tactical (rich aggregates, intensity by subdomain) references/ddd.md
Module internals Flat-by-aggregate, suffixes, depth, flat vs subdomain test, scaffolding references/flat-by-aggregate.md
Communication Ports & Adapters / ACL, events + transactional outbox, SSE real-time references/acl-and-communication.md
Resilience Backoff + full jitter, circuit breaker, retry budget, idempotency, bulkhead, timeouts references/resilience.md
Stack 2026 Frontend, backend, data, observability, durable workflow, decisions references/stack-2026.md
Architecture doc Building the elegant, self-contained HTML architecture document with SVG diagrams references/architecture-doc.md + assets/architecture-template.html
Validation Deterministic checks for structure and module boundaries scripts/validate-structure.mjs, scripts/validate-boundaries.mjs

Do not load all references at once. Read a reference only when the current phase needs it (the workflow below states when).


Workflow

Use this whether you are designing a new system or reviewing an existing one. Move through phases in order; each has an exit criterion. State assumptions explicitly; if the domain is unclear, ask before guessing.

Phase 0 β€” Frame the scope

Confirm: is this a new platform, a new module in an existing one, or a review? Confirm the runtime/stack constraints (default target is the 2026 TypeScript stack β€” see references/stack-2026.md). Default to one deploy (modular monolith) unless a hard constraint says otherwise.

Exit: scope and constraints written down.

Phase 1 β€” Domain discovery (DDD strategic)

Read references/ddd.md. Identify subdomains from the business language, classify each as Core, Supporting, or Generic, and find the ubiquitous language of each. Do not group by technical layer. If multiple bounded-context interpretations exist, present them β€” do not pick silently.

Exit: a list of candidate bounded contexts, each classified, with one-line responsibility and key aggregates.

Phase 2 β€” Boundaries & context map

Dr

FAQ

Does it always recommend microservices?

No. It starts simple and adds separate services only when the product and team justify it.

Does it cover real-time updates?

Yes. The skill includes adding real-time updates from server to client.

Is it for a simple app with a few endpoints?

No. Simple apps are better served by framework defaults.

Details

Original description by the author

Guides design and implementation of evolutionary modular-monolith platforms with DDD (strategic + tactical), flat-by-aggregate organization, an Anti-Corruption Layer for vendor independence, a transactional outbox for events, smart resilience (backoff with jitter, circuit breakers, idempotency), and a polished architecture HTML document with elegant SVG diagrams. Use when designing a platform or backend, defining bounded contexts, organizing modules and folders, choosing monolith vs microservices, decoupling from an external service (ERP, storage, AI), making calls resilient, adding real-time

repo: tech-leads-club/agent-skills

Popularity

GitHub stars
7.1k
Ranking position
#13506
License
β€”
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills