MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / intent_path_to_node_id

Function intent_path_to_node_id

atomic-cli/src/commands/vault/context.rs:655–662  ·  view source on GitHub ↗

`intents/pimo-1/intent.md` -> `intent:PIMO-1` (nested paths keep their inner segments, uppercased, matching the KG indexer).

(path: &str)

Source from the content-addressed store, hash-verified

653/// `intents/pimo-1/intent.md` -> `intent:PIMO-1` (nested paths keep
654/// their inner segments, uppercased, matching the KG indexer).
655fn 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

Callers 1

seed_from_intentMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected