P
persistent-memory-hygiene
About persistent-memory-hygiene
persistent-memory-hygiene is a workflow guide for keeping an agent's daily notes and long-term memory organized. It defines when to record information, how to curate persistent memory, and how to close sessions and handle scheduled wakeups.
Key features
- 01Separate daily notes from long-term memory
- 02Set criteria for recording information
- 03Use a structured session closing routine
- 04Track cleanup state in a YAML file
- 05Review long-term memory and remove stale entries
Use cases
- 01Record decisions and task progress
- 02Carry forward context between sessions
- 03Run a scheduled memory cleanup check
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ archieindian/ openclaw-superpowers --skill persistent-memory-hygieneAfter installing, type/persistent-memory-hygienein Claude Code to confirm it loaded.
Bundled filesSTATE_SCHEMA.yaml
Details
From the project READMEPersistent Memory Hygiene
State file: ~/.openclaw/skill-state/persistent-memory-hygiene/state.yaml
Memory Structure
memory/
YYYY-MM-DD.md # Daily notes - raw, comprehensive
MEMORY.md # Long-term - curated, distilled
When to Write
Write to memory/YYYY-MM-DD.md when:
- Completing a significant task
- Making a decision with reasoning
- Encountering a notable error and its fix
- At checkpoints on long tasks
Write to MEMORY.md when:
- Something is worth remembering across months
- A user preference has been established
- A pattern has been confirmed
Session Closing Routine
## [HH:MM] Session End
- Completed: [what was finished]
- In progress: [what was started]
- Next: [what to do next session]
- Decisions: [choices made and why]
After writing, update state: last_cleaned_at, memory_line_count, daily_file_count, last_daily_file, status: done.
Hygiene Rules
- Daily files: write raw, append-only, never edit old entries
- MEMORY.md: review periodically, remove stale entries, keep under 500 lines
Cron Wakeup Behavior
On 11pm wakeup:
- Read state file
- If
last_cleaned_atis today's date: skip (already ran) - Otherwise: run Session Closing Routine, update state
Comments
Markdown supported