Feat: Deliver guidelines as a skill instead of writing into agent files#742
Feat: Deliver guidelines as a skill instead of writing into agent files#742GoneTone wants to merge 1 commit intolaravel:mainfrom
Conversation
For agents implementing SupportsSkills, guidelines are now composed into a single skill (laravel-boost-guidelines) in the agent's skillsPath(), and only a short activation instruction is written to the agent file (CLAUDE.md, AGENTS.md, etc.). Non-SupportsSkills agents fall back to the existing full-guideline behavior. - Add GuidelineSkillAdapter to compose guidelines into a single skill - Add writeSkillActivation() to GuidelineWriter - Branch InstallCommand by SupportsSkills capability with fallback
|
Thanks for your pull request! Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain this package, we need to be very careful regarding the amount of code we include. If applicable, please consider releasing your code as an additional package so that the community can still take advantage of your contributions! |
Thanks for the review! This change modifies how That said, I completely understand the need to keep the codebase lean. Would it help if I reduced the scope further? The core change is quite small:
The main motivation is that writing all guideline content directly into files like Happy to adjust the approach if there's a direction that would work better for the team. |
Summary
For agents implementing
SupportsSkills, guidelines are now composed into a single skill (laravel-boost-guidelines) written to the agent'sskillsPath(), instead of writing the full guideline content directly into files likeCLAUDE.mdorAGENTS.md. Only a short activation instruction is written to the agent file. Agents not implementingSupportsSkillsfall back to the existing behavior.Benefit
Currently,
boost:installandboost:updatewrite all guideline content directly into agent files (CLAUDE.md, AGENTS.md, etc.), which pollutes these files with large amounts of generated content and makes them difficult to manage alongside user-authored content. This change keeps agent files clean by moving the guideline content into the skill system, while still ensuring AI agents are instructed to load the guidelines.Changes
GuidelineSkillAdapter(new) — composes all guidelines into a single skill directory withSKILL.mdat the agent'sskillsPath()GuidelineWriter::writeSkillActivation()(new) — writes a short activation instruction to the agent's guidelines file, replacing any existing full guideline contentInstallCommand::installGuidelinesAsSkill()(new) — branches guideline installation:SupportsSkillsagents get the skill + activation instruction, others keep the existing full-guideline writeWhy it does not break existing features
SupportsSkillsagents are unaffected — they continue to receive full guidelines in their agent fileSupportsSkillsagents, the existing<laravel-boost-guidelines>tag replacement logic handles the migration seamlessly — the old full content is replaced with the activation instruction on the nextboost:installorboost:update