Reference: ./vendor/hypecodeteam/backend-ai-rules/rules/codingprinciples.md
php artisan boost:add-skill hypecodeteam/backend-ai-rules
Save this content to: AGENTS.md
# AGENTS.md - API Config Project Guidelines
## ๐ Security Rules
- **NEVER** read or edit `.env.local` files
- **NEVER** expose or log secrets/API keys
- **NEVER** execute database migrations (`doctrine:migrations:migrate`)
- **ALWAYS** follow security best practices
## ๐ Development Guidelines
### ๐๏ธ Coding Principles
**Reference:** `./vendor/hypecodeteam/backend-ai-rules/rules/coding_principles.md`
### ๐งช Unit Testing Standards
**Reference:** `./vendor/hypecodeteam/backend-ai-rules/rules/unit_testing.md`
### ๐ Git Commit Convention
**Reference:** `./vendor/hypecodeteam/backend-ai-rules/rules/git_workflow_guideline.md`
<!-- If you need to use domain language, uncomment these 2 lines below, then create and fill the file you need with your domain rules-->
<!-- ### ๐ฃ๏ธ Domain Language -->
<!-- **Reference:** `./.rules/ubiquitous_language.md` -->
## ๐ค AI/LLM Integration
### โ ๏ธ MANDATORY RULES - SYSTEMATIC VERIFICATION
**CRITICAL: Before EVERY code proposal, the AI MUST imperatively:**
1. **Read and apply** `./vendor/hypecodeteam/backend-ai-rules/rules/repository_service_patterns.md` (controller/service logic, constants, OrThrow patterns)
2. **Read and apply** `./vendor/hypecodeteam/backend-ai-rules/rules/coding_principles.md` (PHP 8 patterns, Yoda conditions, defensive programming)
3. **Read and apply** `./vendor/hypecodeteam/backend-ai-rules/rules/unit_testing.md` (Prophecy, AAA pattern, isolated tests)
4. **Read and apply** `./vendor/hypecodeteam/backend-ai-rules/rules/git_workflow_guideline.md` (commit message format)
<!-- Uncomment the line below if you need to use domain language -->
<!-- 5. **Read and apply** `./.rules/ubiquitous_language.md` (domain language terms and relations) -->
- **Explicitly verify compliance** before responding
- **Display in a bullet point the rules that have been read and loaded in the first answer**
**WITHOUT EXCEPTION:**
- โ No business logic in controllers
- โ No hardcoded values (use UPPER_SNAKE_CASE constants)
- โ No generic methods when a dedicated method is necessary
- โ
Thin controllers (orchestration only)
- โ
Private constants in services for static values
- โ
Dedicated methods in services for special routes
**If these rules are not respected, the response is invalid and must be corrected.**
### Quick-Reference Tables for Agents
| Guideline | Key Rule | Example |
|-----------|----------|---------|
| **Class Declaration** | Final when not extended | `final class Service` |
| **Constructor** | Property promotion | `public function __construct(public readonly string $name)` |
| **Conditions** | Yoda + explicit | `if (false === $obj instanceof Type)` |
| **Testing** | Prophecy + AAA | Arrange โ Act โ Assert |
| **Commits** | type(scope): subject | `fix(service): correct calculation` |
| **Domain Terms** | Use exact terms | Affiliate (not Publisher), Campaign (not Link) |
| When to Use | Pattern | Reference |
|-------------|---------|-----------|
| New feature | feat(scope): add... | `./vendor/hypecodeteam/backend-ai-rules/rules/git_commit_guideline.md` |
| Bug fix | fix(scope): correct... | `./vendor/hypecodeteam/backend-ai-rules/rules/git_commit_guideline.md` |
| Business logic | Service method | `./vendor/hypecodeteam/backend-ai-rules/rules/repository_service_patterns.md` |
| Data access | Repository OrThrow | `./vendor/hypecodeteam/backend-ai-rules/rules/repository_service_patterns.md` |
| Controller input | Deserialize RequestDto + validate | `./vendor/hypecodeteam/backend-ai-rules/rules/repository_service_patterns.md` |
| Entity validation | Rich model methods | `./vendor/hypecodeteam/backend-ai-rules/rules/coding_principles.md` |
| Test setup | ProphecyTrait + setUp() | `./vendor/hypecodeteam/backend-ai-rules/rules/unit_testing.md` |
### AI Usage Guidelines
- **Always reference specific rules** when asking for code changes
- **Request examples** from existing codebase patterns
- **Specify testing requirements** using unit testing standards
- **Use consistent terminology** from domain language section
- **Provide context** from ubiquitous language for domain-specific features
.env.local filesdoctrine:migrations:migrate)Reference: ./vendor/hypecodeteam/backend-ai-rules/rules/coding_principles.md
Reference: ./vendor/hypecodeteam/backend-ai-rules/rules/unit_testing.md
Reference: ./vendor/hypecodeteam/backend-ai-rules/rules/git_workflow_guideline.md
CRITICAL: Before EVERY code proposal, the AI MUST imperatively:
./vendor/hypecodeteam/backend-ai-rules/rules/repository_service_patterns.md (controller/service logic, constants, OrThrow patterns)./vendor/hypecodeteam/backend-ai-rules/rules/coding_principles.md (PHP 8 patterns, Yoda conditions, defensive programming)./vendor/hypecodeteam/backend-ai-rules/rules/unit_testing.md (Prophecy, AAA pattern, isolated tests)./vendor/hypecodeteam/backend-ai-rules/rules/git_workflow_guideline.md (commit message format)WITHOUT EXCEPTION:
If these rules are not respected, the response is invalid and must be corrected.
| Guideline | Key Rule | Example |
|---|---|---|
| Class Declaration | Final when not extended | final class Service |
| Constructor | Property promotion | public function __construct(public readonly string $name) |
| Conditions | Yoda + explicit | if (false === $obj instanceof Type) |
| Testing | Prophecy + AAA | Arrange โ Act โ Assert |
| Commits | type(scope): subject | fix(service): correct calculation |
| Domain Terms | Use exact terms | Affiliate (not Publisher), Campaign (not Link) |
| When to Use | Pattern | Reference |
|---|---|---|
| New feature | feat(scope): add... | ./vendor/hypecodeteam/backend-ai-rules/rules/git_commit_guideline.md |
| Bug fix | fix(scope): correct... | ./vendor/hypecodeteam/backend-ai-rules/rules/git_commit_guideline.md |
| Business logic | Service method | ./vendor/hypecodeteam/backend-ai-rules/rules/repository_service_patterns.md |
| Data access | Repository OrThrow | ./vendor/hypecodeteam/backend-ai-rules/rules/repository_service_patterns.md |
| Controller input | Deserialize RequestDto + validate | ./vendor/hypecodeteam/backend-ai-rules/rules/repository_service_patterns.md |
| Entity validation | Rich model methods | ./vendor/hypecodeteam/backend-ai-rules/rules/coding_principles.md |
| Test setup | ProphecyTrait + setUp() | ./vendor/hypecodeteam/backend-ai-rules/rules/unit_testing.md |
How can I help you explore Laravel packages today?