Skip to main content

Module user_prompt

Module user_prompt 

Source
Expand description

spool hook user-prompt — invoked when the user submits a prompt.

§Behavior

  1. Read the user’s prompt from stdin (Claude Code passes it as the hook payload).
  2. Check for recall trigger keywords (“remind me”, “之前说过”, “上次决定”, etc.).
  3. If triggered, run a lightweight context retrieval and emit a compact memory block to stdout so the AI sees relevant memories.
  4. Update last-prompt.unix timestamp marker.

§Performance

The retrieval path is the same as spool get — local vault scan, no network. Must stay under 500ms p95.

Structs§

UserPromptArgs

Functions§

run