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.
中文简介正在准备中。当前显示原文说明。
DDD architecture knowledge base. Provides patterns, antipatterns, and PHP-specific guidelines for Domain-Driven Design audits.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Quick reference for DDD architecture patterns and PHP implementation guidelines.
Presentation → Application → Domain ← Infrastructure
↓
Domain (center)
Rule: Dependencies point INWARD. Domain has ZERO external dependencies.
| Layer | Contains | Depends On |
|---|---|---|
| Domain | Entities, Value Objects, Aggregates, Domain Services, Repository Interfaces, Domain Events | Nothing |
| Application | Use Cases, DTOs, Application Services | Domain |
| Infrastructure | Repository Implementations, External APIs, DB, Cache, Queue | Domain, Application |
| Presentation | Controllers, Actions, Request/Response, CLI | Application |
public function set*() methods| Violation | Where to Look | Severity |
|---|---|---|
use Doctrine\\ in Domain | Domain/*.php | Critical |
use Illuminate\\ in Domain | Domain/*.php | Critical |
use Infrastructure\\ in Domain | Domain/*.php | Critical |
| Only getters/setters in Entity | Domain/Entity/*.php | Warning |
=== 'pending' magic strings | Any PHP file | Warning |
public function set*() | Domain/Entity/*.php | Warning |
| Business logic in Controller | Presentation/*.php | Warning |
| Business logic in Repository | Infrastructure/*.php | Warning |
final readonly class Email
{
public function __construct(
public string $value
) {
if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
throw new InvalidArgumentException('Invalid email');
}
}
public function equals(self $other): bool
{
return $this->value === $other->value;
}
}
final class Order
{
private OrderStatus $status;
public function __construct(
private readonly OrderId $id,
private readonly CustomerId $customerId
) {
$this->status = OrderStatus::Pending;
}
public function confirm(): void
{
if (!$this->status->canTransitionTo(OrderStatus::Confirmed)) {
throw new DomainException('Cannot confirm order');
}
$this->status = OrderStatus::Confirmed;
}
}
// Domain/Repository/OrderRepositoryInterface.php
interface OrderRepositoryInterface
{
public function findById(OrderId $id): ?Order;
public function save(Order $order): void;
}
For detailed information, load these reference files:
references/layer-architecture.md — Detailed layer rules and boundariesreferences/domain-patterns.md — Entity, VO, Aggregate, Repository patternsreferences/application-patterns.md — UseCase, DTO, Command/Query patternsreferences/antipatterns.md — Common violations with detection patternsreferences/php-specific.md — PHP 8.5 specific implementationsassets/report-template.md — Structured audit report template还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
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.
中文简介正在准备中。当前显示原文说明。