3.1 KiB
3.1 KiB
name, description
| name | description |
|---|---|
| memory-compact | Audit and compact memory/MEMORY.md by removing superseded, duplicated, overly detailed, or ephemeral entries, and merging related items within a section. Runs interactively by default; use auto mode for unattended execution. |
memory-compact
Compact memory/MEMORY.md when it grows too large or stale. The skill reads MEMORY.md, USER.md, SOUL.md, and keep.md to detect duplicates and outdated context, but only edits MEMORY.md.
When to use
- User says "compact memory", "clean up MEMORY.md", "memory audit", or similar.
MEMORY.mdexceeds ~200 top-level bullet entries.- There are obvious duplicates between
MEMORY.mdand other memory files. - Old project notes, ephemeral debugging details, or superseded facts accumulate.
Modes
Interactive mode (default)
- Read
memory/MEMORY.md. - Count top-level bullets. If ≤ 200 and no obvious staleness, report "no action needed" and stop.
- Identify candidates:
- superseded — replaced by newer facts or no longer relevant.
- detail — concrete commands, flags, paths, or measurements that belong in a skill or
results/file. - duplicate — same fact already present in
USER.md,SOUL.md, orkeep.md. - ephemeral — one-off debugging, temporary state, or resolved incident details.
- Identify merge candidates within the same section — related bullets that can be combined into one concise bullet.
- Present a numbered proposal in chat:
- list each delete with reason and original text;
- list each merge with merged text;
- list kept items implicitly.
- Wait for user approval. Accept commands like:
proveď/ok/yes— apply all proposed changes.ponech 3, 7, 12— keep listed items, apply the rest.smaz 2, 5— delete only listed items.zruš/cancel— abort.
- Apply approved changes to
MEMORY.md. - Append deleted items to
log/memory-clean.logwith timestampYYYY-MM-DD HH:MM. - Report summary.
Auto mode
Triggered by user saying "memory-compact auto" or equivalent with explicit auto intent.
- Perform the same audit as interactive mode.
- Apply changes immediately without waiting for approval.
- Print a detailed list of changes.
- Append deleted items to
log/memory-clean.log.
Rules
- Only edit
memory/MEMORY.md. - Do not touch
SOUL.md,USER.md, orkeep.md. - Do not create backups of
MEMORY.md; rely onlog/memory-clean.logfor traceability. - Merge only within the same section.
- Preserve active project context, user preferences, and infrastructure facts.
- When in doubt, keep it and mention the uncertainty in the report.
Output format
Interactive proposal:
Nalezeno X kandidátů na úpravu v MEMORY.md:
Smazat:
1. [superseded] <text>
2. [detail] <text>
...
Sloučit:
5 + 6: <merged text>
...
Příkazy: proveď | ponech <čísla> | smaz <čísla> | zruš
Auto mode report:
Memory compact (auto):
- smazáno: X
- sloučeno: Y
- beze změny: Z
Detaily:
...
Example
User: compact memory
Agent: reads files, counts bullets, proposes changes, waits for proveď.