Repository navigation
feat(memory): kit memory stats — recall count + token economy + heatmap → 1.23.0 - #96
Merged
Merged
Conversation
…ap → 1.23.0 Turn `kit memory stats` into a real instrument (the "87.6m tokens vs 139k messages" question made concrete), all local-first + zero-LLM from the SQLite DB + transcripts kit already owns: - tokens: input/output totals (already captured per message); --tokens adds tokens/message, tokens/session, by-model breakdown, and a cache-hit ratio. - recalls: net-new query_log records each `kit memory search` + hit count; stats surfaces total / last-7d / distinct / top-terms. Measures how often the store is actually used (recall ≈ 0 tokens vs the paid generation). - sessions: logical-vs-sidechain split + transcript-files-indexed (exposes the N files → M logical sessions collapse). - --heatmap: per-day activity sparkline (last 90 days). Schema v4: cache-token columns on messages + query_log table (additive, guarded ALTER). Cache-hit is n/a until forward data accumulates (older rows predate the columns). Pure summarizeTokens/sparkline fixture-tested. Also fixes a latent arg-parse bug: `kit memory search foo --limit 3` (space form) leaked "3" into the query terms; the value is now consumed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
✅ Docker image built successfully
|
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.
Summary
Turns
kit memory statsinto a real instrument — making the "87.6m tokens vs 139k messages" question concrete. Local-first, zero-LLM, from the SQLite DB + transcripts kit already owns.--tokensadds tokens/msg, tokens/session, by-model, cache-hit ratio.query_logrecords eachkit memory search+ hit count → total / last-7d / distinct / top-terms (measures recall usage: ~0 tokens vs the paid generation).--heatmap— per-day activity sparkline (90d).--jsonincludes all new fields.Schema v4: cache-token cols on
messages+query_log(additive, guarded ALTER). Cache-hit = n/a until forward data accumulates.Also fixes a latent arg-parse bug: space-form
--limit 3leaked3into the query terms.Verify
summarizeTokens/sparkline+getStats/recordQuery/dailyActivityfixture-tested (24/24 inmemory/).kit check/setupintegration tests time out under full-suite concurrency — unrelated; they pass in CI's clean env.)Closes #95
🤖 Generated with Claude Code