Add install.exclude frontmatter to keep companion files out of platform copies (#103) - #109
Merged
Merged
Conversation
2 tasks
devrimcavusoglu
force-pushed
the
feature/install-exclude
branch
from
August 19, 2026 13:11
9b32ede to
7b935cf
Compare
devrimcavusoglu
force-pushed
the
feature/install-exclude
branch
from
August 19, 2026 13:14
7b935cf to
810aa3d
Compare
devrimcavusoglu
changed the base branch from
fix/frontmatter-passthrough
to
feature/install-tag-filter
August 19, 2026 13:14
Owner
Author
Review (adversarial pass against #103)DoD 1 holds across every registry write path (create, from-template, import keep everything; install trims). DoD 2 — file trees never show as drift (no skern surface walks installed trees), but the PR had introduced a regression in the same area, now fixed (
Stacked on #108 (base |
devrimcavusoglu
force-pushed
the
feature/install-tag-filter
branch
from
August 19, 2026 13:50
3fa77bc to
3c155ae
Compare
…rm copies (#103) skill install copied the whole skill tree, so eval corpora and fixtures landed in every agent's context. Model an author-owned `install.exclude` list of path.Match globs on Skill/frontmatter; match each relative path and its leading directories in skill.MatchExclude; thread the patterns through a new platform.InstallOptions argument on Platform.Install so copyDir prunes matched files and directories. The registry always keeps the full directory. skill validate errors on malformed, absolute, or `..` patterns and anything matching SKILL.md, and warns when a pattern matches nothing or excludes a body-referenced file. Closes #103 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…refuse bad patterns at install - skill diff reports a changed install.exclude list (it went blind once install became a modeled key) and diffs install.* extras. - InstallConfig gets an inline Extra map (+ collision guard) so other keys under install: round-trip like every other unmodeled key; `exclude` accepts a bare string as a one-element list. - skill install refuses a skill whose patterns fail validation instead of silently copying what path.Match could not parse; `**` is rejected outright rather than degrading to `*`. - Only the literal SKILL.md is an error: wildcards that also match it are legal since MatchExclude never excludes the manifest. Backslashes are left alone (path.Match escape), validator field carries [index] for multi-entry lists. - Docs: no `--files` flag; exact matching/escape/compat rules; roadmap line dropped; json tag omitzero. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
devrimcavusoglu
changed the base branch from
feature/install-tag-filter
to
main
August 19, 2026 13:52
devrimcavusoglu
force-pushed
the
feature/install-exclude
branch
from
August 19, 2026 13:52
810aa3d to
2d9f568
Compare
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
Fixes #103. Stacked on #106 (base branch
fix/frontmatter-passthrough) — it needs #100's modeled-key machinery so theinstall:block survives registry writes. Once #106 merges, retarget this PR tomain(GitHub will do it automatically on branch deletion).Skill.Install.Exclude(InstallConfig), omitted from output when empty.skill.MatchExclude(patterns, rel)— stdlibpath.Matchagainst the slash-relative path and each leading directory, so a bare dir name excludes its subtree,fixtures/*its children,*.draft.mdtop-level files by suffix. No**(documented, no new deps).SKILL.mdcan never be excluded.Platform.Install(skillDir, name, scope, opts InstallOptions)—copyDirtakes a skip func and prunes matched directories withfilepath.SkipDir.skill_install.goalready had the parsed skill fromreg.Get(it was discarding it); it now passess.Install.Exclude. Registry copies (create --from-template,import) are untouched — the registry keeps everything.skill validate: errors for empty / absolute /../ malformed-glob / matches-SKILL.mdpatterns; warnings (inValidateFolder) when a pattern matches no file, or when a body-referenced file would be excluded (exists in registry, missing from every install).[Unreleased]› Added.Issue DoD
skill installwhile staying in the registryskill diffaccounts for intentionally-excluded paths — nothing to change:diffcompares manifests (frontmatter + body), never file trees, so excluded files cannot surface as drift.TestSkillInstall_HonorsInstallExcludeassertsdiffreports identical after an excluding install. Documented in the new section.Test plan
TestMatchExclude(17 cases),TestValidateExcludePattern,TestExcludedFiles,TestValidate_InstallExclude,TestValidateFolder_InstallExcludeWarnings,TestAdapter_Install_Exclude,TestCopyDir_SkipFuncPrunesDirectories,TestSkillInstall_HonorsInstallExclude(issue scenario end-to-end incl. round-trip of the block),TestSkillValidate_InstallExcludeErrorsgo test ./...,make lintgreeninstall.exclude: [eval]+eval/s1.md→ registry haseval/s1.md,.claude/skills/demo.skill/has onlySKILL.md; bad patterns → validate exit 2🤖 Generated with Claude Code