Ideas · Builder Notes
A policy language with colocated scenario tests
Kognita alpha 0.4 added a YAML policy language that compiles to existing policy rows, and scenario tests that live next to the rules they test.
Context
Policies written as code rows are hard for risk and compliance colleagues to read or review.
Decision
- kognita policy load parses a YAML file or directory, type-checks it and compiles it to policy rows.
- YAML is only a serialisation.
- decide() is unchanged and no new rule type was added.
Why
A plain load refuses an uncited rule. Every rule has to point at its source.
Outcome
Policies became reviewable files with tests beside them.
Open
Scenario tests check rules hypothetically, which later needed one exception so they ignore the register check.
Keep the language thin over the engine. A new syntax should never mean new semantics.
Sources
Kognita is an open-source alpha. This note comes from Kognita PR #35 in the Kognita repository.
