Skip to main content

Module rules

Module rules 

Source
Expand description

The conditional validation-rules engine for the universal config.

evaluate runs a project’s [[rules]] against one document and returns a problem message for each failed assertion. It is the single place the configured guards are checked; later phases call it from new, set-status, import, and verify (today nothing in production calls it — it ships unit-tested, ready to wire in).

A rule fires when its when { type?, status?, tag? } matches the document, then its one assertion (from the closed set) is checked.

Functions§

evaluate
Evaluate every applicable rule against one document. doc_ids is the set of ids a link may resolve to (the live docs), exactly as verify builds it.