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 Read Model/Projection for PHP 8.5. Creates optimized query models for CQRS read side with projections and denormalization. Includes unit tests.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Creates Read Model infrastructure for CQRS read side with optimized query models.
| Scenario | Example |
|---|---|
| CQRS read side | Separate query models |
| Denormalized views | Dashboard aggregates |
| Complex queries | Multi-entity joins |
| Event-driven updates | Event projections |
Path: src/Domain/{BoundedContext}/ReadModel/
{Name}ReadModel.php — Immutable read model with fromArray/toArray{Name}ReadModelRepositoryInterface.php — Query-focused repository interfacePath: src/Application/{BoundedContext}/Projection/
{Name}ProjectionInterface.php — Projection contract{Name}Projection.php — Event handlers building read modelPath: src/Infrastructure/{BoundedContext}/
Projection/{Name}Store.php — Store for insert/update/upsertReadModel/Doctrine{Name}Repository.php — Repository implementation{Name}ReadModelTest.php — Read model serialization tests{Name}ProjectionTest.php — Projection event handling tests| Component | Path |
|---|---|
| Read Model | src/Domain/{BoundedContext}/ReadModel/ |
| Repository Interface | src/Domain/{BoundedContext}/ReadModel/ |
| Projection Interface | src/Application/{BoundedContext}/Projection/ |
| Projection | src/Application/{BoundedContext}/Projection/ |
| Store | src/Infrastructure/{BoundedContext}/Projection/ |
| Repository Impl | src/Infrastructure/{BoundedContext}/ReadModel/ |
| Unit Tests | tests/Unit/ |
| Component | Pattern | Example |
|---|---|---|
| Read Model | {Name}ReadModel | OrderSummaryReadModel |
| Repository Interface | {Name}ReadModelRepositoryInterface | OrderSummaryReadModelRepositoryInterface |
| Projection Interface | {Name}ProjectionInterface | OrderSummaryProjectionInterface |
| Projection | {Name}Projection | OrderSummaryProjection |
| Store | {Name}Store | OrderSummaryStore |
| Test | {ClassName}Test | OrderSummaryProjectionTest |
final readonly class {Name}ReadModel
{
public function __construct(
public string $id,
// ... denormalized properties
public \DateTimeImmutable $createdAt,
public \DateTimeImmutable $updatedAt
) {}
public static function fromArray(array $data): self;
public function toArray(): array;
}
final class {Name}Projection implements {Name}ProjectionInterface
{
public function project(DomainEventInterface $event): void
{
match ($event::class) {
OrderCreated::class => $this->whenOrderCreated($event),
OrderShipped::class => $this->whenOrderShipped($event),
default => null,
};
}
public function reset(): void;
public function subscribedEvents(): array;
}
// Query read model
$orders = $orderSummaryRepository->findByCustomerId($customerId);
// Project event
$projection->project($orderCreatedEvent);
// Reset projection for rebuild
$projection->reset();
CREATE TABLE order_summaries (
id VARCHAR(36) PRIMARY KEY,
order_number VARCHAR(50) NOT NULL UNIQUE,
customer_id VARCHAR(36) NOT NULL,
customer_name VARCHAR(255) NOT NULL,
status VARCHAR(50) NOT NULL,
total_cents BIGINT NOT NULL,
created_at TIMESTAMP NOT NULL,
updated_at TIMESTAMP NOT NULL,
INDEX idx_customer (customer_id),
INDEX idx_status (status)
);
| Anti-pattern | Problem | Solution |
|---|---|---|
| Business Logic | Read model has behavior | Keep data-only |
| Write Operations | Modifying read models | Use projections only |
| Non-idempotent | Re-projection breaks data | Idempotent event handling |
| Missing Reset | Can't rebuild | Add reset() method |
| Tight Coupling | Projection depends on domain | Use events only |
For complete PHP templates and examples, see:
references/templates.md — Read model, projection, store templatesreferences/examples.md — OrderSummary example 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.
日本語の概要は準備中です。原文の説明を表示しています。