Module predefined_views

Module predefined_views 

Source
Expand description

Predefined SochQL Views (Task 7: Stable Identifiers)

This module defines canonical views over the core memory schema (episodes, events, entities) that provide:

  1. Stable naming: LLMs and humans learn consistent patterns
  2. Self-documenting: View names encode semantics directly
  3. Reduced complexity: O(1) concepts instead of O(T) tables

§Views

ViewPurposeCommon Use
conversation_viewChat messages“Show recent conversation”
tool_calls_viewTool invocations“What tools were used?”
error_viewError events“Show recent errors”
episode_summary_viewEpisode overviews“List recent tasks”
entity_directory_viewEntity catalog“Find user/project”

Modules§

naming
Standard column naming conventions

Structs§

ViewDefinition
A predefined view definition

Functions§

build_view_map
Build a HashMap of views for O(1) lookup
get_predefined_views
Get all predefined views
get_view
Get a view by name