Starter contract

agriculture_batch

13 rules · plain YAML · starts in observation mode

OpenDQV Cloud starter template (v0.1) — your tenant inherits this baseline. First customer edit creates v1.0 in your audit trail; pin by yaml_hash for replay. Agriculture crop batch record validation for supply chain traceability and food safety pipelines. Enforces UK crop type taxonomy aligned with AHDB (Agriculture and Horticulture Development Board) classification, food safety certification scheme validation (Red Tractor, LEAF Marque, Organic, Rainforest Alliance, Fairtrade), ISO 3166-1 country of origin for single-origin traceability under UK Food Information Regulations 2014, and yield anomaly detection. Supports GlobalG.A.P. chain-of-custody traceability requirements and DEFRA cross-compliance audit records.

These are starting points you own. Every rule below ships in the trial, starts in observation mode, and is yours to read, edit, or delete from day one. Rules that reference a lookup list (lookup_file) validate against reference data you control in your tenant.
Rules as at 29 August 2026 — starting points you own, not a maintained regulatory feed. We correct errors in these samples; tracking regulatory change in your active contracts is yours.
RuleFieldSeverityWhat it enforces (the message your team sees)
batch_id_requiredbatch_iderrorbatch_id is required
farm_id_requiredfarm_iderrorfarm_id is required
crop_type_requiredcrop_typeerrorcrop_type is required
crop_type_valuescrop_typewarningcrop_type should be a standard AHDB/DEFRA crop classification — use one of the defined values for levy and cross-compliance reporting compatibility
harvest_date_formatharvest_dateerrorharvest_date must be a valid date (YYYY-MM-DD)
weight_kg_minweight_kgerrorweight_kg must be >= 0
field_id_requiredfield_iderrorfield_id is required
soil_ph_rangesoil_pherrorsoil_ph must be between 0 and 14
yield_kg_per_hectare_minyield_kg_per_hectareerroryield_kg_per_hectare must be >= 0
yield_kg_per_hectare_anomalyyield_kg_per_hectarewarningyield_kg_per_hectare exceeds 20,000 kg/ha — verify this is not a unit error (total batch weight stored as per-hectare yield). UK record is 16,790 kg/ha (Lincolnshire, 2015)
certification_status_valuescertification_statuswarningcertification_status must be a recognised scheme: red_tractor, leaf_marque, organic_soil_association, organic_of_g, rainforest_alliance, fairtrade, global_gap, brc_farm, none
country_of_origin_formatcountry_of_originwarningcountry_of_origin must be a 2-letter ISO 3166-1 alpha-2 country code (e.g. GB, FR, ES) — required for UK Food Information Regulations 2014 country-of-origin labelling
inspector_id_requiredinspector_idwarninginspector_id should be provided for traceability

Run your own data against this contract in the free trial — drop a CSV in the dashboard, no code, no credit card. Start free trial →