Memory consolidate

From mikeyobrien/rho · View interactive version

Memory consolidate is an AI agent skill from the GitHub repository mikeyobrien/rho. 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.

How to use this skill

Skill file

Memory Consolidate

Overview

Run a "brain sleep cycle":

  1. Consolidate existing memory (dedupe, decay, merge, vault relocation)
  2. Mine user sessions since the last consolidation checkpoint
  3. 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:

For memory retention, high importance means keep longer, not delete.


Parameters


Steps

1) Inventory

List memory by type and count totals.

You MUST report counts for:

2) Resolve mining window

Determine the lower bound timestamp:

  1. If since is explicit timestamp/duration, use it.
  2. If since=last_consolidation, read checkpoint from checkpoint_key.
  3. If no checkpoint exists, use days_fallback.

Constraints:

3) Session mining (user messages only)

Extract durable learnings/preferences from user messages in matched sessions.

Confidence policy:

Constraints:

4) Decay stale learnings

Run brain action=decay.

Constraints:

5) Consolidate existing entries

Identify duplicates/superseded/stale entries and merge candidates.

Apply the importance lens:

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):

Constraints:

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:

Constraints:

7) Persist checkpoint (success only)

At end of successful consolidation, set/update checkpoint timestamp (now, UTC ISO-8601).

Constraints:

8) Report

You MUST report:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.