Memory compounding

From romiluz13/auto-pi · View interactive version

Memory compounding is an AI agent skill from the GitHub repository romiluz13/auto-pi. Review and sharpen persistent memory so it compounds instead of accumulating. Use when pruning pi-hermes-memory entries, doing monthly memory hygiene, or when the same lesson has been recorded multiple times.

How to use this skill

Skill file

Memory Compounding

Memory is an index, not a transcript. Without review it accumulates stale entries that mislead future work. This skill is the discipline for keeping memory sharp, not just large.

When to use

The 5-outcome review rubric

For each entry in ~/.pi/agent/pi-hermes-memory/MEMORY.md, USER.md, failures.md, and the SQLite memories table (via memory_search), apply exactly one outcome:

| Outcome | When | Action |

| -------- | ---- | ------ |

| Keep | Accurate + useful | Leave as-is |

| Update | Correct but incomplete | Add the missing detail |

| Consolidate | Same lesson appears multiple times | Merge into one entry, remove duplicates |

| Replace | Outdated or superseded by current code | Replace with the current truth |

| Delete | No longer applies (framework changed, code removed) | Remove |

The promotion rule

When the same gotcha appears 3+ times in failures.md or across memory entries, promote it: write a dedicated reference file or a new skill section. A lesson that keeps recurring is a pattern, not a one-off — it earns a permanent home.

Solution docs (durable cross-project learnings)

After any non-trivial debug/build cycle, evaluate whether to write a solution doc to docs/solutions/:

Solution doc format:

# [Problem Title]
Category: debugging | architecture | testing | workflow | conventions
Tags: [comma-separated]
Date: YYYY-MM-DD
## Problem
[symptoms, not just the error message]
## What Didn't Work
[failed hypotheses and why]
## Solution
[what worked — with code example]
## Why
[the underlying principle]
## Prevention
[how to prevent this class of problem]

Ensure AGENTS.md or CLAUDE.md points to docs/solutions/ so agents can find it. This closes the loop: every solved problem makes the next one easier.

Don't

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.