@the-bearded-bear/claude-craft 3.1.2 → 3.3.1-next.f4f0d1e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dev/i18n/de/Angular/CLAUDE.md.template +49 -0
- package/Dev/i18n/de/Angular/agents/angular-reviewer.md +213 -0
- package/Dev/i18n/de/Angular/checklists/new-feature.md +125 -0
- package/Dev/i18n/de/Angular/checklists/pre-commit.md +77 -0
- package/Dev/i18n/de/Angular/commands/check-architecture.md +261 -0
- package/Dev/i18n/de/Angular/commands/check-code-quality.md +238 -0
- package/Dev/i18n/de/Angular/commands/check-compliance.md +199 -0
- package/Dev/i18n/de/Angular/commands/check-security.md +263 -0
- package/Dev/i18n/de/Angular/commands/check-testing.md +292 -0
- package/Dev/i18n/de/Angular/commands/generate-component.md +220 -0
- package/Dev/i18n/de/Angular/rules/00-project-context.md.template +78 -0
- package/Dev/i18n/de/Angular/rules/02-architecture-angular.md +477 -0
- package/Dev/i18n/de/Angular/rules/03-coding-standards.md +640 -0
- package/Dev/i18n/de/Angular/rules/06-tooling.md +516 -0
- package/Dev/i18n/de/Angular/rules/07-testing-angular.md +739 -0
- package/Dev/i18n/de/Angular/rules/08-quality-tools.md +501 -0
- package/Dev/i18n/de/Angular/rules/11-security-angular.md +497 -0
- package/Dev/i18n/de/Angular/templates/component.template.ts +115 -0
- package/Dev/i18n/de/Angular/templates/service.template.ts +203 -0
- package/Dev/i18n/de/CSharp/CLAUDE.md.template +65 -0
- package/Dev/i18n/de/CSharp/agents/csharp-reviewer.md +166 -0
- package/Dev/i18n/de/CSharp/checklists/new-feature.md +178 -0
- package/Dev/i18n/de/CSharp/checklists/pre-commit.md +126 -0
- package/Dev/i18n/de/CSharp/commands/check-architecture.md +294 -0
- package/Dev/i18n/de/CSharp/commands/check-code-quality.md +355 -0
- package/Dev/i18n/de/CSharp/commands/check-compliance.md +178 -0
- package/Dev/i18n/de/CSharp/commands/check-security.md +369 -0
- package/Dev/i18n/de/CSharp/commands/check-testing.md +295 -0
- package/Dev/i18n/de/CSharp/commands/generate-feature.md +481 -0
- package/Dev/i18n/de/CSharp/rules/00-project-context.md.template +100 -0
- package/Dev/i18n/de/CSharp/rules/02-architecture-csharp.md +536 -0
- package/Dev/i18n/de/CSharp/rules/03-coding-standards.md +494 -0
- package/Dev/i18n/de/CSharp/rules/06-tooling.md +493 -0
- package/Dev/i18n/de/CSharp/rules/07-testing-csharp.md +566 -0
- package/Dev/i18n/de/CSharp/rules/08-quality-tools.md +497 -0
- package/Dev/i18n/de/CSharp/rules/11-security-csharp.md +568 -0
- package/Dev/i18n/de/CSharp/rules/12-aspire-cloud-native.md +514 -0
- package/Dev/i18n/de/CSharp/templates/command-handler.template.cs +100 -0
- package/Dev/i18n/de/CSharp/templates/entity.template.cs +159 -0
- package/Dev/i18n/de/Common/commands/add-technology.md +195 -0
- package/Dev/i18n/de/Laravel/CLAUDE.md.template +104 -0
- package/Dev/i18n/de/Laravel/agents/laravel-reviewer.md +200 -0
- package/Dev/i18n/de/Laravel/checklists/new-feature.md +277 -0
- package/Dev/i18n/de/Laravel/checklists/pre-commit.md +156 -0
- package/Dev/i18n/de/Laravel/commands/check-architecture.md +306 -0
- package/Dev/i18n/de/Laravel/commands/check-code-quality.md +302 -0
- package/Dev/i18n/de/Laravel/commands/check-compliance.md +141 -0
- package/Dev/i18n/de/Laravel/commands/check-security.md +372 -0
- package/Dev/i18n/de/Laravel/commands/check-testing.md +397 -0
- package/Dev/i18n/de/Laravel/commands/generate-controller.md +388 -0
- package/Dev/i18n/de/Laravel/rules/00-project-context.md.template +140 -0
- package/Dev/i18n/de/Laravel/rules/02-architecture-laravel.md +644 -0
- package/Dev/i18n/de/Laravel/rules/03-coding-standards.md +573 -0
- package/Dev/i18n/de/Laravel/rules/06-tooling.md +580 -0
- package/Dev/i18n/de/Laravel/rules/07-testing-laravel.md +525 -0
- package/Dev/i18n/de/Laravel/rules/08-quality-tools.md +591 -0
- package/Dev/i18n/de/Laravel/rules/11-security-laravel.md +787 -0
- package/Dev/i18n/de/Laravel/templates/action.template.php +79 -0
- package/Dev/i18n/de/Laravel/templates/controller.template.php +99 -0
- package/Dev/i18n/de/Laravel/templates/model.template.php +206 -0
- package/Dev/i18n/de/Laravel/templates/test.template.php +263 -0
- package/Dev/i18n/de/PHP/CLAUDE.md.template +460 -0
- package/Dev/i18n/de/PHP/agents/php-reviewer.md +345 -0
- package/Dev/i18n/de/PHP/checklists/new-feature.md +132 -0
- package/Dev/i18n/de/PHP/checklists/pre-commit.md +231 -0
- package/Dev/i18n/de/PHP/commands/check-architecture.md +557 -0
- package/Dev/i18n/de/PHP/commands/check-code-quality.md +448 -0
- package/Dev/i18n/de/PHP/commands/check-compliance.md +477 -0
- package/Dev/i18n/de/PHP/commands/check-security.md +420 -0
- package/Dev/i18n/de/PHP/commands/check-testing.md +486 -0
- package/Dev/i18n/de/PHP/rules/00-project-context.md.template +266 -0
- package/Dev/i18n/de/PHP/rules/02-architecture-php.md +696 -0
- package/Dev/i18n/de/PHP/rules/03-coding-standards.md +641 -0
- package/Dev/i18n/de/PHP/rules/06-tooling.md +543 -0
- package/Dev/i18n/de/PHP/rules/07-testing-php.md +636 -0
- package/Dev/i18n/de/PHP/rules/08-quality-tools.md +533 -0
- package/Dev/i18n/de/PHP/rules/11-security-php.md +759 -0
- package/Dev/i18n/de/PHP/templates/entity.md +435 -0
- package/Dev/i18n/de/PHP/templates/use-case.md +512 -0
- package/Dev/i18n/de/PHP/templates/value-object.md +555 -0
- package/Dev/i18n/de/VueJS/CLAUDE.md.template +102 -0
- package/Dev/i18n/de/VueJS/agents/vuejs-reviewer.md +206 -0
- package/Dev/i18n/de/VueJS/checklists/new-feature.md +131 -0
- package/Dev/i18n/de/VueJS/checklists/pre-commit.md +68 -0
- package/Dev/i18n/de/VueJS/commands/check-architecture.md +137 -0
- package/Dev/i18n/de/VueJS/commands/check-code-quality.md +152 -0
- package/Dev/i18n/de/VueJS/commands/check-compliance.md +124 -0
- package/Dev/i18n/de/VueJS/commands/check-security.md +186 -0
- package/Dev/i18n/de/VueJS/commands/check-testing.md +185 -0
- package/Dev/i18n/de/VueJS/commands/generate-component.md +233 -0
- package/Dev/i18n/de/VueJS/rules/00-project-context.md.template +125 -0
- package/Dev/i18n/de/VueJS/rules/02-architecture-vuejs.md +375 -0
- package/Dev/i18n/de/VueJS/rules/03-coding-standards.md +502 -0
- package/Dev/i18n/de/VueJS/rules/06-tooling.md +422 -0
- package/Dev/i18n/de/VueJS/rules/07-testing-vuejs.md +606 -0
- package/Dev/i18n/de/VueJS/rules/08-quality-tools.md +441 -0
- package/Dev/i18n/de/VueJS/rules/11-security-vuejs.md +465 -0
- package/Dev/i18n/de/VueJS/templates/component.template.vue +133 -0
- package/Dev/i18n/de/VueJS/templates/composable.template.ts +162 -0
- package/Dev/i18n/de/VueJS/templates/store.template.ts +282 -0
- package/Dev/i18n/de/VueJS/templates/test.template.ts +233 -0
- package/Dev/i18n/en/Angular/CLAUDE.md.template +49 -0
- package/Dev/i18n/en/Angular/agents/angular-reviewer.md +213 -0
- package/Dev/i18n/en/Angular/checklists/new-feature.md +125 -0
- package/Dev/i18n/en/Angular/checklists/pre-commit.md +77 -0
- package/Dev/i18n/en/Angular/commands/check-architecture.md +261 -0
- package/Dev/i18n/en/Angular/commands/check-code-quality.md +238 -0
- package/Dev/i18n/en/Angular/commands/check-compliance.md +199 -0
- package/Dev/i18n/en/Angular/commands/check-security.md +263 -0
- package/Dev/i18n/en/Angular/commands/check-testing.md +292 -0
- package/Dev/i18n/en/Angular/commands/generate-component.md +220 -0
- package/Dev/i18n/en/Angular/rules/00-project-context.md.template +78 -0
- package/Dev/i18n/en/Angular/rules/02-architecture-angular.md +477 -0
- package/Dev/i18n/en/Angular/rules/03-coding-standards.md +640 -0
- package/Dev/i18n/en/Angular/rules/06-tooling.md +516 -0
- package/Dev/i18n/en/Angular/rules/07-testing-angular.md +739 -0
- package/Dev/i18n/en/Angular/rules/08-quality-tools.md +501 -0
- package/Dev/i18n/en/Angular/rules/11-security-angular.md +497 -0
- package/Dev/i18n/en/Angular/templates/component.template.ts +115 -0
- package/Dev/i18n/en/Angular/templates/service.template.ts +203 -0
- package/Dev/i18n/en/CSharp/CLAUDE.md.template +65 -0
- package/Dev/i18n/en/CSharp/agents/csharp-reviewer.md +166 -0
- package/Dev/i18n/en/CSharp/checklists/new-feature.md +178 -0
- package/Dev/i18n/en/CSharp/checklists/pre-commit.md +126 -0
- package/Dev/i18n/en/CSharp/commands/check-architecture.md +294 -0
- package/Dev/i18n/en/CSharp/commands/check-code-quality.md +355 -0
- package/Dev/i18n/en/CSharp/commands/check-compliance.md +178 -0
- package/Dev/i18n/en/CSharp/commands/check-security.md +369 -0
- package/Dev/i18n/en/CSharp/commands/check-testing.md +295 -0
- package/Dev/i18n/en/CSharp/commands/generate-feature.md +481 -0
- package/Dev/i18n/en/CSharp/rules/00-project-context.md.template +100 -0
- package/Dev/i18n/en/CSharp/rules/02-architecture-csharp.md +536 -0
- package/Dev/i18n/en/CSharp/rules/03-coding-standards.md +494 -0
- package/Dev/i18n/en/CSharp/rules/06-tooling.md +493 -0
- package/Dev/i18n/en/CSharp/rules/07-testing-csharp.md +566 -0
- package/Dev/i18n/en/CSharp/rules/08-quality-tools.md +497 -0
- package/Dev/i18n/en/CSharp/rules/11-security-csharp.md +568 -0
- package/Dev/i18n/en/CSharp/rules/12-aspire-cloud-native.md +514 -0
- package/Dev/i18n/en/CSharp/templates/command-handler.template.cs +100 -0
- package/Dev/i18n/en/CSharp/templates/entity.template.cs +159 -0
- package/Dev/i18n/en/Common/commands/add-technology.md +293 -0
- package/Dev/i18n/en/Laravel/CLAUDE.md.template +104 -0
- package/Dev/i18n/en/Laravel/agents/laravel-reviewer.md +200 -0
- package/Dev/i18n/en/Laravel/checklists/new-feature.md +277 -0
- package/Dev/i18n/en/Laravel/checklists/pre-commit.md +156 -0
- package/Dev/i18n/en/Laravel/commands/check-architecture.md +306 -0
- package/Dev/i18n/en/Laravel/commands/check-code-quality.md +302 -0
- package/Dev/i18n/en/Laravel/commands/check-compliance.md +141 -0
- package/Dev/i18n/en/Laravel/commands/check-security.md +372 -0
- package/Dev/i18n/en/Laravel/commands/check-testing.md +397 -0
- package/Dev/i18n/en/Laravel/commands/generate-controller.md +388 -0
- package/Dev/i18n/en/Laravel/rules/00-project-context.md.template +140 -0
- package/Dev/i18n/en/Laravel/rules/02-architecture-laravel.md +644 -0
- package/Dev/i18n/en/Laravel/rules/03-coding-standards.md +573 -0
- package/Dev/i18n/en/Laravel/rules/06-tooling.md +580 -0
- package/Dev/i18n/en/Laravel/rules/07-testing-laravel.md +525 -0
- package/Dev/i18n/en/Laravel/rules/08-quality-tools.md +591 -0
- package/Dev/i18n/en/Laravel/rules/11-security-laravel.md +787 -0
- package/Dev/i18n/en/Laravel/templates/action.template.php +79 -0
- package/Dev/i18n/en/Laravel/templates/controller.template.php +99 -0
- package/Dev/i18n/en/Laravel/templates/model.template.php +206 -0
- package/Dev/i18n/en/Laravel/templates/test.template.php +263 -0
- package/Dev/i18n/en/PHP/CLAUDE.md.template +460 -0
- package/Dev/i18n/en/PHP/agents/php-reviewer.md +345 -0
- package/Dev/i18n/en/PHP/checklists/new-feature.md +132 -0
- package/Dev/i18n/en/PHP/checklists/pre-commit.md +231 -0
- package/Dev/i18n/en/PHP/commands/check-architecture.md +557 -0
- package/Dev/i18n/en/PHP/commands/check-code-quality.md +448 -0
- package/Dev/i18n/en/PHP/commands/check-compliance.md +477 -0
- package/Dev/i18n/en/PHP/commands/check-security.md +420 -0
- package/Dev/i18n/en/PHP/commands/check-testing.md +486 -0
- package/Dev/i18n/en/PHP/rules/00-project-context.md.template +266 -0
- package/Dev/i18n/en/PHP/rules/02-architecture-php.md +696 -0
- package/Dev/i18n/en/PHP/rules/03-coding-standards.md +641 -0
- package/Dev/i18n/en/PHP/rules/06-tooling.md +543 -0
- package/Dev/i18n/en/PHP/rules/07-testing-php.md +636 -0
- package/Dev/i18n/en/PHP/rules/08-quality-tools.md +533 -0
- package/Dev/i18n/en/PHP/rules/11-security-php.md +759 -0
- package/Dev/i18n/en/PHP/templates/entity.md +435 -0
- package/Dev/i18n/en/PHP/templates/use-case.md +512 -0
- package/Dev/i18n/en/PHP/templates/value-object.md +555 -0
- package/Dev/i18n/en/VueJS/CLAUDE.md.template +102 -0
- package/Dev/i18n/en/VueJS/agents/vuejs-reviewer.md +206 -0
- package/Dev/i18n/en/VueJS/checklists/new-feature.md +131 -0
- package/Dev/i18n/en/VueJS/checklists/pre-commit.md +68 -0
- package/Dev/i18n/en/VueJS/commands/check-architecture.md +137 -0
- package/Dev/i18n/en/VueJS/commands/check-code-quality.md +152 -0
- package/Dev/i18n/en/VueJS/commands/check-compliance.md +124 -0
- package/Dev/i18n/en/VueJS/commands/check-security.md +186 -0
- package/Dev/i18n/en/VueJS/commands/check-testing.md +185 -0
- package/Dev/i18n/en/VueJS/commands/generate-component.md +233 -0
- package/Dev/i18n/en/VueJS/rules/00-project-context.md.template +125 -0
- package/Dev/i18n/en/VueJS/rules/02-architecture-vuejs.md +375 -0
- package/Dev/i18n/en/VueJS/rules/03-coding-standards.md +502 -0
- package/Dev/i18n/en/VueJS/rules/06-tooling.md +422 -0
- package/Dev/i18n/en/VueJS/rules/07-testing-vuejs.md +606 -0
- package/Dev/i18n/en/VueJS/rules/08-quality-tools.md +441 -0
- package/Dev/i18n/en/VueJS/rules/11-security-vuejs.md +465 -0
- package/Dev/i18n/en/VueJS/templates/component.template.vue +133 -0
- package/Dev/i18n/en/VueJS/templates/composable.template.ts +162 -0
- package/Dev/i18n/en/VueJS/templates/store.template.ts +282 -0
- package/Dev/i18n/en/VueJS/templates/test.template.ts +233 -0
- package/Dev/i18n/es/Angular/CLAUDE.md.template +49 -0
- package/Dev/i18n/es/Angular/agents/angular-reviewer.md +213 -0
- package/Dev/i18n/es/Angular/checklists/new-feature.md +125 -0
- package/Dev/i18n/es/Angular/checklists/pre-commit.md +77 -0
- package/Dev/i18n/es/Angular/commands/check-architecture.md +261 -0
- package/Dev/i18n/es/Angular/commands/check-code-quality.md +238 -0
- package/Dev/i18n/es/Angular/commands/check-compliance.md +199 -0
- package/Dev/i18n/es/Angular/commands/check-security.md +263 -0
- package/Dev/i18n/es/Angular/commands/check-testing.md +292 -0
- package/Dev/i18n/es/Angular/commands/generate-component.md +220 -0
- package/Dev/i18n/es/Angular/rules/00-project-context.md.template +78 -0
- package/Dev/i18n/es/Angular/rules/02-architecture-angular.md +477 -0
- package/Dev/i18n/es/Angular/rules/03-coding-standards.md +640 -0
- package/Dev/i18n/es/Angular/rules/06-tooling.md +516 -0
- package/Dev/i18n/es/Angular/rules/07-testing-angular.md +739 -0
- package/Dev/i18n/es/Angular/rules/08-quality-tools.md +501 -0
- package/Dev/i18n/es/Angular/rules/11-security-angular.md +497 -0
- package/Dev/i18n/es/Angular/templates/component.template.ts +115 -0
- package/Dev/i18n/es/Angular/templates/service.template.ts +203 -0
- package/Dev/i18n/es/CSharp/CLAUDE.md.template +65 -0
- package/Dev/i18n/es/CSharp/agents/csharp-reviewer.md +166 -0
- package/Dev/i18n/es/CSharp/checklists/new-feature.md +178 -0
- package/Dev/i18n/es/CSharp/checklists/pre-commit.md +126 -0
- package/Dev/i18n/es/CSharp/commands/check-architecture.md +294 -0
- package/Dev/i18n/es/CSharp/commands/check-code-quality.md +355 -0
- package/Dev/i18n/es/CSharp/commands/check-compliance.md +178 -0
- package/Dev/i18n/es/CSharp/commands/check-security.md +369 -0
- package/Dev/i18n/es/CSharp/commands/check-testing.md +295 -0
- package/Dev/i18n/es/CSharp/commands/generate-feature.md +481 -0
- package/Dev/i18n/es/CSharp/rules/00-project-context.md.template +100 -0
- package/Dev/i18n/es/CSharp/rules/02-architecture-csharp.md +536 -0
- package/Dev/i18n/es/CSharp/rules/03-coding-standards.md +494 -0
- package/Dev/i18n/es/CSharp/rules/06-tooling.md +493 -0
- package/Dev/i18n/es/CSharp/rules/07-testing-csharp.md +566 -0
- package/Dev/i18n/es/CSharp/rules/08-quality-tools.md +497 -0
- package/Dev/i18n/es/CSharp/rules/11-security-csharp.md +568 -0
- package/Dev/i18n/es/CSharp/rules/12-aspire-cloud-native.md +514 -0
- package/Dev/i18n/es/CSharp/templates/command-handler.template.cs +100 -0
- package/Dev/i18n/es/CSharp/templates/entity.template.cs +159 -0
- package/Dev/i18n/es/Common/commands/add-technology.md +195 -0
- package/Dev/i18n/es/Laravel/CLAUDE.md.template +104 -0
- package/Dev/i18n/es/Laravel/agents/laravel-reviewer.md +200 -0
- package/Dev/i18n/es/Laravel/checklists/new-feature.md +277 -0
- package/Dev/i18n/es/Laravel/checklists/pre-commit.md +156 -0
- package/Dev/i18n/es/Laravel/commands/check-architecture.md +306 -0
- package/Dev/i18n/es/Laravel/commands/check-code-quality.md +302 -0
- package/Dev/i18n/es/Laravel/commands/check-compliance.md +141 -0
- package/Dev/i18n/es/Laravel/commands/check-security.md +372 -0
- package/Dev/i18n/es/Laravel/commands/check-testing.md +397 -0
- package/Dev/i18n/es/Laravel/commands/generate-controller.md +388 -0
- package/Dev/i18n/es/Laravel/rules/00-project-context.md.template +140 -0
- package/Dev/i18n/es/Laravel/rules/02-architecture-laravel.md +644 -0
- package/Dev/i18n/es/Laravel/rules/03-coding-standards.md +573 -0
- package/Dev/i18n/es/Laravel/rules/06-tooling.md +580 -0
- package/Dev/i18n/es/Laravel/rules/07-testing-laravel.md +525 -0
- package/Dev/i18n/es/Laravel/rules/08-quality-tools.md +591 -0
- package/Dev/i18n/es/Laravel/rules/11-security-laravel.md +787 -0
- package/Dev/i18n/es/Laravel/templates/action.template.php +79 -0
- package/Dev/i18n/es/Laravel/templates/controller.template.php +99 -0
- package/Dev/i18n/es/Laravel/templates/model.template.php +206 -0
- package/Dev/i18n/es/Laravel/templates/test.template.php +263 -0
- package/Dev/i18n/es/PHP/CLAUDE.md.template +460 -0
- package/Dev/i18n/es/PHP/agents/php-reviewer.md +345 -0
- package/Dev/i18n/es/PHP/checklists/new-feature.md +132 -0
- package/Dev/i18n/es/PHP/checklists/pre-commit.md +231 -0
- package/Dev/i18n/es/PHP/commands/check-architecture.md +557 -0
- package/Dev/i18n/es/PHP/commands/check-code-quality.md +448 -0
- package/Dev/i18n/es/PHP/commands/check-compliance.md +477 -0
- package/Dev/i18n/es/PHP/commands/check-security.md +420 -0
- package/Dev/i18n/es/PHP/commands/check-testing.md +486 -0
- package/Dev/i18n/es/PHP/rules/00-project-context.md.template +266 -0
- package/Dev/i18n/es/PHP/rules/02-architecture-php.md +696 -0
- package/Dev/i18n/es/PHP/rules/03-coding-standards.md +641 -0
- package/Dev/i18n/es/PHP/rules/06-tooling.md +543 -0
- package/Dev/i18n/es/PHP/rules/07-testing-php.md +636 -0
- package/Dev/i18n/es/PHP/rules/08-quality-tools.md +533 -0
- package/Dev/i18n/es/PHP/rules/11-security-php.md +759 -0
- package/Dev/i18n/es/PHP/templates/entity.md +435 -0
- package/Dev/i18n/es/PHP/templates/use-case.md +512 -0
- package/Dev/i18n/es/PHP/templates/value-object.md +555 -0
- package/Dev/i18n/es/VueJS/CLAUDE.md.template +102 -0
- package/Dev/i18n/es/VueJS/agents/vuejs-reviewer.md +206 -0
- package/Dev/i18n/es/VueJS/checklists/new-feature.md +131 -0
- package/Dev/i18n/es/VueJS/checklists/pre-commit.md +68 -0
- package/Dev/i18n/es/VueJS/commands/check-architecture.md +137 -0
- package/Dev/i18n/es/VueJS/commands/check-code-quality.md +152 -0
- package/Dev/i18n/es/VueJS/commands/check-compliance.md +124 -0
- package/Dev/i18n/es/VueJS/commands/check-security.md +186 -0
- package/Dev/i18n/es/VueJS/commands/check-testing.md +185 -0
- package/Dev/i18n/es/VueJS/commands/generate-component.md +233 -0
- package/Dev/i18n/es/VueJS/rules/00-project-context.md.template +125 -0
- package/Dev/i18n/es/VueJS/rules/02-architecture-vuejs.md +375 -0
- package/Dev/i18n/es/VueJS/rules/03-coding-standards.md +502 -0
- package/Dev/i18n/es/VueJS/rules/06-tooling.md +422 -0
- package/Dev/i18n/es/VueJS/rules/07-testing-vuejs.md +606 -0
- package/Dev/i18n/es/VueJS/rules/08-quality-tools.md +441 -0
- package/Dev/i18n/es/VueJS/rules/11-security-vuejs.md +465 -0
- package/Dev/i18n/es/VueJS/templates/component.template.vue +133 -0
- package/Dev/i18n/es/VueJS/templates/composable.template.ts +162 -0
- package/Dev/i18n/es/VueJS/templates/store.template.ts +282 -0
- package/Dev/i18n/es/VueJS/templates/test.template.ts +233 -0
- package/Dev/i18n/fr/Angular/CLAUDE.md.template +49 -0
- package/Dev/i18n/fr/Angular/agents/angular-reviewer.md +213 -0
- package/Dev/i18n/fr/Angular/checklists/new-feature.md +125 -0
- package/Dev/i18n/fr/Angular/checklists/pre-commit.md +77 -0
- package/Dev/i18n/fr/Angular/commands/check-architecture.md +261 -0
- package/Dev/i18n/fr/Angular/commands/check-code-quality.md +238 -0
- package/Dev/i18n/fr/Angular/commands/check-compliance.md +199 -0
- package/Dev/i18n/fr/Angular/commands/check-security.md +263 -0
- package/Dev/i18n/fr/Angular/commands/check-testing.md +292 -0
- package/Dev/i18n/fr/Angular/commands/generate-component.md +220 -0
- package/Dev/i18n/fr/Angular/rules/00-project-context.md.template +78 -0
- package/Dev/i18n/fr/Angular/rules/02-architecture-angular.md +477 -0
- package/Dev/i18n/fr/Angular/rules/03-coding-standards.md +640 -0
- package/Dev/i18n/fr/Angular/rules/06-tooling.md +516 -0
- package/Dev/i18n/fr/Angular/rules/07-testing-angular.md +739 -0
- package/Dev/i18n/fr/Angular/rules/08-quality-tools.md +501 -0
- package/Dev/i18n/fr/Angular/rules/11-security-angular.md +497 -0
- package/Dev/i18n/fr/Angular/templates/component.template.ts +115 -0
- package/Dev/i18n/fr/Angular/templates/service.template.ts +203 -0
- package/Dev/i18n/fr/CSharp/CLAUDE.md.template +65 -0
- package/Dev/i18n/fr/CSharp/agents/csharp-reviewer.md +166 -0
- package/Dev/i18n/fr/CSharp/checklists/new-feature.md +178 -0
- package/Dev/i18n/fr/CSharp/checklists/pre-commit.md +126 -0
- package/Dev/i18n/fr/CSharp/commands/check-architecture.md +294 -0
- package/Dev/i18n/fr/CSharp/commands/check-code-quality.md +355 -0
- package/Dev/i18n/fr/CSharp/commands/check-compliance.md +178 -0
- package/Dev/i18n/fr/CSharp/commands/check-security.md +369 -0
- package/Dev/i18n/fr/CSharp/commands/check-testing.md +295 -0
- package/Dev/i18n/fr/CSharp/commands/generate-feature.md +481 -0
- package/Dev/i18n/fr/CSharp/rules/00-project-context.md.template +100 -0
- package/Dev/i18n/fr/CSharp/rules/02-architecture-csharp.md +536 -0
- package/Dev/i18n/fr/CSharp/rules/03-coding-standards.md +494 -0
- package/Dev/i18n/fr/CSharp/rules/06-tooling.md +493 -0
- package/Dev/i18n/fr/CSharp/rules/07-testing-csharp.md +566 -0
- package/Dev/i18n/fr/CSharp/rules/08-quality-tools.md +497 -0
- package/Dev/i18n/fr/CSharp/rules/11-security-csharp.md +568 -0
- package/Dev/i18n/fr/CSharp/rules/12-aspire-cloud-native.md +514 -0
- package/Dev/i18n/fr/CSharp/templates/command-handler.template.cs +100 -0
- package/Dev/i18n/fr/CSharp/templates/entity.template.cs +159 -0
- package/Dev/i18n/fr/Common/commands/add-technology.md +293 -0
- package/Dev/i18n/fr/Laravel/CLAUDE.md.template +104 -0
- package/Dev/i18n/fr/Laravel/agents/laravel-reviewer.md +200 -0
- package/Dev/i18n/fr/Laravel/checklists/new-feature.md +277 -0
- package/Dev/i18n/fr/Laravel/checklists/pre-commit.md +156 -0
- package/Dev/i18n/fr/Laravel/commands/check-architecture.md +306 -0
- package/Dev/i18n/fr/Laravel/commands/check-code-quality.md +302 -0
- package/Dev/i18n/fr/Laravel/commands/check-compliance.md +141 -0
- package/Dev/i18n/fr/Laravel/commands/check-security.md +372 -0
- package/Dev/i18n/fr/Laravel/commands/check-testing.md +397 -0
- package/Dev/i18n/fr/Laravel/commands/generate-controller.md +388 -0
- package/Dev/i18n/fr/Laravel/rules/00-project-context.md.template +140 -0
- package/Dev/i18n/fr/Laravel/rules/02-architecture-laravel.md +644 -0
- package/Dev/i18n/fr/Laravel/rules/03-coding-standards.md +573 -0
- package/Dev/i18n/fr/Laravel/rules/06-tooling.md +580 -0
- package/Dev/i18n/fr/Laravel/rules/07-testing-laravel.md +525 -0
- package/Dev/i18n/fr/Laravel/rules/08-quality-tools.md +591 -0
- package/Dev/i18n/fr/Laravel/rules/11-security-laravel.md +787 -0
- package/Dev/i18n/fr/Laravel/templates/action.template.php +79 -0
- package/Dev/i18n/fr/Laravel/templates/controller.template.php +99 -0
- package/Dev/i18n/fr/Laravel/templates/model.template.php +206 -0
- package/Dev/i18n/fr/Laravel/templates/test.template.php +263 -0
- package/Dev/i18n/fr/PHP/CLAUDE.md.template +460 -0
- package/Dev/i18n/fr/PHP/agents/php-reviewer.md +345 -0
- package/Dev/i18n/fr/PHP/checklists/new-feature.md +132 -0
- package/Dev/i18n/fr/PHP/checklists/pre-commit.md +231 -0
- package/Dev/i18n/fr/PHP/commands/check-architecture.md +557 -0
- package/Dev/i18n/fr/PHP/commands/check-code-quality.md +448 -0
- package/Dev/i18n/fr/PHP/commands/check-compliance.md +477 -0
- package/Dev/i18n/fr/PHP/commands/check-security.md +420 -0
- package/Dev/i18n/fr/PHP/commands/check-testing.md +486 -0
- package/Dev/i18n/fr/PHP/rules/00-project-context.md.template +266 -0
- package/Dev/i18n/fr/PHP/rules/02-architecture-php.md +506 -0
- package/Dev/i18n/fr/PHP/rules/03-coding-standards.md +585 -0
- package/Dev/i18n/fr/PHP/rules/06-tooling.md +543 -0
- package/Dev/i18n/fr/PHP/rules/07-testing-php.md +636 -0
- package/Dev/i18n/fr/PHP/rules/08-quality-tools.md +533 -0
- package/Dev/i18n/fr/PHP/rules/11-security-php.md +642 -0
- package/Dev/i18n/fr/PHP/templates/entity.md +435 -0
- package/Dev/i18n/fr/PHP/templates/use-case.md +512 -0
- package/Dev/i18n/fr/PHP/templates/value-object.md +555 -0
- package/Dev/i18n/fr/VueJS/CLAUDE.md.template +102 -0
- package/Dev/i18n/fr/VueJS/agents/vuejs-reviewer.md +206 -0
- package/Dev/i18n/fr/VueJS/checklists/new-feature.md +131 -0
- package/Dev/i18n/fr/VueJS/checklists/pre-commit.md +68 -0
- package/Dev/i18n/fr/VueJS/commands/check-architecture.md +137 -0
- package/Dev/i18n/fr/VueJS/commands/check-code-quality.md +152 -0
- package/Dev/i18n/fr/VueJS/commands/check-compliance.md +124 -0
- package/Dev/i18n/fr/VueJS/commands/check-security.md +186 -0
- package/Dev/i18n/fr/VueJS/commands/check-testing.md +185 -0
- package/Dev/i18n/fr/VueJS/commands/generate-component.md +233 -0
- package/Dev/i18n/fr/VueJS/rules/00-project-context.md.template +125 -0
- package/Dev/i18n/fr/VueJS/rules/02-architecture-vuejs.md +375 -0
- package/Dev/i18n/fr/VueJS/rules/03-coding-standards.md +502 -0
- package/Dev/i18n/fr/VueJS/rules/06-tooling.md +422 -0
- package/Dev/i18n/fr/VueJS/rules/07-testing-vuejs.md +606 -0
- package/Dev/i18n/fr/VueJS/rules/08-quality-tools.md +441 -0
- package/Dev/i18n/fr/VueJS/rules/11-security-vuejs.md +465 -0
- package/Dev/i18n/fr/VueJS/templates/component.template.vue +133 -0
- package/Dev/i18n/fr/VueJS/templates/composable.template.ts +162 -0
- package/Dev/i18n/fr/VueJS/templates/store.template.ts +282 -0
- package/Dev/i18n/fr/VueJS/templates/test.template.ts +233 -0
- package/Dev/i18n/pt/Angular/CLAUDE.md.template +49 -0
- package/Dev/i18n/pt/Angular/agents/angular-reviewer.md +213 -0
- package/Dev/i18n/pt/Angular/checklists/new-feature.md +125 -0
- package/Dev/i18n/pt/Angular/checklists/pre-commit.md +77 -0
- package/Dev/i18n/pt/Angular/commands/check-architecture.md +261 -0
- package/Dev/i18n/pt/Angular/commands/check-code-quality.md +238 -0
- package/Dev/i18n/pt/Angular/commands/check-compliance.md +199 -0
- package/Dev/i18n/pt/Angular/commands/check-security.md +263 -0
- package/Dev/i18n/pt/Angular/commands/check-testing.md +292 -0
- package/Dev/i18n/pt/Angular/commands/generate-component.md +220 -0
- package/Dev/i18n/pt/Angular/rules/00-project-context.md.template +78 -0
- package/Dev/i18n/pt/Angular/rules/02-architecture-angular.md +477 -0
- package/Dev/i18n/pt/Angular/rules/03-coding-standards.md +640 -0
- package/Dev/i18n/pt/Angular/rules/06-tooling.md +516 -0
- package/Dev/i18n/pt/Angular/rules/07-testing-angular.md +739 -0
- package/Dev/i18n/pt/Angular/rules/08-quality-tools.md +501 -0
- package/Dev/i18n/pt/Angular/rules/11-security-angular.md +497 -0
- package/Dev/i18n/pt/Angular/templates/component.template.ts +115 -0
- package/Dev/i18n/pt/Angular/templates/service.template.ts +203 -0
- package/Dev/i18n/pt/CSharp/CLAUDE.md.template +65 -0
- package/Dev/i18n/pt/CSharp/agents/csharp-reviewer.md +166 -0
- package/Dev/i18n/pt/CSharp/checklists/new-feature.md +178 -0
- package/Dev/i18n/pt/CSharp/checklists/pre-commit.md +126 -0
- package/Dev/i18n/pt/CSharp/commands/check-architecture.md +294 -0
- package/Dev/i18n/pt/CSharp/commands/check-code-quality.md +355 -0
- package/Dev/i18n/pt/CSharp/commands/check-compliance.md +178 -0
- package/Dev/i18n/pt/CSharp/commands/check-security.md +369 -0
- package/Dev/i18n/pt/CSharp/commands/check-testing.md +295 -0
- package/Dev/i18n/pt/CSharp/commands/generate-feature.md +481 -0
- package/Dev/i18n/pt/CSharp/rules/00-project-context.md.template +100 -0
- package/Dev/i18n/pt/CSharp/rules/02-architecture-csharp.md +536 -0
- package/Dev/i18n/pt/CSharp/rules/03-coding-standards.md +494 -0
- package/Dev/i18n/pt/CSharp/rules/06-tooling.md +493 -0
- package/Dev/i18n/pt/CSharp/rules/07-testing-csharp.md +566 -0
- package/Dev/i18n/pt/CSharp/rules/08-quality-tools.md +497 -0
- package/Dev/i18n/pt/CSharp/rules/11-security-csharp.md +568 -0
- package/Dev/i18n/pt/CSharp/rules/12-aspire-cloud-native.md +514 -0
- package/Dev/i18n/pt/CSharp/templates/command-handler.template.cs +100 -0
- package/Dev/i18n/pt/CSharp/templates/entity.template.cs +159 -0
- package/Dev/i18n/pt/Common/commands/add-technology.md +195 -0
- package/Dev/i18n/pt/Laravel/CLAUDE.md.template +104 -0
- package/Dev/i18n/pt/Laravel/agents/laravel-reviewer.md +200 -0
- package/Dev/i18n/pt/Laravel/checklists/new-feature.md +277 -0
- package/Dev/i18n/pt/Laravel/checklists/pre-commit.md +156 -0
- package/Dev/i18n/pt/Laravel/commands/check-architecture.md +306 -0
- package/Dev/i18n/pt/Laravel/commands/check-code-quality.md +302 -0
- package/Dev/i18n/pt/Laravel/commands/check-compliance.md +141 -0
- package/Dev/i18n/pt/Laravel/commands/check-security.md +372 -0
- package/Dev/i18n/pt/Laravel/commands/check-testing.md +397 -0
- package/Dev/i18n/pt/Laravel/commands/generate-controller.md +388 -0
- package/Dev/i18n/pt/Laravel/rules/00-project-context.md.template +140 -0
- package/Dev/i18n/pt/Laravel/rules/02-architecture-laravel.md +644 -0
- package/Dev/i18n/pt/Laravel/rules/03-coding-standards.md +573 -0
- package/Dev/i18n/pt/Laravel/rules/06-tooling.md +580 -0
- package/Dev/i18n/pt/Laravel/rules/07-testing-laravel.md +525 -0
- package/Dev/i18n/pt/Laravel/rules/08-quality-tools.md +591 -0
- package/Dev/i18n/pt/Laravel/rules/11-security-laravel.md +787 -0
- package/Dev/i18n/pt/Laravel/templates/action.template.php +79 -0
- package/Dev/i18n/pt/Laravel/templates/controller.template.php +99 -0
- package/Dev/i18n/pt/Laravel/templates/model.template.php +206 -0
- package/Dev/i18n/pt/Laravel/templates/test.template.php +263 -0
- package/Dev/i18n/pt/PHP/CLAUDE.md.template +460 -0
- package/Dev/i18n/pt/PHP/agents/php-reviewer.md +345 -0
- package/Dev/i18n/pt/PHP/checklists/new-feature.md +132 -0
- package/Dev/i18n/pt/PHP/checklists/pre-commit.md +231 -0
- package/Dev/i18n/pt/PHP/commands/check-architecture.md +557 -0
- package/Dev/i18n/pt/PHP/commands/check-code-quality.md +448 -0
- package/Dev/i18n/pt/PHP/commands/check-compliance.md +477 -0
- package/Dev/i18n/pt/PHP/commands/check-security.md +420 -0
- package/Dev/i18n/pt/PHP/commands/check-testing.md +486 -0
- package/Dev/i18n/pt/PHP/rules/00-project-context.md.template +266 -0
- package/Dev/i18n/pt/PHP/rules/02-architecture-php.md +696 -0
- package/Dev/i18n/pt/PHP/rules/03-coding-standards.md +641 -0
- package/Dev/i18n/pt/PHP/rules/06-tooling.md +543 -0
- package/Dev/i18n/pt/PHP/rules/07-testing-php.md +636 -0
- package/Dev/i18n/pt/PHP/rules/08-quality-tools.md +533 -0
- package/Dev/i18n/pt/PHP/rules/11-security-php.md +759 -0
- package/Dev/i18n/pt/PHP/templates/entity.md +435 -0
- package/Dev/i18n/pt/PHP/templates/use-case.md +512 -0
- package/Dev/i18n/pt/PHP/templates/value-object.md +555 -0
- package/Dev/i18n/pt/VueJS/CLAUDE.md.template +102 -0
- package/Dev/i18n/pt/VueJS/agents/vuejs-reviewer.md +206 -0
- package/Dev/i18n/pt/VueJS/checklists/new-feature.md +131 -0
- package/Dev/i18n/pt/VueJS/checklists/pre-commit.md +68 -0
- package/Dev/i18n/pt/VueJS/commands/check-architecture.md +137 -0
- package/Dev/i18n/pt/VueJS/commands/check-code-quality.md +152 -0
- package/Dev/i18n/pt/VueJS/commands/check-compliance.md +124 -0
- package/Dev/i18n/pt/VueJS/commands/check-security.md +186 -0
- package/Dev/i18n/pt/VueJS/commands/check-testing.md +185 -0
- package/Dev/i18n/pt/VueJS/commands/generate-component.md +233 -0
- package/Dev/i18n/pt/VueJS/rules/00-project-context.md.template +125 -0
- package/Dev/i18n/pt/VueJS/rules/02-architecture-vuejs.md +375 -0
- package/Dev/i18n/pt/VueJS/rules/03-coding-standards.md +502 -0
- package/Dev/i18n/pt/VueJS/rules/06-tooling.md +422 -0
- package/Dev/i18n/pt/VueJS/rules/07-testing-vuejs.md +606 -0
- package/Dev/i18n/pt/VueJS/rules/08-quality-tools.md +441 -0
- package/Dev/i18n/pt/VueJS/rules/11-security-vuejs.md +465 -0
- package/Dev/i18n/pt/VueJS/templates/component.template.vue +133 -0
- package/Dev/i18n/pt/VueJS/templates/composable.template.ts +162 -0
- package/Dev/i18n/pt/VueJS/templates/store.template.ts +282 -0
- package/Dev/i18n/pt/VueJS/templates/test.template.ts +233 -0
- package/Dev/scripts/install-angular-rules.sh +543 -0
- package/Dev/scripts/install-common-rules.sh +13 -1
- package/Dev/scripts/install-csharp-rules.sh +544 -0
- package/Dev/scripts/install-flutter-rules.sh +17 -4
- package/Dev/scripts/install-from-config.sh +61 -23
- package/Dev/scripts/install-laravel-rules.sh +552 -0
- package/Dev/scripts/install-php-rules.sh +537 -0
- package/Dev/scripts/install-python-rules.sh +17 -4
- package/Dev/scripts/install-react-rules.sh +17 -4
- package/Dev/scripts/install-reactnative-rules.sh +17 -4
- package/Dev/scripts/install-symfony-rules.sh +22 -4
- package/Dev/scripts/install-vuejs-rules.sh +588 -0
- package/README.md +68 -2
- package/Tools/Ralph/README.md +106 -10
- package/Tools/Ralph/lib/checkpoint.sh +15 -9
- package/Tools/Ralph/lib/circuit-breaker.sh +16 -7
- package/Tools/Ralph/lib/context-manager.sh +473 -0
- package/Tools/Ralph/lib/context-reconstruction.sh +329 -0
- package/Tools/Ralph/lib/dod-validator.sh +17 -4
- package/Tools/Ralph/lib/loop.sh +33 -10
- package/Tools/Ralph/lib/session.sh +88 -33
- package/Tools/Ralph/lib/sprint-progress.sh +832 -0
- package/Tools/Ralph/lib/utils.sh +362 -0
- package/Tools/Ralph/ralph.sh +172 -14
- package/Tools/Ralph/templates/ralph.yml.template +87 -0
- package/Tools/Ralph/templates/sprint-progress.md.template +72 -0
- package/Tools/i18n/ralph/de.sh +31 -0
- package/Tools/i18n/ralph/en.sh +31 -0
- package/Tools/i18n/ralph/es.sh +31 -0
- package/Tools/i18n/ralph/fr.sh +31 -0
- package/Tools/i18n/ralph/pt.sh +31 -0
- package/package.json +1 -1
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Architecture Validation
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Architecture Validation
|
|
6
|
+
|
|
7
|
+
Validate Clean Architecture implementation in PHP project.
|
|
8
|
+
|
|
9
|
+
## What This Command Does
|
|
10
|
+
|
|
11
|
+
1. **Layer Analysis**
|
|
12
|
+
- Verify Domain layer independence
|
|
13
|
+
- Check Application layer dependencies
|
|
14
|
+
- Validate Infrastructure implementations
|
|
15
|
+
- Analyze Presentation layer structure
|
|
16
|
+
|
|
17
|
+
2. **Dependency Verification**
|
|
18
|
+
- Check dependency direction (inward only)
|
|
19
|
+
- Identify circular dependencies
|
|
20
|
+
- Verify interface segregation
|
|
21
|
+
- Validate dependency injection
|
|
22
|
+
|
|
23
|
+
3. **Pattern Compliance**
|
|
24
|
+
- Repository pattern verification
|
|
25
|
+
- CQRS/Command pattern analysis
|
|
26
|
+
- Event-driven architecture check
|
|
27
|
+
- Value Object validation
|
|
28
|
+
|
|
29
|
+
## Architecture Layers
|
|
30
|
+
|
|
31
|
+
### Expected Structure
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
src/
|
|
35
|
+
├── Domain/ # Core business logic (no dependencies)
|
|
36
|
+
│ ├── Entity/ # Business entities
|
|
37
|
+
│ ├── ValueObject/ # Immutable value types
|
|
38
|
+
│ ├── Repository/ # Repository interfaces (contracts)
|
|
39
|
+
│ ├── Service/ # Domain services
|
|
40
|
+
│ ├── Event/ # Domain events
|
|
41
|
+
│ └── Exception/ # Domain exceptions
|
|
42
|
+
│
|
|
43
|
+
├── Application/ # Use cases & orchestration
|
|
44
|
+
│ ├── UseCase/ # Application use cases
|
|
45
|
+
│ ├── DTO/ # Data Transfer Objects
|
|
46
|
+
│ ├── Service/ # Application services
|
|
47
|
+
│ └── Exception/ # Application exceptions
|
|
48
|
+
│
|
|
49
|
+
├── Infrastructure/ # External concerns
|
|
50
|
+
│ ├── Persistence/ # Database implementations
|
|
51
|
+
│ ├── Http/ # HTTP client implementations
|
|
52
|
+
│ ├── Mailer/ # Email service implementations
|
|
53
|
+
│ └── Cache/ # Cache implementations
|
|
54
|
+
│
|
|
55
|
+
└── Presentation/ # UI & API layer
|
|
56
|
+
├── Controller/ # HTTP controllers
|
|
57
|
+
├── Console/ # CLI commands
|
|
58
|
+
└── Middleware/ # HTTP middleware
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Dependency Rules
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
┌─────────────────────────────────────────────────────┐
|
|
65
|
+
│ Presentation │
|
|
66
|
+
│ (Controllers, CLI Commands) │
|
|
67
|
+
└────────────────────────┬────────────────────────────┘
|
|
68
|
+
│ depends on
|
|
69
|
+
┌────────────────────────▼────────────────────────────┐
|
|
70
|
+
│ Infrastructure │
|
|
71
|
+
│ (Doctrine, Mailers, Caches) │
|
|
72
|
+
└────────────────────────┬────────────────────────────┘
|
|
73
|
+
│ depends on
|
|
74
|
+
┌────────────────────────▼────────────────────────────┐
|
|
75
|
+
│ Application │
|
|
76
|
+
│ (Use Cases, DTOs, Services) │
|
|
77
|
+
└────────────────────────┬────────────────────────────┘
|
|
78
|
+
│ depends on
|
|
79
|
+
┌────────────────────────▼────────────────────────────┐
|
|
80
|
+
│ Domain │
|
|
81
|
+
│ (Entities, Value Objects, Interfaces) │
|
|
82
|
+
└─────────────────────────────────────────────────────┘
|
|
83
|
+
|
|
84
|
+
CRITICAL: Dependencies MUST flow inward only.
|
|
85
|
+
Domain layer has NO external dependencies.
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Domain Layer Checks
|
|
89
|
+
|
|
90
|
+
### Entity Design
|
|
91
|
+
|
|
92
|
+
```php
|
|
93
|
+
<?php
|
|
94
|
+
// ✅ Good - Rich domain model
|
|
95
|
+
final class Order
|
|
96
|
+
{
|
|
97
|
+
private array $items = [];
|
|
98
|
+
|
|
99
|
+
private function __construct(
|
|
100
|
+
private readonly OrderId $id,
|
|
101
|
+
private readonly CustomerId $customerId,
|
|
102
|
+
private OrderStatus $status,
|
|
103
|
+
private Money $totalAmount,
|
|
104
|
+
) {}
|
|
105
|
+
|
|
106
|
+
public static function create(OrderId $id, CustomerId $customerId): self
|
|
107
|
+
{
|
|
108
|
+
return new self($id, $customerId, OrderStatus::DRAFT, Money::zero());
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
public function addItem(Product $product, int $quantity): void
|
|
112
|
+
{
|
|
113
|
+
// Business logic in entity
|
|
114
|
+
if ($this->status !== OrderStatus::DRAFT) {
|
|
115
|
+
throw new OrderNotEditableException();
|
|
116
|
+
}
|
|
117
|
+
$this->items[] = OrderItem::create($product, $quantity);
|
|
118
|
+
$this->recalculateTotal();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// ❌ Bad - Anemic domain model
|
|
123
|
+
final class Order
|
|
124
|
+
{
|
|
125
|
+
public OrderId $id;
|
|
126
|
+
public CustomerId $customerId;
|
|
127
|
+
public OrderStatus $status;
|
|
128
|
+
public Money $totalAmount;
|
|
129
|
+
// No behavior, just data container
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Value Objects
|
|
134
|
+
|
|
135
|
+
```php
|
|
136
|
+
<?php
|
|
137
|
+
// ✅ Good - Self-validating, immutable
|
|
138
|
+
readonly class Email
|
|
139
|
+
{
|
|
140
|
+
private function __construct(
|
|
141
|
+
public string $value,
|
|
142
|
+
) {}
|
|
143
|
+
|
|
144
|
+
public static function fromString(string $email): self
|
|
145
|
+
{
|
|
146
|
+
$normalized = strtolower(trim($email));
|
|
147
|
+
|
|
148
|
+
if (!filter_var($normalized, FILTER_VALIDATE_EMAIL)) {
|
|
149
|
+
throw new InvalidEmailException($email);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return new self($normalized);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
public function equals(self $other): bool
|
|
156
|
+
{
|
|
157
|
+
return $this->value === $other->value;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// ❌ Bad - Not self-validating
|
|
162
|
+
class Email
|
|
163
|
+
{
|
|
164
|
+
public string $value; // Can be set to invalid value
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Repository Interfaces
|
|
169
|
+
|
|
170
|
+
```php
|
|
171
|
+
<?php
|
|
172
|
+
// ✅ Good - Interface in Domain layer
|
|
173
|
+
namespace App\Domain\Repository;
|
|
174
|
+
|
|
175
|
+
interface OrderRepositoryInterface
|
|
176
|
+
{
|
|
177
|
+
public function nextIdentity(): OrderId;
|
|
178
|
+
public function find(OrderId $id): ?Order;
|
|
179
|
+
public function findByCustomer(CustomerId $customerId): array;
|
|
180
|
+
public function save(Order $order): void;
|
|
181
|
+
public function remove(Order $order): void;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// ❌ Bad - Interface depends on implementation details
|
|
185
|
+
namespace App\Domain\Repository;
|
|
186
|
+
|
|
187
|
+
use Doctrine\ORM\EntityManagerInterface; // BAD!
|
|
188
|
+
|
|
189
|
+
interface OrderRepositoryInterface
|
|
190
|
+
{
|
|
191
|
+
public function getEntityManager(): EntityManagerInterface; // BAD!
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Application Layer Checks
|
|
196
|
+
|
|
197
|
+
### Command/Handler Pattern
|
|
198
|
+
|
|
199
|
+
```php
|
|
200
|
+
<?php
|
|
201
|
+
// ✅ Good - Immutable command
|
|
202
|
+
final readonly class CreateOrderCommand
|
|
203
|
+
{
|
|
204
|
+
public function __construct(
|
|
205
|
+
public string $customerId,
|
|
206
|
+
public array $items,
|
|
207
|
+
) {}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// ✅ Good - Single responsibility handler
|
|
211
|
+
final readonly class CreateOrderHandler
|
|
212
|
+
{
|
|
213
|
+
public function __construct(
|
|
214
|
+
private OrderRepositoryInterface $orderRepository,
|
|
215
|
+
private CustomerRepositoryInterface $customerRepository,
|
|
216
|
+
private EventDispatcherInterface $eventDispatcher,
|
|
217
|
+
) {}
|
|
218
|
+
|
|
219
|
+
public function handle(CreateOrderCommand $command): OrderId
|
|
220
|
+
{
|
|
221
|
+
$customerId = CustomerId::fromString($command->customerId);
|
|
222
|
+
$customer = $this->customerRepository->find($customerId)
|
|
223
|
+
?? throw new CustomerNotFoundException($customerId);
|
|
224
|
+
|
|
225
|
+
$order = Order::create(
|
|
226
|
+
$this->orderRepository->nextIdentity(),
|
|
227
|
+
$customerId,
|
|
228
|
+
);
|
|
229
|
+
|
|
230
|
+
foreach ($command->items as $item) {
|
|
231
|
+
$order->addItem($item['productId'], $item['quantity']);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
$this->orderRepository->save($order);
|
|
235
|
+
|
|
236
|
+
foreach ($order->pullDomainEvents() as $event) {
|
|
237
|
+
$this->eventDispatcher->dispatch($event);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
return $order->getId();
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Query Pattern
|
|
246
|
+
|
|
247
|
+
```php
|
|
248
|
+
<?php
|
|
249
|
+
// ✅ Good - Query returning DTO
|
|
250
|
+
final readonly class GetOrderByIdQuery
|
|
251
|
+
{
|
|
252
|
+
public function __construct(
|
|
253
|
+
public string $orderId,
|
|
254
|
+
) {}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
final readonly class GetOrderByIdHandler
|
|
258
|
+
{
|
|
259
|
+
public function __construct(
|
|
260
|
+
private OrderQueryServiceInterface $queryService,
|
|
261
|
+
) {}
|
|
262
|
+
|
|
263
|
+
public function handle(GetOrderByIdQuery $query): ?OrderDto
|
|
264
|
+
{
|
|
265
|
+
return $this->queryService->findById(
|
|
266
|
+
OrderId::fromString($query->orderId)
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## Infrastructure Layer Checks
|
|
273
|
+
|
|
274
|
+
### Repository Implementation
|
|
275
|
+
|
|
276
|
+
```php
|
|
277
|
+
<?php
|
|
278
|
+
// ✅ Good - Implementation in Infrastructure
|
|
279
|
+
namespace App\Infrastructure\Persistence\Doctrine;
|
|
280
|
+
|
|
281
|
+
use App\Domain\Entity\Order;
|
|
282
|
+
use App\Domain\Repository\OrderRepositoryInterface;
|
|
283
|
+
use App\Domain\ValueObject\OrderId;
|
|
284
|
+
use Doctrine\ORM\EntityManagerInterface;
|
|
285
|
+
|
|
286
|
+
final readonly class DoctrineOrderRepository implements OrderRepositoryInterface
|
|
287
|
+
{
|
|
288
|
+
public function __construct(
|
|
289
|
+
private EntityManagerInterface $entityManager,
|
|
290
|
+
) {}
|
|
291
|
+
|
|
292
|
+
public function nextIdentity(): OrderId
|
|
293
|
+
{
|
|
294
|
+
return OrderId::generate();
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
public function find(OrderId $id): ?Order
|
|
298
|
+
{
|
|
299
|
+
return $this->entityManager->find(Order::class, $id->getValue());
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
public function save(Order $order): void
|
|
303
|
+
{
|
|
304
|
+
$this->entityManager->persist($order);
|
|
305
|
+
$this->entityManager->flush();
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### External Service Adapters
|
|
311
|
+
|
|
312
|
+
```php
|
|
313
|
+
<?php
|
|
314
|
+
// ✅ Good - Adapter pattern for external services
|
|
315
|
+
namespace App\Infrastructure\Payment;
|
|
316
|
+
|
|
317
|
+
use App\Domain\Payment\PaymentGatewayInterface;
|
|
318
|
+
use App\Domain\ValueObject\Money;
|
|
319
|
+
use Stripe\StripeClient;
|
|
320
|
+
|
|
321
|
+
final readonly class StripePaymentGateway implements PaymentGatewayInterface
|
|
322
|
+
{
|
|
323
|
+
public function __construct(
|
|
324
|
+
private StripeClient $stripe,
|
|
325
|
+
) {}
|
|
326
|
+
|
|
327
|
+
public function charge(Money $amount, string $token): PaymentResult
|
|
328
|
+
{
|
|
329
|
+
$charge = $this->stripe->charges->create([
|
|
330
|
+
'amount' => $amount->getAmountInCents(),
|
|
331
|
+
'currency' => $amount->getCurrency(),
|
|
332
|
+
'source' => $token,
|
|
333
|
+
]);
|
|
334
|
+
|
|
335
|
+
return PaymentResult::fromStripeCharge($charge);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
## Presentation Layer Checks
|
|
341
|
+
|
|
342
|
+
### Controller Structure
|
|
343
|
+
|
|
344
|
+
```php
|
|
345
|
+
<?php
|
|
346
|
+
// ✅ Good - Thin controller delegating to handlers
|
|
347
|
+
#[Route('/api/v1/orders')]
|
|
348
|
+
final readonly class OrderController
|
|
349
|
+
{
|
|
350
|
+
public function __construct(
|
|
351
|
+
private CreateOrderHandler $createHandler,
|
|
352
|
+
private GetOrderByIdHandler $getHandler,
|
|
353
|
+
) {}
|
|
354
|
+
|
|
355
|
+
#[Route('', methods: ['POST'])]
|
|
356
|
+
public function create(Request $request): JsonResponse
|
|
357
|
+
{
|
|
358
|
+
$data = json_decode($request->getContent(), true);
|
|
359
|
+
|
|
360
|
+
$command = new CreateOrderCommand(
|
|
361
|
+
customerId: $data['customer_id'],
|
|
362
|
+
items: $data['items'],
|
|
363
|
+
);
|
|
364
|
+
|
|
365
|
+
$orderId = $this->createHandler->handle($command);
|
|
366
|
+
|
|
367
|
+
return new JsonResponse(['id' => $orderId->getValue()], 201);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
#[Route('/{id}', methods: ['GET'])]
|
|
371
|
+
public function show(string $id): JsonResponse
|
|
372
|
+
{
|
|
373
|
+
$query = new GetOrderByIdQuery($id);
|
|
374
|
+
$order = $this->getHandler->handle($query);
|
|
375
|
+
|
|
376
|
+
if ($order === null) {
|
|
377
|
+
return new JsonResponse(['error' => 'Order not found'], 404);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
return new JsonResponse($order);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// ❌ Bad - Fat controller with business logic
|
|
385
|
+
final class OrderController
|
|
386
|
+
{
|
|
387
|
+
public function create(Request $request): JsonResponse
|
|
388
|
+
{
|
|
389
|
+
// BAD: Business logic in controller
|
|
390
|
+
$order = new Order();
|
|
391
|
+
$order->setCustomerId($request->get('customer_id'));
|
|
392
|
+
|
|
393
|
+
foreach ($request->get('items') as $item) {
|
|
394
|
+
// Calculation logic here - BAD!
|
|
395
|
+
$total += $item['price'] * $item['quantity'];
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
$this->entityManager->persist($order);
|
|
399
|
+
$this->entityManager->flush();
|
|
400
|
+
|
|
401
|
+
// BAD: Sending email from controller
|
|
402
|
+
$this->mailer->send($order->getCustomer()->getEmail());
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
## Architecture Tests
|
|
408
|
+
|
|
409
|
+
### Using PHPat
|
|
410
|
+
|
|
411
|
+
```php
|
|
412
|
+
<?php
|
|
413
|
+
namespace App\Tests\Architecture;
|
|
414
|
+
|
|
415
|
+
use PHPat\Selector\Selector;
|
|
416
|
+
use PHPat\Test\Builder\Rule;
|
|
417
|
+
use PHPat\Test\PHPat;
|
|
418
|
+
|
|
419
|
+
final class ArchitectureTest
|
|
420
|
+
{
|
|
421
|
+
public function test_domain_should_not_depend_on_infrastructure(): Rule
|
|
422
|
+
{
|
|
423
|
+
return PHPat::rule()
|
|
424
|
+
->classes(Selector::inNamespace('App\Domain'))
|
|
425
|
+
->shouldNotDependOn()
|
|
426
|
+
->classes(Selector::inNamespace('App\Infrastructure'))
|
|
427
|
+
->because('Domain must be independent of infrastructure');
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
public function test_domain_should_not_depend_on_application(): Rule
|
|
431
|
+
{
|
|
432
|
+
return PHPat::rule()
|
|
433
|
+
->classes(Selector::inNamespace('App\Domain'))
|
|
434
|
+
->shouldNotDependOn()
|
|
435
|
+
->classes(Selector::inNamespace('App\Application'))
|
|
436
|
+
->because('Domain must not know about application layer');
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
public function test_application_should_not_depend_on_infrastructure(): Rule
|
|
440
|
+
{
|
|
441
|
+
return PHPat::rule()
|
|
442
|
+
->classes(Selector::inNamespace('App\Application'))
|
|
443
|
+
->shouldNotDependOn()
|
|
444
|
+
->classes(Selector::inNamespace('App\Infrastructure'))
|
|
445
|
+
->because('Application should depend on abstractions');
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
public function test_entities_should_be_final(): Rule
|
|
449
|
+
{
|
|
450
|
+
return PHPat::rule()
|
|
451
|
+
->classes(Selector::inNamespace('App\Domain\Entity'))
|
|
452
|
+
->shouldBeFinal()
|
|
453
|
+
->because('Entities should not be extended');
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
public function test_value_objects_should_be_readonly(): Rule
|
|
457
|
+
{
|
|
458
|
+
return PHPat::rule()
|
|
459
|
+
->classes(Selector::inNamespace('App\Domain\ValueObject'))
|
|
460
|
+
->shouldBeReadonly()
|
|
461
|
+
->because('Value objects must be immutable');
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
### Using Deptrac
|
|
467
|
+
|
|
468
|
+
```yaml
|
|
469
|
+
# deptrac.yaml
|
|
470
|
+
deptrac:
|
|
471
|
+
paths:
|
|
472
|
+
- ./src
|
|
473
|
+
|
|
474
|
+
layers:
|
|
475
|
+
- name: Domain
|
|
476
|
+
collectors:
|
|
477
|
+
- type: className
|
|
478
|
+
regex: ^App\\Domain\\.*
|
|
479
|
+
|
|
480
|
+
- name: Application
|
|
481
|
+
collectors:
|
|
482
|
+
- type: className
|
|
483
|
+
regex: ^App\\Application\\.*
|
|
484
|
+
|
|
485
|
+
- name: Infrastructure
|
|
486
|
+
collectors:
|
|
487
|
+
- type: className
|
|
488
|
+
regex: ^App\\Infrastructure\\.*
|
|
489
|
+
|
|
490
|
+
- name: Presentation
|
|
491
|
+
collectors:
|
|
492
|
+
- type: className
|
|
493
|
+
regex: ^App\\Presentation\\.*
|
|
494
|
+
|
|
495
|
+
ruleset:
|
|
496
|
+
Domain: []
|
|
497
|
+
Application:
|
|
498
|
+
- Domain
|
|
499
|
+
Infrastructure:
|
|
500
|
+
- Domain
|
|
501
|
+
- Application
|
|
502
|
+
Presentation:
|
|
503
|
+
- Application
|
|
504
|
+
- Domain
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
## Architecture Checklist
|
|
508
|
+
|
|
509
|
+
### Domain Layer
|
|
510
|
+
- [ ] No external dependencies (no framework, no ORM)
|
|
511
|
+
- [ ] Entities have private setters and factory methods
|
|
512
|
+
- [ ] Value Objects are readonly and self-validating
|
|
513
|
+
- [ ] Repository interfaces defined in Domain
|
|
514
|
+
- [ ] Domain events for state changes
|
|
515
|
+
- [ ] Rich domain model (not anemic)
|
|
516
|
+
|
|
517
|
+
### Application Layer
|
|
518
|
+
- [ ] Commands are immutable (readonly)
|
|
519
|
+
- [ ] Handlers have single responsibility
|
|
520
|
+
- [ ] DTOs for data transfer
|
|
521
|
+
- [ ] No direct infrastructure dependencies
|
|
522
|
+
- [ ] Event dispatching for side effects
|
|
523
|
+
|
|
524
|
+
### Infrastructure Layer
|
|
525
|
+
- [ ] Implements Domain interfaces
|
|
526
|
+
- [ ] Adapter pattern for external services
|
|
527
|
+
- [ ] No business logic
|
|
528
|
+
- [ ] Proper error handling and mapping
|
|
529
|
+
|
|
530
|
+
### Presentation Layer
|
|
531
|
+
- [ ] Thin controllers
|
|
532
|
+
- [ ] Input validation at boundary
|
|
533
|
+
- [ ] Proper HTTP status codes
|
|
534
|
+
- [ ] No business logic
|
|
535
|
+
- [ ] Dependency injection only
|
|
536
|
+
|
|
537
|
+
## Common Violations
|
|
538
|
+
|
|
539
|
+
1. **Domain depends on Infrastructure**
|
|
540
|
+
- Using Doctrine annotations in entities
|
|
541
|
+
- Importing framework classes in Domain
|
|
542
|
+
|
|
543
|
+
2. **Anemic Domain Model**
|
|
544
|
+
- Entities with only getters/setters
|
|
545
|
+
- Business logic in services instead of entities
|
|
546
|
+
|
|
547
|
+
3. **Fat Controllers**
|
|
548
|
+
- Business logic in controllers
|
|
549
|
+
- Direct database access from controllers
|
|
550
|
+
|
|
551
|
+
4. **Missing Abstractions**
|
|
552
|
+
- No repository interfaces
|
|
553
|
+
- Concrete implementations in Domain
|
|
554
|
+
|
|
555
|
+
5. **Circular Dependencies**
|
|
556
|
+
- Application depending on Infrastructure
|
|
557
|
+
- Infrastructure depending on Presentation
|