acc-detect-architecture-pattern
Installation
SKILL.md
Architecture Pattern Detector
Overview
Analyzes a PHP codebase to detect which architectural patterns are in use. Examines namespace structure, interface placement, dependency direction, and code organization to determine patterns with confidence scores.
Detectable Patterns
| Pattern | Key Indicators | Confidence Markers |
|---|---|---|
| MVC | Controllers + Models + Views | Framework routing, template engine |
| DDD | Domain layer with Entities/VOs/Aggregates | Repository interfaces in Domain |
| Hexagonal | Ports (interfaces) + Adapters | Inbound/outbound port separation |
| CQRS | Separate Command/Query models | CommandBus, QueryBus, separate handlers |
| Layered | Domain/Application/Infrastructure | Clear namespace separation |
| Event Sourcing | Event store, aggregate replay | EventStore, AggregateRoot::apply() |
| Clean Architecture | Use Cases + Entity + Gateway | Dependency inversion at boundaries |
| Microservice | Independent deployable | Own database, API gateway, docker |