Master backend architectures, REST API design, microservices, and server-side development across multiple languages. Use this as a central index to access specialized sub-skills.
日本語の概要は準備中です。原文の説明を表示しています。
Generates DDD Aggregates for PHP 8.5. Creates consistency boundaries with root entity, domain events, and invariant protection. Includes unit tests.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Generate DDD-compliant Aggregates with root, domain events, and tests.
Path: src/Domain/Shared/Aggregate/
AggregateRoot.php — Base class with event recordingPath: src/Domain/{BoundedContext}/Entity/
{Name}.php — Main aggregate rootPath: src/Domain/{BoundedContext}/Entity/
{ChildName}.php — Child entity inside aggregatePath: src/Domain/{BoundedContext}/Event/
{Name}CreatedEvent.php{Name}{Action}Event.php for each behaviorPath: tests/Unit/Domain/{BoundedContext}/Entity/
| Component | Path |
|---|---|
| Base AggregateRoot | src/Domain/Shared/Aggregate/ |
| Aggregate Entity | src/Domain/{BoundedContext}/Entity/ |
| Child Entities | src/Domain/{BoundedContext}/Entity/ |
| Domain Events | src/Domain/{BoundedContext}/Event/ |
| Unit Tests | tests/Unit/Domain/{BoundedContext}/Entity/ |
| Component | Pattern | Example |
|---|---|---|
| Aggregate Root | {Name} | Order |
| Child Entity | {Parent}{Name} | OrderLine |
| Created Event | {Name}CreatedEvent | OrderCreatedEvent |
| State Event | {Name}{Action}Event | OrderConfirmedEvent |
abstract class AggregateRoot
{
private array $events = [];
protected function recordEvent(DomainEvent $event): void
{
$this->events[] = $event;
}
public function releaseEvents(): array
{
$events = $this->events;
$this->events = [];
return $events;
}
}
final class {Name} extends AggregateRoot
{
private {Name}Status $status;
private function __construct(
private readonly {Name}Id $id,
{properties}
) {
$this->status = {Name}Status::Draft;
}
public static function create({Name}Id $id, {params}): self
{
$aggregate = new self($id, {args});
$aggregate->recordEvent(new {Name}CreatedEvent(...));
return $aggregate;
}
public function {behavior}({params}): void
{
$this->ensureValidState();
// Apply change
$this->recordEvent(new {Name}{Behavior}Event(...));
}
}
final readonly class {ChildName}
{
public function __construct(
public {PropertyType} $property1,
public {PropertyType} $property2
) {}
public function total(): Money
{
return $this->unitPrice->multiply($this->quantity);
}
}
| Rule | Good | Bad |
|---|---|---|
| Transaction Boundary | One aggregate per transaction | Multiple aggregates |
| Reference | By ID only | Full entity reference |
| Size | Small, focused | Large with many collections |
| Invariants | Always valid | Can be in invalid state |
| Events | Record all state changes | No event recording |
| Anti-pattern | Problem | Solution |
|---|---|---|
| Large Aggregate | Performance issues | Split into smaller aggregates |
| Entity References | Tight coupling | Use IDs only |
| Public Setters | No invariant protection | Use behavior methods |
| Missing Events | Can't track history | Record event for each change |
| No Root | Multiple entry points | Single root entity |
For complete PHP templates and examples, see:
references/templates.md — AggregateRoot, Entity, Child Entity, Test templatesreferences/examples.md — Order aggregate with OrderLine, events, and testsまだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Master backend architectures, REST API design, microservices, and server-side development across multiple languages. Use this as a central index to access specialized sub-skills.
日本語の概要は準備中です。原文の説明を表示しています。
在每次回复中使用固定前缀并列出本次实际参考的指令/文件,便于校验是否遵循上下文与规则。
日本語の概要は準備中です。原文の説明を表示しています。
Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.
日本語の概要は準備中です。原文の説明を表示しています。
Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.
日本語の概要は準備中です。原文の説明を表示しています。
Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.
日本語の概要は準備中です。原文の説明を表示しています。
[00] META. Orchestrate skills into dynamic chains for complex tasks. Analyzes the task, discovers available skills, builds an optimal chain, explains why each skill is needed, and executes step-by-step with user confirmation. Use for any complex task requiring multiple thinking/research/analysis steps. Triggers on "plan this", "how to approach", "what's the strategy", "build a plan", or any multi-step problem requiring skill orchestration.
日本語の概要は準備中です。原文の説明を表示しています。