Skip to main content

Spec Rules and Ground Truth

Turn a plain-language rule into proposed Spec rules, check and try them on example values without saving, and review and score a Spec's ground truth against a run.

Rules

Describe a rule in plain language and get proposed rules back, with the assumptions made and anything that would stop a publish. Check proposed rules against the current draft and try them on example values you supply. None of these saves anything: add the rules you accept to the draft with PUT /v1/specs/{id}/draft. Drafting from a description uses credits; checking and trying are free.

GET/v1/specs/{id}/rules
POST/v1/specs/{id}/rules/compile
POST/v1/specs/{id}/rules/lint
POST/v1/specs/{id}/rules/dry-run

Ground truth

Ground truth is the expected value per document and field. Review entries, then score a run against them to see how close the Spec gets. In a workspace that limits field values per person, the ground-truth reads return 404.

GET/v1/specs/{id}/ground-truth
PATCH/v1/specs/{id}/ground-truth/{entryId}
POST/v1/specs/{id}/ground-truth/score
GET/v1/specs/{id}/ground-truth/report

Frequently asked questions

Do proposed rules change my Spec?+
No. They come back to you; nothing changes until you save a draft that contains them.