mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-12 08:51:53 +00:00
feat(agent): prune non-coding skill categories from the prompt index in coding posture
Unlike toolsets (where stripping fought explicit user opt-ins), pruning the skill index is discovery-only: skills_list still returns the full catalog and skill_view loads anything. Hiding cooking/social-media/ smart-home/etc. from the manifest while pairing on code reduces prompt bloat and attention dilution without removing any capability. - ContextProfile.hidden_skill_categories: deny-list on the profile (unknown/custom categories stay visible); coding profile hides the clearly-non-coding set, keeps coding-adjacent ones (github, devops, data-science, diagramming, research, security, ...). - build_skills_system_prompt(hidden_categories=...): filters whole top-level categories (nested ones via their parent), participates in the LRU cache key, and appends a disclosure note so the model knows the full catalog exists. - system_prompt wires it through coding_hidden_skill_categories(); applies in every coding-posture mode (auto/focus/on), no-op otherwise.
This commit is contained in:
parent
9d8763dd26
commit
e2b6f6885c
5 changed files with 133 additions and 1 deletions
|
|
@ -202,6 +202,21 @@ class TestProfiles:
|
|||
assert cc.GENERAL_PROFILE.toolset is None
|
||||
assert cc.GENERAL_PROFILE.guidance == ""
|
||||
|
||||
def test_skill_pruning_scoped_to_coding_posture(self, tmp_path):
|
||||
# Coding posture hides clearly-non-coding categories; coding-adjacent
|
||||
# ones stay visible (deny-list semantics).
|
||||
_git_init(tmp_path)
|
||||
coding = cc.resolve_runtime_mode(platform="cli", cwd=tmp_path, config={})
|
||||
hidden = coding.hidden_skill_categories()
|
||||
assert "social-media" in hidden and "smart-home" in hidden
|
||||
for kept in ("github", "devops", "software-development", "data-science"):
|
||||
assert kept not in hidden
|
||||
# General posture hides nothing.
|
||||
general = cc.resolve_runtime_mode(
|
||||
platform="telegram", cwd=tmp_path, config={}
|
||||
)
|
||||
assert general.hidden_skill_categories() == frozenset()
|
||||
|
||||
|
||||
# ── detection signals ───────────────────────────────────────────────────────
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue