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:651–658  ·  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

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

Callers 1

seed_from_intentMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected