A ruleset is a JSON document that describes: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.
- Which sources to query (and how to filter them).
- What values to compute (counts, areas, distances).
- What conditions must hold for the result to be compliant.
/v1/evaluate, or save it to the catalog
once and reference it by name@version afterwards.
Anatomy
The three blocks
sets — what features to consider
A set is anchored on a source and joined against $input (your
request geometry/identifier) or another set. Available join operators:
intersects— geometry overlapcontains/within— full containmentdwithin— within a buffer distancedisjoint— no overlapsubject_match— match by identifier (for subject registers)
projections — what to compute
Projections produce numeric or geometric values. Common terminals:
count— number of matching featurestotal_area_m2,total_perimeter_moverlap_ratio— fraction of input coveredmin_distance_m,max_distance_maggregate— sum / avg / min / max of a feature propertymerge— unified geometry (for visualization)
checks — what must hold
Checks have a severity and a predicate:
critical, high, medium,
low, info. See Verdicts for how they map to
outcomes.
Inline shorthand
Common case — count + threshold in a single check. The parser accepts:Filters
Restrict a set withfilter:
Custom verdict policy
Override the default severity mapping with an explicit policy:Limits
To keep responses predictable, the API enforces:| Limit | Default |
|---|---|
| Max sets | 20 |
| Max checks | 50 |
| Max projections | 20 |
| Max nesting depth | 5 |
| Max buffer distance | 50 km |
| Max input area | 1 000 km² |
| Max evidence per check | 20 |
422 PROGRAM_VALIDATION_ERROR.