feat(CF-1316): Add LLM metadata extraction at embedding time

Extract structured metadata (topics, decisions, blockers, tools_used,
projects, issue_keys) from session summaries using Haiku at session end.
Metadata stored in JSONB column with GIN index for filtered retrieval.
session_semantic_search now accepts optional metadata filters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-02-19 18:09:00 +02:00
parent ef74d7912e
commit ece0e81ae9
7 changed files with 130 additions and 8 deletions

View File

@@ -0,0 +1,7 @@
-- CF-1316: Add LLM-extracted metadata JSONB column for filtered retrieval
-- Schema: { topics: string[], decisions: string[], blockers: string[], tools_used: string[], projects: string[], issue_keys: string[] }
ALTER TABLE sessions ADD COLUMN IF NOT EXISTS extracted_metadata JSONB;
-- GIN index for fast JSONB containment queries (@>)
CREATE INDEX IF NOT EXISTS idx_sessions_extracted_metadata ON sessions USING GIN(extracted_metadata);