Skip to content

follow-up: LEFT JOIN messages_ext in recall queries #3

@fru-dev3

Description

@fru-dev3

The framework+lens persistence sidecar table (`messages_ext` joined on rowid — see commit ec8ef20) is written on every chat turn but NO recall queries surface the metadata yet.

Sites that should LEFT JOIN messages_ext ON messages_ext.rowid = messages.rowid and SELECT ext.framework, ext.lens:

  • `getRecentUserPrompts` in src/session.ts — for /history readouts
  • `getUserPromptsForDomain` in src/session.ts — for the per-domain prompt list
  • `searchMessages` in src/session.ts — for /search

Plus the FTS reads in src/memory.ts that produce the recall hits prepended to council prompts — those should probably tag their hits with the original framework/lens so the chair sees "this prior decision was made under CONTRARIAN lens" rather than treating all priors as equivalent.

Filed in: commit ec8ef20 "feat(chat): per-bubble metadata badge + framework/lens decision log".

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfollow-upKnown follow-ups from commits that should become real work items

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions