Deterministic Business Rules
Enforces exact if-then business policies in deterministic code instead of hoping the AI remembers them.
You write "Never refund over $500" in a prompt, and 1 time out of 50 the AI ignores it.
A 5-line YAML rule enforces the $500 limit 100.0% of the time in pure deterministic code.
What It Does (In Plain English)
Rules evaluates versioned YAML decision tables directly in code (rules@1). For example: "If refund > $500, require approval; if vendor is blocked, deny immediately." Because rules run deterministically inside guards, the exact same input always produces the exact same decision.
Real-World Example
- 1You define a rule table in
rules.yaml:amountUsd > 500 => require_approval. - 2Agent tries to refund $750 → Rules catches it deterministically before execution.
- 3Updates to rule tables are versioned and can be tested against held-out evals.
When Should You Turn It On?
Add at Level 1 (review) or above for any hard numeric threshold or deterministic policy.
Safety level note: Level 1 · Review — Read-only. Can inspect and answer, never changes outside systems.
How to Add It (workspace.yaml)
kits:
- "@neusym/kit-rules@0.1.0"
domain:
ruleFiles:
- ./domain/rules.yamlKits It Works With
Technical Details & Configuration Options (1 settings)
| Package | @neusym/kit-rules |
|---|---|
| Provides Ports | rules@1 |
| Requires Ports | None |
| Optional Ports | approvals@1tasks@1 |
| Publishes Events | rules.changed |
| Owned DB Collections | rule_tables |
Configuration Options (kitConfigs.rules)
| Setting | Type | Default | Description |
|---|---|---|---|
tables | array | [] | — |