Repository navigation
docs(v4): compaction-pipeline roadmap — five-layer cascade anchor - #24
Merged
Merged
Conversation
Open a new iteration track: rebuild context compaction from today's single-box compactMessagesTiered + chars/4 trigger into a Claude Code-style five-layer pipeline that runs before every model call, cheapest-first, short-circuiting as soon as it is under budget, with semantic auto-compact as the guarded last resort. The doc is the spec of record for the track. It locks: - the five layers + usage anchor (Budget / Snip / Microcompact / Context collapse / Auto-compact; budget judged against last API usage, not chars/4), - an audit of what myagent already has (L1 spill is non-destructive — keep it) vs the real gaps (heuristic trigger, middle three layers mashed into one in-place rewrite, no guardrails on the semantic layer), - the load-bearing constraint: the gateway does not expose Anthropic cache_edits, so L3's hot path is a native cache-preserving adaptation (defer rewrite / append after the breakpoint; warmth approximated by elapsed time since last call via an injectable clock), not server-side reference deletion, - five cross-cutting invariants (v3's three + per-layer freed-token short-circuit + reversible-before-irreversible), - the build order (foundation-first: M4.0 cascade spine + usage anchor, then L1..L5 cheapest-first, one PR each) and per-milestone design + decisions, - honest fidelity trade-offs adapted from CC (cache_edits, real TTL, plan state, the view-overlay architecture change). No code yet — M4.0 (cascade spine + usage anchor) follows in its own PR and references this file. Co-Authored-By: Claude Opus 4.8 <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.
Open a new iteration track: rebuild context compaction from today's single-box compactMessagesTiered + chars/4 trigger into a Claude Code-style five-layer pipeline that runs before every model call, cheapest-first, short-circuiting as soon as it is under budget, with semantic auto-compact as the guarded last resort.
The doc is the spec of record for the track. It locks:
No code yet — M4.0 (cascade spine + usage anchor) follows in its own PR and references this file.