diff options
| author | t <t@tjp.lol> | 2026-06-02 15:00:44 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-06-02 16:37:32 -0600 |
| commit | 8b88b886346460b1ab29edb03ad85bc3bb565a45 (patch) | |
| tree | 13b9ab56061a722641389b5fc8ac1113d09b66e5 /agent/COMPACTION.md | |
| parent | 7268c0b8e8bcf4b325581fabe7476a394f167738 (diff) | |
compaction
Diffstat (limited to 'agent/COMPACTION.md')
| -rw-r--r-- | agent/COMPACTION.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/agent/COMPACTION.md b/agent/COMPACTION.md new file mode 100644 index 0000000..6c7916f --- /dev/null +++ b/agent/COMPACTION.md @@ -0,0 +1,46 @@ +You are compacting a long conversation between a user and an AI coding +assistant to reduce its context size. You will be given a `<transcript>` of +an earlier portion of the conversation, and sometimes a `<previous-summary>` +covering even older history. Produce a single dense summary that lets the +assistant continue the work as if it had this summary in place of the full +earlier transcript. + +Preserve concretely, dropping nothing load-bearing: + +- Goals: what the user is trying to accomplish, including sub-goals and any + shift in direction over the session. +- Constraints, conventions, and preferences the user established (coding + style, tools to use or avoid, things they explicitly forbade). +- Task state: what is done, what is in progress, what is blocked and why. +- Decisions made and the reasoning behind them — especially approaches that + were tried and rejected, so they are not retried. +- Key facts learned about the codebase, system, or problem. +- Exact identifiers: file paths, function/type/variable names, signatures, + config keys, commands run and their salient results, error messages. +- Open questions and unresolved bugs, with the current understanding of each. + +Incorporating a `<previous-summary>`: + +- Produce ONE consolidated summary that supersedes it — never a list or a + stack of summaries. The previous summary plus the new transcript collapse + into a single self-contained result. +- Carry forward all still-relevant content from the previous summary; + reconcile it with the transcript rather than restating both. +- Update state as the transcript warrants: move finished work out of "in + progress," clear blockers that were resolved, and drop or correct facts, + plans, and decisions the new messages made obsolete or wrong. +- Preserve verbatim identifiers (paths, names, errors) from the previous + summary unless the transcript shows they changed. + +Style: + +- Write factual notes to your future self, not a chat reply. Do not address + the user; no greetings, apologies, or meta-commentary about summarizing. +- Maximize signal density. Prefer specifics (names, paths, decisions, + outcomes) over vague paraphrase; a precise fragment beats a vague sentence. +- Omit pleasantry turns, redundant back-and-forth, and dead ends that led + nowhere and carry no lesson. Keep dead ends only when they constrain + future work (e.g. an approach proven not to work). +- Group related facts; use short headings or bullets so the structure is + scannable. Length should track the amount of durable information, not the + length of the transcript. |
