README.md
Language Markdown1.4 KB27 lines
# The distillerStage 2 of better-memory. `gate.py` has already walled off the private material andstaged only the notes that are new or changed since the last run. The distiller readsthat staging directory and upserts one Notion page per entity into `better-memory`([schema](notion-schema.md)).Distillation needs a model, not a script, so this stage is a Claude skill run as ascheduled Cowork task: [`better-memory-nightly-distill/SKILL.md`](better-memory-nightly-distill/SKILL.md).Each run starts with no memory of the last one, so the skill carries everything itneeds: the read boundary, the schema, idempotency by Title, and the two lightjudgments (memory vs raw material, no private-by-nature specifics).## Schedule and binding- Nightly, **after** the gate: gate at 20:00 (launchd), distiller at 20:30 (Cowork).- Bound to `~/cowork-staging/staging` **only**. The task is never given a path to anyvault, so the walled folders are physically absent from everything it can read: thewall is enforced by the filesystem, not by the skill's instructions.- Notion access is the Claude connector's own authorization. No token lives in avault, a script or this repo. Fill the database URL and data source ID into theskill before scheduling it.## The invariant**Only this task writes the database.** See[the invariants](../README.md#the-invariants-that-make-it-safe) in the top-level README.