memory-consolidation
Skill1 starsChanged 3 months agoMITView on GitHub
Periodically compress and promote memory — rolling old checkpoints into episode summaries, and promoting durable lessons from episodic memory into semantic memory — so the memory store stays useful and fast to read instead of growing indefinitely. Use periodically (e.g. at natural session boundaries, or when .memory/checkpoints/ or .memory/episodes/ has accumulated significantly), not as a one-time setup step.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- ArttuAn/agent-memory-skillstheir own version, first seen Oct 25, 2026
- modimihir07/agentic-ostheir own version, first seen Oct 25, 2026
- NVIDIA/nemoclaw-communitytheir own version, first seen Oct 13, 2026
- ManceRayder42/jarvis-ostheir own version, first seen Oct 1, 2026
- zwjbendn/weight-loss-skilltheir own version, first seen Mar 16, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- modimihir07/agentic-os★ 209same name
- NVIDIA/nemoclaw-community★ 142same name
- ManceRayder42/jarvis-os★ 5same name
- ArttuAn/agent-memory-skills★ 2same name
- zwjbendn/weight-loss-skill★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- agent-handoffSkill
- decision-logSkill
- memory-bootstrapSkill
- memory-captureSkill
- memory-hygieneSkill
- memory-recallSkill
- repo-awarenessSkill
- session-checkpointSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
When promoting, compress aggressively — semantic memory entries should read as durable, context-free facts, not a shortened version of the …
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Memory Consolidation
Source: the Redis architecture guide names this explicitly as pipeline stage four — "consolidation decides what stays as raw episodes and what gets promoted into more durable knowledge... without it, your memory store grows indefinitely and retrieval quality degrades over time." ML Mastery's five-pattern guide independently makes the same point: "all patterns require growth management... mandatory operational components, not optional refinements."
Two distinct consolidation moves
1. Checkpoint → episode. Many small, frequent checkpoints from session-checkpoint accumulate fast. Periodically, fold a run of checkpoints from one session into a single coherent episode entry in .memory/episodes/ — the checkpoints did their job (safety net during the session); once the session's actually over, the individual snapshots are less useful than one narrative summary of what happened. The raw checkpoints can then be archived (see memory-hygiene).
2. Episode → semantic. When a lesson from a specific episode generalizes past its original context — "we learned that X approach doesn't work for this codebase" becomes a fact worth knowing regardless of which task surfaces it again — promote that specific, generalizable lesson into .memory/semantic/project-facts.md, stripped of the episode-specific narrative detail. The original episode stays in .memory/episodes/ as the historical record of how that lesson was learned; the promoted version in semantic memory is the compressed, durable, always-relevant form.
What NOT to promote
Not every episode has a semantic-memory-worthy lesson. A session that just executed a well-understood task without surprises doesn't need anything promoted — consolidating for its own sake, rather than because there's a genuine durable lesson, is exactly the kind of noise-generation this discipline exists to prevent, not produce.
The compression discipline
When promoting, compress aggressively — semantic memory entries should read as durable, context-free facts, not a shortened version of the episode's narrative. Compare:
Weak (still narrative, not actually semantic): "In the session where we worked on auth, we found that the caching layer was interfering with token refresh timing, which took a while to figure out."
Strong (compressed to the durable fact): "The caching layer's TTL must be shorter than the token refresh interval, or refreshed tokens can be served stale from cache. (Discovered: episodes/2026-08-01-auth-refactor.md)"
Triggering cadence
A reasonable default: run a consolidation pass at natural session boundaries (end of a session, or at the start of the next one, as part of extending memory-bootstrap's orientation), or when .memory/checkpoints/ has grown past a rough threshold (e.g., more than a session's worth of unconsolidated checkpoints sitting around). This doesn't need to be perfectly scheduled — the cost of running it a little late is degraded retrieval quality, not data loss, since nothing is deleted until memory-hygiene's separate archival step.
Relationship to memory-hygiene
Consolidation decides what gets compressed and promoted. memory-hygiene handles the resulting cleanup — archiving the now-redundant raw checkpoints, expiring old entries past a TTL, and catching conflicts. The two are sequential steps in the same maintenance pass, kept as separate skills because they're genuinely different judgment calls: consolidation asks "what's the durable lesson here," hygiene asks "what's safe to remove or flag now that consolidation is done."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

