docs(spec): DOC-32 trusty-headroom — reversible context-compression service#1983
Merged
Conversation
…ervice Spec for a new standalone Rust workspace crate `trusty-headroom` (a-la trusty-search: lib + bins + src/mcp/), a clean-room reimplementation of Netflix Headroom's ideas: reversible Compress-Cache-Retrieve (CCR), content-type transforms (JSON crush, code AST, log dedup), and an MCP retrieve tool. Key decisions captured: (1) callable service (lib + CLI + on-demand MCP), NO daemon in Phase 1 — the algorithmic transforms have zero model-load latency, so a warm daemon is only justified if an optional ML text-compressor (Phase 2) is added; (2) supersedes trusty-mpm's lossy optimizer.toml (Trim/Summarise/Caveman) with reversible compression; (3) wires into the managed launcher's PostToolUse + retrieve-MCP, closing the "optimizer not wired in managed sessions" gap. Incorporates DOC-32 KV-cache audit finding (trusty-mpm's system-prompt prefix is already cache-stable) and both architecture steers from the design discussion. 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.
Adds
docs/specs/trusty-headroom.md(DOC-32 / SPEC-HEADROOM-01..09).Specs a new standalone Rust crate
trusty-headroom— a clean-room reimplementation of Netflix Headroom (reversible Compress-Cache-Retrieve, JSON/code/log transforms, MCP retrieve tool) as a callable service (lib + CLI + on-demand MCP, no daemon in Phase 1 since the algorithmic transforms have zero model-load latency). Supersedes trusty-mpm's lossyoptimizer.tomland wires reversible compression into the managed launcher's PostToolUse + retrieve-MCP.Doc-only. Tracks #1982.
🤖 Generated with Claude Code