Ddd aggregate

From ruvnet/ruflo · View interactive version

Ddd aggregate is an AI agent skill from the GitHub repository ruvnet/ruflo. Scaffold an aggregate root with entity, value objects, repository interface, domain events, and test stubs. Use when adding a new aggregate to an existing bounded context, modeling a new business concept that owns invariants, or generating the boilerplate for an entity + repo + events triplet.

How to use this skill

Skill file

Scaffold a complete aggregate root inside a bounded context.

Parse $ARGUMENTS as <context-name> <aggregate-name> (both kebab-case). The context must already exist under src/.

Steps

  1. Validate: Confirm src/<context>/domain/ exists. If not, suggest running /ddd-context <context> first.
  1. Pre-task hook: npx @claude-flow/cli@latest hooks pre-task --description "DDD aggregate: <aggregate-name> in <context>"
  1. Create aggregate root entity:
  1. Create value objects:
  1. Create repository interface:
  1. Create domain events:
  1. Create unit test stubs:
  1. Update barrel exports: Add new files to the relevant index.ts barrel files.
  1. Store in domain model graph:

```

mcpplugin_ruflo-core_rufloagentdb_hierarchical-store({ key: "domain/context-<context>/aggregate-<aggregate-name>", value: "Aggregate <aggregate-name> (parent: context-<context>)", tier: "semantic" })

mcpplugin_ruflo-core_rufloagentdb_causal-edge({ sourceId: "entity:context-<context>", targetId: "entity:aggregate-<aggregate-name>", relation: "contains" })

mcpplugin_ruflo-core_ruflomemory_store({ key: "ddd-aggregate-<context>-<aggregate-name>", value: "AGGREGATE_SUMMARY", namespace: "tasks" })

```

  1. Post-task hook: npx @claude-flow/cli@latest hooks post-task --task-id "ddd-aggregate-<aggregate-name>" --success true
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.