v1.5.0
Warning
Superseded by v1.5.1 — these artifacts were built before the workspace version bump and self-report 1.0.0. Identical feature set; install v1.5.1 instead.
v1.5.0 — pays for itself
ADDED
-
Telemetry capture. Raw query text is now stored in
context.served
telemetry events when[learning] store_queries = true(default; set
falseto revert to the pre-v1.5 query-hash-only behavior). A
session_idfield is also written when the host provides one (Claude Code
hooks; absent for hosts that do not emit it). Dropped-capsule sidecar
(~/.kimetsu/cache/<hash>/dropped-recent.json) records capsules that
were floor-filtered out so that a later citation of one is detected as a
retrieval.regretevent, feeding the self-tuning loop. All telemetry
stays on-machine; nothing is exported. -
ROI ledger —
kimetsu brain roi. Conservative per-kind token-savings
estimates (failure_pattern=1500, command=400, convention=300, fact=500,
preference=200 tokens per citation) minus brain-injection overhead give a
net-positive / net-negative verdict. Dollar estimates are shown when the
active model is recognized from a built-in price table (Claude 3/4, GPT-4/5
families, Bedrock routing prefixes) or when[model] price_per_mtokis set
inproject.toml.--window 7d|30d|alland--jsonfor scripting. The
Stop hook appends a per-session savings sentence when ≥1 citation occurred;
zero-citation sessions are silent. Calibration methodology and honest
limitations:docs/ROI-METHODOLOGY.md. -
Token budget — render-time capsule compression and session dedupe.
Two[broker]toggles, both defaulttrue:compress_capsules: capsule summaries are compressed at render time
(strips[tags: ...]/(context: ...)annotations, caps at 3
sentences). Ranking is never affected — this runs only after retrieval
and reranking. Setfalseto inject full memory text.session_dedupe: theUserPromptSubmithook skips capsules whose
handle was already injected earlier in the same session (tracked via
the proactive-state sidecar). Soft policy: falls back to injecting all
capsules when dedupe would produce an empty set. This addresses the
pre-v1.5 behavior where the main hook re-injected the same top capsule
on every prompt of a long session.
-
Self-Tuning Brain —
kimetsu_brain_citeMCP tool +kimetsu brain tune.
kimetsu_brain_citeis a new write-gated MCP tool that records a
memory.citedevent from inside an MCP session, closing the ground-truth
gap when the model leans on a memory but doesn't explicitly call
cite_memory. Personal eval set:tunesetbuilds positive eval cases from
context.served+ citation joins (exact session_id or ±30-minute window
fallback).kimetsu brain tune --statusreports case count and kind
coverage.kimetsu brain tune(dry-run by default) sweepsbroker.min_lexical_coverage
∈ {0.3, 0.4, 0.5, 0.6} ×broker.min_semantic_score∈ {-1.0(AUTO), 0.0, 0.25,
0.35, 0.45} against the production embedder;--applywrites only the
floor parameters (not the reranker — that change is recommended separately);
--revertrestores the previous tune-history entry. A holdout guardrail
(deterministic 20% split) prevents writing a config that regresses the
holdout objective. -
Consolidation —
kimetsu brain consolidate+kimetsu brain triage.
Schema migrated to v3 (superseded_bycolumn + index onmemories).
brain consolidate(Story 3.1, default): brute-force cosine scan within the
same embedding model; clusters at ≥ 0.92 cosine (configurable with
--threshold) are merged — survivor keeps its id and text, members get
superseded_byset and amemory.supersededevent written (rebuild-safe);
citations are reassigned to the survivor.--distill(Story 3.2): looser
clusters (0.75–0.85 cosine band, ≥3 memories, ≥1 shared tag) are fed to
the configured distiller; result lands as a memory proposal for human
review; prints clusters and exits 0 when no distiller is configured.
brain triage(Story 3.3): interactive per-item keep / prune / skip of
memories below a usefulness and age threshold (--score-floor 0.2,
--age-days 30);--prune-all --yesfor batch non-interactive pruning. -
Reach — export redact, Cursor + Gemini CLI installers, CI embeddings job.
kimetsu brain export --redactstrips the(context: …)segment from
exported memory text;--redact-tags(requires--redact) additionally
strips the[tags: …]prefix. Both flags are useful for sharing brains
without leaking workspace-specific file paths or tag metadata.
kimetsu plugin install cursorandkimetsu plugin install gemini-cli
write MCP config (.cursor/mcp.json/.gemini/settings.json) and an
always-on guidance file (.cursor/rules/kimetsu-brain/rule.mdfor workspace
installs;GEMINI.mdmerged into the project root or~/.gemini/GEMINI.md
for global installs). Neither host has aUserPromptSubmit-style hook
system, so MCP + the guidance file are the complete integration surface.
Note: Cursor and Gemini CLI config schemas were inferred from their public
docs as of June 2026 and have not been verified against live host builds —
treat these installers as a starting-point and check the generated files
before committing them. CI: a newtest-embeddingsjob (ubuntu-only,
--features embeddings, HuggingFace + fastembed cache) runs alongside the
existing lean test matrix.
CHANGED
kimetsu.mcp_write_toolsgate now coverskimetsu_brain_citealongside
the existing write tools (same env / config / default-true logic for the
local stdio server; remote server remains env-only, default-deny).- Stop hook output includes a per-session token-savings line when the brain
was cited at least once that session. brain.dbschema advanced from v2 → v3 (automatic on first
read-write open; sidecar backup taken per the existing migration policy).brain exportgains--redact/--redact-tagsflags (no behavior
change for existing callers).
FIXED
- Tune sweep now runs against the production embedder (not the Noop embedder
used in tests), so floor calibration is on real vectors.