Skip to content

Interface: DocumentRuleResult

@kortexya/reasoninglayer


@kortexya/reasoninglayer / DocumentRuleResult

Defined in: src/types/documents.ts:110

Result of evaluating one rule against a document.

optional basis?: DocumentVerdictBasis | null

Defined in: src/types/documents.ts:151

What the evaluator said its verdict rests on. null when it named no basis the engine can read; absent from an engine that predates it.


confidence: number

Defined in: src/types/documents.ts:127

The evaluator’s confidence in status (0.0-1.0). 0 when the engine withheld the evaluator’s answer: no evaluator answered the replacement inconclusive, and the withheld answer’s confidence is in withheldConfidence.


evidence: string[]

Defined in: src/types/documents.ts:129

Evidence supporting the result.


optional fixSuggestion?: string | null

Defined in: src/types/documents.ts:133

Fix suggestion (when requested and the rule failed).


optional proofTrace?: DocumentProofStep[] | null

Defined in: src/types/documents.ts:131

Proof trace (when requested): chain of reasoning steps.


optional relevantExcerpt?: string | null

Defined in: src/types/documents.ts:135

The relevant clause/section excerpt of the document.


ruleDescription: string

Defined in: src/types/documents.ts:114

Human-readable rule description.


ruleId: string

Defined in: src/types/documents.ts:112

Rule identifier (sort name + feature key).


ruleSort: string

Defined in: src/types/documents.ts:116

Which rule sort/category this belongs to.


severity: DocumentRuleSeverity

Defined in: src/types/documents.ts:118

Rule severity.


status: DocumentRuleStatus

Defined in: src/types/documents.ts:120

Whether the rule passed/failed/was inconclusive/not applicable.


optional withheldConfidence?: number | null

Defined in: src/types/documents.ts:157

The evaluator’s confidence in withheldStatus (0.0-1.0). null when the evaluator’s status stands; absent from an engine that predates it.


optional withheldStatus?: DocumentRuleStatus | null

Defined in: src/types/documents.ts:146

The verdict the engine WITHHELD: the status the evaluator answered when the engine replaced it with inconclusive because the answer was not grounded in the evaluated text (it quoted nothing the engine read). null when the evaluator’s status stands; absent from an engine that predates it.

Show it beside an inconclusive result: it explains why a rule the evaluator called pass or fail is reported as undecided.