(candidate: &CandidateScore)
| 202 | } |
| 203 | |
| 204 | fn why_matched(candidate: &CandidateScore) -> &'static str { |
| 205 | match (candidate.base > 0.0, candidate.neighbor) { |
| 206 | (true, true) => "task terms and knowledge-graph relationship", |
| 207 | (true, false) => "task terms", |
| 208 | (false, true) => "knowledge-graph relationship", |
| 209 | (false, false) => "recent-memory fallback", |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | /// Read a vault path from KG node metadata; the legacy fallback maps the |
| 214 | /// node identity onto ``memory/<name>.md``. |