code-abyss icon indicating copy to clipboard operation
code-abyss copied to clipboard

feat: add Pi Agent and Hermes support for indexing-code skill

Open telagod opened this issue 5 months ago • 0 comments

Summary

Add Pi Agent and Hermes as supported targets for the indexing-code skill (code graph intelligence via abyss CLI). Both platforms have full hook support and SKILL.md compatibility.

Platform Analysis

Pi Agent (earendil-works/pi)

Dimension Detail
Config ~/.pi/agent/settings.json
Instructions AGENTS.md
Skills SKILL.md with frontmatter (same as ours)
Hook: tool gate tool_call event — can block tool execution
Hook: session session_start event
Hook: context inject context event — modify LLM messages
PreToolUse compat Yes, via pi-hooks
MCP support Yes, via pi-mcp-adapter
context-mode Supported (platform #12)

Integration path:

  1. hooks/pi/hooks.ts — TypeScript extension using pi.on("tool_call", ...) to run abyss context before edits
  2. Or use pi-hooks for Claude Code-compatible PreToolUse format (reuse existing pre-edit-check.sh)

Hermes Agent (NousResearch/hermes-agent)

Dimension Detail
Config ~/.hermes/config.yaml
Instructions AGENTS.md
Skills SKILL.md with frontmatter (same as ours)
Hook: tool gate pre_tool_call — can block tool
Hook: session on_session_start
Hook: context inject pre_llm_call — return {"context": "..."}
MCP support Yes, native client & server
context-mode Not yet supported

Integration path:

  1. hooks/hermes/config.yaml — shell hooks in config format:
    hooks:
      on_session_start:
        - command: "~/.hermes/skills/indexing-code/hooks/common/session-init.sh"
      pre_tool_call:
        - command: "~/.hermes/skills/indexing-code/hooks/common/pre-edit-check.sh"
    
  2. Or Python plugin at hooks/hermes/plugin.py

Tasks

  • [ ] Create hooks/pi/ with TypeScript extension or pi-hooks compat config
  • [ ] Create hooks/hermes/ with config.yaml snippet and optional Python plugin
  • [ ] Add Pi and Hermes to install-hooks.sh auto detection
  • [ ] Add bin/adapters/pi.js and bin/adapters/hermes.js (or extend existing)
  • [ ] Update SKILL.md hook table with Pi and Hermes rows
  • [ ] Test on real Pi and Hermes installations

Compatibility Note

Both platforms use AGENTS.md (not CLAUDE.md) and SKILL.md with identical frontmatter format. The common/ hook scripts (bash) work as-is — only the hook registration format differs per platform.

Current platform support (v4.6.0)

Platform Skill Hooks Status
Claude Code ✅ ✅ PreToolUse Shipped
Codex CLI ✅ ✅ PreToolUse Shipped
Gemini CLI ✅ ✅ BeforeTool Shipped
OpenClaw ✅ ✅ before_tool_call Shipped
Pi Agent — — This issue
Hermes — — This issue

telagod avatar Jun 09 '26 19:06 telagod