Laravel Engineering
Cross-cutting implementation rules for Laravel changes. Use this skill with the specialist skill that owns the boundary: laravel-rest-api, laravel-eloquent, laravel-async, laravel-patterns or laravel-testing.
When to Apply
- Implementing, debugging, refactoring or reviewing a Laravel change
- A request mentions reuse, readability, root cause, errors, dead code, documentation or verification
- A local patch could affect callers, configuration, persistence, authorization or queued effects
Pick the Rule
| About to do |
Read |
| Start an unfamiliar change |
context-read-contract-before-change, context-trace-data-and-effects |
| Extract a helper, interface, constant or configuration value |
design-reuse-before-abstraction, design-simple-readable-code |
| Handle a failure or repair a bug |
correct-fix-causes-and-fail-loudly |
| Return data after a write |
correct-read-back-through-the-consumer-shape |
| Clean up or explain code |
hygiene-no-comments-or-dead-code |
| Decide what to test or document |
hygiene-verify-critical-paths-and-docs |
Before You Write Code
- Read the local contract: instructions, implementation, callers, configuration and relevant tests.
- Trace the value and effects through its actual boundary before choosing a fix.
- Reuse a present contract or write the smallest direct code that owns the decision.
- Preserve failure and verify the risk-bearing path after the change.
Security, authorization and data-consistency guarantees override a convenience or simplicity preference. Project-specific conventions win when they are documented and the reason is clear.
Rule Sections by Priority
| # |
Section |
Impact |
Prefix |
| 1 |
Context and Contracts |
CRITICAL |
context- |
| 2 |
Design and Reuse |
HIGH |
design- |
| 3 |
Correctness and Failure |
CRITICAL |
correct- |
| 4 |
Hygiene and Verification |
HIGH |
hygiene- |
Quick Reference
1. Context and Contracts (CRITICAL)
context-read-contract-before-change — Read instructions, callers, configuration and proof before editing
context-trace-data-and-effects — Trace data through validation, state and effects
2. Design and Reuse (HIGH)
design-reuse-before-abstraction — Reuse a present contract before adding a seam
design-simple-readable-code — Keep one-off policy visible at its decision
3. Correctness and Failure (CRITICAL)
correct-fix-causes-and-fail-loudly — Fix the cause and never write after a failed operation
correct-read-back-through-the-consumer-shape — Return the explicit shape the consumer reads
4. Hygiene and Verification (HIGH)
hygiene-no-comments-or-dead-code — Avoid redundant implementation comments; preserve type and context annotations
hygiene-verify-critical-paths-and-docs — Prove the risk-bearing path and synchronize docs
How to Use
Load this index, then one rule that matches the decision. Read the specialist skill only for the boundary involved; do not load generated AGENTS.md when rule files are reachable.
Related Skills
laravel-patterns — placement, reuse boundaries and configuration seams
laravel-eloquent — persistence, transactions and response query shape
laravel-rest-api — authorization, request and response boundaries
laravel-async — queued effects and failure handling
laravel-testing — proportionate proof for the affected layer
1---2name: laravel-engineering3description: Laravel implementation discipline for tracing context, reusing present contracts, keeping code simple, preserving failures, and verifying the changed critical path. Use when implementing, refactoring, debugging or reviewing Laravel code where callers, configuration, data flow or proof of correctness may be unclear.4license: MIT5---67# Laravel Engineering89Cross-cutting implementation rules for Laravel changes. Use this skill with the specialist skill that owns the boundary: `laravel-rest-api`, `laravel-eloquent`, `laravel-async`, `laravel-patterns` or `laravel-testing`.1011## When to Apply1213- Implementing, debugging, refactoring or reviewing a Laravel change14- A request mentions reuse, readability, root cause, errors, dead code, documentation or verification15- A local patch could affect callers, configuration, persistence, authorization or queued effects1617## Pick the Rule1819| About to do | Read |20|-------------|------|21| Start an unfamiliar change | `context-read-contract-before-change`, `context-trace-data-and-effects` |22| Extract a helper, interface, constant or configuration value | `design-reuse-before-abstraction`, `design-simple-readable-code` |23| Handle a failure or repair a bug | `correct-fix-causes-and-fail-loudly` |24| Return data after a write | `correct-read-back-through-the-consumer-shape` |25| Clean up or explain code | `hygiene-no-comments-or-dead-code` |26| Decide what to test or document | `hygiene-verify-critical-paths-and-docs` |2728## Before You Write Code29301. Read the local contract: instructions, implementation, callers, configuration and relevant tests.312. Trace the value and effects through its actual boundary before choosing a fix.323. Reuse a present contract or write the smallest direct code that owns the decision.334. Preserve failure and verify the risk-bearing path after the change.3435Security, authorization and data-consistency guarantees override a convenience or simplicity preference. Project-specific conventions win when they are documented and the reason is clear.3637## Rule Sections by Priority3839| # | Section | Impact | Prefix |40|---|---------|--------|--------|41| 1 | Context and Contracts | CRITICAL | `context-` |42| 2 | Design and Reuse | HIGH | `design-` |43| 3 | Correctness and Failure | CRITICAL | `correct-` |44| 4 | Hygiene and Verification | HIGH | `hygiene-` |4546## Quick Reference4748### 1. Context and Contracts (CRITICAL)4950- `context-read-contract-before-change` — Read instructions, callers, configuration and proof before editing51- `context-trace-data-and-effects` — Trace data through validation, state and effects5253### 2. Design and Reuse (HIGH)5455- `design-reuse-before-abstraction` — Reuse a present contract before adding a seam56- `design-simple-readable-code` — Keep one-off policy visible at its decision5758### 3. Correctness and Failure (CRITICAL)5960- `correct-fix-causes-and-fail-loudly` — Fix the cause and never write after a failed operation61- `correct-read-back-through-the-consumer-shape` — Return the explicit shape the consumer reads6263### 4. Hygiene and Verification (HIGH)6465- `hygiene-no-comments-or-dead-code` — Avoid redundant implementation comments; preserve type and context annotations66- `hygiene-verify-critical-paths-and-docs` — Prove the risk-bearing path and synchronize docs6768## How to Use6970Load this index, then one rule that matches the decision. Read the specialist skill only for the boundary involved; do not load generated `AGENTS.md` when rule files are reachable.7172## Related Skills7374- `laravel-patterns` — placement, reuse boundaries and configuration seams75- `laravel-eloquent` — persistence, transactions and response query shape76- `laravel-rest-api` — authorization, request and response boundaries77- `laravel-async` — queued effects and failure handling78- `laravel-testing` — proportionate proof for the affected layer