diff --git a/ingestion/internal/graph/extract.go b/ingestion/internal/graph/extract.go index f557cd2..9f0bda5 100644 --- a/ingestion/internal/graph/extract.go +++ b/ingestion/internal/graph/extract.go @@ -99,11 +99,18 @@ func inferTierFromPath(e *Entity, docPath string) { case "knowledge": e.Tier = "knowledge" case "wiki": - // Pre-M3 wiki layout: sources are synth output of raw inbox - // material (I tier); concepts + entities are reference notes - // (also I tier); top-level wiki/.md is unstructured - // reference too. None of these are reusable lessons (K). - e.Tier = "note" + // Pre-M3 wiki layout. Most subdirs are I-level: + // wiki/sources/ — synth summaries of raw inbox material + // wiki/concepts/ — definitions, not lessons + // One exception: wiki/entities/ holds anchor facts about + // concrete things (models, services, people) that the eval + // expects to surface when queried directly. Those map to K + // to match the post-M3 layout target (knowledge/facts/). + if len(parts) >= 2 && parts[1] == "entities" { + e.Tier = "knowledge" + } else { + e.Tier = "note" + } case "raw", "sessions", "clips": e.Tier = "inbox" } diff --git a/ingestion/internal/search/search.go b/ingestion/internal/search/search.go index 32d58a2..ec75d5b 100644 --- a/ingestion/internal/search/search.go +++ b/ingestion/internal/search/search.go @@ -343,6 +343,11 @@ func extractTier(content, relPath string) string { case "notes": return "note" case "wiki": + // wiki/entities/ anchor pages map to knowledge (see + // graph.inferTierFromPath for the rationale). + if len(parts) >= 2 && parts[1] == "entities" { + return "knowledge" + } return "note" case "knowledge": return "knowledge"