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:601–608  ·  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

599/// `intents/pimo-1/intent.md` -> `intent:PIMO-1` (nested paths keep
600/// their inner segments, uppercased, matching the KG indexer).
601fn intent_path_to_node_id(path: &str) -> String {
602 let id = path
603 .strip_prefix("intents/")
604 .and_then(|s| s.strip_suffix("/intent.md"))
605 .unwrap_or(path)
606 .to_uppercase();
607 format!("intent:{}", id)
608}
609
610// Frontmatter helpers
611

Callers 1

seed_from_intentMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected