Skip to main content

Module recall

Module recall 

Source
Expand description

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

The hook has two things to say, and says whichever one the moment calls for.

When the prompt arrives from a checkout with a dirty working tree, the change already in progress is the more useful subject: the nudge names what those files reach that is not already open — the files that usually change with them, the files that import them, who owns them, and whether a learned concept has just gone out of date. That is what an assistant would otherwise only find out by reading half the repository.

Otherwise the prompt’s own words are all there is to go on, and the topic digest answers: the nodes closest to it and their strongest edges. The digest itself is core_api::repograph::recall_digest.

Everything specific to being a hook stays here: reading the payload, opening the store read-only, keeping inside one byte budget, and staying silent on any error. A recall hook must never block or slow the user’s prompt.

Functions§

run_recall