Implement context building from graph position.
buildContext :: Graph -> UserId -> NodeId -> IO ContextformatContext :: Context -> TexttruncateWithSummary :: Graph -> [Node] -> Int -> IO [Node]summarizeBranch :: Graph -> NodeId -> IO TextcreateSummary :: Graph -> NodeId -> IO NodeId1. Walk path to root 2. If path > 20 nodes, truncate with summary 3. If multiple parents (join), summarize other branches 4. Query memory for relevant context 5. Format as prompt text
Omni/Agent/Graph/Context.hs
Omni/Agent/Memory.hs for memory lookup