Contributing
@maestria/hermes lives in the maestria monorepo under packages/hermes/. It is a Python Hermes plugin using the Hermes Plugin API.
Project Structure
Section titled “Project Structure”packages/hermes/├── plugin.yaml # Plugin manifest (hooks, commands, tools)├── __init__.py # register() entry point + all handlers├── permissions.py # PermissionRole class and ROLES dict├── modes.py # Mode persistence (atomic JSON writes)├── plugins.py # (future) Plugin lifecycle├── session.py # Session lifecycle hooks via SessionDB├── _version.py # Single source of truth for version├── hooks/│ ├── pre_llm.py # Mode injection into user messages│ ├── pre_tool.py # Role-based tool gating│ └── transform.py # Tool result annotations├── middleware/│ └── llm_output.py # LLM execution wrapper (opt-in mode footer)├── tools/│ └── opencode.py # OpenCode CLI routing tool├── skills/ # SKILL.md files (7 specialists + orchestrator + global)└── sync.config.ts # Sync configuration for agent directivesDevelopment Setup
Section titled “Development Setup”# Clone the monorepogit clone https://github.com/agustinusnathaniel/maestriacd maestria
# Install dependenciespnpm install
# Buildpnpm buildInstalling Local Changes
Section titled “Installing Local Changes”To test local changes without publishing:
# Point the hermes plugin to your local clonehermes plugins install /path/to/maestria/packages/hermes --enableOr symlink the plugin directory:
ln -s /path/to/maestria/packages/hermes ~/.hermes/plugins/maestria-hermesDesign Principles
Section titled “Design Principles”- Methodology portable, adapter thin — Plugin code is the Hermes adapter; the real methodology lives in
packages/core/agent-directives/ - Hermes-native first + memory-agnostic — Use Hermes’ built-in subsystems (
delegate_task,ctx.llm,/goal,kanban_*) rather than reimplementing them. Memory is a platform concern (8 providers), not a plugin concern. - Self-contained — The plugin has no startup probes for external tools or packages. The
opencode_routetool delegates to OpenCode CLI if installed, but does not verify or probe for it at startup. - Feel native — Commands, hooks, and config follow Hermes Plugin API conventions
See the ADR-HM-001 for the design rationale behind specific scope decisions.
Testing
Section titled “Testing”# Run plugin-specific testspytest packages/hermes/
# Run the full monorepo quality gatesvp checkExtending
Section titled “Extending”Adding a command
Section titled “Adding a command”- Create
commands/<name>.pywith an async functionasync def cmd_<name>(ctx, args): - Register it in
__init__.py’sregister()viactx.register_command() - Add the command name to
plugin.yaml’scommandslist
Adding a hook
Section titled “Adding a hook”- Create
hooks/<name>.pywith the handler function - Wire it in
__init__.py’sregister()viactx.register_hook() - Add the hook name to
plugin.yaml’shookslist
Adding a skill
Section titled “Adding a skill”- Create the
SKILL.mdfile inskills/ - Register it via
ctx.register_skill()in__init__.py - Skills are namespaced as
hermes-maestria:<name>in Hermes