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.
Variant 1: Composable read-only review suite (dream untouched)
- Approach: Ship all five tasks as additive read-mostly surfaces layered around an unchanged dream. New
brain_retentionandbrain_monthly_reviewtools, acomplexity_scorefield added to discipline reports, JSON Schemas emitted (not enforced) intoBrain/schemas/from existing TypeScript types, and abrain_intent_reviewadvisory tool that scores signals likely to pass dream but does not actually filter them. Dream's single-pass behavior, signal flow, and outputs stay byte-for-byte identical. - Trade-offs:
- Pro: lowest blast radius; no risk of breaking deterministic dream or existing tests.
- Pro: each task ships as an independent additive tool, easy to TDD and revert.
- Pro: matches "recommendation-only" constraint trivially for retention.
- Con: two-stage gate becomes advisory-only, which weakens the upstream pattern's actual filtering benefit (t_ef94345e).
- Con: schemas-as-emission don't catch malformed input at the MCP boundary, so brain_doctor still carries that burden.
- Con: surface area grows by 2-3 new tools/verbs without consolidating them under a unifying frame.
- Complexity: medium
- Risk: low
Variant 2: Staged lifecycle pipeline (port the buildroom)
- Approach: Restructure dream into an explicit pipeline of
intent_review β main_review β retention_reviewstages with JSON Schema contracts between each, mirroring the upstream buildroom. Monthly review consumes the schema-validated stage artifacts as its primary input source, and the complexity-vs-thinking ratio is embedded into the intent_review stage as a filtering signal. Schemas live inBrain/schemas/and are enforced at every inter-stage boundary plus the MCP input layer. - Trade-offs:
- Pro: maximally coherent with the source articles' pipeline pattern; one design covers all five tasks.
- Pro: schemas give brain_doctor much less to do; clear audit artifacts per stage.
- Pro: two-stage gate becomes real filtering, not advisory.
- Con: directly violates the constraint against rewriting dream into a multi-phase engine without strong justification.
- Con: high risk to the deterministic core; planTopics, transition planning, and quarantine paths all need re-threading.
- Con: schema enforcement either pulls in an Ajv-class dependency (constraint hesitation) or requires a non-trivial local validator.
- Con: long migration path; intermediate states may break existing workruns and review-candidates dry-run.
- Complexity: large
- Risk: high
Variant 3: Thin pre-filter + independent review pillars
- Approach: Add a real intent-review pre-pass that runs before dream and actually filters/marks signals (so dream's
planTopicsconsumes a smaller, gated set), while leaving dream's internal main-review logic unchanged. Ship retention as a standalone recommendation-onlybrain_retentiontool overBrain/retired/andinbox/processed/, shipbrain_monthly_reviewas a new temporal aggregator built ondaily-brief/weekly-briefandvaultDelta, extenddecideStatus/ActivitySummarywith acomplexity_score, and emit JSON Schemas from existing TypeScript types intoBrain/schemas/with optional lightweight enforcement only at the MCP input boundary (no Ajv dependency). - Trade-offs:
- Pro: hits all five task scopes without restructuring dream's main pass.
- Pro: two-stage gate is genuinely two-stage (real filtering), not advisory like Variant 1.
- Pro: retention is naturally recommendation-only because it's a separate read-only tool, satisfying t_6fa649b9's safety constraint exactly.
- Pro: monthly review reuses the existing temporal index and brief helpers; complexity ratio is a small additive field in discipline.
- Pro: schemas-as-emitted-contracts with optional boundary validation avoids heavy deps but still tightens MCP input safety.
- Con: introduces a new pre-dream stage that must stay in sync with dream's signal expectations; needs careful contract testing.
- Con: two read-only surfaces (retention, monthly) plus a discipline field plus an intent-review pre-pass plus schemas is still five distinct moving pieces β release coordination matters.
- Con: complexity-vs-thinking metric is heuristic; tuning the threshold for discipline status may need iteration.
- Complexity: medium
- Risk: low-to-medium
Recommended: Variant 3
Rationale: It delivers a coherent Brain lifecycle review release by sequencing the five tasks around their natural seams β pre-dream gating, dream untouched, post-dream retention, period-level monthly review, discipline-level complexity ratio, and schemas as additive contracts β which matches the project's deterministic, dependency-light, recommendation-only constraints far better than Variant 2's dream refactor. Versus Variant 1 it gives the two-stage gate real teeth and keeps retention safely isolated, without paying Variant 2's risk and dependency cost. The five pieces are independently TDD-able (pure core helpers first, CLI/MCP wrappers second) and can ship as additive verbs and tools with no breakage to existing public APIs.