Target:
~/.hermes/memories/& OMP ACP Orchestration (routa.db) Summary: Hyper-dense, budget-constrained Markdown memory synced with a SQLite state-machine orchestrator via stdio.
๐ก Best Practices
- Hyper-Dense Compression: Treat markdown memory like constrained L1 cache. Strip all conversational bloat; express heuristics in absolute minimum words.
- Delegate History to Routa: Store all chronological history, Kanban transitions, and JSON artifacts exclusively in
routa.db. Reserve.mdmemories strictly for semantic agent constraints. - Delimiter Discipline: Utilize the
ยงcharacter to isolate distinct heuristics. It allows clean parsing without JSON overhead and maximizes token-to-signal ratio. - Atomic Flushes: Always respect
MEMORY.md.lockandUSER.md.lockduring swarm operations. Instant-replace content on each turn; never append indefinitely. - Sandboxed Secrets: Never embed raw API tokens in subshell heredocs or memory files. Pass secrets dynamically via
env=dictto avoid parsing errors.
๐จ Anti-Patterns
- Audit Trail Bloat: Treating
MEMORY.mdas an append-only transaction log. It lacks an audit trail by design to prevent context starvation and budget overflow. - Conversational Syntax: Writing full paragraphs, greetings, or meta-commentary inside memory files. Every redundant character risks hitting the budget and causing silent truncation.
- Manual DB Mutations: Modifying
routa.dbdirectly instead of routing transitions viaomp acp. Bypassing the protocol breaks evidence constraints and session tracking. - Ambient Context Reliance: Assuming subprocesses (e.g., cron, execute_code) inherit environment variables globally. Explicitly source
.envbefore any external API calls.
๐ง Patterns & Architecture
- Flush-On-Turn: Memory files are aggressively rewritten per turn. This maintains the latest valid snapshot of truths without historical cruft.
- ACP Subprocess Orchestration:
omp acpbridges the agent runtime androuta.dbviastdio. It securely managesacp_session_key,acp_pid, andtask_idtracking. - Lane Transition Engine: Workspaces enforce strict state-machine progressions (e.g.,
backlogโevidence_requiredโverdict).routa.dblocks lane transitions until evidence JSON arrays are fulfilled. - Concurrency Control: Subagents use strict file locks (
.lock) to prevent state clobbering. Parallel task execution requires atomic writes to shared memory files.