Problem
Conversation edges are one-way: conversation → code. There are no back-edges from code nodes to conversations that reference them. When exploring a code node, you can't find "which conversations discussed this?" without a full graph scan.
Solution
Build a reverse index: Map NodeId [ConversationId] that maps each code node to the conversations that reference it.
New function:
conversationsForNode :: NodeId -> Graph -> [ConversationNode]
-- Find all conversations that reference this code node
Use in select_context:
When selecting context for a query, boost nodes that have recent conversations associated with them. This creates a feedback loop: frequently discussed code gets higher relevance.
Acceptance Criteria
Files to Modify
- src/Graphos/UseCase/Conversation.hs — add conversationsForNode
- src/Graphos/UseCase/SelectContext.hs — boost nodes with conversations
- src/Graphos/Infrastructure/Server/MCP.hs — maintain reverse index
Effort: 0.5 days
Priority: Low
See: docs/proposals/memory-agent/02-gap-analysis.md (Gap 7)
Problem
Conversation edges are one-way: conversation → code. There are no back-edges from code nodes to conversations that reference them. When exploring a code node, you can't find "which conversations discussed this?" without a full graph scan.
Solution
Build a reverse index: Map NodeId [ConversationId] that maps each code node to the conversations that reference it.
New function:
Use in select_context:
When selecting context for a query, boost nodes that have recent conversations associated with them. This creates a feedback loop: frequently discussed code gets higher relevance.
Acceptance Criteria
Files to Modify
Effort: 0.5 days
Priority: Low
See: docs/proposals/memory-agent/02-gap-analysis.md (Gap 7)