Hard rules
A hard rule is a deterministic policy (type: rule): the same action, in the same state,
always gets the same answer. Budgets are hard rules too. Today, what restricts an action is written as guards: a skill's select guards, and the
station's submit guard. Core applies them whatever the model says. Before them,
profiles say who may call which operations,
and the permission guard who may choose an item. Other keys restrict too:
depends_on (a skill's item can be chosen only once the part it depends on holds something;
on_loss and on_change say what becomes of its lines when that part empties or changes, and what
the submit holds), and the tasks of the open playbook: their order (after), which refuses a choice made too early,
their choices (one_of) and conditions (when), which refuse a method that is not the one, and
the required tasks, which block the submit. A condition used in several places is written once, in
policies:, and cited by its name;
station.policies applies it to the whole station; a read
has guards of its own (invoke.guards); every policy can
be tried in observe or suggest; and the
registry lists them all. Two policies count beyond one action: a
budget caps what several submits file, and
select.unique keeps a key for one request only. There are no smart
policies or policies that wait for a person yet
(the target).
Select guards: before an item enters the selection
select:
max_items: 1 # one only: choosing another replaces the first
guards: # an ordered list; each guard is ONE of these six
- form: # what the PERSON fills in, in the card
address: {type: text, required: true, label: "Delivery address"}
zone: {type: text, required: true, enum: [dakar, thies, rufisque]}
- name: zone-desservie # a condition that must hold
require: "$item.fields.zone in ['dakar', 'thies']"
reason: "We do not deliver to Rufisque yet."
- check: checkDeliverable # the tenant says whether the item is eligible
- update: {price: getDeliveryPrice} # the tenant computes the price for THIS request
- {check: checkThiesRoute, when: "$item.fields.zone == 'thies'"}
- {check: checkStock, args: {depot: "$params.depot"}} # arguments on top of the fields
| guard | does | phase |
|---|---|---|
permission | only these profiles may choose the item (see Who chooses) | 1 |
form | values the person gives; they become the item's fields | 3 |
require | a condition that must hold (see Conditions) | 3 |
policy | a reusable policy of policies:, cited by its name (see Reusable policies) | 3; 4 for a budget |
check | the tenant's operation says whether the item is eligible; it receives the item's fields, with the guard's args over them | 5 |
update | the tenant's operations set the item's price (price: <operation>) or fields of the line (fields: {<field>: <operation>.<key>}); its args as a check's | 6 |
Core runs them by phase, and within a phase in the order written: first who chooses, then what the person
answers and the station's own conditions, then what calls the tenant. So the tenant is never
called for an item already refused. A refused item does not enter. A check's reason is the
tenant's; the values the person typed are replaced in it by their field's name.
What a check answers. A success whose body is true, or an object with deliverable,
admissible, ok, valid or eligible, says yes or no by that key; any other success says yes.
An error, or false, says no. To say why, the tenant answers {"reason": "<sentence>"}: the person
and the agent read it as it is. To say several things at once, it answers findings, a list of
{where, what, how} (in a 200 with ok: false, or in detail.findings of a 4xx): each finding
is one refusal with its own sentence, and only these three texts leave (500 characters each, 100
findings at most).
- At most one
formand at most oneupdatein the list; a guard that names two of the six, or none, refuses the station at load.approvaland a smart guard (question) are refused at load with what they wait for. So is a budget written in the list: it is written underpolicies:and cited by its name. max_itemssays how many items the skill's part may hold. It is on the skill only:kinds.<k>.selectholdsguardsalone ({}means "no guard").- Every guard may carry
when:: it applies only when the condition holds. Aformwhosewhenis false for an item is not asked for that item. - A guard that is a policy —
permission,require,check— carries the common attributes:name(what its refusal is called, unique in the list, and never a reusable policy's),reason(the sentence the person and the agent read),effect,modeandtags(below). Withoutreason, arequiresaysthis choice does not meet the condition '<name>', orthis choice does not meet a condition of this offerwithoutname; acheck, the tenant's sentence; apermission, Convoy's.formandupdateare no policies: they carry none of these attributes. - A
requirealone is no step on the card: Core adds the item, or says why not. It does not make the line a one-of choice and does not remove the −/+ buttons; it runs on every add.
Each form field has a type, required, taken from the table of types;
a type outside the table refuses the station at load, naming the field. Its other keys:
| key | what it does |
|---|---|
required | must be answered (presence, not truth) |
label | the tenant's words for it |
placeholder | an example shown in the empty input |
enum | a closed list of answers, drawn as a choice |
identifies | true: the answer identifies the room (Auth) |
multiline | true: a long text, asked in a box of several lines — a type: text field only |
value | "$fields.<field>": prefilled with that presented field of the card chosen — a select guard's form only, never the submit guard's |
help | {label, url}: a link shown under the field, to an https page the person may need |
Core checks each answer by its type: a price expects a number, a quantity a whole number, never
negative.
The form values become the item's fields: $item.fields.address. A field marked
identifies: true also identifies the room, which no longer asks for it (Auth).
nameA name field overwrites the item's displayed name: the delivery line would show the customer's
name instead of "Tomorrow 8am-12pm". Write customer_name.
Conditions: require and when
A condition is a text Core reads itself, against a closed grammar; it is never run as code.
| write | meaning |
|---|---|
==, !=, <, <=, >, >= | compare |
in, not in | in a list ([...], exact), or in a text (ignoring case) |
and, or, not, ( ) | combine |
5, 'text' or "text", true, false, null, ['a', 'b'] | values |
$item.fields.<name> | a field of the item: declared in present.fields, or asked by this select's form |
$item.price, $item.price_cadence, $item.ref, $item.kind, $item.id | what the item itself carries |
$params.<name> | in a require only: a parameter of the skill (below) |
- Refused at load: a syntax error; any other reference (
$params…in awhen,$identity…,$fields…, an undeclared field, an undeclared parameter); a bare value (5,'yes'), which is not a condition; more than 500 characters, 16 levels, 50 list items or 18 digits. - A condition reads a form field only after the
formguard in the list, and aform'swhendoes not read its own fields. Only the answers to the form's fields enter the item: a value under another name is not kept. - No
$item.pricebeside anupdate: theupdatesets the price last, so a condition would read the price from before the quote. No$item.quantity: a guard sees the quantity of one add, not the line's. - Each field is read under its declared type (the one in
present.fieldsor in theform), like a kind'swhen: a number in atextfield is its text (149is'149'), a number written as text in a numeric field is the number. A literal of another type than its field is refused at load ($item.fields.zone == 149on atextfield: write'149'); a stored config that does it is named byadmin check-configs. - Values.
trueis never a number. A number written as text is a number ("460" > 0). Outside a declared field,==and!=are exact:149and"149"differ. An absent value equalsnull:!=andnot inare therefore true for it ($item.fields.country != 'US'admits an item with no country; write$item.fields.country != null and …to require one). - What cannot be known. An absent or unreadable value is not compared with
<,>… Then Core fails closed: arequirenot known to hold refuses; awhenthat cannot be known applies its guard.
$params in guards
A guard reads a parameter of its skill (params)
in two places: in a require, and in the args of a check.
params:
depot: {type: text, set_by: [config, llm], default: dakar}
plafond: {type: price, default: 200}
invoke:
method: listStock
args: {depot: "$params.depot"}
select:
guards:
- {name: plafond, require: "$item.price <= $params.plafond"}
- {check: checkStock, args: {depot: "$params.depot"}}
- The value is the one the skill's call used to show the line, when the model sets the
parameter; else its
default. A task's binding is never read by a guard: a guard runs at the select, before the submit that gives that binding. - A parameter a guard reads has a
default, or the model sets it. Otherwise the station is refused at load. A task does not bind a parameter a guard reads: the guard would hold the line to thedefaultwhile the submit sent the binding. - A
check'sargs(and anupdate's) are literal values,$params.<name>or$item.fields.<name>(a field the item carries, as the person answered it when the form is placed before). They go over what thecheckreceives already: the form's answers, the item's declared fields and its ref — never a key of the tenant's row thatpresentdoes not declare. Any other$…reference is refused at load. A field of an argument is named with a dot (body.depot), as ininvoke.args. Likeinvoke.args, they are held to the operation's schema at assembly: an argument it does not take, a literal value that does not fit it, or a model parameter of another type refuses the station. - A line with no value for the parameter (shown before a change of the config) is never checked with a blank. A guard (
requireorcheck) that reads that parameter refuses it, and the person reads that the skill must be shown again — not therequire'sreason, which would say something false.
Who chooses: permission
Profiles say which operations each caller may
call. Within what they opened, a permission guard keeps the choice of an item to some profiles:
profiles:
anonymous: {when: "$identity.authenticated == false", grants: [paiements.proposeRefund]}
signed-in: {when: "$identity.authenticated", grants: [paiements.proposeRefund]}
skills:
- name: rembourser
invoke: {method: proposeRefund}
kinds:
gros-montant:
when: "$fields.amount > 50"
select: {guards: [{name: reserve-signed-in, permission: {profiles: [signed-in]}}]}
- It is written in
selector inkinds.<k>.select, withwhenandnameif needed. It runs first (phase 1), before any other guard: Core decides it with the profiles of whoever chooses. Holding one is enough. - It tightens, it never opens. A profile not granted the operations of the choice does not choose, permission or not.
- The refusal has the code
not_permitted: X cannot be chosen by you here — nothing was added. The journal names the rule by itsname, else by its place (rembourser.kinds.gros-montant.select#1). - Refused at load: a profile
profilesdoes not declare; a profile not granted what the choice calls (theinvokethat shows the item, thechecks andupdateof itsselect): the permission would never let it choose.
What a profile sees (a permission in kinds.<k>.present) does not exist yet: see
Permissions.
Reusable policies: policies:
A condition used in several places is written once, under its name, and cited by
{policy: <name>} in any guard list: select, kinds.<k>.select, invoke.guards, or
station.policies.
policies:
plafond:
require: "$item.price <= 20000"
when: "$item.kind == 'dish'"
reason: "au-delà de 20 000 F CFA, la commande se fait par téléphone"
mode: enforce # or observe, suggest
tags: [marge]
skills:
- name: takeMealSelection
select:
guards:
- {policy: plafond}
- A policy is
type: rule(the default) with arequire, or abudget— never both; it carrieswhen,reason,effect,modeandtags. Its name is its key:nameis not written. - It reads the item:
$item.fields.<name>and$item.<attribute>, checked where it is cited — a field the skill declares (presented, or asked by aformwritten before the citation); not$item.pricebeside anupdate. It does not read$params: it serves several skills, and a parameter belongs to one. - In
invoke.guards, it reads nothing of the item (there is none yet). A budget is never cited there: a read files nothing. - Refused at load: a citation that names no policy; a policy nobody cites; a policy cited twice
in one list; a written guard named like a reusable policy, or a policy named like a rule of the
platform (
step_open,grant,confirmation…) — the journal could not tell them apart;type: smartand its keys (question,threshold,on_unavailable,class). - The journal names it by its name (
plafond), at phase 3; a budget, at phase 4.
For the whole station: station.policies
station:
policies:
- {policy: plafond, at: submit}
at: selectjudges every item chosen, in every skill: after the skill's phase-3 guards, before the tenant'scheck, which is never called for a refused item.at: submitjudges every line the submit would send, after their revalidation and before the person's confirmation. A line that does not hold holds the whole submit: nothing is sent, and the answer is a held submit's (blocked). The sentence names the line ("Homard : au-delà de 20 000 F CFA…"): the person knows which one to take out.- Layers combine by intersection: a station policy only tightens what the skill allows.
- It reads what every line has: each field it reads must be declared by every skill with items,
else the station is refused at load (cite it in the skill instead). At
select, not$item.pricewhere anupdatesets it: write itat: submit. - A budget cited here counts every line of the station (Budgets).
at: input,read,outputare not built: refused at load.
A read's guards: invoke.guards
A read passes phases 1 to 3 before the tenant is called:
skills:
- name: rapport
params:
team: {type: text, set_by: [llm]}
invoke:
method: getOvertimeReport
args: {team: "$params.team"}
guards:
- {permission: {profiles: [rh]}} # phase 1
- {name: equipes-connues, require: "$params.team in ['a', 'b']"} # phase 3
permission,requireandpolicyonly: neverform,checkorupdate(a read has no form and writes nothing) — refused at load.- A
requireand awhenread the skill's parameters ($params.<name>), as this call sets them: the model's value, else thedefault— from phase 1 on. A value the call cannot pass leaves the condition unknown: thewhenapplies its guard, therequirerefuses. Never$item: there is no item yet. - Refused, the read does not call the tenant. The person reads the
reason, else "rapport cannot be asked this here — nothing was read". The journal names the guard by itsname, else by its place (rapport.invoke#1). - A
permissionnaming an unknown profile, or a profile not granted the operation read, is refused at load.
Try before applying: mode
Every policy — a permission, require or check guard, or a reusable policy — has a mode:
mode | effect |
|---|---|
enforce (default) | it applies |
observe | it refuses nothing: what it would have refused is written to the journal, with its name and code |
suggest | it refuses nothing; its reason is returned as advice to the person and the model (a notice of the add, a note on a read's result, advice in the submit's answer), and the journal keeps it too |
A policy in observe or suggest does not change the decision: the ones after it apply, and an
enforce policy can still refuse. effect is refuse: a policy that waits for a person
(needs-human, approval) waits for the inboxes, and rewrite, mask, drop for output policies;
they are refused at load.
Changing a mode applies at once, to running journeys too: a room does not keep its config's
version yet, so a loosening (from enforce to observe) is not yet limited to new journeys, as the
target wants.
The registry
Core compiles one list of every policy of the station: written in place, reusable (one entry per
place that cites it), derived from a key (max_items, unique, a submit guard's confirm and
submitted_by, a task's after, an operation exposed: false) and inherited from the platform
(step_open, grant, confirmation…). Each has its name, its origin, its place in the config,
the action and phase where it bites, its effect, its mode, its tags, and the business questions
it answers: money (it reads an amount), human (a person must act), access (who may), data
(what the values are), order (when). Core applies the written and reusable policies from this
list, and the journal names them as it does.
The registry is grouped — Input, Journey, Output, Inherited — followed by the
writes without a policy: an access: write operation nothing written guards.
The Console's Policies tab shows every rule of a station, not only the registry's: each
profile and what it may call, the identity providers, how long a sign-in lasts (idle_minutes), the
assistants admitted to the MCP server (hosts), a line's quantity,
a form's fields, the order of the steps. It groups them in families, deduced from where each
rule applies: Access (who is talking, who may call what, from where), Data (what comes in,
goes out, stays), Actions (order, caps, confirmations), Answers and Custom policies
(empty while smart policies and per-user policies do not exist). An amount is never a family: a
rule reading a price falls where it applies. See the Policies tab.
The submit guard: once, before anything
submit_guard:
form:
accept_terms: {type: boolean, required: true, label: "I accept the terms and conditions"}
confirm: true # an explicit yes from the person
It applies to the whole selection, before the first operation. If it fails, nothing is
executed. Core requires the person's confirmation on every submit, whatever the door, and
whether confirm is declared or not.
A playbook can have its own, with the same keys (form, confirm, validate,
submitted_by):
playbooks:
- name: take-meal-order
tasks: {...}
submit_guard:
form:
phone: {type: phone, required: true, label: "Téléphone"}
confirm: true
- Inside the active playbook, its own applies; a playbook with no
submit_guardtakes the station's. The form is its own: a$submit.<field>a call reads inside this playbook must be declared in it. submitted_by: the stricter of the two rules wins. If the station or the playbook reserves the submit to the room's owner, the owner submits.
Who submits
The model cannot submit: it takes the confirmation that Core hands to the person's screen, never to the model. This is not authentication: a script that reads the room gets this confirmation just as a host does (see Auth). See The submit.
Three answers, and the journal
All these rules are read by one decision point, in Core, whatever the door (Claude,
ChatGPT, the room API). For each action — an invoke, an add, a change of quantity, a
removal, opening a playbook, a submit, entering a room, a call of seek_guidance (guidance) — it
gives one of three answers:
- allowed — the action happens;
- refused — nothing happens, and the person and the agent read why;
- held — a human must act: nothing happens until the person has signed in as the room's owner, finished a required step, confirmed with their own click, or filled in the submit guard.
It evaluates the rules in the platform's order — identity (the grant of each operation the action
calls, a permission, the room's owner, the playbook admissible for whoever opens it:
activation), the playbook's order (first_write, step_open), the
arguments (the selection's rules, the quantity, form, require), what counts beyond one action
(the budgets and uniqueness), the tenant's check, the
update, then what a human must do — and stops at the first that does not let the action through.
Each decision is written to the journal, before the action has any effect: the door, who acts
(an opaque id: the signed-in person, else the browser or the connection, else "anonymous"), the
action and what it targets (the skill, the kind, the playbook — names), the answer, the rule that
decided it and its phase, the refusal code, the rules evaluated, and what a policy in observe or
suggest would have refused (its name, mode and code). Never a value: no
argument, no form answer, no price, no quantity, nor the sentence the person read. A name is kept
only when the station declares it (else unknown), and a room's code only when it names a room of
the station: what the caller typed does not get in. A rule is named
by its name when you write one, else by its place: formation.select#2 (the skill's second
guard), refund.kinds.partial.select#1 (the kind's first guard), rapport.invoke#1 (a read's
first guard); a reusable policy, by its name. The platform's rules have their
own names: activation, first_write, step_open, quantity, required, confirmation, room_owner, grant (the operation is kept in what the action targets:
<api>.<operationId>)…
Reading the journal is not yet available to you: the Console will show it.
The journal keeps the decision, not what the tenant did next: an allowed submit whose call
fails stays an "allowed" decision; what it counted in a budget is given back by a release
entry. When the decision cannot be written, the action is refused
and nothing happens. See Data.
What does not exist yet: each rule's counters; smart
policies, needs-human and approval. The target: Guards.
What it looks like
Terre & Table. Before a slot enters the selection, the form select guard asks for what the delivery needs. The e-mail field carries identifies: true: it identifies the room.
- name: delivery
select:
max_items: 1
guards:
- form:
region: {type: text, required: true, label: "Région", enum: [lyon, grenoble, valence, paris]}
postcode: {type: text, required: true, label: "Code postal"}
customer_name: {type: text, required: true, label: "Nom du destinataire"}
customer_email: {type: email, required: true, label: "E-mail de confirmation", identifies: true}
customer_address: {type: text, required: true, label: "Adresse de livraison"}
Terre & Table. The customer gives Marseille (postcode 13001) and picks a slot. The check select guard calls checkDeliverable on the grocery's API, which refuses: its sentence is given as it is (in French), and the slot does not enter the selection.
- name: delivery
select:
guards:
- form: {...} # region, postcode, recipient
- check: checkDeliverable # the grocery's API says yes or no, with its sentence
- update: {price: quoteDelivery}
Terre & Table. Signed in, the customer has ticked the confirmation: the confirmation says what goes out — 2 items, €9.80, products and delivery included. She submits, not the agent.
submit_guard:
confirm: true
submitted_by: [{who: owner}]