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: Temporal intent at the query-plan seam, modulating recencyMul only
- Approach: Extend
src/core/search/query-plan.tswith a new structuraltemporalintent, detected only from signals that survive the language-agnostic invariant β ISO tokens in the query text (reusingextractTemporalConstraints) and the existing<field>:<value>grammar (since:/until:). The plan resolves a target window and, when that window's midpoint is materially older thannow, emits aWeightProfilewithrecencyMulbelow 1 (down to 0 for an explicitly historical query); a near-now window amplifies it. Nothing inranker.tschanges βrecency * recMulat ranker.ts:416 is already the modulation point. - Trade-offs:
- Smallest possible diff: one detector, one profile row, zero new scoring layers, zero new
ScoreBreakdownfields, no MCP surface change. planHashalready feeds the query cache, so cache correctness comes for free.- Bounded by construction β the existing
[0.7, 1.4]profile discipline means a misdetection can only re-weight, never float an unrelated document. - Only suppresses or amplifies; it cannot promote documents inside the target window, so "what did I decide back in spring?" stops being actively hurt but is not actively helped.
- Overloads a single scalar with two distinct meanings (freshness prior strength vs. temporal-intent direction), which makes the
reasonsoutput harder to read: a suppressed recency layer just silently disappears. WeightProfileis currently a per-intent constant table; a window-derived continuousrecencyMulbreaks that table's "fixed structural-feature β profile" property.
- Smallest possible diff: one detector, one profile row, zero new scoring layers, zero new
- Complexity: small
- Risk: low
Variant 2: Anchor-shifted Weibull β recency measured from the query window, not from now
- Approach: Keep one recency layer but make its reference instant query-derived: the plan resolves a target window and
search.tsthreads an optionalrecencyAnchorMs(or the resolved window) intoRankerOptions, sorecencyBoostcomputes age as distance from the window edge rather than fromnow. Absent an anchor the age isnow - mtimeexactly as today, so ranking stays byte-identical; with an anchor, the same Weibull curve becomes a soft two-sided band centred on the queried period. - Trade-offs:
- Conceptually the most faithful reading of "window-shift the recency layer": one curve, one tuning surface,
recencyShape/recencyScale/recencyAmplitudekeep their meaning, andrecencyAmplitude: 0remains the documented global off switch. - No new score component, no new breakdown field, no growth in the explain payload.
- Changes the semantics of
weibullDecay's only input from "age" to "distance", which currently has a documented one-sided contract (ageDays <= 0, including future timestamps, returns full amplitude). Making it two-sided touches the most-depended-upon and most-tested primitive in the ranking stack. - The
recency: 0.041reason string silently changes meaning per query, and downstream consumers (feedback.ts, MCPexplain, tuning/eval gates, the semantic-health baseline watermark) compare recency across queries β a shifted anchor makes those series non-comparable without a marker field. - Fights the existing tie-break, which sorts by
mtimedescending: an older in-window document can win on score and then lose the tie-break to a newer out-of-window one.
- Conceptually the most faithful reading of "window-shift the recency layer": one curve, one tuning surface,
- Complexity: medium
- Risk: high
Variant 3: Detection at the plan seam + a separate capped temporal_match layer
- Approach: Same detection front half as Variant 1 (ISO tokens plus structured field tokens, resolved through
time-range.tsinto aResolvedTimeRange), but the ranker consumes it as its own bounded additive layer rather than as a recency multiplier: reuse the already-puretemporalProximityfromtemporal-bridge.tsover a per-candidate event time (validity start, elsemtime) to produce a capped boost, alongside a modestrecencyMuldamping when the window is historical. It follows the exact shape every other layer inrankResultsuses β optional input map, absent map contributes zero, onereasonsentry, oneScoreBreakdownfield. - Trade-offs:
- Handles both halves of the problem: suppresses the wrong-direction freshness prior and promotes documents that actually sit in the queried window, which is the whole point of the upstream signal.
- Reuses two already-written, already-tested pure functions (
temporalProximity,parseTimePoint) and the existing event-time resolversearch.tsalready builds for the temporal bridge β very little genuinely new math. - Freshness prior and temporal intent stay separately observable in
reasons/breakdown, so tuning, eval gates, and theexplainprojection can attribute a ranking change to the right layer. - Soft window match complements β rather than duplicates β the existing hard
since/untilfilter: a query-text-derived window biases without excluding, which is the safer default for an inferred signal. - Widest blast radius of the three: a new
ScoreBreakdownkey (additive, but it is an MCP-visible shape), new plumbing throughsearch.ts, and a new capped constant that must be calibrated against the link/entity/activation/reuse caps so the layers stay in proportion. - Requires an event-time map for the full candidate pool, not just link expansions β more store work per query than either alternative.
- Two knobs move at once (new boost plus recency damping), so an A/B on retrieval quality needs both isolated.
- Complexity: medium
- Risk: medium
Recommended: Variant 3
Rationale: It is the only variant that delivers the actual upstream capability β biasing toward the queried window β rather than merely stopping the freshness prior from hurting, and it does so in the exact idiom the ranker already uses (optional input map, capped additive boost, absent map β byte-identical ranking), so the "every new key leaves behaviour byte-identical when absent" constraint is satisfied structurally rather than by care. Variant 2 buys elegance by mutating weibullDecay's contract and silently redefining the recency component that tuning, feedback, and eval gates already track across queries, which is a disproportionate regression surface for an enhancement-priority item. Variant 1 is the cheapest and is a legitimate fallback if scope must shrink, but it leaves the motivating "what did I decide back in spring?" case only half-served; note that under this repo's language-agnostic rule, all three variants must detect intent from ISO tokens and structured field tokens only β the "last week"/"recently" natural-language detection Signet performs is not portable here and should not be attempted.