Skip to content

feat(skills): implement profile-scoped skills directory isolation - #23754

Closed
akshan502 wants to merge 2 commits into
NousResearch:mainfrom
akshan502:feature/profile-skills-isolation
Closed

feat(skills): implement profile-scoped skills directory isolation#23754
akshan502 wants to merge 2 commits into
NousResearch:mainfrom
akshan502:feature/profile-skills-isolation

Conversation

@akshan502

@akshan502 akshan502 commented May 11, 2026

Copy link
Copy Markdown

Summary

This PR introduces Profile-Scoped Skills Isolation, allowing multi-agent setups (e.g., main, architect, pm) to load distinct toolsets based on their role.

It solves the "cognitive bloat" issue where all agents load the same massive list of skills regardless of their function, causing role confusion and prompt inflation.

Implementation

  1. Config-Driven: Reads the active profile name from active_profile in ~/.hermes/config.yaml (adhering to Single Source of Truth).
  2. Priority Loading: Scans ~/.hermes/profiles/<name>/skills/ first. Only falls back to the global ~/.hermes/skills/ if the profile dir is missing or skills are not found.
  3. Clean Architecture: No new dependencies or external files; logic is isolated in a helper function.

Changes

  • tools/skills_tool.py: Added _get_profile_skills_dir() helper and updated _find_all_skills().
  • agent/skill_commands.py: Updated scan_skill_commands() to prioritize profile-specific skills.

Motivation

Currently, Hermes loads skills globally. In a multi-agent architecture:

  • The architect agent doesn't need marketing-douyin-strategist.
  • The main agent doesn't need systematic-debugging or vLLM.
    Separating them reduces context window usage and enforces strict role boundaries.

akshan502 added 2 commits May 11, 2026 20:04
This PR adds support for profile-specific skills directories, allowing
multi-agent setups to have isolated toolsets.

Changes:
1. Introduced _get_profile_skills_dir() to detect active profile
   via ~/.hermes/active_profile and return the corresponding skills path.
2. Modified scan_skill_commands() and _find_all_skills() to prioritize
   loading skills from the profile directory before falling back to the
   global skills directory.

This solves the 'cognitive bloat' issue where all agents (main, architect,
pm, etc.) load the same massive list of skills regardless of their role.
…icated file

Removed the dependency on ~/.hermes/active_profile file.
Now reads the active profile name directly from ~/.hermes/config.yaml
under the 'active_profile' key. This centralizes configuration
and removes the split-state design flaw.
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint tool/skills Skills system (list, view, manage) labels May 11, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the profile-isolation contribution. This is an automated hermes-sweeper review; current main already provides this behavior through a more complete profile-aware implementation.

  • f8723c47818e84df7d4514228381be5b0509b7f3 (fix(skills): resolve skills dir from active profile, merged via fix(skills): profile-aware skills resolution in long-lived runtimes (#40677) #60180) resolves skills from live HERMES_HOME at call time.
  • tools/skills_tool.py:692 uses that live directory for discovery, and tools/skills_tool.py:1084 uses it for skill_view lookup.
  • tests/tools/test_skills_tool_profile_scope.py:30 and :57 cover both skill_view and skills_list after a profile change in a long-lived runtime.
  • The fix is included in v2026.7.7.

The timeline-linked discussion around #43796 identified the long-lived-runtime concern; the merged implementation covers that broader path without relying on a separate active_profile config key.

@teknium1 teknium1 closed this Jul 13, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have sweeper:implemented-on-main Sweeper: behavior already present on current main tool/skills Skills system (list, view, manage) type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants