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.

Every /v1/evaluate response carries two top-level enums on purpose:
FieldValuesMeaning
statusok, degradedDid the evaluation finish cleanly?
outcomecompliant, warning, non_compliant, degradedDid the policy pass?
You read both. status: ok + outcome: non_compliant is a clean evaluation that found a policy violation — block. status: degraded is an incomplete evaluation regardless of outcome — treat with caution and consider retrying.

Outcome semantics

OutcomeMeaning
compliantAll checks passed. Safe to proceed.
warningAt least one warning-severity check triggered. Review before proceeding.
non_compliantAt least one error-severity check triggered. Block.
degradedResult is incomplete; some checks could not be evaluated.

Severity

Each check declares one of five severities — critical, high, medium, low, info. The default policy maps them to outcomes roughly like this:
  • critical / high → triggering pushes the outcome to non_compliant.
  • medium / low → triggering pushes the outcome to warning (if not already non_compliant).
  • info → never affects outcome; surfaces as a triggered check for reporting.
Rulesets can also declare an explicit verdict_policy to override the default mapping. See the authoring guide.

Evidence

Each triggered check carries up to 20 matching features in evidence[] — the actual items that caused the check to fire. Use them to render explanations to your users (“polygon overlaps the Yanomami Indigenous Territory by 0.42 km²”) instead of opaque pass/fail flags. Each check also reports total_matched — when this exceeds evidence.length, the UI should indicate truncation.