`intents/pimo-1/intent.md` -> `intent:PIMO-1` (nested paths keep their inner segments, uppercased, matching the KG indexer).
(path: &str)
| 653 | /// `intents/pimo-1/intent.md` -> `intent:PIMO-1` (nested paths keep |
| 654 | /// their inner segments, uppercased, matching the KG indexer). |
| 655 | fn intent_path_to_node_id(path: &str) -> String { |
| 656 | let id = path |
| 657 | .strip_prefix("intents/") |
| 658 | .and_then(|s| s.strip_suffix("/intent.md")) |
| 659 | .unwrap_or(path) |
| 660 | .to_uppercase(); |
| 661 | format!("intent:{}", id) |
| 662 | } |
| 663 | |
| 664 | // Frontmatter helpers |
| 665 |