| name | compact-history |
| description | Rewrite summary.md so future turns don't need to re-read all of conversation.jsonl. Use periodically (every ~20 turns) or when the user explicitly asks "summarize what we've done so far." |
Compact history
When to use this
conversation.jsonl is large (>20 entries since the last
summary refresh).
- The user asks for a recap: "what have we decided?", "where are
we?".
- Before a major fork (publish, big rewrite) — capture the trail
of decisions so it's not lost in the noise.
How to do it
- Read
summary.md (current state) and conversation.jsonl
(raw history). Read the last commit message of .git/HEAD
(decisions land in commits).
- Produce a fresh
summary.md with these sections:
- Open threads — questions the user has raised that don't
yet have an answer.
- Decisions made — bulleted list of key choices, each with
the rationale and (if applicable) a citation.
- Status snapshot — version, current top-level groups,
answerable item count, anything notable.
- WRITE-ONCE: do NOT touch
decisions.md (that's user-curated).
Output
Overwrite summary.md (the orchestrator only preserves it on
first run; explicit summary refreshes are expected to overwrite).
In reply.md, surface a one-line confirmation: "Refreshed
summary.md; see Open threads (3) and Decisions made (12)."
Format guidelines
- Bullets, not prose paragraphs. Each bullet self-contained.
- Decisions in chronological order, oldest first.
- Cite by source:
[guideline NICE NG52], [paper PMID 12345],
[user @ 2026-05-12].
- Keep total under 200 lines; prune older decisions if you go
over.
Pitfalls
- Summarizing what the AGENT thinks instead of what was DECIDED.
Stay literal: "user accepted suggestion X on date Y".
- Losing rationale. If a decision had a "because of …" tied to it
in the conversation, preserve that.
- Compressing too aggressively. If a decision was reversed, keep
both endpoints with the reversal noted.