feat: tag-based skill composition#12
Merged
Merged
Conversation
Replace hardcoded fragment list and WSL special-casing in build.rs with
a generic tag-based composition system.
Each skill fragment and tool list now has YAML frontmatter:
---
tags: [core] # required tags (AND logic)
order: 50 # sort order in assembled output
---
Build.rs resolves active tags from CARGO_CFG_TARGET_OS:
linux → {core, linux}
macos → {core, macos, docker-desktop}
windows → {core, windows, docker-desktop, wsl}
A fragment is included when all its required tags are present in the
active set (subset check). Fragments are auto-discovered from skills/
directory — no code changes needed to add new fragments.
This enables platform-specific skill variations (e.g. Docker Desktop
caveats on macOS/Windows) and future feature-gated backends, all
without touching build.rs.
The minimal single-quote escaper only handled single quotes. The shell-escape crate properly handles spaces, dollar signs, backticks, backslashes, and all other shell metacharacters.
Add explicit 'use only MCP tools' constraint to core rules (early in prompt) and per-workflow reminders before each example section. Agents were bypassing MCP tools and invoking docker/devcontainer/gh CLIs directly. Constraints now appear at three reinforcement points: - Core rules (order 20) — primary constraint, seen first - Each workflow section — reminder before examples - Footer checklist — summary reinforcement at end
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
Replace the hardcoded fragment list and WSL special-casing in
build.rswith a generic tag-based composition system.How it works
Each skill fragment and tool list now has YAML frontmatter:
build.rsresolves active tags fromCARGO_CFG_TARGET_OS:core,linuxcore,macos,docker-desktopcore,windows,docker-desktop,wslInclusion rule: fragment tags ⊆ active tags (AND — all required tags must be active)
What this enables
tags: [docker-desktop]fragment with Docker Desktop caveats appears on both macOS and Windows but not Linuxtags: [docker-desktop, macos]for macOS-specific Docker Desktop tips.mdfile inskills/with frontmatter, nobuild.rschanges neededactive_tags()Verification
cargo check/cargo test/cargo clippy/cargo fmtorderfield