• EventUserPromptSubmit · Status — live
  • In → out{prompt, cwd}additionalContext · fail-open · PYTHONUTF8=1
  • Can — inject context
  • Cannot — block the turn
  • ScriptE:\hooks\inject-protocol.mjs
  • Tunable — every number below is a config.json default

Block 1 · protocol

  • Source — per-prompt-protocol.md
  • Rides every turn
  • Memory + skill + write-conformance rules + platform map

Block 2 · memory recall

  • Source — memory_content_fts
  • Scope — cwd → project; tags = project or all
  • Skip — deleted / superseded
  • Rank — bm25 pool 12 → gap floor 45% → 0.6 rel + 0.25 recency + 0.15 conf
  • Emit — top 3, ≤ 1,500 chars each

Block 3 · skill hints

  • Source — skills_fts, curated = 1
  • Rank — description-weighted bm25 + relevance floor + scope
  • Emit — top 2
  • Nothing forces a load → see PreToolUse

On this page