Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Boost Spatie Guidelines Laravel Package

spatie/boost-spatie-guidelines

AI-optimized Spatie coding guidelines for Laravel Boost. Installs battle-tested Laravel & PHP standards into your .ai/guidelines folder so AI assistants generate PSR-compliant, convention-driven code (types, naming, control flow, testing) automatically.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Laravel-Specific Standards: The package enforces Spatie’s Laravel-centric conventions (e.g., route/controller structure, Blade templates, validation rules), making it a near-perfect fit for projects already adhering to Spatie’s ecosystem (e.g., laravel-permission, laravel-activitylog). For non-Spatie Laravel projects, it introduces consistency but may require minor adjustments to existing codebases.
  • AI-Assisted Workflow Integration: Designed to work with Laravel Boost, a tool that leverages AI for code generation. The guidelines ensure AI-generated code aligns with Spatie’s standards, reducing manual review overhead.
  • PSR Compliance: Aligns with PSR-1, PSR-2, PSR-12, ensuring compatibility with broader PHP ecosystems. No architectural conflicts expected.

Integration Feasibility

  • Low Friction: Installation is Composer-based and integrates via php artisan boost:install, requiring minimal setup. No database migrations or complex configurations.
  • Dev Dependency: Installed as a --dev package, avoiding production bloat.
  • Boost Dependency: Requires Laravel Boost (v2+), which may necessitate adopting Boost’s AI workflow if not already in use. Check Boost’s compatibility with your Laravel version (e.g., Boost v2+ supports Laravel 10+).

Technical Risk

  • Minimal Risk: The package is read-only (enforces guidelines via AI prompts, not runtime checks). No runtime performance impact.
  • Potential Conflicts:
    • Custom in-house coding standards may clash with Spatie’s conventions (e.g., naming, validation rules).
    • AI-generated code may require manual validation if the project has edge-case-specific logic.
  • Testing Impact: Guidelines encourage testing best practices, but enforcement is passive (via AI suggestions). Existing test suites should remain unaffected unless new standards are introduced.

Key Questions

  1. Boost Adoption: Is the team already using Laravel Boost? If not, what’s the cost of integrating it?
  2. Standard Alignment: Does the project’s existing codebase align with Spatie’s conventions? If not, what’s the effort to refactor?
  3. AI Workflow: How will the team incorporate AI-generated code into their pipeline? Will this replace or supplement manual coding?
  4. Customization: Are there Spatie guidelines that conflict with internal standards? Can they be overridden?
  5. Version Support: What’s the Laravel version support matrix for Boost and this package? (Last release is 2026, but Boost may lag.)

Integration Approach

Stack Fit

  • Laravel-Centric: Optimized for Laravel projects using Boost for AI assistance. Ideal for:
    • New projects starting with Spatie’s conventions.
    • Existing projects adopting Boost/AI workflows.
  • PHP Ecosystem: PSR-compliant, so it integrates well with any PHP-based stack (Symfony, Lumen, etc.), though Laravel-specific rules limit broader use.
  • Toolchain Compatibility:
    • Boost: Mandatory. Ensure Boost is configured to use this package’s guidelines as the primary reference.
    • Linters/Formatters: May need to align with Spatie’s rules (e.g., PHP-CS-Fixer, Psalm) to avoid toolchain conflicts.

Migration Path

  1. Assess Current Standards: Audit existing codebase for deviations from Spatie’s guidelines (e.g., naming, validation, testing).
  2. Install Boost and Guidelines:
    composer require laravel/boost --dev
    php artisan boost:install
    
    Select spatie/boost-spatie-guidelines during setup.
  3. Configure AI Workflow:
    • Train team members to use Boost’s AI prompts with these guidelines.
    • Set up CI checks (e.g., GitHub Actions) to flag AI-generated code that drifts from standards.
  4. Iterative Adoption:
    • Start with new features/PRs using AI-generated code.
    • Gradually refactor legacy code to align with guidelines.

Compatibility

  • Laravel Versions: Confirm compatibility with your Laravel version (e.g., Boost v2+ supports Laravel 10+). Check Boost’s docs.
  • PHP Version: Requires PHP 8.1+ (due to Boost’s dependencies).
  • Tooling Conflicts:
    • If using custom PHPStan/Psalm rules or PHP-CS-Fixer configs, ensure they don’t contradict Spatie’s standards.
    • Blade templates: Spatie’s guidelines may enforce specific directives (e.g., @foreach vs. @forelse). Review for conflicts.

Sequencing

  1. Pilot Phase:
    • Use the guidelines for a single module (e.g., a new feature) to test AI integration and guideline adherence.
  2. Toolchain Alignment:
    • Update linters/formatters to match Spatie’s rules before full adoption.
  3. Team Training:
    • Onboard developers to Boost’s AI workflow and Spatie’s conventions.
  4. Full Rollout:
    • Apply guidelines project-wide, with CI gates for compliance.

Operational Impact

Maintenance

  • Low Maintenance: The package is static (no runtime dependencies). Updates only require composer update.
  • Guideline Updates: Spatie may evolve standards over time. Monitor the changelog and update Boost’s configured guidelines accordingly.
  • Boost Maintenance: Depends on Laravel Boost’s roadmap. Ensure the team is prepared for Boost’s updates.

Support

  • Troubleshooting:
    • Issues likely stem from AI-generated code deviations or Boost configuration. Spatie’s GitHub and Boost docs are primary support channels.
    • No direct runtime support needed; conflicts are preemptive (via AI suggestions).
  • Community: Active Spatie community (84 stars, MIT license) ensures quick responses to guideline-related questions.

Scaling

  • Performance: Zero runtime impact. Scales infinitely with project size.
  • Team Growth: Simplifies onboarding for new developers by standardizing code conventions via AI.
  • Multi-Repo: If used across multiple repos, ensure Boost is configured consistently (e.g., shared .ai/guidelines configs).

Failure Modes

Failure Mode Impact Mitigation
AI generates non-compliant code Manual review overhead increases. Use Boost’s boost:review to validate output.
Boost compatibility issues Workflow disruptions. Pin Boost to a stable version.
Guideline conflicts Codebase divergence. Override specific rules via Boost’s config.
Team resistance to AI workflow Low adoption. Pilot with willing teams; demonstrate ROI.

Ramp-Up

  • Developer Onboarding:
    • 1–2 hours: Learn Spatie’s conventions (docs: laravel.com/docs/...).
    • 1 day: Train on Boost’s AI workflow and guideline integration.
  • CI/CD Adjustments:
    • Add a pre-commit hook or GitHub Action to scan AI-generated code for compliance.
    • Example:
      # .github/workflows/boost-check.yml
      jobs:
        boost-check:
          runs-on: ubuntu-latest
          steps:
            - uses: actions/checkout@v4
            - run: composer require laravel/boost --dev
            - run: php artisan boost:check  # Hypothetical command; verify with Boost
      
  • Measurement:
    • Track code review time reduction and AI-generated PR acceptance rate.
    • Survey team on guideline usefulness after 2 sprints.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport