Skip to content

Rules

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

Rule Structure

[Label.] A/An **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 or An)
  3. Reference a selector
  4. Specify an outcome (verb + value)
  5. Have at least one condition after if
  6. End with a period (.)

Outcome Verbs

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

Common 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

Achievement Verbs

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

Assessment Verbs

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

State Verbs

maintains, holds, possesses, displays, exhibits, presents

Action Verbs

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

Negative Verbs

suffers, lacks, misses, fails

Success Verbs

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

Evaluation

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)

Comments

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.