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.
Cycle 20261020 - structure variants (consultant output, verbatim) and final rationale
The three variants below are the consultant's output, reproduced verbatim from cli-output/claude.md.
Variant 1: Substrate-first with live censuses
- Approach: A short serial substrate pass lands every shared declarative surface before the feature lanes start: the config quartet in one coherent diff (src/core/brain/types.ts carrying both the
cross_topicblock on BrainDreamConfig at :1450 and the newcontext:block near :2030, the policy parse/validate registration, the config-template entries, and the single config-template-ratchet test update), the env parse helper in src/core/config.ts, the path constants plus the state-surface row for Brain/cross-topic-rules.json, and the search-options-descriptor module with SEARCH_INPUT_SCHEMA derived byte-identically behind an equality test. The five feature lanes then run in parallel on disjoint file sets, consuming the substrate; the model-window resolver is built by the context-window lane itself, and the descriptor's remaining work (CLI flag derivation, the committed schemas/brain artifact, the schema export/check verb, the scoped doc-example tests) proceeds as a normal lane. Census registration stays per-lane as features go; because the substrate pre-registered the riskiest new surface, the only lane expected to add a census row is judge-eval, if it counts the machine-side mark file as a state surface. - Trade-offs:
- Pros: the single real code collision (the config quartet shared by cross-topic and context-window) is resolved exactly once in one reviewable diff; every commit on the cycle branch stays census-green and bisectable; the config-template ratchet is satisfied in one pass instead of two sequential edits; landing the descriptor with its byte-equality proof early converts the highest-blast-radius feature into an additive one and removes tail risk; the doc-example tests are scoped to the Search sections, so the later freshness and bench doc edits cannot break them.
- Cons: a serial phase delays all lanes by the substrate duration; early risk concentrates in the config validation machinery, where a misspelled key only warns and silently defaults; lanes build against types that exist only on the cycle branch, so branch discipline is required; the substrate lane must be staffed with someone who understands both the dream config parse and the policy block machinery.
- Complexity: medium
- Risk: low
Variant 2: Independent lanes with ownership contracts and an end-stage integrator
- Approach: No pre-landing. Five lanes start immediately from the same base under declared file ownership: the context-window lane owns the config quartet and the ratchet test; the cross-topic lane takes an explicit dependency on it and merges after, touching only the dream files, the path constants and its ledger write; judge-eval, freshness-plus-wikilink, and bench-plus-schema-schema-artifact form the remaining lanes on provably disjoint sets. Each lane registers its own census rows so every branch is green on its own. One integrator pass at the end resolves the residual collisions (state/surfaces.ts between the ledger and mark rows, command-manifest.ts between the eval and schema verbs, docs/cli-reference.md across three features, CHANGELOG), and the schema unification is sequenced last so the byte-identity check of SEARCH_INPUT_SCHEMA and the CLI flag derivation runs against the settled tree, with its doc-example tests executing after the freshness and bench doc edits have landed.
- Trade-offs:
- Pros: maximum parallelism from minute zero; no lane waits on a substrate; the config machinery gets a single owner, so the two features never edit the same files simultaneously; sequencing the schema unification last means its byte-freeze and doc tests verify the final state of both the frozen MCP surface and the docs, eliminating the risk of later edits invalidating the proof.
- Cons: the cross-topic lane is blocked or must stub against the config owner, creating a hidden serial chain inside a nominally parallel plan; integration churn concentrates at the end precisely in the sensitive files (config validation, state surfaces, the frozen schema, the manifest), where conflicts get resolved under deadline pressure; the highest-blast-radius feature lands last, so any byte-drift discovery or SCHEMA_IDS tripwire surprise arrives when the least schedule remains; reviewers see the config additions twice, in two feature diffs, instead of once.
- Complexity: medium
- Risk: medium
Variant 3: Two-wave train with centralized registration commits
- Approach: No substrate pass. The cycle merges onto the cycle branch as two waves. Wave 1 lands immediately in parallel the three features with zero shared files: wikilink disambiguation, the freshness behind-count, and the bench guards. Wave 2 sequences the rest: context-window lands first and owns the config quartet, cross-topic rebases on it, judge-eval runs in parallel on its disjoint set, and the schema unification lands last in the wave, followed by a single final docs pass. Census and registry registration is centralized: each lane develops its rows as an attached patch, and one registration commit at each wave boundary applies the state-surface rows, config-template entries, manifest lines and doc updates in a single reviewable diff, keeping the PR head green at each boundary.
- Trade-offs:
- Pros: the three disjoint features deliver early with no coordination cost, shrinking the tail; two wave boundaries give two clean integration and review checkpoints instead of one end-stage crunch; the centralized registration commit presents every census, manifest and docs change as one set, which is efficient to review as a whole.
- Cons: commits between a feature landing and the wave-boundary registration commit leave the cycle branch census-red, which hurts bisectability inside the single PR; registration review is decoupled from feature review, so whoever reviews the registration commit may lack the context justifying each row; the wave discipline serializes the config work anyway, yielding most of Variant 2's constraint plus additional choreography; per-lane branches must either carry known-red census tests or maintain local registration patches, both of which invite drift between what a lane verified and what lands.
- Complexity: large
- Risk: medium
Recommended: Variant 1
Rationale: The architecture censuses fail the build on unregistered new surfaces, so registration must be live wherever a lane adds state; Variant 1 is the only variant that removes the riskiest registrations (the cross-topic ledger surface row and the config-template ratchet shared by two features) from the lanes entirely, keeping every commit across four or five parallel lanes green and bisectable. The one genuine code collision, the config quartet shared by the cross-topic and context-window features, is resolved exactly once in a small coherent diff rather than through ownership-and-rebase choreography that concentrates churn in exactly the files where a mistake silently defaults. Landing the descriptor with its byte-equality proof early converts the schema unification, the highest-blast-radius feature, into an additive change and leaves only ordinary lane work for the tail. The cost is a short serial substrate phase and an early coordination front, which is cheap at this substrate size and pays for itself in merge stability and review clarity.
Orchestrator decision
The orchestrator accepts the consultant's recommendation of Variant 1. It resolves the cycle's only true code collision, the config quartet shared by the cross-topic and context-window features, exactly once in one reviewable diff, and pre-registers the riskiest census rows so every commit across the five parallel lanes stays green and bisectable. Landing the search-options descriptor with its byte-equality proof first converts the highest-blast-radius feature into a purely additive change, which no other variant achieves without end-stage churn in exactly the files where a mistake silently defaults.