Skip to content

feat: add Hermes Agent integration (with review fixes)#2651

Open
majordave wants to merge 5 commits into
github:mainfrom
majordave:feat/hermes-integration
Open

feat: add Hermes Agent integration (with review fixes)#2651
majordave wants to merge 5 commits into
github:mainfrom
majordave:feat/hermes-integration

Conversation

@majordave
Copy link
Copy Markdown

Description

Adds a new built-in integration for Hermes Agent (by Nous Research) to Spec Kit's integration system, enabling specify init --integration hermes / --ai hermes to scaffold Spec Kit commands as skills under .hermes/skills/ with an AGENTS.md context file.

Based on the original work by @Zhaoxiaoguang001 in PR #2547, with the following fixes and improvements:

Changes from original PR #2547

  • src/specify_cli/integrations/hermes/__init__.py — Full Hermes integration:
    • Uses SkillsIntegration (skills-based, same as Claude/Codex)
    • Skills are installed to both project-local .hermes/skills/ (manifest-tracked) and global ~/.hermes/skills/ (where Hermes discovers them)
    • setup() delegates to super().setup() + post-processing (same pattern as Claude)
    • teardown() cleans up both locations
    • Fixed Copilot review issues:
      • Docstring now correctly reflects both -Q (quiet) and -q (query) flags
      • Empty command guard: / alone no longer passes an empty skill name
  • src/specify_cli/__init__.py — CLI integration_uninstall now calls integration.teardown() instead of calling manifest.uninstall() directly, allowing custom teardown logic in integrations to run properly
  • integrations/catalog.json — Added hermes catalog entry
  • tests/integrations/test_integration_hermes.py — Uses shared SkillsIntegrationTests (28 tests, all passing)

Why global skills?

Unlike Claude Code (.claude/skills/) or Codex (.agents/skills/), Hermes loads skills from ~/.hermes/skills/$HERMES_HOME/skills/ (user home directory). Skills are installed to both locations:

  1. Project-local .hermes/skills/ — tracked by the manifest for clean uninstall
  2. Global ~/.hermes/skills/ — where Hermes discovers them at runtime

Both locations are cleaned up on specify integration uninstall.

Co-authored-by: Zhaoxiaoguang001 3357983213@qq.com

@majordave majordave requested a review from mnriem as a code owner May 20, 2026 19:25
majordave and others added 2 commits May 20, 2026 13:32
- Full SkillsIntegration subclass with dual install strategy
  (project-local .hermes/skills/ + global ~/.hermes/skills/)
- CLI fix: integration_uninstall now calls integration.teardown()
  instead of manifest.uninstall() directly, allowing custom cleanup
- Fix Copilot review issues:
  - Docstring now reflects both -Q (quiet) and -q (query) flags
  - Empty command guard prevents passing empty skill names
- Add catalog entry for hermes in integrations/catalog.json

Co-authored-by: Zhaoxiaoguang001 <3357983213@qq.com>
Hermes loads skills from the global ~/.hermes/skills/ directory,
not from project-local paths.  The old dual-install strategy copied
SKILL.md files to both locations — project-local (for manifest
tracking) and global (for Hermes discovery).

This change removes the project-local copies entirely:
- setup() writes directly to ~/.hermes/skills/speckit-*/SKILL.md
- An empty .hermes/skills/ marker directory is created in the
  project so extension commands (e.g. git) can detect Hermes
  as an active integration via register_commands_for_all_agents()
- teardown() cleans both the global speckit-* dirs and the local
  marker
- import yaml moved to local import inside setup()

Tests updated: Hermes-specific tests now assert global skill
location, and shared SkillsIntegrationTests that assumed
project-local files are overridden with Hermes-appropriate
assertions.

Co-authored-by: Zhaoxiaoguang001 <3357983213@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants