- How do I install spatie/boost-spatie-guidelines in my Laravel project?
- Run `composer require spatie/boost-spatie-guidelines --dev` and then execute `php artisan boost:install` to select Spatie’s guidelines during setup. The package installs as a dev dependency and integrates seamlessly with Laravel Boost.
- Does this package work with Laravel 10+ only, or does it support older versions?
- This package requires **Laravel Boost v2+**, which officially supports Laravel 10+. Check Boost’s documentation for exact version compatibility, as older Laravel versions may not be fully supported.
- Will these guidelines conflict with my existing PHP-CS-Fixer or Psalm rules?
- The package enforces Spatie’s conventions (PSR-1/2/12 + Laravel-specific rules) but won’t override your existing tooling. Ensure your linters/formatters align with Spatie’s standards to avoid conflicts during CI checks.
- Can I use this package without Laravel Boost?
- No, this package is **exclusively designed for Laravel Boost** and requires Boost’s AI workflow. If you’re not using Boost, consider standalone tools like PHP-CS-Fixer or custom PSR-12 rules instead.
- How does this package enforce coding standards? Does it run linting checks?
- This package is **read-only**—it provides AI-optimized guidelines for Boost to generate compliant code. It doesn’t run runtime checks or linting; you’ll need tools like PHPStan or GitHub Actions for enforcement.
- Are there any Spatie-specific naming conventions I should know about (e.g., Blade, controllers)?
- Yes. The guidelines enforce Spatie’s Laravel conventions, such as kebab-case for routes (`/api/users`), snake_case for database columns, and controller methods following RESTful patterns (e.g., `store()`, `update()`).
- What if my team has custom coding standards that differ from Spatie’s?
- You can’t override individual rules via this package, but you can **audit conflicts** before adoption. For critical deviations, consider forking the guidelines or using Boost’s custom prompt overrides.
- Does this package support testing best practices (e.g., PHPUnit, Pest)?
- Yes. The guidelines include Spatie’s testing conventions, such as method naming (`test_user_can_create_post`), assertion styles, and fixture organization. AI-generated tests will follow these patterns by default.
- How do I update the guidelines after a new version is released?
- Run `composer update spatie/boost-spatie-guidelines` followed by `php artisan boost:update` to refresh the guidelines in your `.ai/guidelines/` directory. This ensures AI-generated code stays aligned with the latest standards.
- Is this package safe for production? Will it slow down my app?
- This is a **dev-only package** with no runtime impact. It only influences AI-generated code during development. No database migrations, configurations, or performance overhead are introduced.