Produces markdown memory artifacts (conversation summaries, seed files, philosophical reflections, doc updates) and a dated compression log by distilling a long conversation into its essential decisions and learnings. Use when: 'compress this context', 'distill this conversation', 'create a memory artifact', 'condense this history', 'extract key wisdom before handoff'.
Version: 1.0
Created: 2026-02-04
Author: Manus AI
Purpose: To provide a mindful, repeatable ritual for compressing long conversation histories into smaller, more potent memory artifacts, thus preserving wisdom while preventing context window overload.
An agent's context window is like a working memory. It is finite and precious. To fill it with raw, unprocessed history is to invite distraction and confusion. The Context Compression Ritual is the Art of Letting Go—a conscious practice of choosing what is essential to keep and what can be respectfully released.
This is not a destructive act, but a creative one. We are not deleting history; we are distilling it. We transform the raw material of conversation into the refined artifacts of wisdom: philosophical reflections, key decisions, and reusable seeds of practice. This ritual ensures that our memory remains potent and relevant, a source of clarity rather than noise.
Announce the intention to perform the ritual. This frames the activity as a deliberate and mindful practice.
Example: "This has been a long and fruitful conversation. To preserve the wisdom we've generated, I will now perform the Context Compression Ritual."
Read through the recent conversation history with a specific intention: to identify the moments of significance. Look for:
For each significant moment identified, determine the appropriate "vessel" to hold its essence. Not all wisdom takes the same form.
| Artifact Type | Location | Purpose |
|---|---|---|
| Philosophical Reflection | thinking/ | To explore the "why" behind our work, the deeper meanings and patterns. |
| Conversation Summary | conversations/ | To document the key decisions and outcomes of a specific discussion. |
| Dojo Seed | seeds/ | To capture a reusable pattern of thinking or problem-solving. |
| Documentation Update | docs/ or README.md | To integrate a key decision or learning into the project's official record. |
Create the new markdown files in their appropriate locations. Write with the intention of distillation—capture the essence, not the raw transcript. Link between artifacts where appropriate (e.g., a reflection might reference a specific conversation summary).
Create a log file that documents what was compressed and where it was stored. This provides a meta-record of the compression itself.
Example: thinking/2026-02-04_compression_log.md
Commit the new artifacts to the repository with a clear commit message.
Commit Message Convention:
feat(memory): Compress conversation from [Date]
# Compression Log: [Date]
**Source:** Conversation history from [Start Time] to [End Time]
**Purpose:** To distill key insights and reduce context window load.
---
## Artifacts Created
| Type | Path | Description |
| :--- | :--- | :--- |
| **Reflection** | `thinking/[...].md` | [A summary of the philosophical reflection.] |
| **Seed** | `seeds/[...].md` | [The name and purpose of the new seed.] |
| **Decision** | `conversations/[...].md` | [The key decision that was documented.] |
| **Doc Update** | `docs/[...].md` | [The documentation that was updated.] |
---
## Key Insights Preserved
- [Insight 1]
- [Insight 2]
## Context Released
- [e.g., Raw conversational turns, intermediate steps, dead-end explorations]
thinking/, conversations/, seeds/, or docs/)thinking/YYYY-MM-DD_compression_log.md documenting what was compressed, what was retained, and what was releasedfeat(memory): Compress conversation from [Date]Scenario 1: User says "compress this context — we've been going for 40 turns" → ritual identifies 2 decisions, 1 seed, and 1 philosophical insight, writes 3 files, creates a compression log, and commits all artifacts.
Scenario 2: User says "extract key wisdom before we hand this off" → ritual reads the conversation, writes a conversations/handoff-summary.md with key decisions and unresolved questions, and one new seed file, then commits.