Expand description
Requirement traceability, executable coverage, and review tooling for Rust.
Cross-checks numbered system requirements in selected
USER_STORIES_AND_REQUIREMENTS.md documents against the code and test
anchors in the source tree (#[shallguard::enforces] /
#[shallguard::verifies] attributes and shallguard::enforces_here!
branch anchors).
Hard errors (always fail):
- a document fails to parse or yields fewer configured requirements;
- duplicate requirement IDs across the documents;
- a
src/ortests/path cited anywhere in a document that does not exist (except repository-configured historical removals); - a requirement ID referenced in code that no document defines.
Ratcheted checks (warning only for exact committed baseline entries, otherwise a hard error; already-hard areas cannot be baselined):
- a requirement whose Enforced: files carry no anchor of its ID;
- a requirement with automated-test evidence (
[test]) that no test anchor claims to verify; - automated evidence that does not resolve to its cited test.
The binary prints a per-area coverage report; the repo-wide check also runs as this crate’s integration test, which is the CI gate.
Modules§
- baseline
- Persistent exceptions for historical traceability gaps.
- bundle
- Deterministic review-capsule generation.
- check
- The cross-checks and the report.
- config
- Repository-owned ShallGuard configuration.
- coverage
- Per-verification-test LLVM coverage projected onto requirement enforcement scopes.
- docs
- Parsing of the
USER_STORIES_AND_REQUIREMENTS.mddocuments. - evidence_
mark - Evidence marks on the Verified: line of a requirement.
- impact
- Deterministic base/head requirement impact analysis.
- requirement_
format - Structural linting and deterministic formatting for requirement documents.
- review
- Isolated local-CLI execution of requirement review capsules.
- review_
workflow - One-command orchestration for impact, coverage, bundle, and local review.
- scan
- Scanning of Rust sources for requirement anchors.
- test_
index - Exact Cargo test identity resolution for verification anchors.
Macros§
- enforces_
here - Statement-position enforcement anchor: marks the surrounding branch,
match arm, or statement sequence as an enforcement site of the listed
requirements. Expands to nothing; the IDs are validated for form and
uniqueness at compile time exactly like
enforces.
Structs§
- DocSpec
- A requirements document and the source tree that unprefixed
src/andtests/references inside it resolve to.
Enums§
- Progress
Event - A human-readable update from a long-running command.
Functions§
- workspace_
root - Discovers the Cargo workspace that contains the invocation directory.
Type Aliases§
- Progress
Callback - Callback used by long-running commands for human-readable stderr progress.