cordance-core
Core types, schemas, and ports for the Cordance context-pack compiler. No I/O.
Part of the Cordance workspace.
Discoverability
Search terms: Cordance core, context pack schema, source lock, evidence map, authority boundary, fenced regions, provenance, AI agent context, deterministic schemas.
What it does
cordance-core defines the central data model every other Cordance crate
reads or writes:
CordancePack— the in-memory IR acordance packrun produces.SourceLock— the deterministic drift-detection lock that drivescordance check.SourceRecord/SourceClass— classified-file metadata, content-agnostic by design (taxonomy comes from path, not prose).AdviseReport,EvidenceMap,DoctrinePin— supporting on-disk shapes.AuthorityBoundary/CortexReceiptV1Candidate/AxiomProjectHarnessTargetV1— authority-bearing receipt structs, all#[non_exhaustive]withvalidate_invariants()enforcement.fence::{find_regions, replace_regions, sanitise_fenced_value}— the fenced-region parser that makesAGENTS.mdregeneration idempotent.paths::doctrine_cache_dir_for_url— operator-trusted filesystem locations.fs::{safe_write, safe_write_with_mkdir, SymlinkRefusal}— symlink-/ reparse-point-refusing write helpers used by every Cordance writer.
The crate is pure data + helpers; it never touches the filesystem outside
the explicit fs:: and paths:: modules.
Install
[]
= "0.1"
Quick start
use ;
use SourceLock;
use AdviseReport;
use schema;
let pack = CordancePack ;
let json = to_string_pretty.unwrap;
assert!;
See also
- Cordance project README
cordance-scan— the canonical producer ofSourceRecordvalues.cordance-emit— emitters that consumeCordancePack.
License
Dual-licensed under MIT OR Apache-2.0.