Expand description
Doctrine consumer. Reads 0ryant/engineering-doctrine and indexes by
directory. Never re-classifies prose — only filenames and paths.
Source-of-truth: engineering-doctrine/doctrine/SEMANTIC_INDEX.md.
§Golden path
use camino::Utf8PathBuf;
let root = Utf8PathBuf::from("../engineering-doctrine");
let index = cordance_doctrine::load_doctrine(&root).expect("load doctrine");
println!("doctrine pinned at: {:?}", index.commit);
for entry in &index.principles {
println!("principle: {} ({})", entry.topic, entry.path);
}With network fallback (when the sibling clone is absent, performs a
hardened shallow HTTPS clone into an operator-trusted cache —
dirs::cache_dir()/cordance/doctrine/<hash>/<head-sha>/, never inside
the target repo):
let root = Utf8PathBuf::from("../engineering-doctrine");
let index = cordance_doctrine::load_doctrine_with_fallback(
&root,
"https://github.com/0ryant/engineering-doctrine",
None,
Some("auto"),
).expect("doctrine loaded (sibling or fallback clone)");Structs§
Enums§
Functions§
- load_
doctrine - Load and index the engineering-doctrine repository at
root. - load_
doctrine_ or_ default - Load doctrine, returning an empty index on any error rather than propagating.
- load_
doctrine_ or_ fallback - Like
load_doctrine_with_fallbackbut returns an empty index instead of propagating any error. Logs a warning when the fallback fails. - load_
doctrine_ with_ fallback - Load doctrine from
rooton disk. Ifrootdoes not exist, clonefallback_repo(shallow, depth=1) intocache_dirand load from there.