Local-first π§ memory for Hermes Agent that lives in your Obsidian vault and remembers project context. Nightly π΄ dream passes turn repeat corrections into confirmed preferences with measurable confidence. Adapters ship for Claude Code, Codex, and OpenClaw, with an MCP server for anything else.
Variants β memory-signal provenance and lifecycle integrity
Verbatim consultant output (claude-opus-4-8) + final rationale.
Variant 1 β Shared-substrate first
Approach: Land the three cross-cutting primitives as standalone modules before any consumer: a manifest module (content-hash cache + classify), an idempotency keyβcontent-hash ledger under Brain/, and a single dryRun gate that wraps every continuity-append surface. All 13 cards then reduce to thin verticals that call into settled infrastructure.
Trade-offs:
- Maximal reuse and one canonical answer for each concern (one hashing path, one dedup notion, one preview switch) β no divergent re-implementations.
- Couples the p4 anchors (A1) and the shared ledger to the p2 capstones (A3, C4) through APIs designed before their only consumers exist, so the primitive shape is guessed, not validated; a wrong guess forces a rewrite that ripples across cards.
- A global dry-run wrapper contradicts the existing per-surface
opts.dryRunidiom inimport.tsand risks a leaky abstraction that must special-case dream/retire triggers anyway. Complexity: large Risk: high
Variant 2 β Self-contained verticals
Approach: Treat every card as an independent vertical driven by priority then dependency, with no shared modules beyond the existing sourceIdentityHash/SHA-256 primitive. A1 grows its manifest inside ingest; C1 grows its ledger inside feedback-tools; C4 and A3 reach directly into whatever their parents left behind rather than a shared API.
Trade-offs:
- Lowest coupling and simplest per-card review; each commit is atomic and byte-identical-when-off is trivial to verify in isolation.
- The two hard composition edges (A1βA3, C1βC4) still force reuse, so "no shared module" is a fiction β A3 and C4 either duplicate parent logic or depend on internal shapes, producing drift (two idempotency notions, two hash-manifest readers) that the next release must reconcile.
- No structural place for the dry-run concern shared by C2 and any future preview, so C2's short-circuit logic is bespoke and hard to prove faithful to the real extraction path. Complexity: medium Risk: medium
Variant 3 β Topological hybrid: shared seams only at composition edges
Approach: Extract shared infrastructure only where a hard dependency already mandates it β A1 ships the manifest as a real module because A3 consumes it, C1 ships the keyβcontent-hash ledger as a real module because C4 consumes it β and keep everything else a self-contained vertical, mirroring import.ts's existing opts.dryRun as a per-surface parameter rather than a global wrapper. Drive in a topological order that serializes every shared-file collision: A1 β C1 β A2 β D2 β D1 β C2 β C3 β C5 β C6 β A3 β C4 β D3.
Trade-offs:
- Each shared module is designed against a concrete consumer (A3, C4) landed shortly after, so the API is validated by use, not guessed; the p4 anchors never wait on the p2 capstones.
- File collisions resolve by ordering, not merging: A1 before A3 on
ingest.ts; A2 before C2 onimport.ts(event-time settles the emit path, then dry-run gates it); D2 before D3 oncontradiction.ts; D1 ownstruth/{fold,conflicts}.tsalone as a pure projection over the append-only ledger. - Two genuine modules (manifest, ledger) plus disciplined ordering is more upfront design than pure verticals, and the capstones (A3, C4, D3) landing last means the longest-pole cards gate branch completion. Complexity: medium Risk: low
Recommended: Variant 3
The release's own constraints already dictate the answer: two hard composition edges (A1βA3, C1βC4) mean the manifest and idempotency ledger must be reusable, but nothing else composes, so building the full shared substrate of Variant 1 pays coupling and speculative-API cost for reuse the cards do not ask for. Variant 2's refusal to extract even those two modules is a false economy β the edges force reuse regardless, and doing it implicitly produces exactly the duplicate-hash / dual-idempotency drift this release exists to eliminate. Variant 3 extracts shared code precisely at the mandated seams and validates each module against a consumer landed immediately after, while a single topological drive order serializes all five shared-file collisions and honors all three parentβchild edges without coupling the p4 anchors to the p2 capstones. Keeping dry-run as a per-surface parameter that mirrors the existing import.ts idiom preserves the byte-identical-when-off invariant and keeps preview faithful to real extraction, which a global wrapper cannot guarantee.
Final decision: Variant 3
Agreed with the consultant's recommendation. Variant 3 is the right fit because it preserves o2b's load-bearing invariants and resolves every concrete constraint the 13 cards impose:
- Reuse only where a hard edge mandates it. Two composition edges are real (A1βA3 the content-hash manifest; C1βC4 the idempotency-key ledger). Variant 3 extracts exactly those two modules and validates each against a consumer landed immediately after β never guessing an API. Variant 1's speculative full substrate would couple the p4 anchors to p2 capstones through unvalidated shapes; Variant 2's refusal to extract would produce the dual-hash / dual-idempotency drift this release exists to eliminate.
- Byte-identity-when-off / absent-by-default. Every new field is additive
and optional; dry-run stays a per-surface parameter mirroring the existing
import.tsopts.dryRunidiom (not a global wrapper), so each card keeps a locally-provable off-branch and preview stays faithful to real extraction. - Shared-file collisions serialized by drive order. The single topological
order (A1 β C1 β A2 β D2 β D1 β E1 β C2 β C3 β C5 β C6 β A3 β C4 β D3)
resolves all five collisions (
ingest.tsfor A1+A3;import.tsfor A2+C2;contradiction.tsfor D2+D3;WriteSignalInputfor A2/C5/C1;truth/{fold,conflicts}.tsowned by D1 alone) and honors all three parentβchild edges (A1βA3, C1βC4, D2βD3).
One amendment to the consultant's drive order: it listed 12 of 13 cards and omitted E1 (the isolated Aider wrapper). E1 has no shared-file collision and no dependency, so it slots cleanly into the p4-anchor group (driven sixth, after the other three p4 anchors). The variant choice is unaffected.
Drive order: A1 β C1 β A2 β D2 β D1 β E1 β C2 β C3 β C5 β C6 β A3 β C4 β D3.