session-scratchpadlisted
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