Gormes

Upstream Lessons

Upstream Lessons

Gormes does not copy Hermes or GBrain. It absorbs their durable contracts.

Hermes is the capability ledger for the agent runtime: provider routing, prompt assembly, tool continuations, gateway sessions, cron, memory providers, skills, plugins, and operator commands. GBrain is the architecture donor for contract-first operations, durable jobs, knowledge graph provenance, retrieval evaluation, and skills as auditable runtime knowledge.

The combined lesson is simple:

port contracts
reject monoliths
preserve Go ownership boundaries
prove behavior with fixtures
show degraded mode to operators

Durable Contracts To Absorb

ContractDonorGormes target
Contract-first operationsGBrainOperation/tool descriptors drive schemas, commands, doctor, audit, and fixtures.
Trust-class enforcementGBrain + Hermes gatewayoperator, gateway, child-agent, and system are enforced before handlers run.
Stable prompt assemblyHermesStable system layers; ephemeral recall injected into the current user turn.
Provider-neutral eventsHermesAdapters own provider quirks; internal/hermes emits one stream/tool-call contract.
Durable jobsGBrainCron, long work, and subagents get restartable ledgers and operator inspection.
Provenance-rich memoryGBrainEntities and relationships carry source turn, extractor, confidence, freshness, and review state.
Skills as reviewed codeGBrain + HermesSkills have metadata, resolver tests, inactive drafts, review, feedback, and version history.
Visible degraded modeGBrain + HermesMissing embeddings, provider limits, stale extraction, plugin/tool gaps, and dead letters surface in status/doctor/audit.

The Four Questions

Every planned subsystem should answer these before implementation:

  1. What contract are we porting? Name the source files and external behavior. Do not use “port file X” as the requirement.
  2. What trust class can call it? Operator-local, gateway-user, child-agent, and system/cron paths do not share the same permissions.
  3. How is degraded mode reported? Partial capability is acceptable only when operators can see it in status, doctor, audit, logs, or docs.
  4. What fixture proves compatibility? Prefer replayable local fixtures over live credentials, live platforms, or a real provider.

Phase Mapping

  • Phase 2 Gateway owns command policy, active-turn behavior, adapter contracts, cron, and subagent runtime.
  • Phase 3 Memory owns provenance, scoped recall, retrieval evaluation, and degraded memory health.
  • Phase 4 Brain Transplant owns stable prompt assembly, context compression, provider adapters, and transcript fixtures.
  • Phase 5 Final Purge owns operation/tool descriptor parity before handler ports.
  • Phase 6 Learning Loop owns skills as reviewed code, resolver evals, feedback records, and safe self-improvement.

Upstream Study References

Decision

The better Gormes architecture is:

Hermes-class capability
+ GBrain-style operation contracts
+ Go single-owner kernel
+ provider-neutral stream fixtures
+ registry-owned gateway policy
+ descriptor-owned tool safety
+ GONCHO-scoped memory provenance
+ reviewed skill lifecycle
+ visible degraded-mode checks

That keeps the upstream lessons while preserving the product promise: one small Go runtime, explicit boundaries, local-first state, and no Python runtime dependency in the final path.