evolutionary-modular-architecture
できること
このスキルは、強い内部の境界を持つ一つのアプリケーションとしてプラットフォームを設計するよう、AIを導きます。ドメイン設計、外部ベンダーからのコードの保護、失敗の扱いを含みます。早すぎるマイクロサービスを避けつつ、新しいバックエンドを作るチーム向けです。
使う場面
- ✓新しいプラットフォームやバックエンドをゼロから設計しているとき。
- ✓外部のベンダーに接続しつつ、コードをそのベンダーに縛りたくないとき。
- ✓単一のアプリケーション、モジュラーモノリス、マイクロサービスの間で選んでいるとき。
スキルのリンク
https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(architecture)/evolutionary-modular-architecture/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私たちの新しいプラットフォームのアーキテクチャを設計してください。一つのアプリとして保ちつつ、内部の境界はきれいにしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
スキルは、システムを境界づけられたコンテキストに分ける規則、外部システムの周りの保護の層の追加、そして安全に失敗する仕組みのためのイベントと再試行の使い方を定めます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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
よくある質問
常にマイクロサービスを勧めますか?
いいえ。単純に始め、製品とチームが正当化するときだけ別のサービスを追加します。
リアルタイムの更新も扱いますか?
はい。サーバーからクライアントへのリアルタイムの更新の追加を扱います。
エンドポイントが少ないシンプルなアプリにも向いていますか?
いいえ。単純なアプリは、フレームワークの標準の設定で十分です。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 7.1k
- ランキング
- #13506
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
component-common-domain-detection
7.1kエージェントが、コードベースのいくつかの部分に繰り返し現れるビジネスロジックを見つけ、それらをどう統合できるかを提案できるよう支援します。
component-flattening-analysis
7.1kエージェントが、迷った位置にあるコードを見つけ、乱雑なコンポーネントのフォルダ構造を平らにし、各部分が正しい場所に収まるよう支援します。
component-identification-sizing
7.1kエージェントが、コードベースの部品を洗い出して大きさを測り、最初に分割すべきモジュールを見つけられるよう支援します。
coupling-analysis
7.1kエージェントが、システムの部分同士がどれほど強く依存し合っているかを確認し、最初にどの結びつきを緩めるべきかを教えられるよう支援します。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。