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:
- Start with an optional label followed by a period
- Have an article (
AorAn) - Reference a selector
- Specify an outcome (verb + value)
- Have at least one condition after
if - 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
| Verb | Example |
|---|---|
gets | A **Person** gets approved |
is | A **Person** is eligible |
passes | A **Person** passes the test |
has | A **Person** has access |
receives | A **Person** receives discount |
qualifies for | A **Person** qualifies for membership |
meets | A **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:
- It parses the rule text
- For each condition, it reads the referenced property from the data
- It applies the operator (comparison, validation, etc.)
- It combines conditions using
and/orlogic - If all required conditions pass → result is
true - 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 passesA **Student** passes the exam if __score__ of **Student** is greater than or equal to 60.