Skip to content

Rules

A rule is the fundamental unit of a policy. It defines what outcome occurs when conditions are met.

[Label.] A/An/The **Selector** outcome_verb outcome_value
if condition
[and/or condition]...
.

Every rule must:

  1. Start with an optional label followed by a period
  2. Have an article (A, An, or The)
  3. Reference a selector
  4. Specify an outcome (verb + value)
  5. Have at least one condition after if
  6. End with a period (.)

The outcome verb is the action word between the selector and the outcome value. The engine supports many natural verbs:

VerbExample
getsA **Person** gets approved
isA **Person** is eligible
passesA **Person** passes the test
hasA **Person** has access
receivesA **Person** receives discount
qualifies forA **Person** qualifies for membership
meetsA **Person** meets requirements

achieves, attains, earns, gains, obtains, secures, acquires

deserves, merits, warrants, demonstrates, shows, proves, establishes

maintains, holds, possesses, displays, exhibits, presents

provides, supplies, delivers, submits, confirms, validates, verifies

suffers, lacks, misses, fails

succeeds in, excels at, reaches, arrives at, comes to

When the engine evaluates a rule:

  1. It parses the rule text
  2. For each condition, it reads the referenced property from the data
  3. It applies the operator (comparison, validation, etc.)
  4. It combines conditions using and/or logic
  5. If all required conditions pass → result is true
  6. If any required condition fails → result is false

Interactive Example

Policy Rule
Test Data (JSON)

Use # for comments. Comments are ignored by the parser:

# Check if the student passes
A **Student** passes the exam
if __score__ of **Student** is greater than or equal to 60.