sealmap-corpus
Projects a sealmap_model::Codebase into a corpus of dense Mermaid diagrams
with exactly one document per source file, plus an overview, a JSON index that
links every call to the fragment that expands it, and the model itself. It
also writes the corpus to disk and checks a directory against it, touching
only files it generated.
Its seal module keeps hand-written diagram topics true to the code. A
topic cites symbols by sym: id; seals.lock records the sig_hash and
body_hash each had when the topic was reviewed, plus a hash of the topic's
prose. seal::verify classifies every seal as holds, behaviour, contract,
absent (with rename candidates), unparsable (fail closed), unsealed
citation, orphan, prose edited or lock fault; seal::stale compares two
models; seal::sign writes a seal. All of it is pure: no file system, no
git.
Its pack module builds review packs: one deterministic text holding
chosen topics verbatim, the sealmap-dense slice of the code each cites and
a bounded window of that code's source, refused (never truncated) when over
a byte budget, or split into shards of whole topics. pack::changed_topics
picks the topics whose sealed or cited symbols changed between two models.
Part of sealmap.
use ;
use SourceSet;
use ;
let mut src = new;
src.insert.unwrap;
let model = extract.codebase;
let corpus = generate;
let doc = corpus.document.unwrap;
assert!;
assert!;
A review pack of one topic, refused when over budget:
use ;
use Topics;
use ;
use ;
let mut src = new;
src.insert.unwrap;
let model = extract.codebase;
let mut topics = new;
topics.insert;
let input = new;
let ids = ;
let out = pack.unwrap;
assert!;
assert!;
Licence
Licensed under either of Apache License, Version 2.0 or MIT licence, at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 licence, shall be dual licensed as above, without any additional terms or conditions.