Part of Djinn — the anchor-bound intent-preservation plugin.
Captures the first-turn session intent and refreshes it when the developer adds constraints. This is the out-of-context state that survives /compact.
- SessionStart hook writes
state/anchor.jsononce per session with the first user prompt, its sha1 hash, intent type (feature/bugfix/refactor/research/docs), and capture timestamp. - UserPromptSubmit hook compares each new prompt against the anchor via D1 LCS. If preservation < 0.5, appends a
refresh_deltato the anchor record. - Publishes
djinn.intent.capturedon first capture;djinn.intent.refreshedon constraint deltas.
Hook-driven. No slash command.
state/anchor.json— the session anchor record.- Published events:
djinn.intent.captured,djinn.intent.refreshed.
- D1 Hunt-Szymanski LCS (Hunt and Szymanski 1977) — ratio test for constraint-refresh eligibility.
- D3 Vitter reservoir (Vitter 1985) — seeded here; populated by drift-aligner.