pub struct EvidenceGroundingRule { /* private fields */ }Expand description
Evidence-grounding rule for one invocation: which output field carries the claims, which per-claim field carries the evidence references, and the closed set of reference ids that count as real evidence for this deliberation (the “evidence pack”).
The rule is deliberately shape-only: the core does not know what an
evidence ref points at (a document, a trace, a metric snapshot) —
only that a claim citing a ref outside the pack is ungrounded. When
a SemanticSupportRule is attached the contract additionally
demands that every claim’s cited evidence supports the claim, as
judged through the EvidenceSupportJudgePort.
Implementations§
Source§impl EvidenceGroundingRule
impl EvidenceGroundingRule
Sourcepub fn new(
claims_field: impl Into<String>,
refs_field: impl Into<String>,
allowed_refs: impl IntoIterator<Item = impl Into<String>>,
) -> Result<Self, DomainError>
pub fn new( claims_field: impl Into<String>, refs_field: impl Into<String>, allowed_refs: impl IntoIterator<Item = impl Into<String>>, ) -> Result<Self, DomainError>
Build a grounding rule. allowed_refs must be non-empty: an
evidence-bound deliberation with an empty pack is a
configuration error, not a stricter gate.
Sourcepub fn with_semantic_support(
self,
rule: SemanticSupportRule,
) -> Result<Self, DomainError>
pub fn with_semantic_support( self, rule: SemanticSupportRule, ) -> Result<Self, DomainError>
Attach a semantic-support rule. Every allowed reference must carry a body: a pack entry the judge cannot read would make the gate’s outcome depend on which ref a proposal happens to cite — a config gap must fail loudly at wiring time, not at judgment time.
pub fn claims_field(&self) -> &str
pub fn refs_field(&self) -> &str
pub fn allowed_refs(&self) -> &BTreeSet<String>
Sourcepub fn semantic_support(&self) -> Option<&SemanticSupportRule>
pub fn semantic_support(&self) -> Option<&SemanticSupportRule>
Semantic-support rule, when the contract demands one. None
means the support validator is a no-op for this invocation.
Trait Implementations§
Source§impl Clone for EvidenceGroundingRule
impl Clone for EvidenceGroundingRule
Source§fn clone(&self) -> EvidenceGroundingRule
fn clone(&self) -> EvidenceGroundingRule
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more