name: laravel:policies-gates allowed-tools: - Read - Write - Edit - Bash - Glob - Grep description: Strengthen Laravel validation/auth/authorization boundaries with explicit failure-safe implementation patterns. Use for policies gates tasks.
Policies Gates (Laravel)
Use when
- Hardening authentication/authorization/validation paths.
- Standardizing access control and error semantics.
Default workflow
- Map actors, protected resources, and allowed actions.
- Implement validation + authorization at explicit boundaries.
- Apply throttling and consistent failure responses.
- Test authorized/unauthorized/invalid scenarios.
Guardrails
- Do not leak sensitive existence or permission details.
- Never rely on UI-only access checks.
- Keep auth and validation logic centralized.
Progressive disclosure
- Start with this file for execution posture and constraints.
- Load references only for deep implementation detail or edge cases.
Output contract
- Security boundary changes and rationale.
- Endpoints/middleware/policies updated.
- Negative-path test evidence.
References
reference.mddocs/complexity-tiers.md