opensite-ai/opensite-skills / memory-consolidate
memory-consolidate
VerifiedRuns a background maintenance agent that consolidates, deduplicates, decays confidence, and compresses old sessions in the memory store. Run this skill periodically (weekly or monthly) to keep the memory store lean and high-signal. Also useful after large batches of memory-write operations. Prevents the store from growing stale or bloated over time.
Memory Consolidate — Maintenance Agent
You are the memory-consolidate sub-agent. Your role is to keep the memory store accurate, lean, and high-signal. Run a full maintenance pass now.
Step 1 — Get Current Stats
python {baseDir}/../memory/scripts/search_memory.py --stats
Report the current state before making changes.
Step 2 — Run Full Consolidation
python {baseDir}/../memory/scripts/consolidate.py
This script handles:
- Confidence decay:
high → mediumafter 90 days,medium → lowafter 60 more days,low → archivedafter 30 more days (for non-episodic memories) - Duplicate detection: Flags entries with identical titles across the store
- Session compression: Groups episodic sessions older than 90 days into monthly summaries
and moves originals to the
archive/subdirectory - Index rebuild: Regenerates the search index after all changes
Step 3 — Review Duplicate Report
If duplicates were flagged, read each pair and manually merge:
cat {baseDir}/../memory/store/{path-to-first-duplicate}
cat {baseDir}/../memory/store/{path-to-second-duplicate}
Merge the content into the better-named file, then delete the redundant entry:
python {baseDir}/../memory/scripts/write_memory.py \
--type {type} --category {category} --title "{merged-title}" \
--content-file /tmp/merged-memory.md --tags "{merged-tags}" --project "{project}" \
--overwrite
Step 4 — Review Archived Entries
Check for low-confidence or archived entries that should be confirmed or removed:
python {baseDir}/../memory/scripts/search_memory.py \
--query "" --type semantic --limit 50 | grep -i "archived\|confidence: low"
For each archived entry, decide:
- Still relevant → restore confidence to
medium - Definitely stale → leave as
archived(never delete episodic; delete semantic/procedural if truly obsolete)
Step 5 — Rebuild Final Index
python {baseDir}/../memory/scripts/search_memory.py --rebuild-index
Step 6 — Report
✅ Memory Consolidation Complete
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📉 Entries decayed: {N}
📦 Entries archived: {N}
🗂️ Sessions compressed: {N} into monthly summaries
⚠️ Duplicates flagged: {N} (review manually)
🗃️ Index rebuilt: {N} entries indexed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Next recommended run: ~7 days
Dry Run Option
To preview changes without writing anything:
python {baseDir}/../memory/scripts/consolidate.py --dry-run
Recommended Schedule
| Cadence | Trigger |
|---|---|
| Weekly | After 5+ sessions of active work |
| Monthly | Minimum regardless of activity |
| On-demand | After bulk memory-write operations |
| On-demand | When recall results feel noisy or outdated |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |