# T-02: Provenance & Quality Layer

## T-02: Provenance &amp; Quality Layer

<div id="bkmrk-w3c-prov-othe-w3c-pr" style="border-left:4px solid #1a7f64;padding:14px 18px;margin:12px 0;
background:#f9fbfa;border-radius:0 8px 8px 0">**W3C PROV-O**  
The W3C Provenance Ontology. Every data submission, validation event, and agent action is recorded as a PROV-O graph: `prov:Entity` (the data), `prov:Activity` (what happened), `prov:Agent` (who did it), `prov:wasGeneratedBy`, `prov:wasAttributedTo`.</div><div id="bkmrk-iso-8000-220%3A2025-%E2%80%94-" style="border-left:4px solid #1a6b8a;padding:14px 18px;margin:12px 0;
background:#f9fbfa;border-radius:0 8px 8px 0">**ISO 8000-220:2025 — Data Quality**  
International standard for data quality management. Used for metadata quality dimensions: completeness, accuracy, consistency, timeliness. CTH maps these to field-specific thresholds in the SHACL profile.</div><div id="bkmrk-cth%3Afielddataquality" style="border-left:4px solid #b35c00;padding:14px 18px;margin:12px 0;
background:#f9fbfa;border-radius:0 8px 8px 0">**cth:FieldDataQuality SHACL Profile (CTH-original)**  
SHACL shapes that enforce EUDR-specific and Andean-specific quality rules at ingestion. Key shapes:</div><table id="bkmrk-shaperulerationalect" style="width:100%;border-collapse:collapse;margin:16px 0"><thead><tr><th style="background:#1a7f64;color:#fff;padding:10px 14px;text-align:left">Shape</th><th style="background:#1a7f64;color:#fff;padding:10px 14px;text-align:left">Rule</th><th style="background:#1a7f64;color:#fff;padding:10px 14px;text-align:left">Rationale</th></tr></thead><tbody><tr style="background:#f9fbfa"><td style="padding:9px 14px;border-bottom:1px solid #e8ede9">cth:GpsPrecision</td><td style="padding:9px 14px;border-bottom:1px solid #e8ede9">Polygon vertices must have ≥6 decimal place precision</td><td style="padding:9px 14px;border-bottom:1px solid #e8ede9">EUDR Article 9 requires parcel identification; 5dp = ~1m accuracy; 6dp = ~10cm</td></tr><tr style="background:#fff"><td style="padding:9px 14px;border-bottom:1px solid #e8ede9">cth:DeforestationDataVintage</td><td style="padding:9px 14px;border-bottom:1px solid #e8ede9">IDEAM reference raster must be ≤24 months old</td><td style="padding:9px 14px;border-bottom:1px solid #e8ede9">EUDR requires current deforestation status; stale data invalidates DDS</td></tr><tr style="background:#f9fbfa"><td style="padding:9px 14px;border-bottom:1px solid #e8ede9">cth:IotCalibration</td><td style="padding:9px 14px;border-bottom:1px solid #e8ede9">IoT soil/weather sensors must have calibration certificate ≤180 days old</td><td style="padding:9px 14px;border-bottom:1px solid #e8ede9">Sensor drift; CSRD ESRS E4 requires traceable measurement</td></tr><tr style="background:#fff"><td style="padding:9px 14px;border-bottom:1px solid #e8ede9">cth:AndeanGpsLock</td><td style="padding:9px 14px;border-bottom:1px solid #e8ede9">GPS receiver must record ≥90 second lock wait per polygon vertex</td><td style="padding:9px 14px;border-bottom:1px solid #e8ede9">Mountain terrain + tree canopy causes GPS multipath error; 90s reduces error below EUDR threshold</td></tr></tbody></table>

### Ledger Integrity

The governance ledger is an append-only Postgres table with rolling SHA-256 hashes. Each entry hashes the previous entry's hash (blockchain-like chain). KERI (Key Event Receipt Infrastructure) anchoring is used for cross-organisational verifiability — validators can independently verify ledger integrity without trusting CTH's infrastructure.