laravel-agents maintained by rslanzi
rslanzi/laravel-agents
Guidelines for AI coding agents (Claude Code, Codex, Cursor, ...) and quality tooling for Laravel applications organized in DDD-style modules.
- Guidelines loaded automatically by Laravel Boost into
AGENTS.mdandCLAUDE.md: principles (KISS, YAGNI, SOLID, clean code), modular architecture, TDD, Laravel conventions, ADRs, security, performance, errors and logging, quality tooling, Git, safe migrations, APIs, localization, module READMEs. - Skills that Boost loads only when the task needs them, to keep the always-on context small: Laravel conventions, behavioral contracts, domain building blocks, safe migrations, API conventions, ADRs, module READMEs, performance, localization, PHPStan fixes.
php artisan agents:install: installs Pest, Larastan, Rector and rector-laravel (Pint ships with Laravel) and publishes their configs without overwriting existing files:pint.json,rector.php,phpstan.neon,tests/Pest.php,tests/Unit/ArchitectureTest.php,tests/Unit/TranslationsTest.php, GitHub Actions CI, PR template,.claude/settings.jsonwithout agent attribution, ADR index, architecture map, changelog, project modules file, composer scripts.php artisan agents:markdown: writes a completeAGENTS.md(guidelines and skills) for projects that do not use Boost.
Quick start
composer require --dev rslanzi/laravel-agents
php artisan agents:install
agents:install does the whole setup: it installs Laravel Boost and the dev tools, runs boost:install (select rslanzi/laravel-agents among the packages), publishes the configs, runs boost:update and finally composer fix.
To update: composer update rslanzi/laravel-agents && php artisan boost:update, after reading UPGRADE.md.
Documentation
- Installation:
agents:installoptions and published files, updating, re-publishing configs. - Customization: project rules, architecture map, attribution, where the rules come from.
- Releasing and contributing: development, commit messages, automatic releases.
- CHANGELOG.md and UPGRADE.md.
Composer scripts
| Script | What it does |
|---|---|
composer fix |
Rector, Pint, PHPStan, tests: run it before finishing a task |
composer check |
the same checks read-only, with minimum coverage and composer audit: what the CI quality job runs |
composer test:all |
the whole suite in parallel |
composer test:coverage |
Pest with 80% minimum coverage (needs PCOV or Xdebug) |
composer test:mutate |
mutation testing with a 70% minimum score (needs PCOV or Xdebug); the CI mutation job runs it on pull requests |
composer test:arch |
the architecture test only |
PHP support
The package requires PHP 8.5 and Laravel 13, and is tested on them on every change (lowest and latest dependencies). Projects on PHP 8.3 or 8.4, or on Laravel 12, stay on 0.1 (^0.1.0). PHP 8.6 runs on its nightly build in a non-blocking job, so incompatibilities show up before its release.
License
MIT, see LICENSE.