PHPackages                             jaygaha/laravel-ai-prep-kit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. jaygaha/laravel-ai-prep-kit

ActiveLibrary[Testing &amp; Quality](/categories/testing)

jaygaha/laravel-ai-prep-kit
===========================

Audit, optimize, and prepare Laravel codebases for seamless AI agent integration

v1.0.0(1mo ago)00MITPHPPHP ^8.3CI passing

Since Mar 27Pushed 1mo agoCompare

[ Source](https://github.com/jaygaha/laravel-ai-prep-kit)[ Packagist](https://packagist.org/packages/jaygaha/laravel-ai-prep-kit)[ Docs](https://github.com/jaygaha/laravel-ai-prep-kit)[ RSS](/packages/jaygaha-laravel-ai-prep-kit/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

Laravel AI Prep Kit
===================

[](#laravel-ai-prep-kit)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f492b24d87ff8a82eb659a68c2778f16ffaa67f2ead984966db34bfa6fa1b346/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6179676168612f6c61726176656c2d61692d707265702d6b69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jaygaha/laravel-ai-prep-kit)[![Tests](https://camo.githubusercontent.com/cc5920fc7e6d6bd09f9333ff95ed52153c54dd1845e46e33d7f6d968ab0e3b33/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6179676168612f6c61726176656c2d61692d707265702d6b69742f63692e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/jaygaha/laravel-ai-prep-kit/actions/workflows/ci.yml)[![PHP Version](https://camo.githubusercontent.com/27cf6b75ff510f2594ee19c5b37fa9ad836d5f57d3ae64d04dc1ded4aa958973/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a6179676168612f6c61726176656c2d61692d707265702d6b69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jaygaha/laravel-ai-prep-kit)[![License](https://camo.githubusercontent.com/de79cab1746da6c49c1bb036b38bb545d05b42242691cb59e55d43ee3875fb5a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6a6179676168612f6c61726176656c2d61692d707265702d6b69742e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Audit, optimize, and prepare your Laravel codebase for AI coding agents (Claude Code, Cursor, Copilot, Codex).

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 11 or 12

Installation
------------

[](#installation)

```
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
```

Usage
-----

[](#usage)

### Audit

[](#audit)

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/`.

### Fix

[](#fix)

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.

### Generate AGENTS.md

[](#generate-agentsmd)

Create AI agent guidelines from your project's patterns:

```
php artisan ai:prep --generate-guidelines
```

Detects queue, mail, auth, architecture, and testing patterns automatically.

### Simulate

[](#simulate)

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"
```

### Publish Stubs

[](#publish-stubs)

Copy 9 AI-optimized stub templates to your project:

```
php artisan ai:prep --publish-stubs
```

Configuration
-------------

[](#configuration)

All behavior is controlled via `config/ai-prep-kit.php`:

- **paths/exclude** -- Directories to scan and skip
- **weights** -- Scoring weights per analyzer (normalized)
- **thresholds** -- Pass/warn/fail score boundaries
- **fixers** -- Enable/disable individual fixers
- **rules** -- Enable/disable pattern enforcement rules
- **refactors** -- Line count/complexity thresholds, generator toggles
- **guidelines.detectors** -- Enable/disable pattern detectors
- **simulation.scenarios** -- Enable/disable simulation scenarios
- **plugins** -- Register plugin classes
- **macros** -- Enable Eloquent Builder macros (`whereActive`, `whereBelongsToAuth`, etc.)
- **hooks** -- Register AI tool hooks (Prism, NeuronAI)

Plugins
-------

[](#plugins)

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.

CI Integration
--------------

[](#ci-integration)

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
```

Development
-----------

[](#development)

```
composer test       # Run tests
composer lint       # Check code style
composer fix        # Fix code style
composer analyse    # Run static analysis
```

Contributing
------------

[](#contributing)

See [CONTRIBUTING.md](CONTRIBUTING.md).

Security
--------

[](#security)

See [SECURITY.md](SECURITY.md). Do not open public issues for vulnerabilities.

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md).

License
-------

[](#license)

MIT -- see [LICENSE](LICENSE).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

47d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/012b4434db4a934c14fa164ee4288bf708d5b5d3a02f1084f66cd033972e0b61?d=identicon)[jaygaha](/maintainers/jaygaha)

---

Top Contributors

[![jaygaha](https://avatars.githubusercontent.com/u/7334374?v=4)](https://github.com/jaygaha "jaygaha (2 commits)")

---

Tags

ai-agentsai-readinesscode-qualitydeveloper-toolslaravellaravel-packagerefactoringsimulationstatic-analysislaravelstatic analysisaicode qualityAuditprep-kit

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jaygaha-laravel-ai-prep-kit/health.svg)

```
[![Health](https://phpackages.com/badges/jaygaha-laravel-ai-prep-kit/health.svg)](https://phpackages.com/packages/jaygaha-laravel-ai-prep-kit)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[laraveldaily/filacheck

Static analysis for Filament projects - detect deprecated patterns and code issues

9016.5k](/packages/laraveldaily-filacheck)[laravel/surveyor

Static analysis tool for Laravel applications.

7639.0k7](/packages/laravel-surveyor)[calebdw/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

1484.6k3](/packages/calebdw-larastan)[exakat/exakat

The smart static analyzer for PHP

457.7k](/packages/exakat-exakat)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
