- How does PAO detect AI agents like Claude Code or Cursor?
- PAO uses environment and user-agent sniffing to identify AI tools. It checks for known agent signatures (e.g., `Cursor`, `Gemini CLI`) and supports whitelisting via the `PAO_AGENT_WHITELIST` environment variable. No manual configuration is needed for supported agents.
- Will PAO break my existing Laravel Artisan commands?
- No, PAO only modifies output when an AI agent is detected. Human terminal output remains identical—colors, formatting, and behavior are preserved. It’s a zero-config, opt-in optimization for AI tools.
- Does PAO work with Pest, PHPStan, or Paratest in Laravel?
- Yes, PAO supports Pest 4-5, PHPStan, Paratest, and PHPUnit 12-13 out of the box. It hooks into these tools via Composer autoload, requiring no additional setup beyond installation.
- Can I disable PAO for specific tools (e.g., PHPStan) without disabling it entirely?
- Absolutely. Use the `PAO_SKIP_TOOLS` environment variable to exclude tools, like `PAO_SKIP_TOOLS=phpstan`. This lets you opt out per tool while keeping PAO active for others.
- What Laravel versions does PAO officially support?
- PAO is optimized for Laravel 12+ and requires PHP 8.3+. For older Laravel versions, you may need polyfills or manual adjustments, but core functionality (Artisan output cleaning) auto-discovers in Laravel 12+.
- How does PAO’s JSON output help AI agents process test results faster?
- PAO converts verbose CLI output (e.g., 10,000+ characters for 1,000 tests) into structured JSON with key fields like `tool`, `result`, `duration_ms`, and `error_details`. This reduces token usage by 99.8% for AI agents like Claude or Cursor.
- Is there a performance overhead when PAO is active?
- No, PAO adds negligible overhead (~1-5ms) only when processing output for AI agents. In non-agent mode (human terminal), it runs with zero cost, making it safe for CI/CD pipelines.
- Can I customize the JSON schema PAO generates?
- PAO’s schema is designed for extensibility but may require forking for non-standard use cases. For custom fields, check the contribution guidelines or extend via environment variables like `PAO_CUSTOM_FIELDS`.
- What happens if my AI agent isn’t in PAO’s supported list?
- Use the `PAO_AGENT_WHITELIST` environment variable to manually add unsupported agents (e.g., `PAO_AGENT_WHITELIST=my-agent`). Audit the list periodically, as new agents are added via community contributions.
- How do I test PAO in my CI pipeline before full adoption?
- Install PAO in a dev dependency (`composer require laravel/pao --dev`) and run your test suite with an AI agent emulating the environment (e.g., set `PAO_AGENT=test-agent`). Monitor JSON output for correctness without disrupting human workflows.