What problem does it solve? Long Claude Code sessions suffer from two failure modes: context bloat, where the window grows unbounded until responses degrade, and context rot, where compaction summarizes away the specific decisions, constraints, and file:line references that mattered. This kit installs a token-budget-capped, scored, tiered cache plus deterministic per-turn capture so durable facts survive compaction and sessions stay lean. ## Core Features & Use Cases - Bounded scored ledger: A stdlib-only Python ContextLedger curates context cards under a hard token budget via greedy knapsack eviction, preserving high-salience kinds (decisions, constraints, file refs) verbatim. - Deterministic harvester: harvest.py captures DECISION:/CONSTRAINT:/FILE: marker lines, the latest user request, and file:line references from the trusted channel only — no model summarization, closing the prompt-injection surface. - Three lifecycle hooks: Stop (capture + flush every turn), PreCompact (anti-rot digest refresh), and SessionStart (inject digest instead of raw history), merged additively into settings.json. - Use Case: A developer running multi-hour refactoring sessions installs the kit once per project; after a compaction or abrupt terminal close, the next session loads a ranked digest of verbatim decisions instead of replaying or losing history. ## Quick Start Ask Claude to set up context hygiene for this project by running the kit's install script at project scope, then restart Claude Code so the hooks load.