Write the rules / The vocabulary
The vocabulary
The words your rules may use: the attributes people, agents and records hold, and the actions that can be taken. A rule can only name what the vocabulary declares, so a typo is caught at save, not in production.
Attributes
Each attribute is declared once, on the Vocabulary page:
| Part | Example |
|---|---|
| what it describes | people and agents, records, or the request |
| name | approval_limit |
| kind of value | text, number, date, ids of people (and true or false, for the request only) |
| one value or a list | gateways is a list |
| allowed values | department: finance, operations, risk, support |
| when it is missing | how a missing value reads |
| owner and meaning | a team, and one line on what it means |
Some values are computed by Caroline rather than held: whether access is still valid today, whether an embargo is in force. They are shown, never written, and a rule reads them like any other. Time is handled this way, not as an operator.
What the page flags
- Not declared: a rule reads it, or a record holds it, but nothing declares it.
- A value not declared: a record holds a value outside the allowed set.
- No rule reads it, or no record holds it: worth a look before it misleads someone.
Each attribute shows which rules read it, each a link to the rule.
Actions
Actions are declared too: a lower-case name (a gateway's own verbs such as orders.read or tools/call fit), one line on what it does, whether it reads, changes or removes, and optionally the kinds of record it applies to. A pack brings its starter list; the first change makes the list the installation's own.
A save naming an action that is not declared, or one that is retired, is refused.
Changing the vocabulary
- Add, edit, retire, reinstate, each with a reason, recorded in the ledger before and after.
- Nothing a rule reads can be retired. Nor can what the engine reads itself: a record's kind, an agent's settings.
- A change that would leave records out of step asks first, listing them. They keep their values, flagged, until edited.
- Retiring is not deleting. A retired word stays in the history and can come back.
By API
The vocabulary routes: each write takes a reason, the list's ETag in If-Match (a list that moved answers 412) and an Idempotency-Key.