Ontology · domain 2

Memory — the semantic layer

Cortex memory is event-sourced where it matters and freshness-tracked throughout. It maps to a 6-type cognitive memory taxonomy (docs/design/10-work-p…

16 objects · 0 links · 6 actions
Objects · every one cites its backing source
Working
L6 boot context (prompt)
what matters for this tick · cortex-boot
Episodic
team_events, messages, agent_sessions
what happened · cortex-search (temporal)
Semantic
work_products, decisions, knowledge
what is true now · cortex-brief, vector search
Procedural
lessons, rules, skills
how we act · cortex-search, rule files
Structural
code graph (DuckDB+SQLite), cortex_entities/cortex_relationships
how code is wired · cortex-graph-*
Provenance
work_products.provenance, team_events
why we trust it · cortex-brief provenance trail
WorkProduct
work_products (:1816)
handoff_id, actor_id, activity_type (free-text convention, DEFAULT task-completed, slug-normalised; typical values implementation/review/migration/research/fix/content-published/asset-created/approval/campaign), status ∈ {current, stale, superseded}, files_changed[], symbols_changed[], subject_entities[], tests_run jsonb, risks[], followups[], commit_sha, content_hash, file_hashes, symbol_hashes, freshness_status, freshness_reason, projection_status, valid_from/valid_to, supersedes_id, embedding vector(768)
Decision
decisions (:1590)
summary, rationale, outcome, category, files_affected[], tags[], embedding, superseded_by, times_selected/applied/completed/fallback, quality_score, parent_decision_id, generation, actor_id
Lesson
lessons (:1717)
procedural memory rows, embedded
Knowledge
knowledge (:1691)
content, source_file, category, section, embedding, project-scoped (_global allowed)
Artifact
artifacts (:1406), artifact_edges (:1389)
typed modality, captions, provenance (L5)
Entity
cortex_entities (:1555)
typed L4 graph node
Relationship
cortex_relationships (:2109)
typed edge with confidence (deterministic vs probabilistic)
RetentionTier
retention_config (:2381) + archive_* tables
single tier2_days (default 90) drives hot→archive; archive_messages/events/decisions/lessons/handoffs
AgentDiary
agent_diaries (:1136)
episodic/reflective memory; agent_name, summary, outcome, importance, search_vector, actor/project FKs; backs /diary/{agent}
EmbeddingJob
embedding_backfill_jobs (:2180)
pollable backfill durability for the L2 action; status ∈ {queued, running, completed, failed}
Actions
ActionSurface
Log decision/lesson/progresscortex-log <agent> decision|lesson|progressPOST /log; bulk via /decisions/ingest, /lessons/ingest (conflict-detecting, on_conflict=conflict|update)
Record work productcortex-work-productPOST /work-products
Retrieve briefcortex-brief <file-or-symbol>
Check freshnesscortex-work-product --check-freshness --apply; cortex-maintain --freshness; Beat sweep
Backfill embeddingscortex-embed/beat/embeddings/backfill (pollable job)
Archiveretention worker moves hot→warm→archive_*
Notes, laws and mechanics

The Work Product ledger (kinetic core)

immutable evidence event (handoff completed)
  → canonical WorkProduct record (write ONCE, projection_status=pending)
  → typed projections into L1–L6 (embedding, code graph, entity graph, boot briefs)
  → freshness by hash (file/symbol/content) → stale | superseded
← 1. Subjects & Identity3. Coordination — the kinetic layer →