Generates DEPTRAC configurations for PHP projects. Creates deptrac.yaml with DDD layer rules, bounded context separation, and dependency constraints.
From accnpx claudepluginhub dykyi-roman/awesome-claude-code --plugin accThis skill uses the workspace's default tool permissions.
references/examples.mdGenerates optimized DEPTRAC configurations for architectural dependency analysis.
deptrac.yaml # Main configuration
deptrac-baseline.yaml # Violation baseline (if needed)
# deptrac.yaml
deptrac:
paths:
- ./src
layers:
#############################################
# Domain Layer (innermost)
#############################################
- name: Domain
collectors:
- type: directory
value: src/Domain/.*
# Domain sublayers
- name: Domain.Entity
collectors:
- type: directory
value: src/Domain/.*/Entity/.*
- name: Domain.ValueObject
collectors:
- type: directory
value: src/Domain/.*/ValueObject/.*
- name: Domain.Event
collectors:
- type: directory
value: src/Domain/.*/Event/.*
- name: Domain.Repository
collectors:
- type: directory
value: src/Domain/.*/Repository/.*
- name: Domain.Service
collectors:
- type: directory
value: src/Domain/.*/Service/.*
#############################################
# Application Layer
#############################################
- name: Application
collectors:
- type: directory
value: src/Application/.*
- name: Application.UseCase
collectors:
- type: directory
value: src/Application/.*/UseCase/.*
- name: Application.Command
collectors:
- type: directory
value: src/Application/.*/Command/.*
- name: Application.Query
collectors:
- type: directory
value: src/Application/.*/Query/.*
- name: Application.DTO
collectors:
- type: directory
value: src/Application/.*/DTO/.*
#############################################
# Infrastructure Layer
#############################################
- name: Infrastructure
collectors:
- type: directory
value: src/Infrastructure/.*
- name: Infrastructure.Persistence
collectors:
- type: directory
value: src/Infrastructure/Persistence/.*
- name: Infrastructure.Messaging
collectors:
- type: directory
value: src/Infrastructure/Messaging/.*
- name: Infrastructure.External
collectors:
- type: directory
value: src/Infrastructure/External/.*
#############################################
# Presentation Layer (outermost)
#############################################
- name: Presentation
collectors:
- type: directory
value: src/(Api|Web|Console)/.*
- name: Presentation.Api
collectors:
- type: directory
value: src/Api/.*
- name: Presentation.Web
collectors:
- type: directory
value: src/Web/.*
- name: Presentation.Console
collectors:
- type: directory
value: src/Console/.*
#############################################
# Dependency Rules
#############################################
ruleset:
# Domain has NO dependencies (except language primitives)
Domain: []
Domain.Entity: []
Domain.ValueObject: []
Domain.Event: []
Domain.Repository: [] # Only interfaces
Domain.Service:
- Domain.Entity
- Domain.ValueObject
- Domain.Event
- Domain.Repository
# Application depends only on Domain
Application:
- Domain
Application.UseCase:
- Domain
- Application.DTO
- Application.Command
- Application.Query
Application.Command:
- Domain
Application.Query:
- Domain
Application.DTO:
- Domain.ValueObject # Can use VOs for type safety
# Infrastructure implements Domain interfaces
Infrastructure:
- Domain
- Application
Infrastructure.Persistence:
- Domain.Entity
- Domain.Repository
- Domain.ValueObject
Infrastructure.Messaging:
- Domain.Event
- Application.Command
Infrastructure.External:
- Domain
- Application
# Presentation depends on Application
Presentation:
- Application
- Domain # For DTOs, VOs in responses
Presentation.Api:
- Application.UseCase
- Application.DTO
- Domain.ValueObject
Presentation.Web:
- Application.UseCase
- Application.DTO
Presentation.Console:
- Application.UseCase
- Application.Command
See references/examples.md for: Bounded Context separation, Hexagonal Architecture, Advanced Collectors (class name, interface, attribute, combined), Baseline management, CI configuration (GitHub/GitLab), output formats, common violations and fixes.
Analyze project:
Define layers:
Define rules:
Handle violations:
Provide:
The generator will:
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.