laravel/pao
PAO is agent-optimized output for PHP testing tools.
What it solves
Laravel PAO reduces the token cost and noise for AI agents (like Claude Code, Cursor, and Devin) when they run PHP tools. It replaces verbose, human-readable terminal output—which often contains ANSI colors, box-drawing characters, and repetitive formatting—with compact, structured JSON or stripped-down text.
How it works
PAO detects if a tool is being run by an AI agent via environment variables. When an agent is detected, it hooks into common PHP tools (PHPUnit, Pest, Paratest, PHPStan, and Rector) and Laravel Artisan commands to intercept and transform the output. If no agent is detected, the output remains unchanged for human developers.
Who it’s for
PHP developers using AI agents to automate coding, testing, and static analysis in projects using Laravel, Symfony, Laminas, or vanilla PHP.
Highlights
- Token Efficiency: Reduces AI token usage by up to 99.8% for test suites and 75% for Artisan commands.
- Zero Configuration: Works automatically via Composer's autoloader and Laravel service provider auto-discovery.
- Agent-Aware: Only activates when AI agents are detected, ensuring no impact on human workflows.
- Broad Tool Support: Provides structured JSON for PHPUnit, Pest, PHPStan, and Rector, and cleans Artisan command output.
Related
- Project
- Project
- Project
- Project
- Project