nunomaduro/pao
Laravel PAO detects when AI agents like Claude Code, Cursor, or Devin run PHPUnit, Pest, PHPStan, Rector, or Artisan, and swaps verbose output for compact structured JSON. Zero config, no effect on human terminal runs.
Build vs. buy for the agentic engineering stack. PAO answers a narrow question we would otherwise be tempted to solve internally: "how do we stop AI coding agents from burning context on test-runner noise?" A one-line dev dependency replaces what would be a custom output formatter we'd own and maintain. Default to buying here and reserve engineering capacity for work that is actually differentiated.
Whether to fund an "agent efficiency" roadmap line at all. If a meaningful share of PHP work runs through Claude Code, Cursor, Devin, or Gemini CLI, this package is the cheapest available instrument for that initiative — it produces a hard, attributable number (tokens per tool call, before vs. after) with no instrumentation work. That makes it a good first proof point for a broader AI-tooling investment case.
Per-repo adoption sequencing, not a platform mandate. Because human terminal output is byte-identical, adoption can be phased repo by repo. Product decision: pilot on 1–2 modern, test-heavy PHP repos, measure, then decide whether to standardize.
Lockstep-upgrade policy as a standing roadmap commitment. Most releases are compatibility patches for PHPUnit/Pest/Paratest printer internals. Adopting PAO means committing to upgrade it alongside the test toolchain indefinitely. That's a recurring tax that must be budgeted, not assumed away.
Context-budget allocation for agent workflows. Token reduction is a proxy for how much of the agent's window is spent on the actual problem versus progress dots. This feeds decisions about which repos we point agents at first — large test suites and verbose Artisan output (about, db:show, migrate:status) are the highest-yield targets.
Use cases worth scoping now: onboarding agents onto legacy PHP repos with 1,000+ test suites; reducing inference spend on CI-adjacent agent runs; making PHPStan/Rector output machine-actionable so agents self-correct on lint and static-analysis failures rather than needing a human to re-prompt.
Signal on ecosystem maturity. 728 stars, MIT, Laravel-org stewardship, active releases — credible. But zero dependents and readme-plus-releases as the only documentation means we are early. Product read: low technical risk, low ecosystem validation. Treat as a low-cost bet, not a foundation.
Adopt when all of these hold:
Look elsewhere — or defer — when:
Decision rule: pilot on one or two modern, greenfield-adjacent PHP repos with active agent usage and a large suite. Kill it if exit-code verification fails or if agent detection misfires in CI. Otherwise expand, with a named owner for lockstep upgrades.
For executives — one paragraph:
Laravel PAO is a free, MIT-licensed, dev-only package that makes our test and static-analysis tooling far cheaper to run inside AI coding agents. It converts verbose human-readable output — hundreds of lines of progress dots, PHPStan error walls, Artisan tables — into compact JSON, cutting tokens by up to 99.8% on test runs and roughly 70–75% on Artisan commands. It installs as a single dev dependency, changes no application code, ships no production surface, and leaves human terminal output completely unchanged. Reversibility is one line removed from composer.json. The ask is a bounded pilot on two repos with a hard gate on exit-code correctness — this is a low-cost option on lower inference spend and higher agent task completion, not a platform migration.
For engineering — the honest version:
composer require laravel/pao --dev. No config file, no CI change, Laravel 12+ service provider auto-discovery. It hooks PHPUnit, Pest, Paratest, PHPStan, Rector, and Artisan through Composer's autoloader.How can I help you explore Laravel packages today?