Skip to content

Interface: CheckFinding

@kortexya/reasoninglayer


@kortexya/reasoninglayer / CheckFinding

Defined in: src/types/document-check.ts:144

One unified finding, from either the OSF diff pass or the rules pass.

Findings carry two-sided provenance: CheckFinding.evidenceDocument is the span in the checked contract, CheckFinding.evidenceReference the span in the reference document. The details payload is pass-specific opaque JSON (the full clause diff item, contradiction record or rule result) and is surfaced verbatim. proofTrace is typed.

The knowledge-base rules pass produces one rule_violation finding (source: "kb_rules", message "Rule violated: <description>") per rule that fails. A rule it cannot evaluate adds a line to CheckDocumentResponse.warnings, not a finding.

optional details?: JsonValue

Defined in: src/types/document-check.ts:160

Pass-specific detail payload (clause diff item, contradiction record, rule result).


optional evidenceDocument?: JsonValue

Defined in: src/types/document-check.ts:156

Provenance in the checked contract, when present on that side.


optional evidenceReference?: JsonValue

Defined in: src/types/document-check.ts:158

Provenance in the reference document, when present on that side.


optional fixSuggestion?: string | null

Defined in: src/types/document-check.ts:167

Suggested fix, when requested and derivable.


kind: FindingKind

Defined in: src/types/document-check.ts:148

Kind of the finding.


message: string

Defined in: src/types/document-check.ts:150

Human-readable description.


optional proofTrace?: CheckProofStep[] | null

Defined in: src/types/document-check.ts:165

Proof trace of a rule_violation finding, when requested: the ordered reasoning steps. Absent on other findings.


optional referenceDocumentId?: string | null

Defined in: src/types/document-check.ts:154

Which reference document produced this finding (OSF-diff findings only).


severity: FindingSeverity

Defined in: src/types/document-check.ts:146

Severity of the finding.


source: string

Defined in: src/types/document-check.ts:152

Which pass produced this finding: "osf_diff" or "kb_rules".