fix(skills): exclude .archive from skill index walk (salvage #17639) - #17931
Merged
Conversation
Archived skills (moved to ~/.hermes/skills/.archive/ by the curator) were still surfaced in the <available_skills> system prompt under a fake '.archive' category, causing the agent to load and try to use deprecated skills. The os.walk in iter_skill_index_files() only excluded .git/.github/.hub. Add '.archive' to EXCLUDED_SKILL_DIRS, and to the two other places that hardcode the same exclusion tuple (gateway/run.py and agent/skill_commands.py).
Widen #17639 to the fourth sibling site (tools/skills_tool.py _EXCLUDED_SKILL_DIRS) and register leoneparise in scripts/release.py AUTHOR_MAP so CI release script resolves the contributor.
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.
Salvage of #17639 by @leoneparise.
What
EXCLUDED_SKILL_DIRS(and three inline-duplicate tuples) didn't include.archive, so curator-archived skills were still indexed into the<available_skills>system prompt and could still resolve as slash commands.Changes
agent/skill_utils.py— add.archivetoEXCLUDED_SKILL_DIRSagent/skill_commands.py— add.archiveto inline exclusion tuplegateway/run.py— add.archiveto inline exclusion tupletools/skills_tool.py— add.archiveto_EXCLUDED_SKILL_DIRS(sibling site the original PR didn't touch)scripts/release.py— registerleoneparisein AUTHOR_MAPValidation
scripts/run_tests.sh tests/agent/test_curator.py tests/tools/test_skill_usage.py tests/tools/test_skills_tool.py tests/agent/test_prompt_builder.py→ 269 passed.Closes #17639.