Source Code
Progressive Memory Skill
A meta-skill that formalizes the "Progressive Memory" pattern for AI agents.
The Problem: MEMORY.md grows indefinitely, consuming context tokens and confusing the agent with too much detail.
The Solution: Keep MEMORY.md as a lightweight Index, and offload heavy details (logs, lists, configs) to memory/topic.md. The Agent only reads the sub-file when the Index points to it being relevant.
Tools
memorize
Save content to a sub-file and automatically index it in MEMORY.md.
node skills/progressive-memory/index.js memorize "Visual Identity" "White hair, red eyes..."
- Creates/Updates
memory/visual_identity.md. - Adds
- **Visual Identity**: See memory/visual_identity.mdtoMEMORY.md.
recall
Read a specific memory topic file.
node skills/progressive-memory/index.js recall "Visual Identity"
Best Practices
- Index First: Before adding 50 lines to
MEMORY.md, ask "Do I need this every turn?". If no, use Progressive Memory. - Naming: Use clear, searchable topic names (e.g.,
suno_presets,project_alpha_specs). - Context: The Index entry in
MEMORY.mdshould have a short description so the Agent knows why to recall it.