Skip to content

Business operating system for Claude Code — 57 skills, 21 agents, smart daemon. Unified inbox (WhatsApp/Email/Slack/Telegram), autonomous PR merge, full-AWS monitoring, revenue (Stripe+RevenueCat), e-commerce (Shopify), marketing (Klaviyo/Meta/GA4), voice (Bland/ElevenLabs), APM (Datadog/NewRelic/OTEL), YOLO mode.

feat(hermes): native ops plugin with slash commands and harness fallbacks (#853)

Aurora Capital4fc3c57065c6
diff --git a/claude-ops/CLAUDE.md b/claude-ops/CLAUDE.md
index 6f7b368a..29ecb048 100644
--- a/claude-ops/CLAUDE.md
+++ b/claude-ops/CLAUDE.md
@@ -277,6 +277,29 @@ a better way" is a design review, so go and check before answering. "Maybe it's
running on a different port" means enumerate rather than politely dismiss. A
user's half-memory of their own estate routinely beats a first-pass search.
+## Rule 10 — Harness fallbacks (Hermes, Grok, Codex, cron)
+
+Claude Code primitives stay in the skills: they are valid there. When the
+running harness does not have them, **add a fallback — never delete the Claude
+path.** Full table: `hermes-plugin/RUNTIME.md`.
+
+| If this is missing | Do this instead |
+|---|---|
+| `AskUserQuestion` | Numbered options in chat, then wait. Telegram/gateway: two turns (full draft as its own message, then the Send / Edit / Skip card). Max 4 options. |
+| `Workflow` | Hermes `delegate_task`, or sequential work in the main session. |
+| `TeamCreate` / agent teams | The harness's own subagent tool (`delegate_task` on Hermes). |
+| `TaskCreate` / `TaskList` | Hermes Kanban, or skip. Do not require Paperclip. |
+| `CronCreate` | `hermes cron`, or skip. |
+| `mcp__linear__*` | Linear CLI / GraphQL. Resolve real tool names at runtime. |
+| `gh … --admin` | Never. Merge only when required checks pass, the PR is conflict-free, and blocking review threads are resolved. |
+
+Rule 6 (one draft → one approval → one send) is harness-independent. Scanners
+stay read-only; sends stay in the main session.
+
+On Hermes, install `hermes-plugin/` as `~/.hermes/plugins/ops` and add `ops` to
+`plugins.enabled`. Slash commands (`/ops-inbox`, `/ops`) and
+`skill_view("ops:<name>")` then work.
+
## Appendix: CLI Reference (EXACT SYNTAX — never guess)
### gog (v0.12.0+)
diff --git a/claude-ops/hermes-plugin/README.md b/claude-ops/hermes-plugin/README.md
new file mode 100644
index 00000000..a6321b1b
--- /dev/null
+++ b/claude-ops/hermes-plugin/README.md
@@ -0,0 +1,36 @@
+# Hermes plugin (ops)
+
+Native Hermes package for the claude-ops skill tree. Claude Code still loads
+`.claude-plugin/`. Hermes loads this directory.
+
+## Install
+
+```bash
+ln -sfn /path/to/claude-ops/hermes-plugin ~/.hermes/plugins/ops
+```
+
+`claude-ops-installer install` does that symlink when Hermes is enabled.
+
+Then enable it:
+
+```yaml
+# ~/.hermes/config.yaml
+plugins:
+ enabled:
+ - ops
+```
+
+Restart the gateway / CLI. Slash commands (`/ops-inbox`, `/ops-go`, `/ops`)
+and `skill_view("ops:ops-inbox")` become available.
+
+## Layout
+
+| Path | Role |
+|---|---|
+| `plugin.yaml` | Hermes manifest (`name: ops`) |
+| `__init__.py` | Registers skills + slash commands |
+| `RUNTIME.md` | Claude Code → Hermes primitive map |
+| `../skills/` | Canonical SKILL.md tree (unchanged) |
+
+Do not fork skills into this folder. Edit `../skills/` so Claude Code and
+Hermes stay on one source.
diff --git a/claude-ops/hermes-plugin/RUNTIME.md b/claude-ops/hermes-plugin/RUNTIME.md
new file mode 100644
index 00000000..1f71551d
--- /dev/null
+++ b/claude-ops/hermes-plugin/RUNTIME.md
@@ -0,0 +1,25 @@
+# Claude Code → Hermes (ops runtime)
+
+Use this when a claude-ops skill names a Claude Code primitive that Hermes does not have. Keep the skill's intent. Swap the primitive. Do not copy Claude-only assumptions into Hermes.
+
+| Claude Code | Hermes |
+|---|---|
+| `AskUserQuestion` | Numbered options in chat, then wait. Telegram/gateway: two turns — full draft as its own message, then the Send / Edit / Skip card. Never put the draft only in a clipped preview. Max 4 options per card. |
+| `Workflow` | `delegate_task` for parallel read-only work. If that tool is missing, run the same scanners sequentially in the main session. |
+| `TeamCreate` / `Agent` teams | `delegate_task`. No Claude agent-team steering. |
+| `TaskCreate` / `TaskUpdate` / `TaskList` | Hermes Kanban, or skip. Do not require Paperclip. |
+| `CronCreate` / `CronList` | `hermes cron`. |
+| `mcp__linear__*` | Linear CLI / GraphQL. Resolve the real tool names at runtime. |
+| `mcp__whatsapp__*` | Resolve the live server name (Rule 8). Hermes may also have native `whatsapp_*` plugin tools — same Rule 6 send gate. |
+| `gh … --admin` | Never. Merge only when required checks pass, the PR is conflict-free, and blocking review threads are resolved. |
+| `${CLAUDE_PLUGIN_ROOT}` | Directory that contains `skills/` and `bin/` for this install. Probe `$CLAUDE_PLUGIN_ROOT`, then the installer symlink, then `~/.hermes/plugins/ops/..`. |
+
+## Hard rules that do not change
+
+- Rule 0: public repo, no personal data.
+- Rule 6: every outbound message is one draft → one approval → one send.
+- Scanners stay read-only. Sends stay in the main session.
+
+## Do not upstream
+
+Host-only paths, account names, chat IDs, and business routing. Those stay in the local overlay, not this plugin.
diff --git a/claude-ops/hermes-plugin/__init__.py b/claude-ops/hermes-plugin/__init__.py
new file mode 100644
index 00000000..e7c88a71
--- /dev/null
+++ b/claude-ops/hermes-plugin/__init__.py
@@ -0,0 +1,107 @@
+"""Hermes native plugin for claude-ops.
+
+Registers every skill as ``ops:<name>`` and a slash command ``/<name>``.
+Skills stay in the sibling ``skills/`` tree (the Claude Code plugin). This
+package does not import Hermes internals.
+"""
+
+from __future__ import annotations
+
+from pathlib import Path
+
+PLUGIN_DIR = Path(__file__).resolve().parent
+SKILLS_DIR = PLUGIN_DIR.parent / "skills"
+RUNTIME_MD = PLUGIN_DIR / "RUNTIME.md"
+
+
+def _iter_skills():
+ if not SKILLS_DIR.is_dir():
+ return
+ for child in sorted(SKILLS_DIR.iterdir(), key=lambda p: p.name):
+ md = child / "SKILL.md"
+ if child.is_dir() and md.is_file():
+ yield child.name, md
+
+
+def _frontmatter_field(text: str, field: str) -> str:
+ if not text.startswith("---"):
+ return ""
+ end = text.find("\n---", 3)
+ block = text[3 : end if end != -1 else 400]
+ prefix = f"{field}:"
+ for line in block.splitlines():
+ if line.startswith(prefix):
+ return line[len(prefix) :].strip().strip('"').strip("'")
+ return ""
+
+
+def _description(md: Path) -> str:
+ try:
+ text = md.read_text(encoding="utf-8")
+ except OSError:
+ return md.parent.name
+ desc = _frontmatter_field(text, "description")
+ return desc[:200] if desc else md.parent.name
+
+
+def _handler(name: str):
+ def handle(raw_args: str = "") -> str:
+ args = (raw_args or "").strip()
+ return (
+ f"Run the claude-ops skill `{name}` now.\n"
+ f"Load it with skill_view(\"ops:{name}\") if that tool exists; "
+ f"otherwise open `{SKILLS_DIR / name / 'SKILL.md'}`.\n"
+ f"Arguments: {args or '(none)'}\n\n"
+ "This session is Hermes, not Claude Code. Use the degrade table in "
+ "ops:hermes-runtime (AskUserQuestion → numbered options / two-turn "
+ "Telegram card; Workflow → delegate_task; never gh --admin). "
+ "Rule 6 still applies: one draft, one approval, one send."
+ )
+
+ handle.__name__ = f"ops_cmd_{name.replace('-', '_')}"
+ return handle
+
+
+def _handle_ops(raw_args: str = "") -> str:
+ token = (raw_args or "").strip().split(None, 1)
+ names = [name for name, _ in _iter_skills()]
+ if token:
+ want = token[0].lstrip("/").replace("_", "-")
+ rest = token[1] if len(token) > 1 else ""
+ if want in names:
+ return _handler(want)(rest)
+ aliased = want if want.startswith("ops-") else f"ops-{want}"
+ if aliased in names:
+ return _handler(aliased)(rest)
+ listed = ", ".join(f"/{n}" for n in names[:12])
+ more = f" (+{len(names) - 12} more)" if len(names) > 12 else ""
+ return (
+ "claude-ops on Hermes. Enable this plugin in plugins.enabled, then "
+ f"use a slash command.\nExamples: {listed}{more}\n"
+ "Or: /ops inbox /ops go /ops fires\n"
+ 'Skills also load as skill_view("ops:<name>").'
+ )
+
+
+def register(ctx) -> None:
+ if RUNTIME_MD.is_file():
+ ctx.register_skill(
+ "hermes-runtime",
+ RUNTIME_MD,
+ "Claude Code → Hermes primitive map for ops skills",
+ )
+ ctx.register_command(
+ "ops",
+ handler=_handle_ops,
+ description="claude-ops router (inbox, go, fires, …)",
+ args_hint="[skill] [args]",
+ )
+ for name, md in _iter_skills():
+ desc = _description(md)
+ ctx.register_skill(name, md, desc)
+ ctx.register_command(
+ name,
+ handler=_handler(name),
+ description=desc,
+ args_hint="[args]",
+ )
diff --git a/claude-ops/hermes-plugin/plugin.yaml b/claude-ops/hermes-plugin/plugin.yaml
new file mode 100644
index 00000000..fa0e0e1d
--- /dev/null
+++ b/claude-ops/hermes-plugin/plugin.yaml
@@ -0,0 +1,4 @@
+name: ops
+version: "3.4.4"
+description: "claude-ops on Hermes — slash commands and skills for inbox, deploy, revenue, and the rest of the ops suite. Enable with plugins.enabled: [ops]."
+author: Lifecycle Innovations Limited
diff --git a/claude-ops/skills/ops-inbox/SKILL.md b/claude-ops/skills/ops-inbox/SKILL.md
index 7a289c1c..c0a78631 100644
--- a/claude-ops/skills/ops-inbox/SKILL.md
+++ b/claude-ops/skills/ops-inbox/SKILL.md
@@ -693,6 +693,17 @@ channels sequentially in the main session.
prompt MUST say _"You are READ-ONLY. Do NOT send any outbound messages. Return drafts to the
orchestrator who stages them one-by-one."_ Sending stays in the main session, always.
+### Fallback — Hermes (`delegate_task`)
+
+When this skill runs on Hermes (no `Workflow` tool, no `AskUserQuestion`):
+
+- **Fan-out:** `delegate_task` for one read-only scanner per available channel. If that
+ tool is missing, scan sequentially in the main session. Same read-only contract.
+- **Approval:** numbered options in chat. On Telegram, two turns — full draft as its own
+ bubble, then the `[Send]` `[Edit]` `[Skip]` card. Never bundle drafts. Never put the
+ only copy of the draft in a clipped preview.
+- Plugin-wide table: Rule 10 in `CLAUDE.md` and `hermes-plugin/RUNTIME.md`.
+
## Pre-gathered data
```!
diff --git a/claude-ops/tests/run-all.sh b/claude-ops/tests/run-all.sh
index 57fe976f..0bd6b776 100755
--- a/claude-ops/tests/run-all.sh
+++ b/claude-ops/tests/run-all.sh
@@ -52,6 +52,7 @@ run_suite "$TESTS_DIR/test-post-update-migrate-sentinel.sh"
run_suite "$TESTS_DIR/test-migrate-launchctl-domain-isolation.sh"
run_suite "$TESTS_DIR/test-template.sh"
run_suite "$TESTS_DIR/test-claude-md.sh"
+run_suite "$TESTS_DIR/test-hermes-plugin.sh"
run_suite "$TESTS_DIR/test-no-secrets.sh"
run_suite "$TESTS_DIR/test-agent-teams.sh"
run_suite "$TESTS_DIR/test-pocket-env-broker.sh"
diff --git a/claude-ops/tests/test-hermes-plugin.sh b/claude-ops/tests/test-hermes-plugin.sh
new file mode 100755
index 00000000..28deafe1
--- /dev/null
+++ b/claude-ops/tests/test-hermes-plugin.sh
@@ -0,0 +1,66 @@
+#!/usr/bin/env bash
+# test-hermes-plugin.sh — native Hermes package stays loadable and public-clean
+set -euo pipefail
+
+PLUGIN_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
+HP="$PLUGIN_ROOT/hermes-plugin"
+
+pass=0
+fail=0
+ok() { echo " PASS: $1"; pass=$((pass + 1)); }
+err() { echo " FAIL: $1"; fail=$((fail + 1)); }
+
+echo "Checking: hermes-plugin"
+echo ""
+
+if [[ -f "$HP/plugin.yaml" ]]; then
+ ok "plugin.yaml exists"
+else
+ err "plugin.yaml missing"
+fi
+
+if grep -qE '^name:[[:space:]]*ops[[:space:]]*$' "$HP/plugin.yaml"; then
+ ok "plugin.yaml name is ops"
+else
+ err "plugin.yaml name must be ops"
+fi
+
+if [[ -f "$HP/__init__.py" && -f "$HP/RUNTIME.md" ]]; then
+ ok "__init__.py and RUNTIME.md exist"
+else
+ err "missing __init__.py or RUNTIME.md"
+fi
+
+if python3 -m py_compile "$HP/__init__.py"; then
+ ok "__init__.py compiles"
+else
+ err "__init__.py failed to compile"
+fi
+
+skill_count=$(find "$PLUGIN_ROOT/skills" -mindepth 2 -maxdepth 2 -name SKILL.md | wc -l | tr -d ' ')
+if ((skill_count >= 50)); then
+ ok "sibling skills/ has $skill_count SKILL.md files"
+else
+ err "sibling skills/ looks empty ($skill_count)"
+fi
+
+if grep -q 'AskUserQuestion' "$HP/RUNTIME.md" && grep -q 'delegate_task' "$HP/RUNTIME.md"; then
+ ok "RUNTIME.md maps AskUserQuestion and Workflow"
+else
+ err "RUNTIME.md missing required primitive maps"
+fi
+
+# Public-repo: no home paths or mailbox addresses in this package.
+if grep -RE --exclude-dir='__pycache__' --include='*.py' --include='*.md' --include='*.yaml' \
+ '(/Users/|/home/[a-z]|@gmail\.com|@<OWNER_BRAND>)' "$HP" >/dev/null; then
+ err "hermes-plugin contains a private path or mailbox"
+else
+ ok "hermes-plugin has no private paths or mailboxes"
+fi
+
+echo ""
+echo "Results: $pass passed, $fail failed"
+if ((fail > 0)); then
+ exit 1
+fi
+exit 0
diff --git a/installer/README.md b/installer/README.md
index c9ebc0a9..814d5d3a 100644
--- a/installer/README.md
+++ b/installer/README.md
@@ -21,7 +21,7 @@ Reads the canonical source (`Lifecycle-Innovations-Limited/claude-ops` at a pinn
| Codex | Flat `ln -s` | `~/.codex/skills` |
| Gemini CLI | Flat `ln -s` | `~/.gemini/skills` |
| OpenClaw | Flat `ln -s` | `~/.openclaw/skills` |
-| Hermes | Hybrid (flat + nested `ops/<name>`) | `~/.hermes/skills` |
+| Hermes | Hybrid skills + native plugin | `~/.hermes/skills` and `~/.hermes/plugins/ops` |
| OpenCode | Flat `ln -s` | `~/.config/opencode/skills` |
Binstubs from upstream `bin/` are symlinked into `~/bin/` (or `$CLAUDE_OPS_BIN_DIR`).
@@ -56,14 +56,14 @@ version: 1
source:
type: git
url: https://github.com/Lifecycle-Innovations-Limited/claude-ops.git
- ref: v3.4.2
+ ref: v3.4.4
agents:
claude: { enabled: true }
codex: { enabled: true, path: ~/.codex/skills }
gemini: { enabled: true, path: ~/.gemini/skills }
openclaw: { enabled: true, path: ~/.openclaw/skills }
- hermes: { enabled: true, flat: ~/.hermes/skills, nested: ~/.hermes/skills/ops }
+ hermes: { enabled: true, flat: ~/.hermes/skills, nested: ~/.hermes/skills/ops, plugin: ~/.hermes/plugins/ops }
opencode: { enabled: false, path: ~/.config/opencode/skills }
bin:
diff --git a/installer/src/config.mjs b/installer/src/config.mjs
index b220a62d..405aa4d6 100644
--- a/installer/src/config.mjs
+++ b/installer/src/config.mjs
@@ -17,7 +17,7 @@ export const DEFAULT_CONFIG = {
source: {
type: "git",
url: "https://github.com/Lifecycle-Innovations-Limited/claude-ops.git",
- ref: "v3.4.2",
+ ref: "v3.4.4",
},
agents: {
claude: { enabled: true, type: "marketplace" },
@@ -29,6 +29,7 @@ export const DEFAULT_CONFIG = {
type: "hybrid",
flat: "~/.hermes/skills",
nested: "~/.hermes/skills/ops",
+ plugin: "~/.hermes/plugins/ops",
},
opencode: {
enabled: false,
@@ -85,6 +86,7 @@ export function loadConfig(overridePath) {
if (a.path) a.path = expandHome(a.path);
if (a.flat) a.flat = expandHome(a.flat);
if (a.nested) a.nested = expandHome(a.nested);
+ if (a.plugin) a.plugin = expandHome(a.plugin);
}
if (cfg.bin && cfg.bin.path) cfg.bin.path = expandHome(cfg.bin.path);
return cfg;
diff --git a/installer/src/dispatch.mjs b/installer/src/dispatch.mjs
index 5c916963..18c0573b 100644
--- a/installer/src/dispatch.mjs
+++ b/installer/src/dispatch.mjs
@@ -33,6 +33,7 @@ function pickAgents(cfg, onlyNames) {
installed: det.installed,
skillsPath,
nested: conf.nested || null,
+ pluginPath: conf.plugin || null,
};
}
return out;
@@ -67,6 +68,15 @@ export function planAll({
});
plan.agents[name] = mirror;
if (mirror.errors.length) plan.errors.push(...mirror.errors);
+ if (a.pluginPath) {
+ const pluginPlan = planNativePlugin({
+ srcDir,
+ pluginPath: a.pluginPath,
+ force,
+ });
+ plan.agents[name].plugin = pluginPlan;
+ if (pluginPlan.errors) plan.errors.push(...pluginPlan.errors);
+ }
}
if (cfg.bin && cfg.bin.path) {
plan.bin = planBinLinks({
@@ -81,6 +91,96 @@ export function planAll({
return plan;
}
+export function planNativePlugin({ srcDir, pluginPath, force }) {
+ const from = path.join(srcDir, "hermes-plugin");
+ const to = pluginPath;
+ const errors = [];
+ if (!pluginPath) {
+ return { skipped: true, reason: "no plugin path", errors };
+ }
+ if (!fs.existsSync(path.join(from, "plugin.yaml"))) {
+ return { skipped: true, reason: "hermes-plugin missing", errors };
+ }
+ let existing = null;
+ try {
+ existing = fs.lstatSync(to);
+ } catch (_e) {
+ /* absent */
+ }
+ if (existing) {
+ if (existing.isSymbolicLink()) {
+ const cur = fs.readlinkSync(to);
+ if (cur === from || cur === from + "/") {
+ return {
+ skipped: false,
+ action: {
+ op: "skip",
+ from,
+ to,
+ reason: "already correct",
+ },
+ errors,
+ };
+ }
+ return {
+ skipped: false,
+ action: {
+ op: "symlink",
+ from,
+ to,
+ reason: "replace existing symlink",
+ },
+ errors,
+ };
+ }
+ if (!force) {
+ errors.push({
+ path: to,
+ op: "symlink",
+ error: "target is real (refused without --force)",
+ });
+ return {
+ skipped: false,
+ action: {
+ op: "refuse",
+ from,
+ to,
+ reason: "target is a real file/dir; pass --force to overwrite",
+ },
+ errors,
+ };
+ }
+ }
+ return {
+ skipped: false,
+ action: { op: "symlink", from, to },
+ errors,
+ };
+}
+
+function applyPluginLink(pluginPlan, { dryRun, onApply }) {
+ if (!pluginPlan || pluginPlan.skipped || !pluginPlan.action) return;
+ const a = pluginPlan.action;
+ if (a.op === "skip" || a.op === "refuse") {
+ a.status = a.op === "skip" ? "skipped" : "refused";
+ return;
+ }
+ if (a.op !== "symlink" || dryRun) {
+ a.status = dryRun ? "planned" : "noop";
+ return;
+ }
+ fs.mkdirSync(path.dirname(a.to), { recursive: true });
+ try {
+ fs.lstatSync(a.to);
+ fs.rmSync(a.to, { recursive: true, force: true });
+ } catch (_e) {
+ /* absent */
+ }
+ fs.symlinkSync(a.from, a.to);
+ a.status = "applied";
+ if (onApply) onApply(a.to, a.from);
+}
+
function applyAll({ plan, dryRun, cfg }) {
let manifest = loadManifest();
for (const [name, mirror] of Object.entries(plan.agents)) {
@@ -89,6 +189,12 @@ function applyAll({ plan, dryRun, cfg }) {
dryRun,
onApply: (to, from) => addSymlink(manifest, to, from),
});
+ if (mirror.plugin) {
+ applyPluginLink(mirror.plugin, {
+ dryRun,
+ onApply: (to, from) => addSymlink(manifest, to, from),
+ });
+ }
// Record every applied symlink in the manifest.
if (!dryRun) {
for (const a of mirror.actions) {
@@ -132,6 +238,15 @@ function emit(plan, asJson) {
const arrow = a.status ? `${a.op}->${a.status}` : a.op;
process.stdout.write(` ${arrow} ${a.skill}\n`);
}
+ if (m.plugin) {
+ if (m.plugin.skipped) {
+ process.stdout.write(` plugin skipped: ${m.plugin.reason}\n`);
+ } else if (m.plugin.action) {
+ const a = m.plugin.action;
+ const arrow = a.status ? `${a.op}->${a.status}` : a.op;
+ process.stdout.write(` ${arrow} plugin ${a.to}\n`);
+ }
+ }
}
if (plan.bin && plan.bin.planned) {
const applied = plan.bin.planned.filter(
diff --git a/installer/test/smoke.mjs b/installer/test/smoke.mjs
index e4bdc463..6a46ffff 100644
--- a/installer/test/smoke.mjs
+++ b/installer/test/smoke.mjs
@@ -8,7 +8,7 @@ import { loadConfig } from "../src/config.mjs";
import { listSourceSkills, listSourceBin } from "../src/source.mjs";
import { planBinLinks, applyBinLinks } from "../src/bin.mjs";
import { planMirror } from "../src/mirror.mjs";
-import { planAll } from "../src/dispatch.mjs";
+import { planAll, planNativePlugin } from "../src/dispatch.mjs";
import {
loadManifest,
saveManifest,
@@ -138,6 +138,22 @@ try {
!fs.existsSync(undetectedPath),
"undetected agent target directory is not created",
);
+
+ const pluginTo = path.join(scratch, "hermes-plugins", "ops");
+ const pluginPlan = planNativePlugin({
+ srcDir: SRC,
+ pluginPath: pluginTo,
+ force: false,
+ });
+ assert(
+ pluginPlan && !pluginPlan.skipped && pluginPlan.action?.op === "symlink",
+ "hermes native plugin symlink is planned",
+ );
+ assert(
+ pluginPlan.action.from.endsWith(`${path.sep}hermes-plugin`) ||
+ pluginPlan.action.from.endsWith("/hermes-plugin"),
+ "plugin symlink source is hermes-plugin/",
+ );
} finally {
fs.rmSync(scratch, { recursive: true, force: true });
}