Download the PHP package alex-kassel/laravel-package-audit without Composer
On this page you can find all versions of the php package alex-kassel/laravel-package-audit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alex-kassel/laravel-package-audit
More information about alex-kassel/laravel-package-audit
Files in alex-kassel/laravel-package-audit
Package laravel-package-audit
Short Description Autonomous AI Agent Skill and deterministic pre-release certification engine for Laravel and PHP packages.
License MIT
Homepage https://github.com/alex-kassel/laravel-package-audit
Informations about the package laravel-package-audit
๐ก๏ธ Laravel Package Audit & Certification
Autonomous AI Agent Skill + Deterministic CLI Quality Engine for Laravel and PHP Packages
Why This Exists โข Quickstart โข Requirements โข Installation โข Usage โข 7 Contracts โข 8 Gates โข Certification โข Testing โข License
๐ก Why This Exists
Testing Laravel packages is notoriously hard:
- Unit tests often pass locally only because they leak dependencies from the parent workspace.
- Traditional markdown release badges ("๐ข READY") are easily faked or hallucinated by AI agents.
- Most linters check syntax, but cannot judge architectural encapsulation, Octane state leaks, "Laravel First" idiomatic design, or breaking changes.
alex-kassel/laravel-package-audit solves this by pairing two complementary forces:
- The Cognitive Layer (Autonomous AI Agent Skill): Guided by 7 specialized domain contracts, the AI agent performs architectural review, SemVer boundary evaluation, and human-in-the-loop decision gating.
- The Mechanical Layer (Deterministic PHP CLI): Executes 8 rigid quality gates in seconds, tests the package in an isolated sandbox, and issues a tamper-proof cryptographic receipt (
AUDIT.json) anchored to Git'stree_hash.
โก Quickstart
In Agent Chat (Antigravity, Cursor, Claude Code)
Simply tell your agent:
The agent will autonomously execute the 2-Phase Lifecycle:
- Collect mechanical baseline results via non-mutating CLI.
- Evaluate the package against the 7 specialized audit contracts.
- Present a structured 3-Section Report (Baseline, Planned Fixes, and Architectural Decisions with explicit
(Recommended)rationales). - ๐ STOP (Human Gate): Wait for your approval before modifying any code.
- Upon approval, apply atomic semantic fixes and issue the cryptographic
AUDIT.jsoncertificate.
In Terminal (Artisan CLI)
๐ Requirements
- PHP: 8.2 or higher (fully compatible with PHP 8.3 and PHP 8.4)
- Laravel Framework: 11.0, 12.0, or 13.0
- Git: Installed and available in PATH
- Composer: 2.2 or higher
๐ฆ Installation
Require the package as a development dependency in your Laravel host application:
Zero-Touch Auto-Materialization: Upon
composer require, Laravel runspackage:discover, and the package automatically materializes the agent skill into your.agents/skills/package-audit/directory. AI agents (Antigravity, Cursor, Claude Code) immediately recognize it in your next session without any manual setup.
Optionally, publish configuration or CI workflow:
๐ป Usage
Auditing & Certifying a Package
To audit a local package and issue an AUDIT.json certificate:
Options:
--target-version=1.2.0: Explicitly specify the release version for the certificate.--no-commit: GenerateAUDIT.jsonwithout creating git commits.--no-tag: CommitAUDIT.jsonto git, but do not create git tags.--json: Output machine-readable JSON summary for CI/CD pipelines.
Verifying a Certified Package
To verify that a package's AUDIT.json certificate is authentic and source code has not drifted:
Verdicts:
VERIFIED: Exact match. The Git tree hash and normalized tool outputs match the certificate.FORGED: The certificate was manually modified or check outputs differ.OUTDATED: Commits have modified source files since the audit was certified.MISSING: NoAUDIT.jsoncertificate found in package root.
๐งฉ How It Works: The Hybrid Model
๐ The 7 Audit Contracts
The AI agent conducts deep inspections based on 7 specialized domain contracts stored in references/contracts/:
| # | Contract | Core Scope |
|---|---|---|
| 01 | 01_architecture_api.md |
"Laravel First" Standard: Prefer native framework abstractions (Process, Http, Sleep, Cache). Pure ServiceProvider with zero third-party wrapper bloat. Public API encapsulation, @internal boundaries, and BC break protection. |
| 02 | 02_code_quality.md |
Strict typing (declare(strict_types=1);), return/param types, PHPStan Level 8+/max, baseline audit (no sweeping bugs under baselines), Pint styling, cross-platform path safety. |
| 03 | 03_database.md |
Schema reversibility (up/down), table prefix isolation (preventing collisions with host apps), foreign keys, N+1 query prevention, multi-DB engine safety (SQLite/MySQL/PostgreSQL). |
| 04 | 04_security_isolation.md |
Host application isolation: guarded container bindings (bindIf, singletonIf), no runtime config pollution, Octane state safety (no request-bound singletons), injection prevention. |
| 05 | 05_composer_supply_chain.md |
Strict manifest validation (composer validate --strict), strict segregation (require vs require-dev), no committed composer.lock for libraries, .gitattributes export-ignore. |
| 06 | 06_testing_compatibility.md |
Test suite quality (PHPUnit 11+ / Pest 3+), Orchestral Testbench isolation, happy & error paths, custom exceptions, mock boundaries, multi-DB test execution. |
| 07 | 07_consumer_release.md |
Fresh sandbox consumer smoke test, clean installation without parent dependency leakage, auto-discovery verification, asset publishing, README & CHANGELOG compliance, AUDIT.json single source of truth. |
๐ฆ The 8 Automated Quality Gates
The mechanical CLI engine executes 8 automated gates:
๐ Cryptographic Certification
Traditional badges can be edited by anyone in Markdown. laravel-package-audit produces mathematically verifiable receipts:
The resulting AUDIT.json is committed to the package. Anyone can verify it anytime:
๐ ๏ธ Skill Management CLI
Although the skill auto-installs on composer require, you can manage it explicitly:
โ๏ธ Configuration
Publish the config file to config/package-audit.php:
Key options:
๐งช Testing
Run the test suite via PHPUnit:
Format code style using Laravel Pint:
๐ License
The MIT License (MIT). Please see LICENSE for more information.
All versions of laravel-package-audit with dependencies
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/console Version ^11.0|^12.0|^13.0