Skip to content

Support loading guidelines and skills from vendor packages#566

Merged
pushpak1300 merged 19 commits intomainfrom
replace_guidelines_from_vendor
Feb 20, 2026
Merged

Support loading guidelines and skills from vendor packages#566
pushpak1300 merged 19 commits intomainfrom
replace_guidelines_from_vendor

Conversation

@pushpak1300
Copy link
Member

@pushpak1300 pushpak1300 commented Feb 12, 2026

Depends on laravel/roster#42

The Problem

Right now, Boost maintains guidelines for all first-party Laravel packages (Livewire, Pennant, Pint, Sail, etc.) inside its own .ai/ directory. This means:

  1. Boost is the bottleneck When Inertia ships a new feature, someone has to update Boost's copy of the Inertia guidelines. The Inertia team can't update them directly.
  2. Guidelines go stale Package v3 ships, but Boost still has v2 guidelines until someone manually updates them.
  3. Doesn't scale Every new Laravel ecosystem package means more files for the Boost team to maintain.

How the Current Solution Handles It

The PR introduces a three-tier resolution system for guidelines that works for both Composer (vendor/) and npm (node_modules/) packages:

flowchart TD
    A["Package detected by Roster"] --> B{"Is it a first-party package?"}
    B -->|Composer| C{"Does vendor/ path exist?"}
    B -->|npm scoped| N{"Does node_modules/ path exist?"}
    B -->|No| F["Use third-party discovery"]
    C -->|Yes| D{"Does user have override?"}
    C -->|No| E["Fall back to Boost .ai/ copy"]
    N -->|Yes| D
    N -->|No| E
    D -->|Yes| G["Use USER override - highest priority"]
    D -->|No| H["Use package guideline"]
    E --> I{"Does user have override?"}
    I -->|Yes| G
    I -->|No| J["Use Boost .ai/ copy - fallback"]
Loading

Priority Order (highest to lowest):

Priority Source Who maintains it
1st .ai/guidelines/ in user project The developer (user)
2nd vendor/{pkg}/resources/boost/guidelines/ Composer package maintainer
2nd node_modules/{pkg}/resources/boost/guidelines/ npm package maintainer
3rd Boost built-in .ai/ directory The Boost team

npm Support

npm packages from first-party scopes (@inertiajs/*, @laravel/*) are now treated identically to Composer first-party packages. This means packages like @inertiajs/react or @laravel/vite-plugin-wayfinder can ship their own guidelines and skills at node_modules/{pkg}/resources/boost/guidelines/.

Inertia Guideline Restructuring

The non-versioned Inertia core.blade.php has been removed. Its content is now inlined into the versioned files (1/core.blade.php and 2/core.blade.php). The guidelines now reference the specific Roster enum variants (INERTIA_REACT, INERTIA_VUE, INERTIA_SVELTE) instead of the removed compound INERTIA case.

@pushpak1300 pushpak1300 marked this pull request as draft February 12, 2026 18:12
@pushpak1300 pushpak1300 marked this pull request as ready for review February 18, 2026 09:20
…om_vendor

# Conflicts:
#	tests/Feature/Install/SkillComposerTest.php
Copy link
Contributor

@joetannenbaum joetannenbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to make sure we're covering NPM packages like laravel-echo as well, is that covered here? I just see the scoped packages.

@pushpak1300 pushpak1300 merged commit b4c5bed into main Feb 20, 2026
16 checks passed
@pushpak1300 pushpak1300 deleted the replace_guidelines_from_vendor branch February 20, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments