Rumen Changelog
Changelog
Section titled “Changelog”All notable changes to Rumen will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
Section titled “[Unreleased]”No unreleased changes.
[0.4.3] - 2026-04-25
Section titled “[0.4.3] - 2026-04-25”Changed
Section titled “Changed”- Confidence scores are now context-size-normalized. The two
confidence: computeConfidence(rs)call sites insrc/synthesize.ts(lines 228 and 620) are now wrapped withnormalize(computeConfidence(rs), rs.related.length). Insights synthesized from small clusters (≤ 1, < 5, < 15 related memories) land at the lower ceilings the v0.4.2confidence.tscurve specified — the rawcomputeConfidenceoutput is unchanged, but the value that ends up on the Insight object now caps appropriately. Existingrumen_insightsrows are unaffected; new ones land at the normalized scale. computeConfidenceis now exported fromsrc/synthesize.tsso the test suite can verify the raw function directly. The fivecomputeConfidence: …tests now callcomputeConfidence(rs)instead ofmakePlaceholderInsight(rs).confidenceand assert the unscaled values they were always meant to. Two new integration tests verify the wrapped-and-normalized confidence on the placeholder path.
- This is the deferred Sprint 26 T3 integration that landed in v0.4.2 with the pure function only. Sprint 27 closed the loop.
npm test58/58 green.
[0.4.2] - 2026-04-25
Section titled “[0.4.2] - 2026-04-25”- JSON parse hardening in
src/synthesize.ts— Haiku-synthesized-insight responses now go through a three-passtryParseInsightstrategy (strict JSON.parse → fence/slice extraction → comma + literal-newline repair) before falling back to the per-object regex rescue. Drops the placeholder fallback rate from the 19% (31/166) observed on the 2026-04-19 production kickstart toward < 5% on common Haiku malformations: trailing prose after the JSON, markdown code fences, trailing commas, literal newlines inside string values. Truly malformed responses still cleanly fall through to placeholder. Helpers (tryParseInsight,sliceFirstJsonBlock,repairCommonJsonIssues) are exported and unit-tested in isolation. src/confidence.ts— purenormalize(rawScore, contextSize)function plusNORMALIZE_VERSIONconstant. Maps a raw 0..1 score onto a context-size-aware ceiling: 0.4 at size ≤ 1, 0.7 at < 5, 0.9 at < 15, full range at ≥ 15. Clamps NaN / out-of-range inputs. Currently exported only — integration intosynthesize.tsis the Unreleased item above. Seven unit tests intests/relate.test.tscover the curve.
Changed
Section titled “Changed”- Test count grew from 49 → 56 with the new fixtures.
[0.4.1] - 2026-04-16
Section titled “[0.4.1] - 2026-04-16”- Full test suite — 41 tests across extract, relate, synthesize, surface.
- Rumen install guide (
docs/INSTALL.md) and kickstart script. - README refresh covering v0.4 roadmap, hybrid Relate, and cost controls.
- Hybrid Relate documentation: embedding behaviour, failure modes, and the keyword-only fallback path.
[0.4.0] - 2026-04-16
Section titled “[0.4.0] - 2026-04-16”- Hybrid embeddings in Relate.
relate.tsnow generates OpenAItext-embedding-3-largeembeddings per signal with per-signal error tolerance: timeouts / 4xx / 5xx responses fall back to keyword-only search rather than aborting the whole job. - Self-healing migration.
migrations/001_rumen_tables.sqlgainsALTER TABLE ... ADD COLUMN IF NOT EXISTSblocks so the schema upgrades cleanly from v0.2 without a separate migration file.
Changed
Section titled “Changed”extract.ts,synthesize.ts, andtypes.tsupdated to carry the new embedding vector through the pipeline.
[0.2.2] - 2026-04-14
Section titled “[0.2.2] - 2026-04-14”Changed
Section titled “Changed”- Renamed references from Mnemos → Mnestra. Final naming after Ingram
was rejected (corporate sponsor conflict). Compatibility doc and SQL
fixture renamed; the scoped
@jhizzard/mnemospackage is deprecated. - SQL schema unchanged (
memory_*tables stay the same).
[0.2.1] - 2026-04-14
Section titled “[0.2.1] - 2026-04-14”Changed
Section titled “Changed”- Mnemos branding pass through README, CHANGELOG, and the compatibility
doc (
docs/ENGRAM-COMPATIBILITY.md→docs/MNEMOS-COMPATIBILITY.md).
[0.2.0] - 2026-04-14
Section titled “[0.2.0] - 2026-04-14”- Synthesize phase (
src/synthesize.ts) — replaces v0.1’s placeholder insight text with real Claude Haiku generation. Wired intorunRumenJobbetween Relate and Surface.- Batching: up to 3 signals per model call, returned as a single JSON object for token efficiency.
- Confidence scoring combines max similarity, cross-project bonus, and age spread of related memories.
- Citations: the Haiku prompt asks for
[#xxxxxxxx]short-ID citations inside the insight text and returns the matching full UUIDs incited_ids[]. Only IDs that appear in the related-memory set survive intorumen_insights.source_memory_ids.
- LLM budget guardrails.
RUMEN_MAX_LLM_CALLS_SOFT(default 100) logs a warning and falls back to the v0.1 placeholder template for the remaining signals;RUMEN_MAX_LLM_CALLS_HARD(default 500) aborts the job cleanly (rows already written stay, no corruption). Token counts are logged per call as[rumen-synthesize] tokens=<n>. - Graceful degradation when
ANTHROPIC_API_KEYis missing. Rumen logs[rumen-synthesize] no API key, falling back to placeholderand produces the same insight rows as v0.1 — so the loop remains testable without a Anthropic account. - CI integration test. New
integration-testjob in.github/workflows/ci.ymlspins up an ephemeral Postgres 16, appliestests/fixtures/mnestra-minimal.sqlmigrations/001_rumen_tables.sql, and runsscripts/test-locally.tsend-to-end. Asserts at least onerumen_insightsrow is produced.
InsightandSynthesizeContexttypes exported fromsrc/types.tsfor consumers that want to drive Synthesize independently of the full loop.
Changed
Section titled “Changed”surfaceInsightsnow acceptsInsight[]rather thanRelatedSignal[], so the placeholder and real-Haiku paths share a single write layer. External callers that were passingRelatedSignal[]directly must either move torunRumenJob(which still takes care of Relate → Synthesize → Surface) or wrap their signals withmakePlaceholderInsightfirst.
Dependencies
Section titled “Dependencies”- Added
@anthropic-ai/sdk@^0.30.1.
[0.1.0] - 2026-04-11
Section titled “[0.1.0] - 2026-04-11”Initial release. Extract + Relate + Surface only — no LLM synthesis, no question generation.
WARNING: Rumen v0.1 writes to a
rumen_insightstable. It does NOT modify or delete any existing memory rows. Run against a TEST instance for the first two weeks of use. Do NOT point at production memory stores until validated.
runRumenJob(db, options)entry point that runs the Extract, Relate, and Surface phases end-to-end.- Extract phase (
src/extract.ts): pulls session memories from the last 24–72 hours out of Mnestra’smemory_sessions+memory_itemstables, filters out sessions with fewer than 3 events, and returns structured signals. - Relate phase (
src/relate.ts): for each signal, runsmemory_hybrid_searchacross all historical memories and keeps top-5 candidates with similarity > 0.7. - Surface phase (
src/surface.ts): writes a non-destructiverumen_insightsrow per signal withsource_memory_ids[]populated. v0.1 uses placeholder insight text; v0.2 will replace this with LLM synthesis. - SQL migrations:
migrations/001_rumen_tables.sql—rumen_jobs,rumen_insights,rumen_questionswith indexes.migrations/002_pg_cron_schedule.sql—pg_cronschedule that calls the Edge Function every 15 minutes.
- Supabase Edge Function entry point at
supabase/functions/rumen-tick/index.ts. Deno-compatible, readsDATABASE_URLviaDeno.env.get. - Local development script at
scripts/test-locally.ts. - Raw
pgPool factory atsrc/db.tswired for Supabase Shared Pooler IPv4 URLs. [rumen-*]logging convention enforced across the codebase ([rumen],[rumen-extract],[rumen-relate],[rumen-surface], with[rumen-synthesize]and[rumen-question]reserved).- Cost guardrails (hardcoded in v0.1): max 10 sessions per run via
MAX_SESSIONS_PER_RUN, skip sessions with <3 events, skip sessions that already have arumen_jobsrow. - Mnestra compatibility document at
docs/MNESTRA-COMPATIBILITY.md. - CI workflow that runs
tsc --noEmitand a basic SQL syntax check.
Not included (by design)
Section titled “Not included (by design)”- No LLM calls. Rumen v0.1 makes zero network calls to Anthropic, OpenAI, or any other model provider.
- No synthesis — insight text is placeholder in v0.1.
- No question generation.
- No self-tuning.