← ClaudeAtlas

session-scratchpadlisted

Compaction-proof working memory via the kb-search MCP session tools — note load-bearing decisions and in-flight state as you work (kb_session_note), recover them verbatim after compaction or a crash (kb_session_get / kb_session_list, including prior sessions), and flush the session's notes to wiki/log.md at session end (kb_session_flush). Fires when a decision or value future-you must recall VERBATIM is made mid-session (commit hashes in a multi-step flow, chosen thresholds, form/entity ids, scope rulings), when a session runs long enough that compaction is plausible, at session end (flush), and at session start after a crash or heavy compaction (recovery). Skip for short sessions with nothing in flight that files/tasks don't already hold.
draakaap/lorewerk · ★ 1 · AI & Automation · score 74
Install: claude install-skill draakaap/lorewerk
# Session Scratchpad The context window is the only true working memory, and compaction trims it. The scratchpad is the durable sidecar: notes live in `session-notes.sqlite` next to `wiki.db` (its own file — wiki.db is a derived artifact the indexer may rebuild), keyed by a per-process session id, and mirrored into `wiki/log.md` at session end so the audit trail survives in the one place all history lives. ## When to write a note - **A decision with a one-line rationale** the rest of the session builds on ("decision-port: the api service owns 9009 natively; the proxy pin stays as belt-and-braces"). - **Verbatim-critical values** mid-flow: commit hashes you'll reference at push time, entity/form ids harvested from a live DOM, thresholds you settled on. - **In-flight state at a risky boundary**: what is half-done before a long agent wait, what the next step was going to be. Key convention: kebab-case with a type prefix — `decision-*`, `state-*`, `value-*`, `thread-*`. Same key upserts (state notes overwrite as state changes). ## What NOT to note Anything already durable: file contents, wiki pages, TaskList items, git history. The scratchpad is strictly for **what would otherwise exist only in context**. TaskList tracks work items; the scratchpad holds facts and rulings. Knowledge worth keeping past today graduates to a wiki page at session end — the scratchpad is ephemera with an audit trail, not a second wiki. ## Recovery (post-compaction or post-crash) 1. `kb_se