Expand description
spool hook stop — drain pending signals + scan transcript for
self-tags and incidents + persist via the shared distill pipeline,
then attempt silent knowledge distillation.
§Pipeline
- Resolve
transcript_path(priority:--transcript-pathflag,--hook-inputJSONtranscript_pathfield, fallback scan of~/.claude/projects/<sanitized-cwd>/). - Delegate to
crate::distill::pipeline::runwhich performs: queue drain → self-tag heuristic → extraction heuristic → redact + dedupe + LifecycleService writes (accepted + candidate). - Attempt silent knowledge distillation: detect clusters of
related fragments and auto-create candidate knowledge pages
(actor:
spool-auto-distill). Failures are logged to stderr and never propagate. - Write
<cwd>/.spool/last-stop.unixmarker for debugging.
Stop hook is the automatic entry point for distill. The MCP
memory_distill_pending tool exposes the same pipeline as a
manual on-demand entry point (R4a).