Integrates the three Prime-Agent (PrimeIntellect-ai/prime-agent) harness
features that fit Hermes' architecture, adapted rather than ported:
- /goal gate add <cmd>: deterministic quality gates on the goal loop.
Gates run at turn boundary BEFORE the LLM judge; a failing gate's
bounded output becomes the continuation prompt, unchanged workspaces
(git fingerprint) are not re-run, retries are bounded with auto-pause.
- /heartbeat every <interval> <prompt>: one recurring re-entry prompt
per session, injected as a plain user turn only when idle; missed
ticks coalesce; state persists in SessionDB and migrates across
compression rotations. CLI watchdog thread + gateway-wide poller.
- /refine [focus]: user-triggered run of the existing background
memory/skill review fork, with optional focus instructions appended
to the review prompt. Automatic reviews are byte-identical to before.
RLM (IPython-only tool surface) deliberately excluded per request; the
daemon/worker detach layer and root-session A2A messaging are covered
by the gateway, sessions DB, delegation, and send_message and were not
duplicated.
All three features are cache-safe (plain user-role injections, no
system-prompt mutation) and alternation-safe.