Context Compaction

Design how a long-running assistant or agent compresses its own history without losing facts it will need: decide what is pinned verbatim (task, user constraints and corrections, decisions with reasons, open questions, identifiers, paths, the last tool results), compact in tiers (clear old bulky tool results, then summarise old turns, then move durable facts to a notes file), trigger at a fraction of the window with headroom, use a fixed-section summary that quotes values, and gate on continuity probes against the uncompacted run. Use for "the bot forgets what we decided earlier", "conversation hits the context limit", "summaries lose key details", "agent degrades after a long session". Not for the cost lens on history (llm-cost), a coding work item handed to a successor (agent-handoff), retrieval over a corpus (rag-design) or stored cross-session memory (agent-memory-design).

greenblacked Updated
The twenty-nine plugins: coding, family, gamedev, operations, delivery, security, manager, personal, career, design, llm, data, techdocs, assurance, client-apps

File contents

greenblacked/AI commit b59d1736f9

Frequently asked questions

npx get-skill add greenblacked/context-compaction