Skip to main content

Module recall

Module recall 

Source
Expand description

mushroomdb recall <db>: the body of the UserPromptSubmit hook.

The hook reads the prompt off stdin, asks the store what it already knows about it, and prints a digest or nothing at all. Everything specific to being a hook stays here: reading the payload, opening the store read-only, staying inside one byte budget, and staying silent on any error. A recall hook must never block or slow a user’s prompt.

Until 0.7 this gated on the prompt naming a code identifier — a path, a mod::name, a snake_case or backticked word — and said nothing otherwise. On a memory store, whose prompts are sentences about people and projects, that was silence on every prompt. The digest itself is core_api::memory::recall::recall_digest, which has no identifier gate.

The dirty-working-tree nudge — what the changed files reach, who owns them, which learned concepts went stale — read edges only ingest-git writes. It left with the rest of the code-graph door in 0.7.

Functions§

run_recall
The hook’s whole output. Never an error, never a panic: an empty string is how this hook says “nothing to add”, and every failure path says that.