evolutionary-modular-architecture

Designs evolutionary modular monoliths with DDD bounded contexts, ACLs, and resilience patterns.

5.1k|468|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/tech-leads-club/agent-skills --skill evolutionary-modular-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: evolutionary-modular-architecture
Source: https://github.com/tech-leads-club/agent-skills/tree/main/packages/skills-catalog/skills/%28architecture%29/evolutionary-modular-architecture
Command: npx skills add https://github.com/tech-leads-club/agent-skills --skill evolutionary-modular-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Teams often over-engineer new platforms with premature microservices or under-engineer them with tangled monoliths, leading to vendor lock-in, fragile integrations, and costly rewrites. This Skill guides the design of an evolutionary modular monolith with strong logical boundaries from day one and physical boundaries kept as a later, optional step.

Core Features & Use Cases

  • Strategic and tactical DDD: Classify subdomains as Core, Supporting, or Generic, draw context maps, and apply tactical depth in proportion to business value.
  • Flat-by-aggregate module organization: Co-locate each business concept in one folder with technical layers expressed as file suffixes, validated by deterministic CI scripts.
  • Vendor independence and resilience: Place every external system behind a port and Anti-Corruption Layer, use a transactional outbox for events, and wrap calls with timeouts, circuit breakers, and jittered retries.
  • Architecture documentation: Produce a polished self-contained HTML architecture document with hand-drawn-style SVG diagrams from a provided template.
  • Use Case: When designing a payables platform that syncs to a customer ERP, use this Skill to define bounded contexts, organize modules, decouple from the ERP vendor, and generate the full architecture document.

Quick Start

Ask the agent to design the architecture for a new platform or backend, for example: design the architecture of a billing platform that integrates with an external ERP.

Frequently Asked Questions about evolutionary-modular-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a modular monolith architecture?

Start with strategic DDD to classify subdomains as Core, Supporting, or Generic, then draw a context map with clear state ownership per module. Organize each module flat-by-aggregate, put external systems behind ports and adapters, and keep everything in one deploy until metrics justify splitting.

When should I choose a modular monolith vs microservices?

Default to a modular monolith with one deploy unless a hard constraint requires otherwise. Promote a module to its own app or database only when its own scaling, failure-isolation, or deployment metrics justify it, since strong logical boundaries make that evolution possible without a rewrite.

How do I avoid vendor lock-in with an external ERP or API?

Define a port in your domain's own language, such as an ErpLedgerPort, and implement it with an adapter that translates the vendor model at the boundary. Swapping vendors then means writing a new adapter while the domain never imports vendor types.

What is flat-by-aggregate folder organization?

Flat-by-aggregate means one business concept equals one folder, with technical layers expressed as file suffixes like .entity.ts, .service.ts, and .controller.ts instead of layer folders. Depth stays at two or three levels, and the Clean Architecture dependency rule is preserved through suffixes.

When should I not use this architecture approach?

Skip it for simple CRUD applications with a handful of endpoints where framework defaults are enough. For NestJS-specific deep implementation use a dedicated NestJS modular skill, and for reviewing a single anemic domain model use a tactical DDD skill instead.

How do I make external API calls resilient in a modular monolith?

Compose layers in order: timeout, circuit breaker, then retry with capped exponential backoff and full jitter. Only retry idempotent operations, require idempotency keys for writes, cap retries at roughly ten percent of traffic, and give every breaker a named fallback.