Skip to main content

Documentation Index

Fetch the complete documentation index at: https://code4source.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

These examples are illustrative — adapt sources, thresholds, and severities to your jurisdiction and policy.

Rural credit eligibility (Brazil)

Block credit if the property overlaps an indigenous territory or appears on the IBAMA embargo list.
{
  "name": "br-rural-credit",
  "version": 1,

  "sets": {
    "indigenous_overlap": {
      "source": "br:funai:indigenous-territories",
      "join": { "op": "intersects", "target": "$input" }
    },
    "embargo_overlap": {
      "source": "br:ibama:embargoed-areas",
      "join": { "op": "intersects", "target": "$input" }
    }
  },

  "checks": [
    {
      "id": "no_indigenous_overlap",
      "severity": "critical",
      "predicate": { "type": "exists", "set": "$indigenous_overlap" }
    },
    {
      "id": "no_embargo_overlap",
      "severity": "high",
      "predicate": { "type": "exists", "set": "$embargo_overlap" }
    }
  ]
}

Buffer around conservation units

Warn if the property is within 1 km of a federal conservation unit.
{
  "name": "near-conservation-unit",
  "version": 1,

  "sets": {
    "nearby_uc": {
      "source": "br:icmbio:conservation-units",
      "join": {
        "op": "dwithin",
        "target": "$input",
        "distance_m": 1000
      }
    }
  },

  "projections": {
    "distance_to_uc": {
      "set": "$nearby_uc",
      "terminal": { "type": "min_distance_m", "target": "$input" }
    }
  },

  "checks": [
    {
      "id": "too_close",
      "severity": "medium",
      "predicate": {
        "type": "threshold",
        "projection": "distance_to_uc",
        "op": "<=",
        "value": 1000
      }
    }
  ]
}

Sanctions screening

Reject if the identifier matches a sanctions register.
{
  "name": "sanctions-screening",
  "version": 1,

  "sets": {
    "ofac_hits": {
      "source": "ofac:sdn",
      "join": { "op": "subject_match", "target": "$input" }
    }
  },

  "checks": [
    {
      "id": "no_ofac_match",
      "severity": "critical",
      "predicate": { "type": "exists", "set": "$ofac_hits" }
    }
  ]
}
Call with the typed identifier:
{
  "input": {
    "scheme": { "type": "ofac:sdn", "value": "SDN-12345" }
  },
  "ruleset_id": "sanctions-screening@1"
}

Combined policy with custom verdict

Multiple checks across different severities, with an explicit verdict policy.
{
  "name": "combined-policy",
  "version": 1,

  "sets": {
    "indigenous_overlap": {
      "source": "br:funai:indigenous-territories",
      "join": { "op": "intersects", "target": "$input" }
    },
    "nearby_uc": {
      "source": "br:icmbio:conservation-units",
      "join": {
        "op": "dwithin",
        "target": "$input",
        "distance_m": 500
      }
    }
  },

  "checks": [
    {
      "id": "no_indigenous",
      "severity": "critical",
      "predicate": { "type": "exists", "set": "$indigenous_overlap" }
    },
    {
      "id": "not_near_uc",
      "severity": "low",
      "predicate": { "type": "exists", "set": "$nearby_uc" }
    }
  ],

  "verdict_policy": {
    "kind": "severity_mapping",
    "rules": {
      "critical": "non_compliant",
      "high":     "non_compliant",
      "medium":   "warning",
      "low":      "warning",
      "info":     "compliant"
    }
  }
}