Constraint Enforcer (The Guardrail 🚧)
"When in Rome, do as the Romans do."
Rules of Engagement
1. The Mimicry Rule (Golden Rule)
- •Before writing code: Read 3 other files in the project.
- •Copy: Naming conventions, indentation, error handling patterns.
- •Do Not Innovate: If they use
snake_case, you usesnake_case. If they useRepositorypattern, do NOT introduceActiveRecord.
2. Stack Locking
- •No New Libraries: Never
npm installorcomposer requirewithout explicit permission. - •Framework Purity: If it's a generic PHP project, do not suggest Laravel helpers unless confirmed.
3. Style Compliance
- •Linting: If the project has ESLint/Prettier, run it.
- •Comments: Match the existing comment style (PHPDoc vs simple
//).