Session Memory Context
Folder Structure
session-memory-context/
├── new-recent/ # Latest 10 sessions, full detail
├── old-sessions/ # Short dated summaries of older sessions
├── permanent/ # User-flagged "remember this" items (no limit)
└── temporary-priority/ # "Do you remember this" pins (no limit, auto-release)
Core Behavior
On /new — Save Current Session
- If
new-recent/has ≥10 files, compress the oldest intoold-sessions/as a short dated summary before saving new session. - Save full session notes to
new-recent/with timestamp filename (e.g.,2026-04-12-2000.md).
On "remember this" (or similar)
- Move the relevant session file from
new-recent/intopermanent/. - Release that slot so the 10-session limit stays at 10 — do not expand to 11.
On "do you remember this" (or similar)
- Move the relevant session from
new-recent/orold-sessions/intotemporary-priority/. - Treat as short-term priority, loaded when user asks to remember.
Temporary-Priority Rules
- Keep items in
temporary-priority/only while user is actively asking about them. - If user has NOT asked about that session in the last 10 sessions, move it back to
old-sessions/and stop treating it as priority.
Permanent Memory Rules
- Sessions in
permanent/are kept forever unless user says "forget X" or "forget this" for that item. - On "forget X"/"forget this": immediately delete that specific item from
permanent/. - Never delete or modify anything outside the skill's own memory folders.
- If unsure which file to delete, stop and ask for confirmation.
Deletion Rules
- Only delete from
old-sessions/if: session is very old AND user has never asked to remember it. - Never remove newer sessions when compressing or deleting older ones.
- Respect explicit user commands like "forget this" or "clear old sessions" — delete oldest/least relevant first.
Auto-Context Loading
- When user asks anything related to a session in
permanent/, automatically read relevant permanent files as context. - When a message is clearly related to a session in
new-recent/, automatically read matchingnew-recent/sessions as context. - In both cases, keep loaded context short and focused — only the parts directly relevant to current topic.
One-Off Queries
- Short checks like "what is the system status" or other trivial queries are NOT saved to
permanent/once the 10-session limit is active. - Only save memorable/relevant sessions.
Session File Format
Save as .md files. Filename pattern: YYYY-MM-DD-HHmm.md (e.g., 2026-04-12-2000.md).
Session files should contain:
- Timestamp
- Brief summary of what happened
- Key decisions, preferences, or context the user shared
- Anything worth remembering long-term
Compressing to Old-Sessions
When moving from new-recent/ to old-sessions/, create a very short summary:
YYYY-MM-DD — [1-2 line summary of what happened]
Keep it minimal. These are just enough context to recognize if user asks to remember something later.
