Expand description
The GroundingSource trait module (PRD §5.5) — the sole boundary between
ethos-verify and any parser, Ethos included.
Design rules (invariant 4):
- This module depends on
serdeonly — no canonical model, no backend types, no PDFium, nothing Ethos-parser-internal. - Foreign adapters (e.g.
adapters/grounding/opendataloader-json) implementGroundingSourceover foreign output; missing capabilities become explicitcapability_limiteddowngrades in verification reports, never silent approximation.
Geometry here is integer quanta when the source declares a compatible coordinate
system; foreign sources that cannot provide that declare it via Capabilities.
Structs§
- Capabilities
- Capability declaration (PRD §5.5). Capability-driven downgrades are explicit:
whatever is
false/Unknownhere must surface as acapability_limitedwarning in verification reports that needed it. - Grounding
Cell - A table cell exposed for
table_cellclaims. - Grounding
Element - An addressable element exposed for evidence checks.
- Grounding
Span - Optional span with char offsets (capability
spans/char_offsets). - Grounding
Table - A table exposed for
table_cellclaims. - Page
Geometry - Page geometry as declared by the grounding source.
- Parser
Identity - Identity of the parser that produced the grounding data.
Enums§
- Coordinate
Origin - Coordinate origin declared by the grounding source.
Traits§
- Grounding
Source - Parser output as evidence: everything
ethos-verifyis allowed to know about a document. Implementations must be deterministic — same underlying artifact, same returned data, same order.