Skip to content

spec: drop surface modes and --message flag, read transcript directly #436

@toejough

Description

@toejough

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 --mode flag — the command doesn't need to know why it's being called
  • Drop --message flag — read the latest entry from the transcript tail
  • engram surface just 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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions