memory-consolidate
Skill372 starsChanged 8 months agoMITView on GitHub
Consolidate brain memory and mine user sessions since the last consolidation checkpoint (sleep-cycle style). Use to reduce noisy prompt injection while preserving durable high-value memories.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- stoa-platform/stoatheir own version, first seen Nov 1, 2026
- YYfather/DSH-memorytheir own version, first seen Oct 15, 2026
- opensite-ai/opensite-skillstheir own version, first seen Oct 13, 2026
- DScardini91/agentic-ostheir own version, first seen Jun 26, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- opensite-ai/opensite-skills★ 15same name
- stoa-platform/stoa★ 9same name
- DScardini91/agentic-os★ 2same name
- YYfather/DSH-memory★ 0same 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 repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- install-rhoSkill
- auto-memorySkill
- code-assistSkill
- codebase-summarySkill
- code-task-generatorSkill
- create-sopSkill
- evalSkill
- pdd-buildSkill
- pddSkill
- release-changelogSkill
- rho-cloud-emailSkill
- rho-cloud-onboardSkill
- session-searchSkill
- small-improvementSkill
- update-piSkill
- vault-cleanSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 3 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Run a "brain sleep cycle":
- Very specific: line 16
Use the brain tool for brain changes and the vault tool for reference relocation.
- Distinctive: line 22
Use these symbols while triaging entries:
- Very specific: line 57
If since is explicit timestamp/duration, use it.
- Very specific: line 58
If since=last_consolidation, read checkpoint from checkpoint_key.
- Very specific: line 59
If no checkpoint exists, use days_fallback.
- Distinctive: line 127
Leave a short pointer memory when useful (e.g., "See [[note-slug]]").
“Common” is measured: kept by at least 6 in 10 of the 3 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 Consolidate
Overview
Run a "brain sleep cycle":
- Consolidate existing memory (dedupe, decay, merge, vault relocation)
- Mine user sessions since the last consolidation checkpoint
- Persist a new checkpoint only after a successful run
Use the brain tool for brain changes and the vault tool for reference relocation. Never edit brain.jsonl directly.
Importance levels (retention)
Use these symbols while triaging entries:
- 🔴 High importance — durable, high-leverage, should remain in brain
- 🟡 Medium importance — useful but optional; review for merge/tightening
- 🟢 Low importance — stale/noisy/duplicative; prune or relocate
For memory retention, high importance means keep longer, not delete.
Parameters
- brain_path (default:
~/.rho/brain/brain.jsonl) - mine_sessions (default:
true) - since (default:
last_consolidation) —last_consolidation | <ISO timestamp> | <duration> - days_fallback (default:
1) — only used when no checkpoint exists - session_dir (default:
~/.pi/agent/sessions/) - max_new_entries (default:
10) - confidence_threshold (default:
high) —high | medium - checkpoint_key (default:
memory_consolidate.last_consolidated_at)
Steps
1) Inventory
List memory by type and count totals.
You MUST report counts for:
- learnings, preferences, behaviors, identity, user, context, tasks, reminders
- total active entries
2) Resolve mining window
Determine the lower bound timestamp:
- If
sinceis explicit timestamp/duration, use it. - If
since=last_consolidation, read checkpoint fromcheckpoint_key. - If no checkpoint exists, use
days_fallback.
Constraints:
- You MUST mine only sessions in the resolved window.
- You MUST include the resolved window in the final report.
3) Session mining (user messages only)
Extract durable learnings/preferences from user messages in matched sessions.
Confidence policy:
- High: explicit user statements/corrections/preferences → auto-add
- Medium: strong multi-session inference → add only if threshold is
medium - Low: ambiguous/one-off/hypothetical → skip
Constraints:
- You MUST NOT exceed
max_new_entries. - You MUST dedupe against existing memory before add.
- You MUST prefer high-confidence extractions first.
- You MUST include session id in
sourcewhen available (session:<id>).
4) Decay stale learnings
Run brain action=decay.
Constraints:
- You MUST report decayed count.
5) Consolidate existing entries
Identify duplicates/superseded/stale entries and merge candidates.
Apply the importance lens:
- 🔴 Keep durable, high-value operational guidance
- 🟡 Merge or tighten wording
- 🟢 Remove if stale/noisy/redundant
Apply the 30-day test to every entry: "Would this change a decision I make 30 days from now?" If no, it's noise — remove it.
Auto-remove categories (these should never have been stored):
- Version numbers or update confirmations ("updated X to v1.2.3")
- Heartbeat or check-in status reports ("Heartbeat Feb 19: all clear")
- Benchmark scores or run results ("scored 42/89 = 47.2%")
- Bug sweep summaries without a generalizable root cause ("reviewed X, no bugs found")
- UI/feature implementation details ("button text changed to X", "layout uses 3 columns")
- Task completion status ("task X is complete", "run Y failed")
- Project-specific transient state that won't inform future decisions
- Duplicates — keep the best-worded version, remove the rest
Constraints:
- You MUST NOT remove preferences unless contradicted/superseded.
- You MUST NOT invent new facts while merging.
- When uncertain, keep.
- You SHOULD be aggressive about pruning — a smaller, high-signal brain is better than a large, noisy one.
6) Vault relocation for reference-heavy entries
"Reference-heavy" means useful knowledge that does not need to be injected every turn and can be searched ad hoc.
Typical candidates:
- long feature histories / changelog-style learnings
- architecture rationale requiring structure
- multi-step runbooks / deep troubleshooting notes
- linked research/reference material
Constraints:
- You MUST write vault notes before removing corresponding brain entries.
- Each note MUST include
## Connectionswith[[wikilinks]]. - Leave a short pointer memory when useful (e.g., "See [[note-slug]]").
7) Persist checkpoint (success only)
At end of successful consolidation, set/update checkpoint timestamp (now, UTC ISO-8601).
Constraints:
- You MUST update checkpoint only after successful completion.
- You MUST NOT advance checkpoint on partial/failed runs.
8) Report
You MUST report:
- counts before/after by type + total
- mining window and sessions analyzed
- added/skipped mined entries (with skip reasons)
- decayed, removed, merged, relocated counts
- vault notes created/updated (slugs)
- checkpoint old → new value
- up to 10 significant changes
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.

