Rule expression grammar
Returns the canonical rule DSL spec — variables, operators, functions, boolean precedence, examples, validation error codes, and the substitution method catalog, including source slug selection and window parameters for each method. Intended for LLM agents and external integrations that generate rule_text. Not project-scoped; the grammar is global.
Response
Grammar spec
Canonical rule DSL spec. Each section documents what the parser accepts; consumers (LLM agents, integrations) generate rule_text against this contract. Examples are guaranteed to parse — a CI test feeds them through ParseTree.
Coverage functions and the calendar windows the projection stores, with each function's own syntax, return value and examples under functions. Separate from functions at the top level because the operand is a reporting period's completeness, not a data point's value. TIME_NOT_CAPTURED is compared only against a duration literal (literals.duration).