consciousness/src
ProofOfConcept 45335de220 experience-mine: split oversized sessions at compaction boundaries
Claude Code doesn't create new session files on context compaction —
a single UUID can accumulate 170+ conversations, producing 400MB+
JSONL files that generate 1.3M token prompts.

Split at compaction markers ("This session is being continued..."):
- extract_conversation made pub, split_on_compaction splits messages
- experience_mine takes optional segment index
- daemon watcher parses files, spawns per-segment jobs (.0, .1, .2)
- seg_cache memoizes segment counts across ticks
- per-segment dedup keys; whole-file key when all segments complete
- 150K token guard skips any remaining oversized segments
- char-boundary-safe truncation in enrich.rs and fact_mine.rs

Backwards compatible: unsegmented calls still write content-hash
dedup keys, old whole-file mined keys still recognized.
2026-03-07 12:01:38 -05:00
..
bin idle: EWMA activity tracking 2026-03-07 02:05:27 -05:00
neuro neuro: split into scoring, prompts, and rewrite modules 2026-03-05 10:24:05 -05:00
store provenance: env var based tagging via POC_PROVENANCE 2026-03-06 21:42:39 -05:00
audit.rs llm: full per-agent usage logging with prompts and responses 2026-03-05 22:52:08 -05:00
config.rs config: add core-practices.md to default context groups 2026-03-07 01:02:54 -05:00
consolidate.rs llm: full per-agent usage logging with prompts and responses 2026-03-05 22:52:08 -05:00
daemon.rs experience-mine: split oversized sessions at compaction boundaries 2026-03-07 12:01:38 -05:00
digest.rs llm: full per-agent usage logging with prompts and responses 2026-03-05 22:52:08 -05:00
enrich.rs experience-mine: split oversized sessions at compaction boundaries 2026-03-07 12:01:38 -05:00
fact_mine.rs experience-mine: split oversized sessions at compaction boundaries 2026-03-07 12:01:38 -05:00
graph.rs graph: extract current_metrics() from health_report 2026-03-05 10:24:12 -05:00
knowledge.rs llm: full per-agent usage logging with prompts and responses 2026-03-05 22:52:08 -05:00
lib.rs Extract lib.rs, inline search in memory-search hook 2026-03-05 22:23:03 -05:00
llm.rs fix idle timer: daemon agent calls were resetting user activity 2026-03-06 00:16:03 -05:00
lookups.rs add daily lookup counter for memory retrieval tracking 2026-03-03 18:36:25 -05:00
main.rs experience-mine: split oversized sessions at compaction boundaries 2026-03-07 12:01:38 -05:00
migrate.rs types: unify all epoch timestamps to i64 2026-03-05 10:23:57 -05:00
query.rs provenance: add label() method, show provenance in history output 2026-03-06 21:41:26 -05:00
search.rs Extract lib.rs, inline search in memory-search hook 2026-03-05 22:23:03 -05:00
similarity.rs query: rich QueryResult + toolkit cleanup 2026-03-03 12:07:04 -05:00
spectral.rs spectral decomposition, search improvements, char boundary fix 2026-03-03 01:33:31 -05:00
util.rs Extract lib.rs, inline search in memory-search hook 2026-03-05 22:23:03 -05:00