003-knowledge-memory #55
Reference in New Issue
Block a user
Delete Branch "003-knowledge-memory"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Create running knowledge in the DB that remembers and links together entities
Implements persistent cross-photo knowledge memory so the agentic insight loop can learn and recall facts about people, places, and events across the photo collection. Changes: - photo_insights: drop UNIQUE(file_path) + INSERT OR REPLACE, replace with append-only rows + is_current flag for insight history retention - New tables: entities, entity_facts, entity_photo_links with FK constraints and confidence scoring - KnowledgeDao trait + SqliteKnowledgeDao with upsert, merge, and corroboration (confidence +0.1 on duplicate fact detection) - Four new agent tools: recall_entities, recall_facts_for_photo, store_entity, store_fact (with object_entity_id FK support) - Cameron entity auto-seeded with stable ID injected into system prompt - Pre-run photo link clearing + post-loop source_insight_id backfill - Audit REST API: GET/PATCH/DELETE /knowledge/entities/{id}, POST /knowledge/entities/merge, GET/PATCH/DELETE /knowledge/facts/{id}, GET /knowledge/recent Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>