Skip to content

feat(adapters): add Hermes Agent command adapter#1200

Closed
wispy007 wants to merge 1 commit into
Fission-AI:mainfrom
wispy007:main
Closed

feat(adapters): add Hermes Agent command adapter#1200
wispy007 wants to merge 1 commit into
Fission-AI:mainfrom
wispy007:main

Conversation

@wispy007

@wispy007 wispy007 commented Jun 11, 2026

Copy link
Copy Markdown

Summary

Add support for Hermes Agent (github.com/NousResearch/hermes-agent) as a supported AI tool.

This enables users to run openspec init --tools hermes and have OpenSpec generate skill and command files in the .hermes/ directory.

Changes

  • New: src/core/command-generation/adapters/hermes.ts — adapter that generates commands to .hermes/commands/opsx/<id>.md with standard YAML frontmatter (name, description, category, tags)
  • Config: Added { name: 'Hermes Agent', value: 'hermes', ... } to AI_TOOLS in config.ts with skillsDir: '.hermes'
  • Registry: Imported and registered hermesAdapter in CommandAdapterRegistry
  • Tests: 4 test cases in adapters.test.ts covering toolId, file path generation, different command IDs, and formatFile output

Test Results

All hermesAdapter tests pass:

✓ hermesAdapter > should have correct toolId
✓ hermesAdapter > should generate correct file path
✓ hermesAdapter > should generate correct file paths for different commands
✓ hermesAdapter > should format file with name, description, category, and tags

About Hermes Agent

Hermes Agent is an open-source CLI AI agent that supports Agent Skills (SKILL.md) and custom slash commands. It's the AI agent that helped write this PR. 😄

Summary by CodeRabbit

Release Notes

  • New Features
    • Hermes Agent is now available as a tool option for command generation.

Add support for Hermes Agent (github.com/NousResearch/hermes-agent) as a
supported AI tool. This enables users to run 'openspec init --tools hermes'
and have OpenSpec generate skill and command files in .hermes/ directory.

Changes:
- Add hermes.ts adapter (commands → .hermes/commands/opsx/<id>.md)
- Register hermesAdapter in CommandAdapterRegistry
- Add Hermes Agent to AI_TOOLS list in config.ts
- Add 4 test cases for hermesAdapter
@wispy007 wispy007 requested a review from TabishB as a code owner June 11, 2026 08:04
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d73fb8e7-3447-433b-ba56-1da572953ca1

📥 Commits

Reviewing files that changed from the base of the PR and between 1b06fdd and 45e1092.

📒 Files selected for processing (5)
  • src/core/command-generation/adapters/hermes.ts
  • src/core/command-generation/adapters/index.ts
  • src/core/command-generation/registry.ts
  • src/core/config.ts
  • test/core/command-generation/adapters.test.ts

📝 Walkthrough

Walkthrough

This PR adds a new Hermes Agent command adapter to the OpenSpec command-generation system. The adapter generates markdown files in a .hermes directory with YAML frontmatter and command content. The implementation follows the established pattern used by other adapters and includes registration in the adapter registry, configuration export, and full test coverage.

Changes

Hermes Agent Command Adapter Integration

Layer / File(s) Summary
Hermes Adapter Implementation
src/core/command-generation/adapters/hermes.ts
The hermesAdapter exports a ToolCommandAdapter that generates Hermes markdown command files with .hermes/commands/opsx/<id>.md paths and formats content with YAML frontmatter fields (name, description, category, tags) followed by the command body.
Adapter Wiring and Configuration
src/core/command-generation/adapters/index.ts, src/core/command-generation/registry.ts, src/core/config.ts
The hermesAdapter is re-exported from the central adapters index, registered in the CommandAdapterRegistry, and added to the AI_TOOLS configuration as the "Hermes Agent" option with skillsDir: '.hermes'.
Test Coverage and Updates
test/core/command-generation/adapters.test.ts
Comprehensive tests validate hermesAdapter toolId, file path generation, and YAML frontmatter output; piAdapter newline formatting expectation is corrected, and cross-platform path handling tests include hermesAdapter in the adapter list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • Fission-AI/OpenSpec#864: Adds the Lingma tool adapter using the same command-adapter pipeline pattern with updates to adapters index, registry, and AI_TOOLS configuration.
  • Fission-AI/OpenSpec#735: Implements the Pi command adapter following the identical integration pattern across adapters index, registry, config, and test suite.
  • Fission-AI/OpenSpec#853: Adds the Junie tool adapter with the same structural changes to command-generation integration points.

Suggested reviewers

  • TabishB

Poem

🐰 A new adapter hops into the fold,
Hermes joins the chorus, brave and bold,
Markdown frontmatter glows so bright,
Registry wired, tests all right! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@wispy007 wispy007 closed this Jun 11, 2026
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.

1 participant