Compress and reorganize observational memory, condensing old observations
Condense and reorganize the observations file, producing a more compact version that preserves essential information.
Determine the memory directory by running:
python3 -c "import os; print(os.path.expanduser('~/.claude/projects/' + os.getcwd().replace('/','-') + '/memory/'))"
Read the observations file (observations.md) from that directory.
If the file is small (under ~2000 chars), inform the user that reflection isn't needed yet.
Perform reflection by reorganizing the observations:
## Project Context
- [consolidated project facts]
## User Preferences
- [consolidated preferences]
## Recent Activity
Date: YYYY-MM-DD
- Recent observations...
Before writing, show the user:
After confirmation:
reflections.log in the same directoryobservations.md