-
Notifications
You must be signed in to change notification settings - Fork 0
spec: drop surface modes and --message flag, read transcript directly #436
Copy link
Copy link
Open
Description
Problem
engram surface currently takes --mode prompt|stop and --message "..." flags. But the surfacing pipeline already reads the transcript tail for context, and the user's message (or agent's output) is already written to the transcript before the hook fires.
Evidence
Tested in live session: "let's test it" appeared in transcript JSONL before the UserPromptSubmit hook executed. The transcript is the source of truth — passing the message via flag duplicates data.
Fix
- Drop
--modeflag — the command doesn't need to know why it's being called - Drop
--messageflag — read the latest entry from the transcript tail engram surfacejust reads the transcript, finds matching memories, surfaces them- Hook scripts simplify to just
engram surface - Both UserPromptSubmit and Stop hooks call the same command; the transcript naturally contains the right latest content at each point
This also eliminates the documentation problem where stop-surface said "Same as prompt-mode surface" without being explicit about shared behavior like [[pending_evaluations]] writes.
AI-Used: [claude]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels