Expand description
marque-rules — trait definitions for the marque rule system.
This crate defines the contract every rule crate must satisfy.
It has no rule implementations — those live in marque-capco and future crates.
The engine depends only on this crate, enabling rule crates to be swapped.
§Type split: FixProposal vs AppliedFix
FixProposal is pure data emitted by rules — deterministic, timestamp-free,
classifier-free. AppliedFix wraps a proposal with runtime context (timestamp,
classifier id, dry-run flag) and is constructed only by Engine::fix.
This makes “suggested vs applied” a type-system invariant.
Structs§
- Applied
Fix - A promoted
FixProposalwith runtime context. - Diagnostic
- A single diagnostic emitted by a rule check.
- FixProposal
- A proposed fix for a diagnostic violation.
- Rule
Context - Document position context passed to rules alongside parsed markings.
- RuleId
- Unique rule identifier string (e.g., “E001”, “capco/banner-abbreviation”).
Enums§
- Document
Position - Coarse position within the document (for banner detection heuristics).
- FixSource
- Provenance of a fix proposal — where the fix recommendation originated.
- Marking
Type - Classification marking candidate type, determined by scanner heuristics.
- Severity
- Rule severity level. Configurable per rule in
.marque.toml. - Zone
- Document zone — where in the document structure a marking appears.