Audit, optimize, and prepare Laravel codebases for seamless AI agent integration
jaygaha/laravel-ai-prep-kit is a Laravel package for audit, optimize, and prepare laravel codebases for seamless ai agent integration.
It currently has 4 GitHub stars and 1 downloads on Packagist (latest version v1.0.0).
Install it with composer require jaygaha/laravel-ai-prep-kit.
Discover more Laravel packages by jaygaha
or browse all Laravel packages to compare alternatives.
Last updated
Audit, optimize, and prepare your Laravel codebase for AI coding agents (Claude Code, Cursor, Copilot, Codex).
composer require jaygaha/laravel-ai-prep-kit --dev
Publish the config (optional):
php artisan vendor:publish --tag=ai-prep-kit-config
Optional dependencies:
composer require --dev rector/rector # PHPDoc and strong type refactoring
composer require --dev spatie/laravel-data # DTO auto-generation
Scan your codebase and get a 0-100 AI-readiness score:
php artisan ai:prep --audit
php artisan ai:prep --audit --format=json
Scores are based on type coverage, Pint adherence, Larastan compliance, test coverage, and pattern enforcement. Reports are saved to storage/ai-prep-kit/.
Auto-fix issues to improve readiness:
php artisan ai:prep --fix
php artisan ai:prep --fix --dry-run # Preview without modifying
php artisan ai:prep --fix --force # Skip git safety checks
The fix pipeline runs: Pint formatting, Larastan analysis, Rector types, test stub generation, controller refactoring (FormRequests, DTOs, Actions/Services), and pattern enforcement scaffolding.
Create AI agent guidelines from your project's patterns:
php artisan ai:prep --generate-guidelines
Detects queue, mail, auth, architecture, and testing patterns automatically.
Predict what an AI agent would do with your codebase:
php artisan ai:prep --simulate
php artisan ai:prep --simulate --prompt="Add CRUD to OrderController"
Copy 9 AI-optimized stub templates to your project:
php artisan ai:prep --publish-stubs
All behavior is controlled via config/ai-prep-kit.php:
whereActive, whereBelongsToAuth, etc.)Register built-in or custom plugins in config:
'plugins' => [
\JayGaha\AiPrepKit\Plugins\Builtin\FilamentPlugin::class,
\JayGaha\AiPrepKit\Plugins\Builtin\InertiaPlugin::class,
],
Plugins can contribute analyzers, fixers, rules, detectors, and scenarios. Extend AbstractPlugin and override only what you need.
Publish the reusable GitHub Actions workflow:
php artisan vendor:publish --tag=ai-prep-kit-workflow
jobs:
ai-readiness:
uses: ./.github/workflows/ai-prep-check.yml
with:
min-score: 60
composer test # Run tests
composer lint # Check code style
composer fix # Fix code style
composer analyse # Run static analysis
See CONTRIBUTING.md.
See SECURITY.md. Do not open public issues for vulnerabilities.
See CHANGELOG.md.
MIT -- see LICENSE.