The create-policy skill streamlines the implementation of the Policy pattern within PHP 8.4 projects, specifically targeting Domain-Driven Design (DDD) and Clean Architecture environments. It automates the creation of encapsulated, stateless business rules, authorization checks, and complex validation logic by generating interfaces, concrete implementations, and composite policies. By providing a structured way to handle PolicyResult objects with specific denial reasons, it ensures that your application logic remains auditable, testable, and free from side effects, while also generating corresponding unit tests for every component.
Key Features
01Strict adherence to DDD and Clean Architecture patterns
02Automated PHP 8.4 Policy and Interface generation
03Composable business logic using AND/OR result logic
04Automatic unit test generation for all policy components
0545 GitHub stars
06Detailed denial reasons and metadata for auditing