feat(bundle): include tool-skills in built-in bundle - #16
Closed
manojp99 wants to merge 1 commit into
Closed
Conversation
Add the Agent Skills support module (tool-skills) to the orchestrator's default tools list so external host adapters (Paperclip, future hosts) can deliver custom skill markdown via the standard discovery path (.amplifier/skills/, ~/.amplifier/skills/, $AMPLIFIER_SKILLS_DIR) instead of prompt-prepending — which doesn't survive --resume cleanly. Config mirrors amplifier-module-tool-skills/behaviors/skills.yaml. Bundle cache key changes (sha256 of bundle.md), triggering one-time re-prepare on next invocation per existing bundle stability contract. No behavioral regression: empty skill list when no directories populated. 🤖 Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
tool-skillsto the built-in orchestrator bundle so external host adapters can deliver custom skill markdown via the standard discovery path (.amplifier/skills/,~/.amplifier/skills/,$AMPLIFIER_SKILLS_DIR).Motivation
Host adapters today (e.g. Paperclip's
amplifier_local) have no first-class mechanism to inject host-specific skill markdown into the agent's session-cached layer. The only available transport is prepending skill content into the user-positional prompt, which:--resumecleanly — accumulated context from one task pollutes the next, causing the model to respond to whichever task framing is loudest in its history rather than the current wake.$CODEX_HOME/skills/or Claude Code's--append-system-prompt-file— both of which let those CLIs deliver skill content into a session-cached layer that--resumepreserves cleanly.tool-skillsis the architecturally correct mechanism. It already exists, follows the Agent Skills open standard, and is the recommended bundle inclusion per the module's README. The only missing piece is shipping it in the default bundle so host adapters can rely on it being present.This was discovered while debugging a Paperclip host adapter's continuation-loop bug, where a session-id resumed across heartbeats kept fusing successive tasks into one accumulated conversation. The other two production adapters in the same codebase (
claude_local,codex_local) avoid this class of bug precisely because their CLIs expose a session-cached skill-delivery layer; amplifier-agent's CLI does too via--mcp-servers, but markdown-shaped skills are the natural fit andtool-skillsis already the de facto answer.Change
One additive YAML entry under
tools:insrc/amplifier_agent_lib/bundle/bundle.md, sourced from the publishedamplifier-module-tool-skillsmodule at@main. Config mirrors the canonical wiring published by that module inbehaviors/skills.yaml.Impact
bundle.mdchangessha256(bundle.md), triggering a one-time re-prepare on next invocation per the bundle stability contract documented in the manifest header..amplifier/skills/,~/.amplifier/skills/, or$AMPLIFIER_SKILLS_DIRdirectories populated, the visibility hook surfaces an empty list andload_skillreports zero entries.SKILL.mdfiles into a known directory rather than prepending into user prompts.Verification
amplifier-agent run "list available skills"— expect the visibility hook to surface in agent context andload_skillto return zero entries when no skill dirs are populated.name: hello
description: Demonstrate skill discovery
Hello
A test skill.
EOF
AMPLIFIER_SKILLS_DIR=/tmp/test-skills amplifier-agent run "what skills are available?"
— expecthello` to appear in the visibility hook list.3. Existing tests pass without modification.
Notes
tool-skillsmodule registers its visibility hook internally at mount time (verified againstamplifier-module-tool-skills/behaviors/skills.yaml), so no separate hook entry is required.skills:context/skills-instructions.mdin the bundle'scontext:block to add agent-facing meta-instructions about how to useload_skill. Skipped here to keep the change minimal; the visibility hook itself surfaces what's needed for autonomous discovery.Generated with Amplifier