本文へ移動
cccskills
無料GitHub で公開

domain-driven-design-expert

Expert guide for Domain-Driven Design (DDD). Covers tactical patterns (Aggregates, Value Objects), strategic patterns (Bounded Contexts), event storming, and CQRS / Panduan ahli Desain Berbasis Domain (DDD).

インストール方法を見る

含まれるファイル(1)

  • SKILL.md5.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Domain-Driven Design (DDD) Expert

English | Bahasa Indonesia


<a name="english"></a>

English

Description

A software architecture guide focused on tackling complexity in the heart of software. This skill bridges the gap between business rules and codebase structure using Domain-Driven Design (DDD). It covers Strategic Design (Bounded Contexts, Ubiquitous Language) and Tactical Design (Aggregates, Value Objects, Domain Events, Repositories).

Trigger Conditions

  • When refactoring a massive, monolithic "Big Ball of Mud" codebase.
  • When defining microservice boundaries (Bounded Contexts).
  • When the user asks about "Clean Architecture", "CQRS", or "Event Sourcing".
  • When building core business logic that is highly complex and rule-heavy (e.g., banking, logistics, SaaS billing engines).

Core Architectural Guidelines

1. Strategic Design (The Big Picture)

  • Ubiquitous Language: The code must speak the language of the business. Do not use generic terms like UserData if the business calls it a Subscriber.
  • Bounded Contexts: Divide large systems into distinct contexts. A Product in the Inventory context has different attributes than a Product in the Billing context. Do not try to create one massive, unified Product model.

2. Tactical Design (The Code)

  • Value Objects: Use immutable Value Objects for attributes (e.g., Money, Address, Email) instead of primitives (int, string). Value Objects validate themselves upon creation.
  • Entities & Aggregates: Group related Entities together under a single Aggregate Root. External objects may only hold a reference to the Aggregate Root, never to its internal children.
  • Repositories: Only create Repositories for Aggregate Roots.

3. Domain Events

When an Aggregate changes state in a way that other parts of the system care about, it should publish a Domain Event (e.g., OrderPlacedEvent). This decouples side-effects (like sending an email) from the core business transaction.

4. CQRS (Command Query Responsibility Segregation)

For highly scalable systems, separate the models used for writing data (Commands) from the models used for reading data (Queries).

  • Commands: Modify state via the rich Domain Model.
  • Queries: Read data directly from optimized database views or read models, bypassing the Domain Model entirely for performance.

Orchestration & Integration

  • Extends scalability-clean-code with strict domain isolation patterns.
  • Essential for event-driven-architect when defining what events flow through the message broker.
  • Complements micro-frontend-architect by aligning frontend boundaries with backend Bounded Contexts.

<a name="bahasa-indonesia"></a>

Bahasa Indonesia

Deskripsi

Panduan arsitektur perangkat lunak yang berfokus pada penanganan kompleksitas bisnis. Skill ini menjembatani aturan bisnis dan struktur kode menggunakan Domain-Driven Design (DDD). Meliputi Desain Strategis (Bounded Contexts, Ubiquitous Language) dan Desain Taktis (Aggregates, Value Objects, Domain Events).

Kondisi Pemicu

  • Saat melakukan refactoring codebase monolitik yang sudah berantakan (Big Ball of Mud).
  • Saat mendefinisikan batas-batas layanan microservices.
  • Saat membangun logika bisnis inti yang sangat kompleks (misal: mesin penagihan SaaS, sistem perbankan).

Panduan Arsitektur Inti

1. Desain Strategis

  • Ubiquitous Language: Kode harus menggunakan bahasa yang sama dengan pihak bisnis. Hindari istilah teknis generik jika ada istilah bisnis yang lebih tepat.
  • Bounded Contexts: Jangan mencoba membuat satu model data raksasa (misal: tabel User dengan 100 kolom). Pisahkan berdasarkan konteks; entitas User di konteks Penagihan berbeda dengan User di konteks Pengiriman.

2. Desain Taktis (Implementasi Kode)

  • Value Objects: Gunakan objek immutable (tidak dapat diubah) untuk atribut seperti Uang, Alamat, atau Email daripada tipe data primitif biasa (string/int).
  • Aggregates: Kelompokkan entitas-entitas yang saling berhubungan ke dalam satu Aggregate Root. Interaksi dari luar hanya boleh melalui Root ini untuk menjaga konsistensi data.
  • Repositories: Buat Repository hanya untuk Aggregate Root, bukan untuk setiap tabel di database.

3. Domain Events

Pisahkan efek samping (side-effects). Daripada membuat modul Pesanan memanggil modul Email secara langsung, buat modul Pesanan menerbitkan OrderPlacedEvent. Modul Email akan bereaksi terhadap event tersebut.

4. CQRS

Pisahkan model data untuk operasi Write (Command) dan Read (Query). Model baca dapat dioptimalkan secara drastis dengan melakukan bypass penuh pada logika domain.

Integrasi Orkestrasi

  • Mengembangkan scalability-clean-code dengan pola isolasi domain yang ketat.
  • Sangat penting bagi event-driven-architect untuk menentukan struktur event di message broker.
  • Membantu micro-frontend-architect menyelaraskan batas-batas frontend dengan Bounded Contexts backend.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug752026年10月9日 更新

Expert guide for intelligent model cascading and routing — complexity-scored task routing from Flash/Haiku to Sonnet/Opus/Astra, dynamic escalation with quality gates, 40-60% token cost reduction while maintaining output quality / Panduan ahli untuk kaskade dan routing model cerdas — routing tugas berbasis skor kompleksitas dari Flash/Haiku ke Sonnet/Opus/Astra, eskalasi dinamis dengan gerbang kualitas, pengurangan biaya token 40-60% dengan kualitas output terjaga.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug752026年10月9日 更新

Expert guide for Affective Computing, emotional AI, and real-time sentiment analysis through native multimodal tokens (voice intonation and facial micro-expressions) / Panduan ahli komputasi afektif, AI emosional, dan analisis sentimen real-time melalui token multimodal native.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug752026年10月9日 更新

Expert guide for AI-assisted coding workflows — agentic code generation, multi-agent code swarms, self-healing CI/CD, automated PR review, spec-to-code pipelines, codebase knowledge graphs, and human-in-the-loop approval gates / Panduan ahli untuk workflow pengkodean berbasis AI — generasi kode agentic, code swarm multi-agen, CI/CD self-healing, review PR otomatis, pipeline spec-to-code, knowledge graph codebase, dan gate persetujuan human-in-the-loop.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug752026年10月9日 更新

Expert guide for long-term episodic memory integration (Mem0 v2, Letta/MemGPT, Zep v2), memory tier architecture, pgvector HNSW storage, and unified context management for autonomous AI agents / Panduan ahli untuk integrasi memori episodik jangka panjang (Mem0 v2, Letta/MemGPT, Zep v2), arsitektur tier memori, penyimpanan pgvector HNSW, dan manajemen konteks terpadu untuk agen AI otonom.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug752026年10月9日 更新

Expert guide for designing Machine-to-Machine (M2M) micro-economies, autonomous agent wallets, and swarm budget allocation / Panduan ahli merancang ekonomi mikro antar-agen (M2M), dompet agen otonom, dan alokasi anggaran swarm.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug752026年10月9日 更新

roedyrustam のスキルをすべて見る

このスキルの問題を報告する