Expand description
spec-drift — semantic coherence analysis between a project’s
specification surfaces (README, AGENTS.md, examples, CI) and its Rust code.
The library exposes the domain model, analyzers, and reporters so they can
be embedded in editors or other tools. The spec-drift binary is a thin
CLI wrapper over run.
Re-exports§
pub use config::Config;pub use context::ProjectContext;pub use domain::Attribution;pub use domain::ClaimKind;pub use domain::CodeFact;pub use domain::Confidence;pub use domain::Divergence;pub use domain::FactKind;pub use domain::Location;pub use domain::RuleId;pub use domain::Severity;pub use domain::SpecClaim;pub use error::SpecDriftError;
Modules§
- analyzers
- baseline
--baselinesupport.- blame
--blamedivergence attribution viagit blame --porcelain.- config
spec-drift.tomlconfiguration.- context
- domain
- error
- llm
- LLM-backed rule support.
- parsers
- reporters
- sources
- suppress
- Inline-ignore filtering.
- workspace
- Workspace member discovery via
cargo metadata.
Functions§
- apply_
config - Apply a
Configto a divergence set: drop suppressed items and apply severity overrides. - apply_
strict - Promote every non-deterministic divergence one severity level. Mirrors the
--strictCLI flag — deterministic rules stay untouched because they already carry unambiguous verdicts. - run
- Execute every analyzer in parallel and return divergences sorted
deterministically by
(file, line, rule)so output can be diffed between runs.