Hermes architecture
Skill rox1694125-bit/hermes-codex-control-plane/skills/hermes-architecture
Load before changing Hermes Agent, Hermes profiles, gateway integrations, messaging-platform adapters such as Feishu/Lark, skills, tools, Codex runtime bridging, or Kanban worker behavior. Provides a compact architecture map, invariants, risk points, and test routing for Codex acting as the Hermes development control plane.From its SKILL.md
npx -y skills add rox1694125-bit/hermes-codex-control-plane --skill hermes-architectureAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
6.4 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it
Hermes Architecture
Use this skill whenever the task touches Hermes Agent itself, a Hermes-powered project, a messaging-platform gateway flow, a profile-specific runtime, skills/tooling, or multi-agent/Kanban behavior.
Codex is the development control plane. Hermes plus the messaging platform are the execution workers and user-facing runtime. Do not merge these roles unless the user explicitly asks for a runtime integration.
For the public package architecture map, see docs/architecture.md. It names Hermes runtime modules that may exist in a Hermes Agent checkout, not necessarily inside this public pattern repository. For project migration into the 3+3 standard, prefer hermes-project-operating-manual plus docs/migration-guide.md.
First Moves
- Read the repo or project
AGENTS.mdfirst when present. - If the task is medium or high risk, use planning plus grill-me before edits.
- Define test scenarios before spawning workers or changing code.
- Keep runtime boundaries clear: Codex edits and verifies; Hermes gateway/profile handles production execution.
Architecture Map
run_agent.py: top-levelAIAgentsurface and compatibility re-exports used by tests.agent/system_prompt.py: assembles stable, context, and volatile prompt tiers.agent/prompt_builder.py: builds skills index, environment hints, platform hints, project context, andSOUL.mdidentity.agent/skill_utils.py: lightweight skill metadata, frontmatter, disabled skill, platform, and external-dir utilities.tools/skills_tool.py: model-facingskills_listandskill_viewtools plus local/plugin skill serving.model_tools.py,tools/registry.py,toolsets.py: tool registration, tool definitions, and toolset membership.gateway/run.py: long-lived gateway runtime, session routing, cachedAIAgentinstances, slash commands, background process handling, and embedded Kanban dispatcher.gateway/platforms/feishu.py: Feishu/Lark adapter. Normalizes SDK/webhook events intoMessageEvent.gateway/platforms/base.py: base adapter pipeline and background processing wrapper.hermes_cli/main.py: CLI parser and command dispatch. Gateway service entry eventually runsgateway.run.start_gateway.hermes_cli/gateway.py: gateway command/service orchestration.hermes_cli/kanban_db.py: durable Kanban DB schema, task state machine, CAS claim, dispatcher, and worker spawning.tools/kanban_tools.py: structured worker/orchestrator tool surface for Kanban.hermes_cli/kanban_swarm.py: creates a Kanban DAG for root, workers, verifier, and synthesizer.agent/transports/codex_app_server.pyandagent/transports/hermes_tools_mcp_server.py: Codex runtime bridge and Hermes tool exposure.
Prompt And Context Rules
Hermes prompt assembly is intentionally layered and cached.
SOUL.mdfromHERMES_HOMEis identity, not project architecture.- Project context priority is
.hermes.md/HERMES.md, thenAGENTS.md, thenCLAUDE.md, then.cursorrules; first match wins. .hermes.mdcan hideAGENTS.mdfrom Hermes because it has higher priority.- Skills index enters the stable prompt only as names/descriptions. Full skill content requires
skill_viewor explicit preloading. - External skills come from
skills.external_dirs, but Codex does not automatically read Hermes~/.hermes/skills. TERMINAL_CWDmatters in gateway mode because it controls project context and file/tool cwd.
Messaging Gateway Flow
The Feishu/Lark adapter is a representative example of how messaging ingress reaches Hermes. Other adapters follow the same broad shape: platform event, normalized MessageEvent, base adapter pipeline, gateway runner, session, and AIAgent.
For normal chat messages:
FeishuAdapterreceives SDK/webhook events._on_message_event()schedules_handle_message_event_data()._handle_message_event_data()deduplicates and checks admission._process_inbound_message()extracts text/media/mentions and createsMessageEvent._dispatch_inbound_event()applies batching._handle_message_with_guards()serializes per chat and calls the base adapter.BasePlatformAdapter.handle_message()calls the registeredGatewayRunner._handle_message().GatewayRunner._handle_message_with_agent()gets/creates a session and runsAIAgent.run_conversation().
Feishu Drive comments are a separate route through gateway/platforms/feishu_comment.py; do not treat them as ordinary chat messages.
Multi-Agent Boundaries
- Codex subagents are for current development work: exploration, bounded implementation, and verification.
- Hermes
delegate_taskis synchronous and not durable; use it for short in-turn child work inside Hermes. - Hermes Kanban is durable and cross-profile; use it for long-running or multi-worker production workflows.
- messaging chat is an ingress surface, not a task-state protocol.
- Do not run multiple Kanban dispatchers against the same board.
- Do not modify Kanban SQLite directly; use
kanban_db.py, CLI, dashboard, orkanban_*tools.
High-Risk Changes
Ask for explicit confirmation before:
- editing profiles,
SOUL.md, memory, cron, gateway config,.env, credentials, or allowlists; - restarting gateway or changing launchd/systemd service behavior;
- performing real Feishu writes, external sends, deletes, migrations, push, or publish actions;
- changing prompt assembly, tool schemas, file safety, profile isolation, approval handling, or Kanban state transitions.
Test Routing
Pick tests by touched area:
- Skills/context:
tests/skills,tests/run_agent/test_run_agent.py, prompt size or context tests. - Gateway/Feishu: targeted
tests/gatewayand adapter-specific tests. - CLI/config/profile:
tests/hermes_cli. - Kanban:
tests/tools/test_kanban_tools.py,tests/hermes_cli/test_kanban*, stress tests only when concurrency behavior changes. - Desktop/Codex runtime bridge: relevant
apps/desktoptests plus transport tests.
Always add or update tests when changing shared behavior, state transitions, prompt construction, tool schemas, or gateway routing.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.