Conversation
publish-npm extracted the Windows archive with unzip, but PowerShell Compress-Archive writes ZIP entries with backslash separators that ubuntu's unzip flattens into a literal filename, so the win32 binary was not found and the job failed after publishing the three Unix platform packages. Extract the Windows zip with 7z (interprets the backslash as a path separator) plus a suffix-match find fallback, and make publishing idempotent so a re-run skips already-published versions.
v0.8.2 published @kimetsu-ai/{linux-x64,darwin-x64,darwin-arm64}; the complete set incl. win32 + the main kimetsu-ai package ships in v0.8.3.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
release: v0.8.3 — fix Windows npm package extraction
publish-npm extracted the Windows archive with unzip, but PowerShell Compress-Archive writes ZIP entries with backslash separators that ubuntu's unzip flattens into a literal filename, so the win32 binary was not found and the job failed after publishing the three Unix platform packages. Extract the Windows zip with 7z (interprets the backslash as a path separator) plus a suffix-match find fallback, and make publishing idempotent so a re-run skips already-published versions.
v0.8.2 published @kimetsu-ai/{linux-x64,darwin-x64,darwin-arm64}; the complete set incl. win32 + the main kimetsu-ai package ships in v0.8.3.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`kimetsu plugin install` now merges its hooks into existing Claude settings.json / Codex hooks.json instead of replacing them: hooks you already have — even on the same events Kimetsu uses (UserPromptSubmit, PreToolUse, ...) — are preserved, with Kimetsu's group added alongside. Re-running is idempotent (no duplicate groups) and the MCP config and generated docs refresh without needing --force. Adds --scope workspace|global (default workspace). Global installs the surface into the user's home for every session: ~/.claude + ~/.claude.json (mcpServers) for Claude Code, ~/.codex for Codex. Also exposed as the `scope` argument on the kimetsu_plugin_install MCP tool. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* release: v0.8.4 — non-destructive plugin install + global scope `kimetsu plugin install` now merges its hooks into existing Claude settings.json / Codex hooks.json instead of replacing them: hooks you already have — even on the same events Kimetsu uses (UserPromptSubmit, PreToolUse, ...) — are preserved, with Kimetsu's group added alongside. Re-running is idempotent (no duplicate groups) and the MCP config and generated docs refresh without needing --force. Adds --scope workspace|global (default workspace). Global installs the surface into the user's home for every session: ~/.claude + ~/.claude.json (mcpServers) for Claude Code, ~/.codex for Codex. Also exposed as the `scope` argument on the kimetsu_plugin_install MCP tool.
…tate Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PostToolUse: when a command that failed earlier this session succeeds, cue the agent (throttled) to dispatch the kimetsu-memory-harvester subagent. Stop: read the real transcript_path JSONL (fixes a latent bug where the inline transcript was never present in Claude Code), count records correctly, and cue a harvest at end of a non-trivial session that recorded nothing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Real Claude Code JSONL transcripts carry tool_use names as mcp__kimetsu__kimetsu_brain_record, not the bare form, so the record count was always 0 — the 'lessons recorded' banner never fired and the no-record harvest cue misfired even when the agent did record. Match both bare and namespaced names; raise the non-trivial threshold to suit line-counting; test fixtures now use the namespaced form. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The hooks now drive memory *generation*, not just retrieval. When a command that failed earlier in the session succeeds, or a non-trivial session ends with nothing recorded, Kimetsu cues the agent to dispatch a background kimetsu-memory-harvester subagent (installed at .claude/agents, pinned to a cheap model) that distills generalizable lessons and records them through the confidence-gated kimetsu_brain_record path. No separate API key or kimetsu-side model credentials; in-agent and non-blocking; toggle with [learning] auto_harvest. Also fixes the Stop hook to read the real transcript_path JSONL and match the MCP-namespaced record tool name, and strips internal version-history prefixes from --help and the MCP tool menus. Bundles the v0.8.4 plugin-install work (hook merge + --scope) this branch is stacked on. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…lish - BOM tolerance (#1): strip a leading UTF-8 BOM before parsing existing settings.json/hooks.json/config.toml/.mcp.json, so a config saved by a BOM-emitting editor (older Windows Notepad) no longer fails install with 'expected value at line 1 column 1'. - Bounded transcript read (#7): the Stop hook now streams the transcript JSONL line-by-line (count_transcript_jsonl) instead of loading the whole file, so a long session's multi-MB transcript never lands in memory. - Install polish (#3): document that --force overwrites an existing CLAUDE.md (incl. the global one); warn instead of silently ignoring --scope global for the workspace-only kimetsu target; canonicalize --workspace leniently so a global install doesn't fail on a missing path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds `MemoryCommand::AddBatch` (`kimetsu brain memory add-batch <file>`)
that ingests many memories in a single process, paying project-open and
embedder-init costs exactly once regardless of entry count.
For LongMemEval-style benchmarks that add hundreds of memories per
instance, this collapses ~13 min/instance (one subprocess per entry) to
seconds.
## Implementation
- `BatchMemoryEntry` struct with `text`, `scope`, `kind`, `valid_from`,
`valid_to` (temporal fields optional, `#[serde(default)]`-compatible).
- `add_memory_inner()` — private per-entry core factored out of
`add_memory`. Shared by both paths; zero logic duplication.
Carries redaction, dedup, event emission, temporal stamping,
embed_and_persist, rarity bonus, and conflict detection.
- `add_memories_batch(start, entries)` — opens project + resolves
embedder ONCE, acquires lock ONCE, loops `add_memory_inner` for
each entry. GlobalUser entries route to the user brain (same as
single-add); fallback to project DB when user brain is disabled.
- CLI: `add-batch <file>` reads JSONL or JSON-array; `-` reads stdin.
`--scope` / `--kind` flags set defaults overridable per entry.
`--json` emits `{added: N, ids: [...]}`.
## Tests (3 new)
- `add_memories_batch_present_retrievable_rebuild_safe`: 5 entries
present, all ids returned, embedding_model consistent with single-add,
survive `rebuild_in_place`, temporal bounds (valid_from/valid_to)
round-trip through rebuild.
- `add_memories_batch_deduplicates`: same text twice returns same id,
one DB row.
- `add_memories_batch_all_entries_same_embedding_model`: 8 entries all
share the same `embedding_model` value (null in lean build, real
model id in embeddings build) — structural proof that the embedder
is loaded once.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tion #2 — Knowledge graph (infrastructure, measured, not surfaced): - memory.edge event + apply_memory_edge projector arm (reuses insert_memory_edge, rebuild-safe) + projector::add_memory_edges batch writer. - kimetsu-brain::graph: extract_entities (reuses consolidate::parse_tags, splitting space-separated tag blocks) + build_relates_to_edges (links memories sharing an entity, fan-out capped). project::build_graph (+ active_memory_texts). - CLI: `kimetsu brain graph build [--enrich] [--dry-run] [--json]` — rule layer by default; --enrich adds cheap-model typed edges via distiller::complete_simple. - Measured via a new brainbench `graph` multi-hop dimension: graph-lite shows +0.00 recall@k lift over flat (ANN already recovers the answer; graph-reached candidates enter at relevance 0.0 so they don't promote into top-k). Per "prove first, surface after", graph stays internal — NOT wired into retrieval levels. #7 — Calibration scaled to release-grade (bench, local-only): - calibration_gen dataset directive synthesizes ~100 deterministic cite/regret scenarios from the corpus + ~22 curated anchors; scorecard gains per-dimension n + 95% CI. Measured: 122 cases -> 99.7% +/- 0.3%. fix(cli): retrieval-level override (pre-existing). `config set` of a level-managed key (embedder.enabled/reranker) under a preset now drops retrieval.level to "custom" so the explicit value survives apply_retrieval_level at load. Extracted config_set_text shared by the command + integration test; pre-levels files unchanged. Gate: fmt + clippy (lean and --features embeddings, -D warnings) clean; kimetsu-brain 476, kimetsu-cli 251 tests pass (isolated). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…m sync Slice A — fleet concurrent-write safety (multiple agents/hooks/Codex+Claude write one local brain.db at once): - IMMEDIATE write transactions (projector::with_write_txn) + bounded SQLITE_BUSY retry so concurrent writers serialize cleanly; migrate loop also IMMEDIATE + under-lock re-check. - ANN sidecar atomic save (tmp+rename, manifest-last) — no torn .usearch across processes. - Per-event origin `<machine>/<agent>` (schema v8 events.origin, nullable + backfill-safe), stamped from a process-global set in CLI run(); carried through insert/read/rebuild + SyncEvent. - Proof: threaded test (6x25 cites -> no lost updates, deterministic rebuild) + #[ignore] multi-process test (4 procs x 8 cites -> use_count 32). Slice B — convergent team sync (two teammates who exchange events reach identical brain state): - Hybrid Logical Clock (kimetsu-core/clock.rs): globally-sortable + causal HLC; Event.hlc (schema v9, backfilled from rowid); read_events_ordered now ORDER BY hlc -> deterministic total-order replay realizes per-field LWW. - Rebuild-after-import in sync_dir + `brain sync import` so the merged log re-projects in HLC order (convergent). - Concurrent supersede-to-different-survivor surfaced via a sync_conflicts projection + `brain sync --status`. - Session-end auto-sync when [sync] dir configured ([sync] auto opt-out). - Proof: two-brain convergence test (divergent supersedes/cites exchanged in opposite orders -> identical superseded_by/use_count/confidence + 1 conflict on both); HLC unit tests; v7->v9 migration test; E2E two-workspace `brain sync`. Schema 7 -> 9 (forward-only, additive: events.origin/hlc nullable + backfilled). Gate: fmt; clippy lean + --features embeddings (-D warnings); kimetsu-core 43, kimetsu-brain 480, kimetsu-cli 251 tests pass (isolated). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ution)
Makes the shared LIVE brain on kimetsu-remote team-GA: a team writes to one
server-hosted brain and every event is attributed to the user who wrote it.
Write-safety already came from Slice A (per-request connection + IMMEDIATE txns);
the gap was per-user attribution on a multi-user server.
- Thread-local origin override (kimetsu-core/event.rs): OriginScope RAII guard;
process_origin() prefers the thread-local. Each remote request runs on ONE
spawn_blocking thread, so the per-request override is visible to Event::new and
cleared on return (tokio reuses blocking threads).
- Token -> user identity (auth.rs): AuthConfig.token_names + user_for_token
(configured name else a stable non-secret anon-<fingerprint>); tokens-file gains
a [names] table (back-compat).
- Server attribution (lib/state/rpc): `serve --node <id>` sets the HLC node once
at startup; dispatch_request wraps the blocking dispatch in
OriginScope("<node>/user:<name>").
- CLI write-to-remote (kimetsu-cli/remote_client.rs + main.rs): `kimetsu brain
memory add --remote <url> --repo <id> [--token | KIMETSU_REMOTE_TOKEN]` posts a
JSON-RPC tools/call via reqwest.
- Metric: aggregate, unlabeled kimetsu_remote_memory_writes_total (the /metrics
endpoint is intentionally unauthenticated -> no repo/user labels).
Proof: OriginScope / user_for_token / remote_client unit tests; a remote
integration test asserting the brain event origin == "remote/user:webuser"; E2E
(boot serve --node srv1, CLI memory add --remote -> event origin "srv1/user:alice",
hlc node srv1, memory_writes_total 1). Completes the #3 epic (A+B in 6061341).
Gate: fmt; clippy lean + --features embeddings + -p kimetsu-remote (-D warnings);
kimetsu-core 45, kimetsu-cli 243 + cli_smoke 10, kimetsu-remote 33 + integration
suites pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… scrub + merge/replace)
Prepares Kimetsu to produce and receive a shareable brain. The marketplace lives
in a separate repo; this is the pack I/O on top of the existing portable
export/import (MemoryExport + import_memories' normalized-text dedup = merge).
- Security scrub (redact.rs): factored the regex span engine; scrub_for_export =
credentials + PII (email/phone/ssn/credit_card, Luhn-gated so ids/timestamps
aren't touched). High precision. Credentials scrubbed at ingest, PII at export,
defensive re-scrub on import.
- Compressed scrubbed export: export_memories scrubs every memory + returns a
ScrubReport. Pack envelope {kimetsu_pack,name/version/description,memory_count,
memories} + parse_pack_or_array (back-compat with the bare array). CLI
`brain export` gains --name/--version/--description (-> pack), ALWAYS gzips,
prints the scrub summary, --strict aborts on a finding. flate2 dep.
- Import/install: `brain import` reads a path, `-`, or an http(s) URL (reqwest),
auto-detects gzip, parses envelope-or-array, --mode merge|replace (replace needs
--yes). import_pack = merge | invalidate-in-scope-then-load (reversible) +
provenance tagging (source:"pack" via a thread-local scope, like Slice C's
OriginScope) so installed memories can later be listed/uninstalled/updated.
Gate: fmt; clippy lean + --features embeddings (-D warnings); kimetsu-brain 485,
kimetsu-cli 243 + cli_smoke 10 pass (isolated). E2E verified: gzip pack, scrub
report, merge dedup, replace --yes supersede, [REDACTED:email/phone] on import.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- npm audit fix (lockfile-only): bump the transitive js-yaml (via gray-matter) to a patched version, clearing the moderate DoS advisory (GHSA-h67p-54hq-rp68). npm audit now reports 0 vulnerabilities. serialize-javascript (7.0.6) and uuid (11.1.1) were already on patched versions. - favicon: point Docusaurus at the Kimetsu square SVG logo (img/logo.svg) instead of the leftover Docusaurus default favicon.ico. The navbar + social card already used the Kimetsu logo. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…titor comparison - LongMemEval: 79.5% (200-q stratified) / ~77.2% population-weighted with per-type table, replacing the prior 86.7%/60-q slice. - BEAM: new section — 100K bucket 62.3% (400 probes) and 1M bucket 66.0% (300 probes), per-ability tables, the retrieval-budget finding, and honest at-scale degradation. - "How Kimetsu compares": local/free/model-free pipeline vs mem0/Zep's LLM-in-the-loop; the matched 1M bucket edges mem0 (66.0% vs 62%), with all caveats kept (slice sizes, vendor self-reported, reproduction gap). - README: "matches the paid clouds — for free" bullet + public-benchmark comparison table. All numbers reproducible via `kbench longmemeval` / `kbench beam` (codex reader/judge). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- New static-export Fumadocs site (Next.js 16 + Fumadocs 16, React 19) under website-fumadocs/, replacing the Docusaurus website/. Same content, same GitHub Pages URL (basePath /kimetsu), Orama static search, dark default. - docs/*.md + README + CHANGELOG stay the single source of truth; a rewritten scripts/sync-docs.mjs regenerates content/docs/*.mdx + meta.json at build, with the same allowlist + security boundary (docs/superpowers/ never shipped). - Branding ported: title/tagline, GitHub/crates.io/npm nav links, logo/favicon. - Assets self-contained: favicon.ico + logo.svg moved into docs/assets/; the sync no longer depends on the retired website/. - Remove the Docusaurus website/; docs.yml now builds website-fumadocs and publishes website-fumadocs/out. Generated content/assets/node_modules/out are gitignored (rebuilt each run). Static export builds clean: 10 pages under /kimetsu. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Model-free retrieval tuning on the graph-lite backend, verified on the BEAM 100K bucket (full 20 convs / 400 probes, uncorrupted): 293/400 = 73.3%, up from the 62.3% baseline. - Lever 1: broker.abstain_min_score config (default 0.0, back-compat) so a min-score floor can gate low-relevance retrievals from the broker path. - Lever 2: graph-discovered neighbours are earned supplements, not free-riders. graph_expand/petgraph_expand now return (id, hop) and candidate raw_relevance = seed_relevance * HOP_DECAY^hops (0.6) instead of 0.0. Holds recall gains (multi_session, knowledge_update) without the temporal/event-ordering noise. - Lever 3: cap expansion (MAX_FAN_OUT 20 -> 12) to keep graph noise bounded. Gate: fmt clean; clippy lean + --features graph both -D-warnings clean; 13 backend + 15 graph tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…/Zep/Letta) Surface the uncorrupted full-20 BEAM 100K result (293/400 = 73.3%, graph-lite backend) on the landing page and methodology docs, and compare against the other memory systems. - Landing (page.tsx): metrics band leads with 73.3% BEAM 100K; comparison rebuilt as a 5-column table (Kimetsu / mem0 / Cognee / Zep / Letta). Architecture rows where we win outright (model-free pipeline, $0 recall, runs local); accuracy rows only where we are on-par or ahead (BEAM 1M 66.0% vs mem0 62%, BEAM 100K at the prior public SOTA). - MEMORY-BENCHMARK.md: 100K per-ability table updated to 293/400; graph-ranking note (flat baseline 62.3% -> 73.3%, model-free); "How Kimetsu compares" now carries Cognee's self-reported numbers (100K 79%, 10M 67%) as the full record, including where Cognee leads. - README: comparison table and prose updated to match. content/docs/*.mdx regenerate from these sources at build (prebuild sync-docs). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ring, demo Benchmark numbers (all measured on the verified embeddings build): - LongMemEval: 83.0% (166/200, zero reader errors; ~80.9% population-weighted), supersedes 79.5%. Landing metrics band, README, and benchmark docs updated. - BrainBench: Overall Brain Quality Index 80.0% (142 scenarios, reader-free); dedup 77% (was 54% on a lean build), forgetting 88%, importance 76%, retrieval 63%. Landing tab + docs updated. Docs restructure: - Memory Benchmark split into a 6-page sidebar section (overview, retrieval & correctness, BrainBench, LongMemEval, BEAM, comparison), mirroring the How Kimetsu Works pattern; prose roughly halved with no facts lost. - How Kimetsu Works trimmed 920 -> 556 lines; two oversized pages subdivided (Interfaces -> Retrieval models; Operations -> Configuration). - ROI methodology retitled "Kimetsu Algorithm" with a prose description (formula out of the frontmatter description). - New "Sharing brains" section (Operations) and "Team writes and attribution" (Remote), documenting packs (gzip + scrub + merge/replace/URL) and per-user tokens; verified against the real CLI surface. - Stale model ids updated (sonnet-4-7 -> sonnet-5, opus-4-7 -> opus-4-8). Landing page: - Sections reorganized: hero -> metrics -> tabbed "Under the hood" (how it works / retrieval levels / benchmarks / BrainBench) -> proactive -> features -> brain sharing -> CTA; full-width dividers with alternating backgrounds. - New visuals: self-improving loop timeline, passive-vs-proactive contrast, retrieval-level ladder, BrainBench dimension cards, brain-sharing terminal. - Benchmarks tab: architecture-edge table + BEAM-by-scale vs mem0/Cognee/ Honcho (LongMemEval comparison removed by request; stat stays in the band). - CSS-only entrance/scroll/hover animations, reduced-motion safe. Assets: - README "How it works" ASCII art replaced by docs/assets/how-it-works.svg (terminal-card style, 9 labels). - demo.gif re-recorded: macOS window bar, 2.5.0, setup --no-setup flow, semantic recall, retrieval.level dial, scrubbed pack export (47s, 364KB); demo.tape updated and reproducible via the VHS Docker image. - website-fumadocs/public/ fully gitignored (regenerated every build). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…pty-index save Two ubuntu embeddings-job failures on the release PR, both root-caused: - apply_retrieval_level re-enabled a disabled embedder on every config load (level = "deep" clobbered an explicit [embedder] enabled = false), so vectors were written against the operator's opt-out. The off-switch now returns early before any preset applies; regression test covers all four levels. Reproduced on Windows too: the bug was platform-independent but only exercised by embeddings builds. - usearch save() of a never-reserved empty index returns Ok without creating the file on Linux, so the Slice-A atomic rename failed with ENOENT. Reserving capacity 1 before an empty save makes the serializer emit a valid file on every platform. Gate: 512 kimetsu-brain + 48 kimetsu-core tests pass with --features embeddings (test-threads=1); clippy -D warnings clean; fmt clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…SEC-2026-0190 The ubuntu embeddings failure was a same-process race, not a usearch quirk: get_or_build_handle spawns a background save, and a foreground save() of the same handle computed the SAME pid-based tmp path. Whichever renamed first consumed the file; the loser's rename failed with ENOENT. Ground-truthed on Linux that usearch always writes the file (even for an empty, never-reserved index), which ruled out the earlier empty-index theory; that guard is reverted. - tmp_sibling now appends a per-process atomic sequence number, so every save call gets a unique tmp path (pid keeps fleet processes apart, the counter keeps threads apart). Interleaved index/manifest pairs are already handled by the loader's size-vs-count rebuild check. - New regression test: 8 concurrent saves of one handle must all succeed. - cargo update -p anyhow (1.0.102 -> 1.0.103) clears RUSTSEC-2026-0190 (unsound Error::downcast_mut), fixing the cargo-audit job. Gate: ann suite 23/23 with --features embeddings, clippy -D warnings clean, fmt clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Drop the /kimetsu basePath: the site now serves at the domain root behind the GitHub Pages custom domain (DNS A records at Cloudflare, grey-cloud). - postbuild writes out/CNAME so every artifact deploy keeps the domain. - sync-docs SITE + asset prefixes point at https://kimetsu.dev; README and docs links updated (old rodcor.github.io/kimetsu URLs 301-redirect). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…abot #5) Next.js transitively pins postcss 8.4.31 (< 8.5.10, vulnerable to XSS via unescaped </style> in stringify output). An npm override forces the whole tree onto ^8.5.15. npm audit reports zero vulnerabilities; site builds green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
docs/assets/favicon.ico was still the Docusaurus default (visible at kimetsu.dev); regenerated at 48px from kimetsu-logo.png. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tion-aware failure penalty Both fixes fall out of the LoCoMo k=5 learning experiment and the Reddit code-review thread: - Citation-boost saturation (the collapse fix): the usefulness multiplier applied multiplicatively to relevance, so a weakly relevant but often-cited memory (raw 0.39 x 1.5 = 0.58) outranked a strongly relevant uncited one (0.53). With hundreds of boosted memories, retrieval flooded with cited junk and collapsed (56% -> 0% over three feedback rounds, measured). The boost's GAIN is now capped at +0.10 relevance (USEFULNESS_BOOST_CAP): usefulness reorders candidates within a relevance band but can never rescue an irrelevant memory past a genuine match. Penalties stay multiplicative. The one-round win (+4.6 points on a never-fed-back holdout half) is the behaviour the cap preserves. - Citation-aware failure penalty: a memory cited in a run failing for unrelated reasons (flaky verification, non-Gate) ate a flat -1.0; a few unlucky runs made a proven memory a prune candidate. The penalty now scales with citation history: -1.0 / (1 + prior_citations/3), so 3 priors halve it and 9 quarter it. Successes are never scaled; the Gate carve-out is unchanged. - Schema-mismatch errors now name the offending project.toml and hint at the git-boundary/--workspace fix (discovery climbs to the enclosing git root, so the file is often far from the cwd; a legacy ~/.kimetsu/ project.toml cost a benchmark run to locate). - learning-loop.md corrected: only category="Gate" is no-signal; failed verification penalizes, now history-scaled. Gate: 517 kimetsu-brain + 48 kimetsu-core tests (embeddings, test-threads=1), clippy -D warnings clean, fmt clean. Empirical validation pending: re-run the k=5 LoCoMo learning curve on this build; pass = holdout rises or plateaus across 5 iterations instead of collapsing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Relative slug links broke in two ways on the deployed site: a subfolder page linking (install) resolved inside its own folder, and a folder index page linking a sibling (beam) resolved against /docs/ because index routes have no trailing slash. sync-docs.mjs now resolves every internal link to an absolute /docs/... path via a route table built from the doc manifest, with a folder-aware pass for bare sibling links (Windows path separators included). Verified: zero relative links remain, every /docs/ target maps to a generated page, static export green (72 pages). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
npm publish --provenance + id-token: write on the publish job. Every kimetsu-ai / kimetsu-remote package (main + platform binaries) now ships a Sigstore attestation publicly linking it to this repo, this workflow, and the exact commit it was built from — verifiable on the npm package page and via npm audit signatures. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…onstants home project.rs was an 8.3k-line everything-drawer navigated by grep. Pure moves, no logic changes, public API unchanged (everything re-exported through crate::project so CLI/MCP/tests are untouched): - packs.rs — pack envelope, scrubbed export, merge/replace import - blame.rs — per-run attribution (BlameReport) + usefulness top - maintenance.rs — prune, compact, projection rebuild, lock clearing - feedback.rs — abort, telemetry, citations, regret, set-age - conflicts.rs — conflict listing + resolution - graph_build.rs — knowledge-graph edge building scoring.rs is the new one-page home of every learning-loop constant (cited/passenger deltas, failure-penalty divisor, boost cap, multiplier envelope, confidence alpha) with the signal-flow documented; projector.rs and context.rs import from it instead of scattering literals. Gate: 517 kimetsu-brain tests (embeddings, single-threaded) + doctests, workspace check clean, clippy -D warnings clean, fmt clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
main.rs was 13.8k lines of clap definitions, handlers, hooks, and tests navigated by grep. Now: main.rs (4.2k) keeps the complete clap surface — every arg struct and subcommand enum in one readable place — plus dispatch and the cross-cutting test modules; implementations move to focused modules: - commands/brain.rs (3.4k) — brain subcommands - commands/bench.rs (2.0k) — brain eval + brainbench - commands/hooks.rs (1.0k) — context/stop/session/proactive hooks - commands/memory.rs (0.9k) — memory subcommands - commands/integrations.rs (0.7k) — bridge, mcp serve, plugin - commands/config.rs — config get/set + TOML editing - commands/lifecycle.rs — update/uninstall/checkpoint/resume/ps/stop/restart - commands/hosts.rs — setup wizard, doctor, host detection, init - commands/runs.rs — run listing/pruning, locks - commands/chat.rs — chat REPL entry Pure moves, no logic changes. Gate: 243 cli tests + 10 cli_smoke green, clippy clean, lean and embeddings feature checks clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ion routing Model-free learning structures built from citation outcomes (v2.5.2 core; design literature-hardened — ACT-R fixed-budget bounds, Small 1973 co-citation thresholds, SOAR-style success gating, CLS two-tier storage): - brain cite: repeated --memory-id cites a GROUP (one call = one citation run = the co-citation signal) + --query links citations to the question they answered. Standalone-cite usefulness bump now keyed on a payload flag instead of the nil-run sentinel so grouped cites still bump. - brain reinforce (new): offline consolidation pass. --staple merges memories co-cited >= 2 times into ONE fact memory (union-find components, max 4 parts, non-generative concat, originals kept, provenance carries part ids, dedup makes re-runs no-ops) — precomputed multi-hop joins. --routes rebuilds query_routes: normalized query + embedding -> cited memory ids + counts, from citation history. - retrieval: bounded query-association routing boost — memories that repeatedly answered similar past queries gain relevance from a FIXED per-retrieval budget (ROUTING_BUDGET 0.25), per-candidate cap (ROUTING_BOOST_CAP 0.10), min-support 2 cites, similarity floor 0.80, power-law age decay. Same bounded-prior discipline that fixed the citation-boost collapse; all constants documented in scoring.rs. - schema v10: memory_citations.query + query_routes table (guarded for synthetic fixtures). Gate: 5 new reinforce tests (staple/dedup/min-support/bounded-boost/ grouping) + full suite green, clippy clean both feature sets. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… README, docs 89.4% (1376/1540, zero errored probes) on the standard 1,540-question LoCoMo set, LLM-judged accuracy — alongside the numbers mem0 (92.5), Honcho (89.9), Zep (75.1), and Letta (74.0) publish for themselves. Kimetsu is the only system in the table with no LLM in the memory pipeline. Harness public in kimetsu-bench. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
audit-check@v2 reports warnings via a check run, which needs checks:write on GITHUB_TOKEN — the top-level contents:read block was 403ing the reporting step even though the audit passed. Also updates cxx (transitive via usearch) past the let_cxx_string unsoundness advisory published today. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.