Skip to content

Conversation

@pushpak1300
Copy link
Member

@pushpak1300 pushpak1300 commented Dec 15, 2025

Why This Feature?

Context Management

Previously, all third-party package guidelines would need to be added to the global context, which could grow unboundedly as more packages are integrated.

The current approach:

  • Reduces global context bloat: Only guidelines for actively used packages are loaded
  • Improves token efficiency: Each AI interaction carries smaller context, leaving room for more application-specific information

Example

Consider a package that's only used in the admin dashboard. Adding its guidelines to the global context means every single LLM request across the entire application carries this information even when working on features unrelated to that package. With this feature, the package guidelines are only available as a Resource/Prompt that can be accessed when needed.

How It Works

  1. Package Discovery: The system automatically discovers packages with Boost guidelines using Composer::packagesDirectoriesWithBoostGuidelines()

  2. Dynamic Registration: For each package containing a core.blade.php file:

    • A PackageGuidelineResource instance is created (makes guidelines available as a searchable resource)
    • A PackageGuidelinePrompt instance is created (makes guidelines available as context when explicitly requested)
  3. Guidelines are included:

    • As Prompts - allowing the LLM to request them when working with that package
    • As Resources - allowing users to explicitly fetch and review the guidelines

Demo

Reference

Signed-off-by: Pushpak Chhajed <[email protected]>
Signed-off-by: Pushpak Chhajed <[email protected]>

# Conflicts:
#	src/Mcp/Boost.php
Signed-off-by: Pushpak Chhajed <[email protected]>
Signed-off-by: Pushpak Chhajed <[email protected]>
@pushpak1300 pushpak1300 changed the title Add Resource and Prompts for Third Party Package Guideliens Add Resource and Prompts for Third Party Package Guidelines Dec 15, 2025
@pushpak1300 pushpak1300 changed the title Add Resource and Prompts for Third Party Package Guidelines Add Resource and Prompts for Package Guidelines Dec 16, 2025
@pushpak1300 pushpak1300 marked this pull request as ready for review December 16, 2025 07:56
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