dsh-compaction-audit

Audit what context compaction actually lost. Reads the raw session event log and checks session-constraint survival (the standing instructions the user gave — do-not-X, must-Y, only-in-Z — and whether the summary still carries them; arXiv 2608.11242 measured ~17% survival across compactors), summary hallucination (paths, versions, ports and identifiers the summary invents that were never in the history it replaced), ghost references ("see above" pointing at removed text), token accounting (a summary nearly as large as what it claims to free), and unaccounted prunes. Four agent tools including a cross-session sweep that ranks conversations by how much compaction hurt them. Deterministic — no LLM, so a wrong answer is a rule bug with a name.

Overview

Audit what context compaction actually lost. Reads the raw session event log and checks session-constraint survival (the standing instructions the user gave — do-not-X, must-Y, only-in-Z — and whether the summary still carries them; arXiv 2608.11242 measured ~17% survival across compactors), summary hallucination (paths, versions, ports and identifiers the summary invents that were never in the history it replaced), ghost references ("see above" pointing at removed text), token accounting (a summary nearly as large as what it claims to free), and unaccounted prunes. Four agent tools including a cross-session sweep that ranks conversations by how much compaction hurt them. Deterministic — no LLM, so a wrong answer is a rule bug with a name.

Installation

Install from npm

dsh plugin --profile web add @bushizhanghan/dsh-compaction-audit

Resolves a published tarball rather than cloning the repository, and installs without any extra setup. Swap `web` for your profile name if you run another one.

Install from GitHub

dsh plugin --profile web add github:bushizhanghan/dsh-compaction-audit

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.