BSL Language Reference (Program 27)
The normative, language-agnostic specification of the Babylon Scripting Language (BSL) — the deterministic, total, fuel-metered s-expression DSL that Program 27 makes the substrate for game rules.
Status. Phase-1 draft, produced under
docs/superpowers/specs/2026-07-28-program-27-refoundation-design.md §10
(“Phase 1 — Language & Kernel: the BSL specification as the language-agnostic
reference”). The design document is Director-approved; this document is not
code authorization. The v3.0.0 amendment (design §4) that Phase 1 was gated
on was ratified 2026-07-29 — CONSTITUTION.md v3.0.0, Amendment AE (The
Refoundation), PR #365 — so that gate is closed; this document remains the
reference, not the implementation.
Amendment D — ruled, and this document revised. The first revision was
written against the dyadic working assumption, with §2.6 (queries), §2.8
(structural verbs) and §3.7 (the edge-side ceiling) flagged as revisable if
Phase 0 ruled otherwise. On 2026-07-29 the Director ruled NATIVE
HYPEREDGE: hyperedges are first-class objects in babylon-graph’s
exposed model and type system, membership is a single typed hyperedge — never
a clique expansion, and never exposed as a bipartite incidence encoding
(Levi/incidence is sanctioned as an internal storage strategy only). Source:
Amendment AE clause (vi) (CONSTITUTION.md v3.0.0) recording the ruling in
ai/_inbox/amendment-d-analysis-p27.md §9 (PR #353), sub-rulings D-1…D-7.
Those three sections carry the hyperedge shape as of this revision. The dyadic
query forms and edge verbs are unchanged and coexist with it: II.9’s
morphism layer stays strictly dyadic, and the two layers are separated by
type inside one substrate (sub-ruling D-2 — one substrate, typed homes).
Third revision — the R9 gap-fill chapters (2026-08-10). Twelve of the
seventeen systems targeted at pure BSL rule packs carried at least one hard
language blocker: they were BSL-shaped and unauthorable. Thirteen chapters
(C1–C13), planned in reports/bsl-gap-analysis-2026-08-10.md §7, close them
in place across §§1.6, 2.2–2.11, 3.1, 3.4, 3.6–3.10, 4.2, 4.5–4.7, 5.2, 5.3,
5.5 and 6.2, adding rows D29–D71 to the register below and vector families
10–22 to §6.2. One planned item is not closed and is recorded as such:
edge-endpoint accessors (gap item Q2), §3.8 item 8 and D78. A three-lens
adversarial verification of the chapters (2026-08-10) added rows D72–D78,
which repair what it found: query-result multiplicity, the edge-key uniqueness
obligation at hydration, the enum-ref operand class rule, error-code hygiene,
manifest completeness, and the fuel meter’s scope under per-subject firing.
The chapters were held to a stated reach: query forms, bindings,
iteration and selection structure, and graph-scope state are licensed
(Amendment AE clause (ii), which re-opens the formalism surface for BSL and for
nothing else), while a new generator, constructor, adjunction, level lattice or
severity rule is not — and neither is an addition to the intrinsic table beyond
{exp, log}. Two items reached that boundary and were escalated rather
than specced: per-membership hyperedge payload (§2.8’s note — a change to the
exposed hyperedge model Amendment AE clause (vi) ruled) and the minting of new
scale-lattice rungs or adjunctions (§3.9’s note). Amendment AG has since
ruled both (CONSTITUTION.md v3.2.0, ADR189, ratified 2026-08-10), and the
fourth revision below converts the two notes from escalations into
specifications. The rider slate in §3.10 is
recorded as proposals and declares nothing. This revision is additive: no
form changes meaning, and §5.6’s canonical bytes and both its digests are
unchanged — the one deliberate exception is neighbors, which gains a
mandatory operand (D51) against evidence that no conformance vector exercises
it.
Fourth revision — the Amendment AG spec sections (2026-08-10). Amendment AG
(CONSTITUTION.md v3.2.0, ADR189) ruled the two items the third revision
escalated and obliges this document to spec them (clause (iv)). Clause (i)
makes the (member, hyperedge) incidence pair a first-class attributed
membership carrying declared, typed payload fields; §2.12 states what that
element kind is, and its three language surfaces land in the sections that own
them — the declaration in §2.9 (deffield’s :member operand), the read
in §2.10 (membership-field-of), the write in §2.8
(update-membership, and add-hyperedge’s annotated member items). Rows
D79–D84 record the decisions and §6.2 family 23 pins them. Clause (ii)
lets content declare scale-lattice rungs and allocate/aggregate
adjunction instances of the existing schema: the declaration forms join the
manifest in §2.9 and their load-time validation — including the two
standing rulings the amendment binds every rung to — is §3.9’s, with rows
D85–D89 and family 24. A four-lens adversarial verification of these
sections added row D90, which repairs what it found: §3.4’s table stated a
result kind for four of its five fold rows and left the weighted intensive
mean blank, and §2.12’s worked shape had folded sum over exactly that
value. A post-merge audit added row D91, scoping §6.1’s vector-file
format outside §5’s canonical encoding (the :graph flag-vs-valued
spelling collision found by the PR #480 re-verification). This
revision is additive on the same terms as the third: no form changes meaning,
§5.6’s canonical bytes and both its digests are unchanged, and the intrinsic
table is untouched.
Fifth revision — the consolidated grammar (2026-08-10). §7 collects every
production of §§1, 2 and 6.1 into docs/reference/bsl.ebnf and includes it
here, adding rows D92 and D93 and a rigor index (§7.1) that says
where each artifact of the language’s rigor lives. The collection adds no
form and changes no meaning: it states one EBNF dialect, records in comments
the context conditions a context-free grammar cannot carry, and where the
sections are silent or disagree with themselves it collects the reference
implementation’s reading and flags it — nine of its productions come from
prose rather than from a code block, so the appendix does choose where it must,
and says which choice it made and what cuts against it. §5.6’s bytes and both
its digests are again unchanged.
Standard this document is written to. Constitution III.12(a) — the rewrite
test: two independent implementations (the Rust babylon-bsl crate now,
anything later) must be derivable from this document alone, without reading
either implementation’s source. Every under-determined point in the design
document is decided here and marked [draft ruling — Phase 1 review]; the
complete list is collected in Draft-Ruling Register at the end, and each row
is a Phase-1 review item, not a settled law.
Boundary with the determinism contract. This document owns the language:
lexis, grammar, typing, evaluation, fuel, and the canonical AST byte layout that
rules_hash is computed over. It does not restate the tick hash,
defines_hash, or the ContentDigest composition — those live in
Determinism Contract, which Program 27 Phase 0 extends with
three new chapters (tick-hash field set, rules_hash’s place in
ContentDigest, and the ContentDigest byte layout). Where this document
says “rules_hash”, it defines what bytes are hashed; the determinism
contract defines what that hash is combined with and compared against.
Amendment AJ finite probability addendum
Status: ratified and normative, 2026-09-01. Constitution v4.1.0 and
ADR248 add finite material transition kernels. This addendum is the current
language law where older sections below describe rng-draw as
author-visible, close the suffix set without m, or say BSL has exactly two
numeric lanes. Historical text remains readable, but it grants no alternate
path.
AJ keeps four categories separate:
MassExact, nonnegative allocation input for one finite kernel.
ProbabilityThe existing bounded binary64 material scalar.
IntensityA bounded state measure.
- dialectical weight
The
wofD = (A, Ā, w, T, σ).
No implicit conversion joins them. A kernel is subordinate to the dialectic and ranges over material effect bundles, not events or outcomes of history.
Lexis and surface grammar
The scaled-literal suffix production gains m:
suffix ::= "$" | "p" | "i" | "c" | "r" | "m"
mass-lit ::= digits ( "." digits )? "m"
An m literal has static type Mass and cannot be negative. It permits at
most nine fractional decimal digits. The reader converts it without loss to an
unsigned nanounit integer:
mass_units = unscaled * 10^(9 - scale)
Leading zeros and digit separators follow the other numeric literals. A
negative literal, excess scale, or value above u64::MAX nanounits refuses
at read time. Equivalent spellings such as 1m, 1.0m, and
1.000000000m have the same canonical value and bytes. No read-time
rounding occurs.
Expressions gain one built-in language form, not an intrinsic:
<expr> ::= ...
| "(" "quantize-mass" <expr> ")"
quantize-mass accepts an ordinary numeric expression in the binary64 lane.
It refuses a negative, nonfinite, or overflowing result. It multiplies the
exact represented binary64 value by 10^9 and rounds to the nearest integer,
breaking an exact tie toward the even integer. It returns Mass. This is the
only dynamic conversion to Mass. No implicit conversion exists from
Probability, Intensity, Coefficient, Real, Ratio,
Currency, or Int.
The rule and effect grammar gains the following forms:
<u32-lit> ::= <digits>
<rule> ::= "(" "rule" <qname>
":role" <rule-role>
":evidence" <evidence-class>
":material-basis" <string>
":fuel" <int-lit>
( ":projects-kernel" <qname> )?
<domain>? <anchor>? <bindings> <when>? <effects> ")"
<effect-item> ::= ... | <choose>
<choose> ::= "(" "choose" ":sample" <qname> ":slot" <u32-lit>
<branch>+ ")"
<branch> ::= "(" "branch" <enum-ref> ":mass" <mass-expr>
"(" "effects" <deterministic-effect-item>* ")" ")"
<u32-lit> is a nonnegative integer literal no greater than
4294967295. <mass-expr> is a Mass literal, binding, constant,
checked addition or subtraction, or quantize-mass result.
<deterministic-effect-item> is an existing bounded Mechanic effect item
whose complete tree contains neither choose nor emit.
Mass semantics
Mass is deliberately non-storable. It can occur only as a literal, a
constant, a binding, a branch mass, the result of quantize-mass, or an
operand or result of checked Mass + Mass and Mass - Mass. Subtraction
below zero refuses. Addition above u64::MAX also refuses.
Mass cannot be a deffield or metric type. It cannot be a graph value,
update value, or event-payload value. It cannot be a fold accumulator,
comparison operand,
intrinsic parameter or result, or serialized campaign scalar. Multiplication
and division on Mass do not exist.
Mass is not normalized at authoring time. Branch masses need not sum to
1m. Their ratios set the executable measure. This permits exact
relative weights without conflating mass with the existing Probability
scalar.
Finite kernel static semantics
A loaded choose compiles once into FiniteKernelV1 with
KernelBranchV1 children. The typed structures keep their source path,
form path, and spans. Evaluation, forecasting, diagnostics, and tooling use
that structure. These consumers do not rediscover kernels by independently
walking raw s-expressions.
The complete content set must meet these conditions:
Only a
mechanicrule can containchoose.- A rule has at most one
choose. It must be a direct child of that rule’s top-level
effectsform, never underguard,for-each, or anotherchoose.
- A rule has at most one
:sampleis a QName unique across the whole content set.:slotis aliteral
u32. Once shipped, a slot remains assigned to that semantic choice. Later samples use a new slot rather than renumbering an old one.
- All branches name members of one declared enum. They contain every member
exactly once and in the enum declaration order. Source order becomes the canonical outcome order.
Each branch independently passes ordinary Mechanic authority, type, footprint, structural, and fuel checks. A branch cannot contain
emitor anotherchooseat any depth.A kernel Mechanic paired with a finite projection keeps all branch and sibling material writes carrier-local. Only
update-node selfis legal. A cross-node, edge, hyperedge, or graph-shape write requires one joint carrier kernel and refuses V1 enumeration.- The finite kernel grants no stochastic authority to
recognizer, external-event, orintent. Those roles remain deterministic and exact-allowlist.
- The finite kernel grants no stochastic authority to
One material cause uses one kernel over its joint carrier. The language does not infer independence and has no tensor, parallel-choice, or independent-sample declaration.
Evaluation and ticket allocation
For one firing, every branch mass evaluates in enum order before a draw. No branch body evaluates during that step. A zero total, arithmetic overflow, or invalid dynamic quantization aborts the tick before material effects.
Let m_i be the exact nanounits for branch i, M = sum(m_i), and
T = 2^64. Allocation uses exact wide integer arithmetic:
floor_i = floor(m_i * T / M)
remainder_i = (m_i * T) mod M
left = T - sum(floor_i)
The allocator awards one more ticket to the left branches with the largest
remainder_i values. The enum order breaks ties between equal values. A
positive mass that would receive zero tickets refuses. A zero mass can own an
empty interval. The enum-ordered, half-open intervals partition
[0, 2^64) exactly. Counts and endpoints use an integer representation that
can express 2^64.
Realization calls KernelRng::next_u64 exactly once and selects the interval
containing that ticket. Only the selected branch body then evaluates. Its
effects retain their ordinary source order. A no-change branch still realizes
an outcome and produces a choice receipt.
The evaluator charges fuel conservatively and independently of the selected outcome:
cost(choose) = draw_cost
+ sum(cost(branch_mass_i))
+ max(cost(branch_body_i))
This keeps the load-time bound valid without evaluating unselected branch bodies.
Finite event projections
:projects-kernel <sample-qname> is legal only on an ordinary
recognizer rule. It compiles into FiniteProjectionV1. The referenced
kernel must resolve immediately before that recognizer in schedule order. The
recognizer must be subject-local, deterministic, and emit-only. It cannot write
a latch, mutate graph shape, inspect another sample, or contain a
choose. Its existing restricted-role event allowance remains mandatory.
Forecasting evaluates exact alternatives, not random samples. For each branch,
the forecaster clones the relevant detached state and applies that branch’s
deterministic effects. It runs the real linked recognizer and records whether
the requested event appears. It sums the favorable branch ticket counts. The
public EventLikelihoodV1 result contains event type, enum-ordered favorable
outcomes, an exact numerator in [0, 2^64], and the fixed denominator
2^64.
The read-only analyze_content_set and forecast_event_likelihoods
boundaries refuse a recognizer outside this exact projection shape. They do not
approximate arbitrary recognizers, cross-sample joins, sequences,
conjunctions, payload distributions, or whole ticks. Where state does not
yield exact branch masses, tooling reports that the likelihood is
state-dependent rather than inventing a number.
Canonical identity and deliberate absences
FiniteKernelV1, its branches, exact mass atoms, quantize-mass, and
FiniteProjectionV1 enter canonical BSL serialization with explicit
versioned tags, lengths, and enum order. File boundaries do not affect their
bytes. The implementation’s cross-language vectors own the exact tag values
and asymmetric byte examples.
The author-visible rng-draw intrinsic is removed. No content declaration,
binding, guard, or effect may call it. KernelRng remains private to finite
kernel realization. BSL has no stochastic recognizer, stochastic event,
empirical-distribution sampler, universal sigmoid, authored event probability,
or terminal-outcome branch. Those absences enforce Amendment AJ rather than
postpone a second stochastic API.
Design intent (non-normative)
BSL replaces three disjoint substrates that exist in the Python engine today:
the doctrine trap-condition string DSL (
src/babylon/domain/doctrine/mechanics.py, a recursive-descent evaluator overOR/AND/NOT, six comparisons,TAG/PRACTICEvariables, and@coeffreferences);the flat Pydantic event-precondition tree (
src/babylon/models/entities/event_template.py+src/babylon/engine/event_evaluator.py:NodeConditionwith a dot-notation path, a node filter and a seven-member aggregation;EdgeCondition;GraphConditionover six named graph metrics; anall/anycombinator);the four-operation effect enum (
increase/decrease/set/multiplyinTemplateEffect).
BSL is a superset of the two condition grammars’ expressible sets, not of their failure semantics (see Grammar-superset honesty under Conformance). Rules are homoiconic data: stored as content files, diffed in PRs, inspectable in-game, rewritable by tools, and hashed as declared input.
1. Lexical grammar
1.1 Source text
A BSL source file is a sequence of Unicode scalar values encoded as UTF-8.
A byte sequence that is not valid UTF-8 is a load error (E-LEX-001).
A UTF-8 BOM at offset 0 is accepted and discarded; a BOM anywhere else is
E-LEX-001.
[draft ruling — Phase 1 review] String literals must be in Unicode
Normalization Form C. A non-NFC string literal is E-LEX-002. This is what
makes “the source bytes of the string” a canonical form (§5.4) rather than an
implementation accident; it is checked at load, not normalized silently.
1.2 Whitespace and comments
Whitespace is exactly U+0020 (space), U+0009 (tab), U+000A (LF) and
U+000D (CR). No other character is whitespace; in particular U+000C and
Unicode space separators are not. Whitespace separates tokens and is otherwise
insignificant.
A comment begins with ; outside a string literal and extends to the next LF
or to end of file. Comments are whitespace.
There are no block comments and no reader macros. [draft ruling — Phase 1 review]: rejected because both create formatting/hash coupling the canonical serialization would then have to define away.
1.3 Delimiters
( and ) are the only structural delimiters. There are no square
brackets, no quote/quasiquote reader syntax, no dotted pairs, and no vectors.
Every non-atomic construct is a parenthesised form whose first element is a
symbol naming the form.
The Rust reader accepts at most 512 simultaneously open lists. The 513th open list is a positioned, uncoded structural read error. This safety limit applies before the reader constructs the recursively owned syntax tree. Semantic load walkers apply a lower 256-level rule limit, so in-bound parsing does not grant unbounded semantic work.
1.4 Atoms
Lexical productions are given in the same BNF notation as §2 (never as a regular-expression dialect — dialects differ across implementations). The character terminals are:
DIGIT ::= "0" … "9"
LOWER ::= "a" … "z"
UPPER ::= "A" … "Z"
The atom classes:
symbol ::= LOWER ( LOWER | DIGIT | "-" )*
qname ::= symbol ( "/" symbol )+
keyword ::= ":" symbol
enum-ref ::= enum-type "/" enum-member
enum-type ::= UPPER ( UPPER | LOWER | DIGIT )*
enum-member ::= UPPER ( UPPER | DIGIT | "_" )*
bool-lit ::= "#t" | "#f"
digits ::= DIGIT ( "_"? DIGIT )*
int-lit ::= "-"? digits
scaled-lit ::= "-"? digits ( "." digits )? suffix
suffix ::= "$" | "p" | "i" | "c"
string ::= '"' string-char* '"'
string-char ::= any scalar value except '"', "\" and LF
| "\\" | '\"' | "\n" | "\t"
Atom class |
Notes |
|---|---|
|
Form heads, binding names, verb names, intrinsic names, fold operators.
Lowercase kebab-case only. Maximum length 64 ( |
|
Rule ids ( |
|
See §1.6. |
|
|
|
The only two boolean tokens. |
|
See §1.5. |
|
See §1.5. |
|
See §1.5. |
[draft ruling — Phase 1 review, implementation-discovered 2026-07-30]
The ten operator tokens <, <=, >, >=, =, !=, +,
-, *, / form a distinct atom class, operator, lexed by exact
match against this closed set. §2 quotes them as terminals and §5.2 lists
them as form tags, but this table omitted them — by its letter the reader
had to reject (< a b) and §5.6’s own worked example. An operator is
valid only in form-head position; CAS encodes it as a form tag, never as an
atom (an operator anywhere else is unencodable and fails loudly per §5.4).
Maximal munch is unchanged: <x is still E-LEX-003, and -5
still lexes as an integer literal (the exact-match check precedes the
numeric path only for the bare token).
A token ends at whitespace, (, ), ;, or end of input. A character
sequence that matches no atom class is E-LEX-003.
Tokenization is maximal munch within a token run: the lexer reads to the
next delimiter and then classifies the whole run. 1000.5$x is therefore one
run that classifies as nothing and is E-LEX-003 — it is never split into
1000.5$ followed by x. This differs deliberately from the doctrine
DSL’s re.findall tokenizer, which silently drops nothing but does accept
adjacency without separators; BSL requires explicit separation.
1.5 Literals
Integer literals. int-lit per §1.4. Underscores are digit-group
separators and are removed before interpretation; a leading or trailing
underscore, or two adjacent underscores, is E-LEX-003. Leading zeros are
permitted and insignificant (007 is 7). The value must fit i64
(E-LEX-020). Static type: Int.
Scaled literals. A decimal numeral with a mandatory one-character kind
suffix. There are no unsuffixed non-integer literals — a bare 0.5 is
E-LEX-021. This is the lexical enforcement of the house prohibition on bare
floats.
Suffix |
Static type |
Closed range |
Representation |
|---|---|---|---|
|
|
|
Fixed point, |
|
|
|
Decimal, canonicalized to |
|
|
|
As |
|
|
|
As |
|
|
|
As |
The ranges are those of the kernel scalars as they exist today
(src/babylon/models/types.py): Probability, Intensity and
Coefficient are all [0.0, 1.0], and Currency is [0.0, ∞).
A p/i/c literal outside [0,1] is E-LEX-024. Maximum scale
for p/i/c is 9 (E-LEX-023); [draft ruling — Phase 1 review]
9 is chosen because binary64 carries ~15–17 significant decimal digits and
the engine’s existing quantization grid is 1e-5 (SnapToGrid), so 9
digits is comfortably beyond any authored precision while remaining exactly
representable in the i128 unscaled form.
Which literals a real-declared field accepts (Train B item 6,
#591 — D155 in the register): an int literal (exact to 2⁵³), any
p/i/c literal, and any r literal — each already lex-bounded
in its own lane above — all converting to binary64 by the one contract,
unscaled / 10^scale. A $ literal is refused (the typed-storage
deferral every field type states, §3.2). There is NO arbitrary-precision
fractional literal: a bare 0.5 stays E-LEX-021 under a real
declaration too — that is #591 item 5’s territory, deliberately not this
train’s.
``r`` — ``Ratio`` (Director ruling 2026-08-11, #492/ADR194: the
declared-domain Currency scale operation). babylon_kernel::scalars::Ratio
is a pre-existing kernel sort (𝔾 ∩ (0, ∞), grid-quantized like every
other bounded scalar) that this document did not previously expose to BSL —
this row and §3.2’s addendum are what expose it, minting no new mathematics
(“scalar multiplication isn’t new mathematics” is the ruling’s own framing).
It exists to name a positive scale factor outside Coefficient’s
[0,1] domain — the construct gap director-gate #492 named Blocker-1: five
runtime-moddable coefficients had a declared domain beyond [0,1] with
no BSL representation at all before this addendum — not merely “cannot
multiply Currency”, literally “cannot be written”:
Consumer |
Declared domain |
Ratio lane carries |
|---|---|---|
Territory’s |
|
the whole domain — no |
Metabolism’s |
|
the whole domain — |
Lifecycle’s |
|
the whole domain — |
Lifecycle’s |
|
the OPEN INTERIOR |
Lifecycle’s |
|
the OPEN INTERIOR |
Maximum scale is 9, the same cap and the same reuse of E-LEX-023 as
p/i/c (§1.5’s own documented reuse discipline for “too many
fractional digits”). Unlike p/i/c, Ratio is not one of
the six deffield/metric :type names (§3.1) — it joins Real
as a typechecker type no <type-name> position can name, not a widening
of that closed table.
A bare (undeclared) ``Ratio`` literal is legal in ordinary expression
position, with no ``defconst`` involved at all — the reader classifies
every literal class position-independently (§1.4’s whole design;
Currency itself is the precedent: a $ literal is legal directly in a
rule body, not only via :const), and gating r specifically to
“inside a defconst only” would need a context-sensitive lexer rule this
reader’s architecture does not have and this addendum does not add. The
ruling’s own wording, “a defconst-declared positive coefficient”, names the
INTENDED use for moddability (§3.2’s Why this closes director-gate #492
paragraph) — it is not a syntactic restriction, and this document does not
read it as one.
Declared bounds, narrower than (0, ∞). Ratio’s own domain is
already stated by construction — this literal’s row IS the “domain stated at
declaration” the ruling asks for, for a consumer whose real domain is
genuinely unbounded (rent_spike_multiplier). A consumer with a tighter
domain narrows it further via the Rust reference’s defconst
:floor/:cap extension (rust/crates/babylon-bsl/src/
scenario.rs::load_defconst) — stated here for orientation, not specified
here: defconst, like the rest of the .bscn scenario-file dialect, is
outside this document’s grammar (§7, D93: “no section specifies it”), so
neither keyword is an rst production or a §1.6 keyword-table row. What §3.2
DOES specify, because it belongs to the language proper, is the operator
both keywords exist to feed: Currency × Ratio. :cap narrows the
UPPER end, INCLUSIVE (pareto_alpha’s (0, 10]: :cap 10r);
:floor narrows the LOWER end, EXCLUSIVE — matching Ratio’s own
open-at-zero law — for a consumer whose floor is load-bearing, not
decorative: entropy_factor’s domain is (1.0, 3.0] because “extraction
costs more than it yields” is the entire thermodynamic point, and a modded
value at or below 1.0 is the exact violation the floor exists to forbid.
The worked example, both bounds together:
(defconst metabolism/entropy-factor 1.5r :floor 1r :cap 3r).
The zero endpoint — what the Ratio lane does NOT carry, and why.
early_mortality_modifier’s and carceral_transition_modifier’s
declared domain is [0, 10] — CLOSED at zero — and the frozen engine
actively PRODUCES 0.0 for them (mobility.py:187-188): the mortality
channel OFF, semantically meaningful, not an error case. Ratio cannot
represent that 0 — not as a gap in this addendum’s coverage but as the
same structural law that makes the whole construct a “POSITIVE coefficient”
(the ruling’s own phrase) rather than a general bounded scalar: the reader’s
E-LEX-027 refuses a 0r literal before it is even a token, and
Ratio::new(0.0) refuses at the kernel layer independently. Widening the
sort to admit zero — the seemingly obvious fix — is explicitly declined:
“zero-scaling is the multiply’s ABSENCE, not a scale,” and admitting a
zero-valued Ratio would be exactly the sort-widening the ruling’s
“scalar multiplication isn’t new mathematics” framing forbids re-opening.
The content-layer answer needs no new construct: guard (§2.8) already
gates whether an EFFECT fires at all, on a signal separate from the
Ratio-typed magnitude — never “the Ratio equals zero” (unwritable),
always “the multiply does not run this tick.” A rule wanting the frozen
engine’s “0.0 ⇒ no effect” behavior guards the Currency × Ratio
effect on an ordinary Bool :const (or a field, or a doctrine-derived
condition — whatever the content authors), for instance
(guard channel-active (emit … (scaled-mortality (* base-rate modifier)))).
This is proved end-to-end, not merely reasoned about: the guarded-effect
mechanism clears the whole run_once seam in both directions — the
effect fires and the exact product is observed when the flag is #t, and
the multiply never evaluates at all (an empty event list, not a zero-valued
one) when the flag is #f — in
rust/crates/babylon-tick/tests/currency_scale_op_e2e.rs
(a_guard_gated_ratio_multiply_fires_when_the_channel_is_active /
…_never_evaluates_when_the_channel_is_off). The absence holds
because the multiply sits inline in the guarded effect body: guarded
effect bodies are genuinely lazy, while :expr BINDINGS resolve before
any guard runs (§4.2’s binding-then-guard order), so a binding-shaped
multiply would still evaluate — and fuel-charge, and surface any eval
error — under a false guard. Content wanting the absence must write the
multiply inline, exactly as the example above does. What this does NOT
settle: WHICH signal a real Lifecycle port gates on — a dedicated
activation const, a doctrine tag, a field read — is that port’s own
content-modeling decision, the same way this whole addendum ports no
consumer. This paragraph proves the mechanism is available and typechecks
cleanly through the real entry point; it does not pre-choose Lifecycle’s
answer.
Decimal canonicalization. Every scaled literal is reduced to its minimal
scale: trailing zeros of the fractional part are stripped, and zero canonicalizes
to (0, 0). 0.50c, 0.5c and .5c (the last is E-LEX-003, a
leading digit is mandatory) are therefore not three values but one — the first
two hash identically. Currency literals canonicalize further, to their integer
micro-unit value.
String literals. " … ". The only escapes are \", \\,
\n (LF) and \t (TAB); any other backslash sequence is E-LEX-025.
A raw LF inside a string literal is E-LEX-025 (strings are single-line).
Maximum length 1024 bytes after escape processing (E-LEX-026). Strings
appear only in :material-basis and in conformance-vector identifiers; there
is no string concatenation, comparison, or interpolation in the language — the
${var} substitution of today’s TemplateEffect/EventEmission does
not carry over (its job is done by binding references).
Enum member references. An <enum-ref>’s type name must be registered
and its member must exist in that registration; both checks are load-time.
There is no “unknown enum member reads as default” behavior anywhere in the
language. Which registry checks it is a property of where the
``<enum-ref>`` sits, never a guess between two candidates (§2.13 states
this fully): in a §2.6 class-rule operand position (a query head, the,
a structural verb’s type operand, emit) it is checked against the
closed graph vocabulary (§3.6, populated by defvocabulary —
E-LOAD-030/E-LOAD-031); in an :enum-type-declared field’s value
position (§2.9, §2.13) it is checked against that field’s declared
content-declared enum type (populated by defenum — E-LOAD-054/
E-LOAD-055). The two registries are never interchangeable: §3.6 sorts
and deduplicates its members, while a defenum type’s member order is
the field’s storage ordinal (§3.1’s enum row) and must never be
reordered.
1.6 Keywords
A keyword is a colon-prefixed symbol. Keywords are never values: they may only
appear in the option position of a form, always immediately followed by their
operand (except for the flag keywords listed below, which take no operand).
A keyword in value position is E-PARSE-010. [draft ruling — Phase 1
review, R9 verification repair] So is a string literal in expression
position, for the same reason and under the same code: §1.5’s strings are
well-formed atoms admitted at :material-basis and at conformance-vector
identifiers only, <expr> (§2.7) has no string form, and Str has no
operations (§3.1). Both are atoms rejected by position, not by lexis.
Keyword |
Operand |
Meaning |
|---|---|---|
|
string |
Mandatory on every rule. The Aleksandrov Test’s parse-time half.
The parser enforces presence and non-emptiness only (a string of
length 0, or one consisting solely of whitespace, is |
|
integer |
Mandatory on every rule. The rule’s fuel budget (§4.5). Must be
|
|
qualified name |
Binding source: read a declared field of a node (§2.5). |
|
qualified name |
Binding source: read a coefficient from the defines environment. This
is the successor of the doctrine DSL’s |
|
symbol |
Binding source: read a named graph-level metric (§2.5). |
|
expression |
Binding source: a computed value, a pure function of the bindings declared before it (§2.5). |
|
flag |
Marks a binding permitted to be absent at evaluation. Requires
|
|
literal |
The value an absent |
|
flag |
Binding source: the current tick, as |
|
flags |
Binding sources: kernel-computed calendar reads, as |
|
integer |
Binding source: the current tick’s position in a cycle of the given
length, as |
|
|
Per-field intensivity declaration, on |
|
type name |
Scalar type, on |
|
enum-ref |
The member |
|
symbol |
Names the current element of an iterating form, so a nested body can still reach it (§2.6). |
|
expression |
The mandatory explicit weight term of a weighted aggregation (§3.4). |
|
expression |
Edge strength operand of |
|
symbol |
Ordering anchors (§2.8). A raw position float is not expressible. |
|
flags |
Traversal direction, on |
|
flag |
Graph domain, on |
|
see §2.7 |
Intrinsic declaration fields. |
|
symbol |
The kernel service a |
|
integer |
Declared cardinality ceiling, on |
|
integer |
Declared member-count ceiling of one hyperedge type, on the
|
|
flag |
Marks a |
|
enum-ref |
The |
|
flag |
Marks a |
|
symbol |
The declared rung an |
|
qualified name |
The extensive field an intensive |
[draft ruling — Phase 1 review, R9 chapter C4] The three neighbors
directions were used as bare flags by §2.6 from this document’s first revision
and were missing from this table — the same class of omission the operator-atom
ruling of §1.4 records, and it is fixed the same way, by writing down what the
grammar already required. :graph joins them as a flag keyword so that
(domain :graph) is a legal form rather than a keyword in value position
(E-PARSE-010); it encodes as an opt under D20 like every other flag.
The keyword set is closed. An unrecognized keyword is E-PARSE-013; it
is never ignored. Adding a keyword is a language revision and re-blesses the
conformance vectors (§6).
2. Syntactic grammar
2.1 Notation
BNF with ::= for production, | for alternation, * for zero-or-more,
+ for one-or-more, ? for optional. Terminals are quoted. Lexical
classes from §1 appear as <symbol>, <qname>, <keyword>,
<enum-ref>, <int-lit>, <scaled-lit>, <string>, <bool-lit>.
2.2 Content files
<file> ::= <top-form>*
<top-form> ::= <rule> | <deffield> | <intrinsic-decl> | <manifest>
| <metric-decl>
A content set is the union of all files under the declared content roots. File
boundaries and file names carry no semantics: the same forms split across
different files produce the same rules_hash (§5.5). Duplicate rule ids,
duplicate field declarations, duplicate intrinsic declarations, or — since
Amendment AG (ii) — duplicate rung or adjunction names across the
content set are E-LOAD-001.
2.3 Rules
<rule> ::= "(" "rule" <qname>
":role" <rule-role>
":evidence" <evidence-class>
":material-basis" <string>
":fuel" <int-lit>
<domain>?
<anchor>?
<bindings>
<when>?
<effects>
")"
<rule-role> ::= "mechanic" | "recognizer" | "external-event" | "intent"
<evidence-class> ::= "observed" | "derived" | "calibrated" | "designed"
<domain> ::= "(" "domain" ( <enum-ref> | ":graph" ) ")"
<anchor> ::= "(" "anchor" ( ":after" | ":before" ) <symbol> ")"
<bindings> ::= "(" "bindings" <binding>* ")"
<when> ::= "(" "when" <cond> ")"
<effects> ::= "(" "effects" <effect-item>+ ")"
The four valued keyword options :role, :evidence,
:material-basis, and :fuel are mandatory and may appear in any source
order; the canonical serialization sorts them (§5.3). A missing option is a
malformed rule surface. A role or evidence value outside its closed set is
E-PARSE-015.
:role declares causal authority; it is not descriptive decoration.
mechanic derives endogenous state through the ordinary typed effect
algebra. recognizer describes a governed state pattern. external-event
is the role for exogenous shocks and may introduce only an approved burden,
capacity change, or pressure. intent may introduce only an approved
next-week intent carrier. The latter three roles are default-deny: every
possible field write and emitted event in their complete effect tree must
match an exact governed allowance row for that rule id. An unapproved effect,
including one under an untaken guard or for-each branch, is
E-LOAD-060. Graph-shape effects are never allowed for these roles. Calling
a downstream result a pressure does not grant authority; matching uses exact
qualified names, never substrings.
For built-in content, the production CI sentinel requires exact set equality
between each non-Mechanic rule’s complete effect footprint and its
GOVERNED_EFFECT_ALLOWANCES rows. It also requires unique allowance keys.
Thus a missing permission, an extra dead permission, or a duplicate key cannot
survive the production corpus check.
:evidence carries Article IV’s evidentiary class for the rule itself:
observed, derived, calibrated, or designed. Evidence class
does not grant effect authority. A receipt preserves both role and evidence so
a later projection can explain what kind of rule moved a value without
misstating designed or calibrated content as observed fact.
The declared pair is the first attribution ledger. A built-in production rule
must also match the independent
causal_contract::GOVERNED_RULE_ATTRIBUTIONS manifest. Each governed row
is a GovernedRuleAttribution that pins the exact rule id, RuleRole,
EvidenceClass, owner, date, and ADR224. A known ID whose declaration
differs refuses load as the typed, unnumbered
ContractError::GovernedAttributionMismatch. A CI sentinel proves exact set
equality between the 60-rule production corpus and the manifest, catching an
unlisted built-in or a row with no built-in rule. Unknown fixture and mod IDs
remain self-declared. Thus the second ledger prevents first-party production
content from escalating its own authority; it does not make arbitrary mod
content an untrusted sandbox.
Omitted ``<when>``. A rule with no <when> is unconditional. An
empty condition is not expressible: (when) is E-PARSE-020, and a
rule that means “always” writes (when #t) or omits the clause. This is one
of the four deliberate III.11 corrections (§6.3).
Executable anchor placement (PER-17, ADR222). A rule with no <anchor>
belongs to the system named by the first segment of its rule id and takes that
system’s governed position. A rule whose first id segment names no registered
system, and which carries no anchor, is E-LOAD-002. An explicit anchor
selects the boundary immediately before or after its named system; :after
one slot and :before the next share one boundary. Rules at one resolved
position use D16’s rule-id byte order.
The registry follows the frozen 34-system causal spine: 15 Material Base
slots, one Action slot, and 18 Consequence slots. Four compatibility names
keep governed homes: class-dynamics maps to tick-dynamics,
economics to contradiction, organization to ooda, and
social-class to solidarity. Mods cannot land a rule
“nowhere” and cannot express a raw position float. The boundary before
Vitality and the boundary after Metabolism are legal. An explicit anchor that
cuts through the interior of Material Base is E-LOAD-003. Placement
compiles for the complete content set before caller-owned hydration or
mutation. Validation may hydrate a disposable graph first to preserve the
established scenario-error precedence, but an invalid composition never
touches caller-owned world state.
[draft ruling — Phase 1 review, R9 chapter C4] The rule domain — what a
rule fires over, and how many times. §4.2 says a rule evaluates against “the
subject node” and §5.6 lets the reader infer the subject’s type from a
binding’s qname prefix; the document never stated the inference rule and said
nothing at all about a rule whose only bindings are :const, :metric and
:tick. Six systems (R9 gap analysis §2, Q12) perform exactly one
graph-level check per tick — ControlRatio’s four-phase machine, Metabolism’s
overshoot check, FieldDerivative’s principal-contradiction pick — and under a
per-node reading those would fire once per node.
<domain> is optional, with the inference below as its default. It is
optional rather than mandatory for the same reason <anchor> is (D5): the
document already carries a default-inference convention for rule-level
placement, mandating a new child would make every existing rule form
non-conforming, and §5.6’s pinned canonical bytes would need recomputation for
no gain in expressiveness.
The inference, stated so it is computable at load. Let U be the set of
node types owning (§2.9):
every
:fieldbinding referenced at least once outside every query body, andevery
<qname>of anupdate-nodeverb whose element operand is the symbolself, and of everyfield-ofwhose element operand isself.
Then |U| = 1 gives the domain; |U| = 0 (nothing is self-scoped) and
|U| > 1 (two node types are) are both E-LOAD-004, and both are repaired
by writing <domain> explicitly. The surprise the gap analysis names is
removed by construction: a binding referenced only inside a fold body never
enters U, so adding one cannot change how many times a rule fires.
Explicit domains. (domain NodeType/SOCIAL_CLASS) replaces the inference
outright. Its operand is a NodeType member — an EdgeType or
HyperedgeType member there is E-TYPE-011 under §2.6’s enum-ref class
rule — and a self-scoped reference owning off a different node type is
E-TYPE-010, the existing code for a foreign node type read outside a fold
body over that type, which is exactly what such a reference is.
The graph domain. (domain :graph) fires the rule exactly once per
tick, at its anchor position. self is not bound in a graph-domain rule:
any reference to self, and any :field binding referenced outside a
query body, is E-TYPE-015. Graph-domain rules read the graph through
queries and through §2.10’s accessors, which is what chapter C3’s carrier
ruling is for; they read nothing else the language did not already give them.
(domain :graph) is therefore a firing-multiplicity declaration and not a
new capability — it removes an N-fold repetition, it does not reach
further.
2.4 Conditions
<cond> ::= <bool-lit>
| "(" "and" <cond>+ ")"
| "(" "or" <cond>+ ")"
| "(" "not" <cond> ")"
| "(" <cmp> <expr> <expr> ")"
| "(" "exists" <query> <elem-name>? <cond>? ")"
| "(" "forall" <query> <elem-name>? <cond> ")"
<cmp> ::= "<" | "<=" | ">" | ">=" | "=" | "!="
and and or are variadic with at least one operand; (and) and
(or) are E-PARSE-021 (there is no implicit identity element — the same
correction as the empty precondition set).
[draft ruling — Phase 1 review, R9 chapter C12] References compare by
identity, with = and != only. Two NodeRefs (or two
EdgeRefs, or two HyperedgeRefs) may be compared for identity;
comparing a reference with an ordering operator, or with a reference of a
different kind, or with any non-reference, is E-TYPE-017. This document
had left reference comparison undefined, which made the intersection idiom of
§2.7 unwritable and would have left two implementations free to differ. There
is no ordering on references in the language — §2.6’s iteration order is the
executor’s, and exposing it as a comparison would invite content to depend on
id assignment.
exists/forall bind no variable of their own; the query’s element is
referred to inside the body as it [draft ruling — Phase 1 review] —
a reserved binding name that may not be declared or shadowed
(E-PARSE-022). (exists <query>) with no body is “the query is
non-empty”.
Coverage of the existing grammars. This set expresses everything the two Python grammars express:
Existing construct |
BSL form |
|---|---|
doctrine |
|
doctrine |
a |
doctrine |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A contradiction this table used to carry, now closed (R9 chapter C1). The
two EdgeCondition rows above were one row until the R9 gap analysis
(reports/bsl-gap-analysis-2026-08-10.md §2, Q1), and that row promised
sum_strength/avg_strength transcribe as a fold over edges — while
§2.5 scoped :field to node types, §2.9’s deffield had no edge case, and
no §2.7 production could read anything off an EdgeRef. The document
committed to a capability its grammar could not express. §2.9 (edge- and
hyperedge-qualified deffield) and §2.10 (field-of) close it; the row is
split above because count needs no attribute read and the other two do.
The frozen Python site the row transcribes is
engine/event_evaluator.py:174-175, which reads solidarity_strength and
defaults it to 0.0 — the default is the §6.3 honest-null delta, not part of
the form.
2.5 Bindings
<binding> ::= "(" "binding" <symbol> <bind-src> <bind-opt>* ")"
<bind-src> ::= ":field" <qname>
| ":const" <qname>
| ":metric" <symbol>
| ":tick"
| ":year"
| ":tick-of-year"
| ":tick-in-cycle" <int-lit>
| ":expr" <expr>
<bind-opt> ::= ":optional" | ":default" <literal>
A binding names a value the rule reads. A plain (non-``:optional``) declared
binding that is unbound at load is a load error (E-LOAD-010) — the
opt-in to absence is content, not a test list.
:field reads a declared field of self’s node type unless the qualified
name’s first segment names a different node type, in which case it is only
legal inside a fold body over that type (E-TYPE-010). :const reads a
coefficient from the defines environment. :metric reads a registered
metric whose declared domain is :graph (§2.11); an unregistered metric name
is E-LOAD-011 — never 0.0 (§6.3) — and an element-indexed metric read
through a :metric binding is E-LOAD-012, since its value depends on an
element a binding does not name. :tick binds the current tick as Int.
[draft ruling — Phase 1 review, R9 chapter C13] Calendar reads are
bindings, not arithmetic. Four call sites in the frozen estate compute
tick % interval and base_year + tick // ticks_per_year, and
<arith> provides neither integer modulo nor floor division. The two obvious
repairs are an intrinsic rider for mod/floor-div or three more
bind-srcs; this document takes the second. :year, :tick-of-year and
:tick-in-cycle all bind Int, all are computed by the kernel’s clock,
and all are seams to a kernel service rather than mathematics — which is
the category R10 already sanctions without a rider, and a calendar is not a
curve. The epoch and the ticks-per-year figure are the kernel’s, pinned in
Determinism Contract; content does not choose them, which is
also what stops a mod-by-anything operator from arriving through the back door.
:tick-in-cycle’s length is a literal, not an expression, so the value
is a static function of the tick and the content bytes.
[draft ruling — Phase 1 review, R9 chapter C1] A :field binding is
node-scoped, and stays node-scoped. An edge’s or a hyperedge’s declared field
is read by the field-of accessor of §2.10, never by a :field binding.
Two reasons, both taken from the rest of this document rather than invented
here: a binding is declared once at rule scope and resolved implicitly
against an enclosing body, which needs exactly one candidate body to be
unambiguous — and the systems that read edge attributes read several edge types
in one rule; and §2.10’s accessor takes its owning type as a qname operand,
which is D24’s fix for the identical problem on members-of. The R9 gap
analysis §2 (Q1) sketched an edge-typed :field binding instead; this
document’s conventions override the sketch, and D29 records the divergence.
[draft ruling — Phase 1 review, R9 chapter C1] Implicit resolution
requires a unique candidate. A foreign-node-type :field binding
referenced where two or more enclosing bodies range over that same node
type is E-TYPE-013 — the reference is ambiguous and the author must write
field-of against a named element (§2.6’s :as) instead. This is the
narrow, loud form of the resolution rule §2.5 previously left to inference;
single-body code is unaffected.
Two symbols are reserved and always in scope, never declared and never
shadowed (E-PARSE-022): self, the node the rule is being evaluated
for (NodeRef), and it, the current element inside a query predicate or
fold body (NodeRef, EdgeRef or HyperedgeRef, per the query it
ranges over). it outside a query context is E-TYPE-012.
Binding names are otherwise rule-scoped; a duplicate name in one rule is
E-PARSE-030.
[draft ruling — Phase 1 review, R9 chapter C7] :expr — a rule may name
an intermediate value. Every other <bind-src> names an external
source, so before this chapter a rule could not name anything it computed
itself, and every non-trivial rule repeated its sub-expressions verbatim. That
costs three things at once: fuel (a repeated fold is charged at its ceiling
every time it is written), correctness (a transcription that must restate the
same algebra in four places will eventually restate it differently in one), and
reviewability — and the third is the one that matters most here, because the
standing no-imposed-functional-forms line can only be enforced against algebra
a reviewer can read.
(bindings
(binding wealth :field social-class/wealth)
(binding subsistence :const vitality/subsistence-cost)
(binding drained :expr (- wealth subsistence)))
Type and kind come from the expression, computed bottom-up like any other (§3.1, §3.4). There is no annotation and no inference beyond that.
Resolution is in declaration order. A
:exprmay reference bindings declared before it and no others; a forward reference or a self-reference isE-PARSE-032. Order therefore matters inside<bindings>, which is the one place in this document where a list’s order carries meaning and is not a formatting concern — §5.3’s group 3 already emits it in source order, so CAS needs no change.No cycles are expressible, by construction: the forward-reference ban makes the dependency graph a DAG in source order, so nothing needs a cycle analysis.
A
:expris evaluated at rule scope, soitisE-TYPE-012inside one, and referencing a foreign-node-type:fieldbinding — legal only inside a fold body over that type — isE-TYPE-010. A:exprmay contain a fold, a selection or an accessor of its own; that is the fuel win, since the ceiling factor is then paid once.:optionaland:defaultare illegal on a:expr(E-PARSE-033). A computed value is never absent: its operands were resolved at load or the rule did not load, and §3.5’s whole point is that absence is opted into at the external source rather than inherited by everything downstream.
Critically, :expr does not weaken §4.2’s law that a rule never observes
its own effects. A computed binding is a pure function of pre-state bindings,
evaluated before any effect applies — it is an abbreviation, not a sequencing
construct, and nothing in it can read a value this rule wrote.
2.6 Queries
<query> ::= "(" "nodes" <enum-ref> <node-pred>? ")"
| "(" "edges" <enum-ref> <edge-pred>? ")"
| "(" "neighbors" <expr> <enum-ref> <direction> <enum-ref> ")"
| "(" "hyperedges" <enum-ref> <hedge-pred>? ")"
| "(" "members-of" <expr> <enum-ref> ")"
| "(" "hyperedges-of" <expr> <enum-ref> ")"
<elem-name> ::= ":as" <symbol>
<direction> ::= ":out" | ":in" | ":any"
<node-pred> ::= <cond>
<edge-pred> ::= <cond>
<hedge-pred> ::= <cond>
[draft ruling — Phase 1 review, R9 verification repair] Every
<enum-ref> operand position is typed, and E-TYPE-011 is the code for
all of them. The rule is stated once here as a class rather than per form,
because the R9 chapters added four such positions and a per-form restatement
left each new one without a rejection:
NodeType—nodes,neighbors’ fourth operand,the(§2.10),(domain <enum-ref>)(§2.3),deffield’s:memberoperand (§2.9), the annotation of anadd-hyperedgemember item (§2.8) and both positional operands of arung(§2.9);EdgeType—edges,neighbors’ second operand,edge-between(§2.10) and arung’s:viaoperand (§2.9);HyperedgeType—hyperedges,members-ofandhyperedges-of;EventType—emit(§2.8).
An operand naming a member of any other enum kind is E-TYPE-011, checked
statically. It is a kind check and nothing more: whether the named type and
member exist at all is E-LOAD-030/E-LOAD-031 (§1.5). neighbors
therefore takes two — an EdgeType for the relation traversed and a
NodeType for the elements yielded (below) — and swapping them is
E-TYPE-011 at both positions. Predicates and bodies refer to the candidate
element as it, or by the :as name of the iterating form.
Element and result types:
Query |
Result |
|
Ranges over |
|---|---|---|---|
|
|
|
Every node of the given |
|
|
|
Every dyadic edge of the given |
|
|
|
Nodes of the annotated |
|
|
|
Every hyperedge of the given |
|
|
|
The members of the hyperedge the operand denotes. |
|
|
|
The hyperedges of that type the operand node belongs to. |
Hyperedges are first-class (Amendment D ruled NATIVE HYPEREDGE
2026-07-29; Amendment AE clause (vi), analysis §9 sub-ruling D-1). A hyperedge
is a typed graph object with an identity and a member list — not sugar for a
set of dyadic edges and not a bipartite encoding the language can see.
(members-of h HyperedgeType/ECONOMIC_SECTOR) is therefore one lookup
against one object, and there is no member↔member edge anywhere for
edges/neighbors to walk: Anti-Pattern VIII.9 is preserved by
construction rather than by policy. The dyadic forms above are untouched —
edges and neighbors range over the strictly dyadic morphism layer
(II.9), which coexists with the hyperedge layer in one substrate under
sub-ruling D-2 (type-level separation, one substrate, typed homes). Whether an
implementation stores hyperedges as a Levi/incidence bipartite graph is its
own business and is unobservable here.
[draft ruling — Phase 1 review] members-of and hyperedges-of take
the HyperedgeType as a mandatory second operand, even though the first
operand already denotes a hyperedge (or a node incident to one). BSL has no
type variables (§3.1), so a HyperedgeRef does not carry its type
statically; the annotation is what makes ceiling(query) computable at load
(§3.7), and therefore what keeps a fold over members statically bounded. At
evaluation, a members-of whose referent is not of the annotated type is
E-EVAL-032 — never a silently empty set.
Iteration order is part of the contract. A query yields its elements in ascending node-id / (source-id, target-id, edge-type) / hyperedge-id lexicographic byte order [draft ruling — Phase 1 review] — never in graph-internal storage order. This is the language-level answer to the cross-language iteration-order trap; it makes fold results independent of the underlying graph library — of its bucket order, its adjacency order and its insertion-versus-storage bookkeeping alike.
[Director ruling 2026-08-11, ADR191 R2] It does not make them independent
of a scenario’s declaration order, and it is not asked to. An earlier
revision of the sentence above promised independence of “insertion history”
as well, and that half was never delivered: NodeId is a monotonic mint
counter, so a scenario’s nodes take their ids top to bottom and shuffling two
node declarations permutes the ids, the iteration order and the tick hash
with them. The Director ruled the promise weakened rather than identity made
content-derived, on the ground that a scenario is a canonical committed
artifact and its declaration order is part of its identity: a reordered
scenario is a different scenario, and a different tick hash is the honest
answer rather than a defect to engineer around. What the order above
guarantees is therefore exactly this — a total order, identical in every
conforming implementation, over whatever ids the scenario minted — and no test
may assert that shuffling a scenario’s declarations leaves the tick hash
unchanged. Recorded as D96.
That order is total only because each of the three keys identifies at most
one element. For nodes and hyperedges the id is the identity. For edges the key
is the (source-id, target-id, edge-type) triple, and it is a key rather
than a sort field because both points at which an edge can enter the graph
refuse a second one: an add-edge duplicating an existing edge is
E-EVAL-031 (§2.8) and a hydration seeding the same triple twice is
E-LOAD-044 (§3.9).
[draft ruling — Phase 1 review] The same rule applies inside a
hyperedge: members-of yields members in ascending node-id byte order, and a
hyperedge’s declared member order — the order add-hyperedge (§2.8) or a
scenario hydration listed them in — is never observable. A member list is a
set, not a sequence.
[draft ruling — Phase 1 review, R9 verification repair] A NodeSet
is a set, and neighbors yields each node exactly once. A node reachable
from the operand across two or more qualifying edges — two SOLIDARITY edges
in opposite directions under :any, an :out and an :in edge of one
type — appears once in the result. This is the only reading compatible with
the total order above: the order is ascending id byte order and a duplicated id
has no defined position relative to its twin, so a multiset result would leave
(fold count (neighbors self EdgeType/SOLIDARITY :any NodeType/SOCIAL_CLASS))
reading 1 or 2 by implementation choice — two conforming implementations
disagreeing on a tick hash, which is the failure this whole section exists to
prevent. The alternative reading (a multiset, one element per traversed edge)
is recorded as rejected for that reason (D72).
The consequence is worth stating in the form an author meets it: a fold over
neighbors counts and sums per node, never per edge. A rule that means
“once per contributing edge” — a per-edge emission, a total of tie strengths —
folds over edges instead, or iterates one with for-each (§2.8), and
reads the relation there; neighbors answers which nodes, not how many
ways. members-of and hyperedges-of carry the same property for the same
reason — which D25 above already said of a member list.
[draft ruling — Phase 1 review, R9 chapter C8] neighbors carries its
result NodeType as a mandatory fourth operand. §2.5 permits a foreign
node type’s :field “only inside a fold body over that type”, and a fold
over nodes carries that annotation in the query’s operand. neighbors
did not: it yielded an untyped NodeSet, so this document never said whether
(fold mean (neighbors self EdgeType/TENANCY :in) social-class/consciousness
:weight …) typechecks — and six systems need exactly that read. This is
D24’s problem verbatim, and it takes D24’s fix: the type becomes an
operand, because §3.1 gives references no static type and an annotation is the
only thing that can supply one. With it, a fold body over neighbors
legalises the annotated type’s fields exactly as a fold over nodes does,
and a neighbour that is not of the annotated type is simply not in the set —
this operand filters, where members-of’s D24 operand asserts, because a
node’s edge may legitimately reach several node types while a hyperedge has one
type.
The operand is mandatory rather than optional, and that is a breaking change
to a form that already existed. What the estate holds, stated exactly (all
verified 2026-08-10): no conformance vector and no content rule exercises
neighbors — zero occurrences under rust/crates/babylon-bsl/tests/
(twelve .bsl vectors) and under rust/crates/babylon-tick/content/ — so
no blessed expectation moves and there is no vector re-bless to pay. The
babylon-bsl crate, however, does implement the pre-change form:
bound_checker.rs reads the ceiling operand of neighbors at index 2 and
bounds it against the edge type alone, and a unit test pins that three-operand
spelling together with the edge-type-only bound D52 revises. Those are updated
when Phase 1 implements this chapter — the correction costs a grammar edit and
a crate change, which is the cheapest of the three prices it could have carried
and the reason to pay it now rather than defer. An optional operand would have
left the untyped reading legal and the under-determination alive.
ceiling(neighbors) is correspondingly tightened in §3.7.
[draft ruling — Phase 1 review, R9 chapter C8] :as — naming the
element, and what it actually means. Two passages of this document
disagreed: §2.5 declares it “reserved and always in scope, never declared
and never shadowed (E-PARSE-022)”, while §3.7’s cost model discusses “a
fold over members nested inside a fold over hyperedges”, which needs two live
elements at once. Four systems need a two-hop rule and none could be authored
with confidence.
The resolution is a reading, not a repeal. ``it`` always denotes the element
of the innermost enclosing iterating form. That is rebinding by construction
— it is never declared, so there is no declaration for an inner form to
shadow, and E-PARSE-022’s prohibition (content may not declare or shadow
it) is untouched and still means what it said. What was missing was a way
to reach an outer element, and :as supplies it:
(fold sum (hyperedges HyperedgeType/ECONOMIC_SECTOR) :as sector
(fold sum (members-of sector HyperedgeType/ECONOMIC_SECTOR)
(field-of it social-class/wealth)))
A
:asname is in scope for the whole body of its form, including nested bodies, and has the query’s element type.Names share the rule’s binding namespace: colliding with a binding or another
:asname isE-PARSE-030, and namingselforitisE-PARSE-022.A
:asname referenced outside its body isE-TYPE-012, the same code and the same reason asitoutside a query context.Naming is optional everywhere. Single-level rules keep reading
it, and no existing form changes meaning — which is the property that made naming the safer of the two candidate resolutions, against rebinding rules that would have had to carve an exception intoE-PARSE-022.
2.7 Expressions, intrinsics, folds, guards
<expr> ::= <literal> | <symbol> | <enum-ref>
| "(" <arith> <expr> <expr> ")"
| "(" <intrinsic-name> <expr>* ")"
| "(" "if" <cond> <expr> <expr> ")"
| <fold>
| <accessor> ; §2.10
| <selection>
<arith> ::= "+" | "-" | "*" | "/"
<literal> ::= <int-lit> | <scaled-lit> | <bool-lit>
<fold> ::= "(" "fold" <fold-op> <query> <elem-name>?
<expr> ( ":weight" <expr> )? ")"
<fold-op> ::= "sum" | "mean" | "min" | "max" | "count"
<selection> ::= "(" "select-max" <query> <elem-name>? <expr> ")"
| "(" "select-min" <query> <elem-name>? <expr> ")"
Arithmetic is strictly binary; (+ a b c) is E-PARSE-040. This keeps
the reduction order explicit in the source rather than implied by a
left-fold convention — a cross-language float trap the design document names.
[draft ruling — Phase 1 review, R9 verification repair] Arity and closed
terminal sets each get a code, rather than an unnumbered prose prohibition.
Every form’s operand count is fixed by its production, and a count that differs
from it is E-PARSE-042; E-PARSE-040 remains the arithmetic-specific
spelling of that class, and the three-operand neighbors of the pre-C8
grammar (§2.6, D51) is the case this revision creates. A head symbol that is
not a member of a closed terminal set — <fold-op> above, <cmp> (§2.4),
<update-op> (§2.8) or <arith> — is E-PARSE-015, which is where two
of §6.3’s four silent-degradation corrections (unknown aggregation, unknown
comparison operator) land. Both were previously written as prohibitions with no
code, which left the conformance families that must pin them unable to name
what they expect (§6.2 families 17 and 19).
Guards are (if <cond> <a> <b>) in expression position and
(guard <cond> <effect-item>+) in effect position (§2.8). Both branches of
if must have the same static type (E-TYPE-020).
Intrinsic calls are ordinary forms whose head is a symbol declared in the
intrinsic table. Transcendentals and round-half-even are never language
primitives — they exist only as named intrinsics with pinned deterministic
implementations. The names this document has used to illustrate that
(sigmoid, exp, log, tanh, sqrt, entropy) are
illustrative of the class, not a table of intrinsics that exist — a
reading the R9 gap analysis found this document inviting. What is declarable is
governed by §3.10: the {exp, log} transcendental cap (R10), the separately
authorized floor, the ADR219 exact-arithmetic sextet
(sqrt, round-half-even, min, max, abs, clamp) — and
sigmoid ruled prohibited outright. BSL cannot define an intrinsic;
intrinsic forms only
declare what the kernel provides, so that the typechecker and the fuel
bound-checker are computable from content alone:
<intrinsic-decl> ::= "(" "intrinsic" <symbol>
":params" "(" <intrinsic-type-name>* ")"
":returns" <intrinsic-type-name>
":cost" <int-lit>
")"
<intrinsic-type-name> ::= <type-name> | "real"
[draft ruling — Phase 1 review, Draft-Ruling Register D98]
<intrinsic-type-name> widens <type-name> with real — legal
only in an <intrinsic-decl>’s :params/:returns position. A
deffield’s or a metric’s :type still writes bare <type-name>
(§2.9, §2.11) and still cannot name Real: §3.1 rules it “Not storable”,
and this widening does not touch that production. The need is structural,
not cosmetic — every binary64 expression’s static type is Real (§3.3),
so before this row no intrinsic’s argument could be declared at all, which
made ADR188 Row 2’s own floor rider (§3.10) undeclarable in content.
A declaration whose signature disagrees with the kernel’s registration is
E-LOAD-020; a call to an undeclared intrinsic is E-LOAD-021. The
contents of the intrinsic table are Program 27 Phase 2 work and are not fixed
by this document — only the calling convention, the declaration form, the
reserved-name prohibition below, and the “never a primitive” prohibition are
normative here. §3.10 records the cap the intrinsic table is held to and the
rider slate proposed against it.
[draft ruling — Phase 1 review, R9 chapter C1] Form-head symbols are
reserved against the intrinsic namespace. An intrinsic call is
"(" <intrinsic-name> <expr>* ")", so an intrinsic whose name collided with
a form head would make (field-of it x/y) ambiguous between an accessor and
a call. Every head symbol listed as a form tag in §5.2 is therefore reserved:
declaring an intrinsic with one of those names is E-LOAD-024. The
prohibition is checked at load against the §5.2 list, not against a separate
registry, so adding a form tag automatically reserves it.
Selection returns the element that extremises a score, where a fold
returns the extremised value. Eleven systems pick an element and then act on
it — the winning claimant, the winning faction, the best platform, the FPTP
winner, the top claims holder, the principal field (R9 gap analysis §2, Q4) —
and until this chapter no expression form yielded a NodeRef other than
self and §2.8’s effect-list-scoped minted names, so none of them was
authorable.
(update-node (select-max (nodes NodeType/ORGANIZATION)
(field-of it organization/claim-strength))
organization/holds-office (set #t))
The result type is the query’s element type:
NodeReffornodes,neighborsandmembers-of;EdgeRefforedges;HyperedgeRefforhyperedgesandhyperedges-of.itis bound in the score expression exactly as it is in a fold body.The tiebreak is a property of the language, not of each rule. Ties are broken by §2.6’s iteration order: the first element in ascending id byte order wins, for
select-maxandselect-minalike. Every frozen system that picks an element carries its own tiebreak today, and several carry none; hoisting it here means a transcribed rule cannot forget one.An empty query is
E-EVAL-021— the same code, for the same reason, asmin/maxover an empty set (§4.4). There is no element to return and there is no null.The score expression must have a comparable scalar static type —
Int,Currency,Probability,Intensity,CoefficientorReal.Bool,Enum<T>,Str, references and sets areE-TYPE-016.Kind is unconstrained on the score and the result is kind-neutral (a reference has no extent). This is not a hole in §3.4: that law polices aggregation, where an unweighted mean of an intensive quantity across classes or space is the recorded variance error. Ranking elements by an intensive field aggregates nothing — it orders — so the weighted-mean obligation has nothing to attach to.
[draft ruling — Phase 1 review, R9 chapter C12] No set-algebra operator,
and the deferral is now honest. One system needs a set intersection (shared
memberships between two nodes). This document adds no intersect,
union or difference: a dedicated operator would need a result type
that is a NodeSet not produced by a <query>, which §3.1’s “only
consumable by fold, exists, forall” line and §3.7’s
ceiling(query) both assume away. Intersection is expressible today, at
quadratic fuel cost, with C8’s naming and C12’s reference identity:
(fold count (hyperedges-of a HyperedgeType/COMMUNITY) :as ha
(if (exists (hyperedges-of b HyperedgeType/COMMUNITY) (= it ha))
1 0))
The earlier judgement to defer rested on a form that could not actually be
written — it meant the inner element in both positions and references had
no comparison. Both holes are closed above, so the deferral now stands on its
own: revisit when a second system asks, and pay the quadratic cost
visibly in :fuel until then, where a reviewer can see it.
Folds and selection are the only expression-position iteration
constructs, and §2.8’s for-each is the only one in effect position.
There is no recursion, no while, no loop, no user-defined function, and
no way to name a rule from inside a rule. Totality is therefore syntactic, and
the static bound of §3.7 is computable.
2.8 Effects — the typed structural verbs
<effect-item> ::= <verb>
| "(" "guard" <cond> <effect-item>+ ")"
| "(" "for-each" <query> <elem-name>? <effect-item>+ ")"
<verb> ::= "(" "update-node" <expr> <qname> <update-op> ")"
| "(" "update-edge" <expr> <qname> <update-op> ")"
| "(" "add-node" <enum-ref> <expr> <field-init>* ")"
| "(" "remove-node" <expr> ")"
| "(" "add-edge" <enum-ref> <expr> <expr> ":strength" <expr>
<field-init>* ")"
| "(" "remove-edge" <enum-ref> <expr> <expr> ")"
| "(" "add-hyperedge" <enum-ref> <expr> <members> <field-init>* ")"
| "(" "update-hyperedge" <expr> <qname> <update-op> ")"
| "(" "remove-hyperedge" <expr> ")"
| "(" "update-membership" <expr> <expr> <qname> <update-op> ")"
| "(" "emit" <enum-ref> <payload-item>* ")"
<update-op> ::= "(" "add" <expr> ")"
| "(" "sub" <expr> ")"
| "(" "set" <expr> ")"
| "(" "scale" <expr> ")"
<members> ::= "(" "members" <member-item>+ ")"
<member-item> ::= <expr>
| "(" "member" <enum-ref> <expr> <field-init>* ")"
<field-init> ::= "(" <qname> <expr> ")"
<payload-item>::= "(" <symbol> <expr> ")"
The four <update-op> forms are exactly today’s four-operation effect enum
— add = increase, sub = decrease, set = set,
scale = multiply. The set is closed: a fifth head there — the
(unset …) the frozen estate reaches for (§3.8) — is E-PARSE-015.
Of the ten structural verbs, five are the
addition the design document’s §6.4 audit found necessary (20 of 39 system
modules mutate graph structure); two — add-hyperedge and
remove-hyperedge — are what the Amendment D ruling adds, since if a
hyperedge is a first-class object, minting and retiring one is a first-class
verb; two — update-edge and update-hyperedge — are what R9
chapters C2 and C12 add, below; and one — update-membership — is what
Amendment AG clause (i) adds, below.
[draft ruling — Phase 1 review, R9 chapter C2] update-edge, and why
the dyadic layer differs from D26. Eight systems overwrite a standing edge’s
attributes (R9 gap analysis §2, Q3): value_flow on four edge types,
SOLIDARITY decay, MEMBERSHIP accrual, field_gradients, the EdgeTransition
mode fields. Before this chapter nothing in the verb set could, and the
question that had to be answered first is whether D26’s refusal to mutate a
hyperedge in place carries over. It does not. D26’s stated rationale is
that a partially-mutated member list must be unrepresentable, so membership
changes go through whole-object replacement and the member-count check stays at
a single point. A dyadic edge has no member list; there is no partial state for
in-place mutation to leave behind, and the :max-members check it protects
does not exist on the dyadic layer. The rationale is therefore specific to the
construct it was written about, and re-using it here would be an argument from
symmetry rather than from the reason. (C12 revisits the other half of D26 —
mutation of a hyperedge’s own declared fields — on exactly this reasoning.)
[draft ruling — Phase 1 review, R9 chapter C2] update-edge takes an
EdgeRef, not a type-and-endpoints triple. It mirrors update-node
operand for operand — element, field qname, update-op — because the effect
positions that will supply it are it inside a for-each over edges
(§2.8, chapter C6) and the result of select-max (§2.7, chapter C5), both of
which yield refs. Giving the verb a second arity taking <enum-ref> <expr>
<expr> would have made it the grammar’s only overloaded head — the exact
objection D26 raises against an overloaded add-edge. Rules that hold the
endpoints instead of the ref reach the edge through §2.10’s edge-between
accessor, which is one form used in expression position rather than a second
shape of a verb. The R9 gap analysis §2 (Q3) sketched the triple form; D36
records the divergence.
A <qname> whose owning type (§2.9) is not the element type the verb’s
<enum-ref> names is E-TYPE-014 — a static check on add-node,
add-edge and add-hyperedge, whose element type is an operand. On
update-node/update-edge the element is a reference, which §3.1 gives no
static type, so the same disagreement surfaces at evaluation as E-EVAL-033
(§2.10). A <field-init> on add-edge naming the implicit
<edge-type>/strength field is E-PARSE-041: the :strength operand is
that field’s only writer at mint time, and two writers for one field in one
form is an authoring bug rather than a precedence question.
update-edge inherits the structural-verb discipline unchanged: it obeys the
I.15 edge-mode state machine, so a write that would take an edge to a mode the
machine does not admit from its current one is E-EVAL-030, and a store
outside the target field’s declared range is E-EVAL-020 (§3.3) — never a
clamp, never a silent no-op.
add-hyperedge’s <enum-ref> is a HyperedgeType member, its <expr>
is the new hyperedge’s id (as add-node’s is a node id), and <members>
names its member nodes. The grammar’s <member-item>+ makes a zero-member
hyperedge unexpressible; the upper end is the declared :max-members
ceiling of §3.7, checked statically. A member item is a bare <expr> where
the hyperedge type carries no membership payload, and the annotated member
form where it does — the Amendment AG ruling below.
[draft ruling — Phase 1 review] Id operands are effect-list-scoped
names (implementation-discovered, 2026-07-30, Phase 1 Task 16). The id
operand above is written as <expr>, but no expression form yields a
fresh identity and §2.5 gives rules no way to declare one. The executor
therefore reads it as a symbol introducing an effect-list-scoped name
for the minted object: later effect items in the same list may reference it
(roster replacement needs exactly this), the substrate mints the actual
identity, and the no-shadowing discipline of E-PARSE-022 extends to
these names. A non-symbol id operand is a loud error pending the review.
[draft ruling — Phase 1 review] Two verbs, not an overloaded add-edge.
Membership is minted by its own typed verb rather than by an add-edge
variant carrying a member set. Three reasons, each following the rest of this
document rather than inventing a rule for the occasion: the head symbol names
the form (§1.3), so one tag with two arities would be the grammar’s only
exception; add-edge’s first operand is an EdgeType and
add-hyperedge’s is a HyperedgeType, so overloading needs a union type
§3.1 does not have; and the member-count ceiling attaches to the hyperedge verb
alone. It also keeps the ruling legible in the grammar itself — a clique
expansion is not expressible, because no verb takes a member set and emits
edges.
[draft ruling — Phase 1 review; field-mutation half superseded by the C12
ruling below ] Membership changes are whole-hyperedge replacement. There
is no add-member/remove-member verb: a rule that changes a formation’s
roster emits (remove-hyperedge h) and then (add-hyperedge …) in one
effect list, applied in source order (below). This keeps the member-count check
at a single point (§3.7) and makes a partially-mutated hyperedge
unrepresentable. The cost was stated rather than hidden: per-membership
payload (the role/strength/visibility fields today’s Python
CommunityMembership carries) and mutation of a hyperedge’s own declared
fields were both inexpressible in the revision that made this ruling. The
second of those is retired immediately below (D65); the first was escalated by
D66 and is retired by the Amendment AG rulings below
(D79–D84), which change what a membership carries and leave this row’s
member-list discipline exactly as written. Neither was a silent omission.
[draft ruling — Phase 1 review, R9 chapter C12] D26’s second half is
closed: update-hyperedge writes a hyperedge’s own declared fields. The
verb mirrors update-node and update-edge operand for operand, and it is
added on exactly the reasoning C2 sets out above: D26’s rationale is that a
partially-mutated member list must be unrepresentable, and writing a
declared field of a hyperedge leaves no member list partially anything. The
member list stays whole-object replacement (remove-hyperedge then
add-hyperedge in one effect list), so the :max-members check stays at
its single point and D26’s actual guarantee is untouched. What is retired is
only the incidental consequence that a formation’s own state was frozen for
the life of the object.
A <qname> whose owning type is not the referent’s HyperedgeType is
E-EVAL-033 (§2.10), since a HyperedgeRef carries no static type; the
range and I.15 disciplines apply as they do to the other two update verbs.
[draft ruling — Phase 1 review, Amendment AG (i)] update-membership —
D26’s first half is closed, and the member list still crosses whole. The
verb writes a payload field of an existing membership and nothing else. It
mirrors the other three update verbs in its trailing operands (a <qname>
and an <update-op>) and differs only in its element position, which takes
two operands rather than one: BSL mints no reference kind for a
membership, so the pair is named by its key — the hyperedge first, the member
second (§2.12).
(for-each (members-of c HyperedgeType/COMMUNITY)
(update-membership c it community/visibility (scale 0.9c)))
The member list is untouched. There is still no
add-member/remove-memberverb, and a roster change is stillremove-hyperedgethenadd-hyperedgein one effect list (D26). The:max-memberscheck therefore stays at its single point, a partially mutated member list stays unrepresentable, and Anti-Pattern VIII.9 survives verbatim — this verb changes what a membership carries, never how many objects cross. The payload of a member dropped by a roster replacement does not survive it, and re-stating the payload is that idiom’s price, unchanged.A pair that is not a membership is
E-EVAL-038— the member node is not in that hyperedge’s member list — never a silent no-op and never a quietly minted membership. A hyperedge operand that is not of the<qname>’s owningHyperedgeType, and a member operand that is not of the payload declaration’s:memberNodeType, are bothE-EVAL-033(§2.10 discipline 1, which now reads across two operands rather than one); neither is statically checkable, because §3.1 gives references no type.The range and I.15 disciplines apply exactly as they do to the other update verbs: a store outside the payload field’s declared range is
E-EVAL-020, never a clamp.Why a verb at all, given Amendment AG (iii). Clause (iii)’s “adds no verb” is the ADR177-governed player-action contract:
ai/decisions/ADR177_verb_matrix_ratified_main_ruleset.yaml,src/babylon/game/actions/matrix.py, andsrc/babylon/game/actions/registry.py. The matrix and named files are the same closed list as “no intrinsic, no severity rule, no constructor family”. Clause (i) of the same amendment obliges payload to mutate only through effects, and ADR189 clause (iv) names the “accessor/verb surface” as exactly what this document owes. An effect-position write is therefore required by the amendment, not licensed against it; what stays closed is the player/state verb registry and the algebra, neither of which this touches.
[draft ruling — Phase 1 review, Amendment AG (i)] Payload is initialised
at mint, totally, against an annotated member item. Where a hyperedge type
declares any membership payload (§2.9), every item of add-hyperedge’s
<members> list is the annotated form (member <enum-ref> <expr>
<field-init>*), and its field-inits are exactly the declared payload
fields of that (hyperedge type, member node type) pair — no more and no
fewer.
(add-hyperedge HyperedgeType/COMMUNITY h
(members (member NodeType/SOCIAL_CLASS c1 (community/strength 0.4c)
(community/visibility 0.5p))
(member NodeType/SOCIAL_CLASS c2 (community/strength 0.7c)
(community/visibility 0.2p))))
The annotation is D24’s fix, for the third time. The owed field set depends on the member’s node type, and §3.1 gives a
NodeRefno static type, so without the<enum-ref>the completeness check would be a runtime discovery. With it the check is static: a missing payload field, or a bare member item under a hyperedge type that declares payload, isE-LOAD-047. The annotation asserts rather than filters, exactly as D24’s does: a member that is not of the annotated type isE-EVAL-033.Bare items stay legal where nothing is owed, so every existing
add-hyperedgeform keeps its meaning and its bytes. A bare item under a payload-declaring type is not a shorthand for defaults — there are none.A field-init naming a field owned by another type is
E-TYPE-014(the static check the minting verbs already carry) and one naming the same payload field twice in one member item isE-PARSE-041, the existing two-writers-for-one-field code.Why total rather than optional.
add-nodeandadd-edgecarry<field-init>*and no completeness rule because hydration and later effects can seed a node’s field; a membership minted at runtime has exactly one writer at that moment and no:defaultanywhere in the element-state half of the language (§3.5’s opt-in is a binding property). The alternative — permit partial mint and let the first read beE-EVAL-033— converts a decidable authoring error into a runtime one, which is the direction §4.6 says a chapter must never move the language.add-edge’s mandatory:strengthoperand is the same reasoning already applied to the one field that had no other writer at mint. Hydration carries the identical obligation (§3.9 clause 6).
emit’s <enum-ref> is an EventType member — a member of another
enum kind there is E-TYPE-011 under §2.6’s class rule; payload items are
name/expression pairs. There is no string interpolation in a payload.
[draft ruling — Phase 1 review, R9 chapter C6] for-each — bounded
iteration in effect position. Nine systems apply a verb once per matching
element (R9 gap analysis §2, Q5): an emit per contributing SOLIDARITY edge,
a write to both endpoints of every value-bearing edge, a decay on every
incident edge, a transition per territory, the two sibling nodes of a class
split. None was expressible: <effect-item>+ fixes arity at parse time,
folds live in expression position only, and it outside a query context is
E-TYPE-012 — so “for every matching element, apply a verb” had no form at
all, and the surveys reached for one-summed-emit fallbacks that are content
rulings in disguise.
(for-each (edges EdgeType/SOLIDARITY)
(update-edge it solidarity/strength (scale 0.95c))
(emit EventType/SOLIDARITY_DECAYED (strength (field-of it
solidarity/strength))))
itis bound inside the body to the current element, with the query’s element type (§2.6’s result table). Outside afor-each,for-each’s body, or a query predicate or fold body,itremainsE-TYPE-012.The query is materialized against the rule’s pre-state, in §2.6’s iteration order, before any effect in the rule’s list is applied. This is not a convenience: §4.2’s law that a rule can never observe its own effects would otherwise be silently repealed by an iteration whose membership depended on an earlier verb in the same list. Every expression anywhere in an effects list — a verb’s operands, a
guard’s condition, afor-each’s query — is evaluated against the pre-state, and the collected effects are then applied.Application order is total. The body runs once per element in iteration order (outer), and the body’s own items apply in source order (inner). Nested
for-eachcomposes the same way. With §4.2’s subject order this leaves no unordered reduction anywhere in the language.An empty query applies nothing, and is not an error. This is the one place where an empty set is quiet, and the distinction is principled: §4.4’s
mean/min/maxmust produce a value and have none to produce, so they areE-EVAL-021; an iteration is a command, and “do it to each of no elements” is completely determined. The reading that would make it loud would also make a correct rule fail on a legitimately empty graph.Totality holds. The set is materialized before the body runs and its size is bounded by the declared ceiling, so this is a bounded iteration and not a loop; §3.7 charges it exactly as it charges
exists/forall.
One consequence worth recording where the port train will look for it: with
for-each in hand, a bulk structural operation (re-parenting every claim of
a collapsing sovereign, severing every exploitation edge) is expressible in
content. A Rust bulk primitive for the same job therefore survives only as a
performance escape, which needs measurement rather than assertion.
Effect ordering and application. Effects are collected in source order and
applied in source order at the point the rule fires. Structural verbs obey the
I.15 edge-mode state machine; a verb that would violate it is an evaluation
error (E-EVAL-030), never a silent no-op. Removing a node that does not
exist, adding a node id that already exists, or adding an edge that already
exists are all E-EVAL-031 — absence is never treated as success. The
hyperedge verbs inherit that discipline exactly: removing a hyperedge that does
not exist, adding a hyperedge id that already exists, naming a member node that
does not exist, and naming the same member twice in one <members> list
are all E-EVAL-031. Members are a set; a duplicate is an authoring bug, and
it is never silently deduplicated.
Prohibited. There is no I/O, no time source other than a :tick
binding, no
general randomness primitive. Chance enters BSL only through the governed
finite choose effect with the private realization key that the
Determinism Contract specifies. BSL permits no graph mutation
outside this verb set, no reflection, and nothing unbounded. In particular,
BSL has no clique
expansion. The verb set has no member-list-to-pairwise-edge conversion, so
BSL cannot represent the object that Anti-Pattern VIII.9 bans (Amendment D,
D-1).
2.9 Field and manifest declarations
<deffield> ::= "(" "deffield" <qname>
":type" <type-name>
( ":kind" ( "intensive" | "extensive" )
| ":enum-type" <enum-type> )
( ":member" <enum-ref> )?
")"
<manifest> ::= "(" "manifest" <symbol> <ceiling>+ <rung>* <adjunction>* ")"
<ceiling> ::= "(" "ceiling" <enum-ref> ":ceiling" <int-lit>
( ":max-members" <int-lit> )? ":invariant"? ")"
<rung> ::= "(" "rung" <symbol> <enum-ref> <enum-ref>
":via" <enum-ref> ":substrate"? ")"
<adjunction> ::= "(" "adjunction" <symbol> <qname> <qname>
":rung" <symbol> ( ":weighted-by" <qname> )? ")"
The rung and adjunction rows are Amendment AG clause (ii)’s: a scenario
declares the rungs of its scale lattice and the allocate/aggregate
instances that run along them. Their meaning, their validation and the two
standing rulings that bind every rung are §3.9’s; what belongs here is only
that they are manifest children — the same form, and therefore the same
digest, as the :invariant ceiling rows the substrate ruling keys off
(D85).
A ceiling row’s <enum-ref> is a NodeType, EdgeType or
HyperedgeType member. :max-members is mandatory on a
HyperedgeType row and illegal on the other two; :invariant is legal
on a NodeType or EdgeType row and illegal on a HyperedgeType row
(§3.9). Any of those mismatches is E-LOAD-042. The semantics of the two
numbers are §3.7’s; the flag’s are §3.9’s.
[draft ruling — Phase 1 review, R9 verification repair] The manifest must
be complete for the types the content set actually uses. The grammar demands
<ceiling>+ — one row or more — and nothing until now said which rows were
owed. A content set that queries a type, names it in a structural verb,
reaches it through the (§2.10), or (since Amendment AG (ii)) names it in a
rung declaration, and whose manifest carries no row for that type, is
E-LOAD-045. The omission is not survivable by defaulting:
ceiling(query) (§3.7) is not computable without the row, so bound(rule)
has nothing to compare against :fuel; the’s E-LOAD-043 tests for a
ceiling “other than 1” and a missing row is neither 1 nor other than 1; and
:invariant (§3.9) is a flag on a row that does not exist, so its
E-LOAD-013 check silently never fires. The obligation is scoped to the
vocabulary the content set mentions, not to the whole registry — a scenario
owes no row for a type nothing touches.
[draft ruling — Phase 1 review] The design document says intensivity is “a
per-field declaration (:kind intensive|extensive) on model fields” without
saying where the declaration lives. It lives here, in BSL content, as
deffield. Rationale: the typechecker must be derivable from content alone
for this document to satisfy III.12(a); a kind that lived only in Rust
attribute macros would make a second implementation impossible to write from
the spec. A deffield whose type or kind disagrees with the kernel’s model
registration is E-LOAD-022 — the two must agree, and the kernel is checked
against content, not the reverse.
[draft ruling — Phase 1 review, R9 chapter C1] A field’s owner may be a
node type, an EdgeType or a HyperedgeType. The first segment of a
deffield’s <qname> names the owning graph-element type; until this
revision it could only name a node type, which is what left §2.4’s
EdgeCondition row unwritable. A first segment naming no registered
NodeType, EdgeType or HyperedgeType member is E-LOAD-023.
The segment↔member correspondence, stated because it was only ever implied.
social-class/wealth owns off NodeType/SOCIAL_CLASS by a rendering the
document used from its first revision and never wrote down: lowercase the
enum member identifier and replace each _ with -. The result must
be a valid symbol per §1.4; a member whose rendering is not (a leading
digit, say) is E-LOAD-033. Because one namespace of renderings now spans
three enum types, the registry must keep them pairwise disjoint: a
NodeType and an EdgeType (or either and a HyperedgeType) rendering
to the same symbol is E-LOAD-032, checked at load over the whole closed
vocabulary. Disjointness is a property of the vocabulary, so the check runs
once per content set rather than per field.
[draft ruling — Phase 1 review, R9 chapter C1] Every EdgeType
carries one implicitly declared field, <edge-type>/strength, with
:type coefficient and :kind extensive. It needs no deffield — it is
the field add-edge’s :strength operand writes (§2.8), and before this
revision the language could write it and never read it back. Re-declaring it
explicitly is E-LOAD-001 (a duplicate field declaration), so there is
exactly one home for its type and kind.
The Coefficient type is the frozen engine’s: the sum_strength /
avg_strength metric of engine/event_evaluator.py:174-175 reads
solidarity_strength, declared Coefficient in
models/entities/relationship.py:116. The extensive kind is the
load-bearing half of the ruling and is chosen so §2.4’s coverage row is
honoured rather than half-honoured: under §3.4 an intensive fold body makes
sum an E-TYPE-041 and mean legal only with a :weight, so an
intensive strength would have left sum_strength inexpressible after all.
The extent being aggregated is the edge population — a total tie-weight
over a set of edges is additive in exactly the way an intensity across classes
or space is not, which is the distinction §3.4 exists to police. Authors
wanting a genuinely intensive per-edge attribute (tension, a rate)
deffield it :kind intensive and carry the :weight obligation, and
the recorded variance error stays caught.
[draft ruling — Phase 1 review, Amendment AG (i)] A membership payload
field is a deffield with a :member operand, not a new top-level
form. The owner of such a field is a pair — a member NodeType inside a
HyperedgeType — and the question the amendment leaves to this document is
whether deffield’s owner axis can carry a pair. It can, because half the
pair is already where a field’s owner has always been: the <qname>’s first
segment renders the HyperedgeType under D31’s rendering rule, unchanged,
and :member names the other half.
(deffield community/strength :type coefficient :kind extensive
:member NodeType/SOCIAL_CLASS)
(deffield community/visibility :type probability :kind intensive
:member NodeType/SOCIAL_CLASS)
Why not a dedicated top-level form. Two reasons from this document’s own machinery, and neither is ergonomic:
§5.5 hashes
deffield,intrinsic,manifestandmetricforms into sibling digests thatContentDigestcombines — andContentDigest’s composition is Determinism Contract’s, not this document’s. A new top-form would owe a new sibling digest and therefore an edit to a document this one deliberately does not reach into. A keyword option lands the declaration inside a digest that already exists.A keyword encodes as an
optform under D20, so the declaration needs no new form tag, no numeric id and no new atom kind — the same cheapest-available proof of additivity §5.2 relies on, and the reason §5.6’s bytes survive this revision too.
The rules, all decidable at load:
The
<qname>’s first segment must render aHyperedgeTypemember. A:memberon adeffieldwhose first segment renders aNodeTypeor anEdgeTypeisE-LOAD-048; a first segment that renders nothing registered isE-LOAD-023as before.:member’s own operand is aNodeTypemember — any other enum kind there isE-TYPE-011under §2.6’s class rule.One namespace, one declaration. A membership payload field shares the field namespace with the hyperedge type’s own fields, so a
<qname>resolves to exactly onedeffieldand a duplicate isE-LOAD-001like any other. Reading or writing a membership field throughfield-of/update-hyperedge, or a hyperedge’s own field throughmembership-field-of/update-membership, isE-LOAD-046— static, because the declaration and the reading form are both content, and the same shape as §2.11’sE-LOAD-012.One declaration is one pair. A hyperedge type whose members are of two node types, both needing an axis of the same name, declares two qnames. The cost is real and is taken deliberately: it keeps
<qname>→ declaration a total function, which is what makes both the wrong-form check above and §2.8’s mint-time completeness check static rather than runtime.Kernel agreement is
E-LOAD-022, as for any otherdeffield: the type, the kind and the member half are all checked against the kernel’s registration of the attributed-membership object.
[Director ruling 2026-08-11, Organization-as-game-object spec §1 Q12]
The :kind slot widens to an exclusive-or with :enum-type, not
an additional option. Every deffield before this ruling carried a
mandatory :kind; an enum-typed field carries none, because there is
no meaningful extensive-or-intensive reading of a member identity — an
aggregation kind answers “how does this quantity add up across a
population”, and a member has no such answer. §3.4’s aggregation-law table
is never even consulted for one: Enum<T> supports no operation beyond
=/!= (§3.1), so an enum-typed value never reaches a fold with an
arithmetic kind to check in the first place — the refusal is structural,
not a special case bolted onto §3.4. The two slots are therefore mutually
exclusive and jointly exhaustive against :type: any :type other
than enum requires :kind and forbids :enum-type (unchanged from
before this ruling); :type enum requires :enum-type — naming a
type defenum has declared (§2.13) — and forbids :kind. Either
violation is E-LOAD-053. Full declaration and read/write law: §2.13.
[Train B item 6, #591 — D155] The :type slot’s eighth name is
real: the finite binary64 lane as a STORED field type, carrying no
declared-domain range law (§3.3’s E-EVAL-020 stays the three
unit-interval types’ own check). A real field is ordinary under every
other clause of this section — it takes :kind like any non-enum
type, its owner may be a node, EdgeType or HyperedgeType member,
and kernel agreement stays E-LOAD-022. Seed law: §1.5’s acceptance
paragraph; the full row: §3.1. A knowing supersession of D98’s “not
storable”, recorded in the register — not a silent reopening.
2.10 Element accessors
Accessors are the expression forms that read from a graph element the rule
already holds a reference to, as against :field/:const/:metric
bindings, which read from the rule’s own environment. They are the R9
chapter-C1/C2/C3/C9 additions and they all share one discipline, stated once
here.
<accessor> ::= "(" "field-of" <expr> <qname> ")"
| "(" "edge-between" <enum-ref> <expr> <expr> ")"
| "(" "the" <enum-ref> ")"
| "(" "metric-of" <expr> <symbol> ")"
| "(" "membership-field-of" <expr> <expr> <qname> ")"
Form |
Result |
Reads |
|---|---|---|
|
the field’s declared type |
A declared field of the node, edge or hyperedge the |
|
|
The edge of the given |
|
|
The unique node of a |
|
the metric’s declared type |
A registered element-indexed metric, evaluated at the element the
|
|
the field’s declared type |
A declared payload field of the attributed membership keyed by the
hyperedge the first |
The shared discipline.
The qname carries the type annotation, the reference does not. §3.1 gives
NodeRef/EdgeRef/HyperedgeRefno type variables, so a reference does not carry whichNodeType/EdgeType/HyperedgeTypeit belongs to. The owning type therefore comes from the<qname>, exactly as D24 makes theHyperedgeTypea mandatory operand ofmembers-offor the same reason. Afield-ofwhose referent is not of the qname’s owning type isE-EVAL-033at evaluation — never a default value and never an absent read.Absence is not a value. A
field-ofagainst an element that carries no value for a declared field isE-EVAL-033as well; there is no:optional/:defaulton an accessor, because the opt-in to absence is a property of a binding (§3.5) and an accessor names its element at the point of use. §3.8 gives the re-modelling for genuinely optional axes.Accessors are reads. No accessor mutates. The verbs of §2.8 are the only writes, and §2.8’s
update-edge(R9 chapter C2) is the write dual offield-ofover anEdgeRef.Kind and type propagate from the declaration. A
field-ofexpression has thedeffield’s:typeas its static type and its:kindas its kind (§3.4), identically to a:fieldbinding of the same field.The enum-ref operand is kind-checked like any other.
edge-between’s operand is anEdgeTypemember andthe’s is aNodeTypemember; either naming a member of another enum kind isE-TYPE-011under §2.6’s class rule, statically and at load.
Worked shape. The §2.4 coverage row, written out:
(fold mean (edges EdgeType/EXPLOITATION)
(field-of it exploitation/tension)
:weight (field-of it exploitation/value-flow))
it is an EdgeRef inside a fold over edges (§2.6’s result table), so
both accessors read the edge under the fold. The :weight is mandatory here
because exploitation/tension would be declared :kind intensive — §3.4’s
rule is untouched by this chapter and applies to edge fields exactly as it
applies to node fields.
[draft ruling — Phase 1 review, R9 chapter C2] edge-between is
well-defined because the triple is a key. §2.6 fixes the edge iteration order
at ascending (source-id, target-id, edge-type) lexicographic byte order —
which is a total order only if no two edges share that triple, and the two
points at which an edge enters the graph both refuse a second one: §2.8 makes
“adding an edge that already exists” E-EVAL-031, and §3.9’s hydration
contract makes a scenario seeding one triple twice E-LOAD-044. Parallel
edges of one type between one ordered pair are therefore not representable
(a ceiling-violating hydration is separately E-LOAD-041), and “the edge
between a and b of type T” denotes at most one element. When it denotes none,
that is E-EVAL-034 — the accessor never yields an absent reference and never
degrades to a no-op write, which is what would happen if update-edge had
been given endpoint operands and left to skip quietly.
(update-edge (edge-between EdgeType/SOLIDARITY self other)
solidarity/strength (scale 0.95c))
[draft ruling — Phase 1 review, R9 chapter C3] the reaches a singleton
carrier without a degenerate fold. Graph-scope state lives on carrier nodes
(§3.6), and a rule whose domain is some other type has to name one. The
alternative the language already had — (fold sum (nodes NodeType/POLITY)
(field-of it polity/imperial-rent-pool)) — reads as an aggregation, costs a
ceiling factor it does not need, and is a fold whose result happens to be a
single element only because the ceiling is 1. the says that directly and
proves it statically: legality is conditioned on the manifest’s :ceiling
being exactly 1 (E-LOAD-043), which is the same declared number §3.7
already uses for the fuel bound, so the ruling adds no second registry. A
graph that holds no such node at evaluation is E-EVAL-035 — a carrier the
scenario forgot to hydrate fails loudly rather than reading as zero.
(update-node (the NodeType/POLITY)
polity/imperial-rent-pool (sub drawn))
[draft ruling — Phase 1 review, Amendment AG (i)] membership-field-of
keys the pair with two operands and annotates with the <qname> — D24’s
pattern for the third time, and an accessor rather than a binding source.
A :membership <bind-src> was the obvious alternative and is
rejected on D56’s reasoning verbatim: a bind-src encodes as a two-child
opt under D20 and this one needs two element operands, so it would have
been the only bind-src of its shape; and a binding resolves implicitly
against an enclosing body, while a rule that scores memberships holds the
hyperedge and the member explicitly (§2.12’s example holds both at once
through :as). The accessor names its element at the point of use, which is
the property §2.10 was written around.
(fold mean (members-of c HyperedgeType/COMMUNITY)
(membership-field-of c it community/visibility)
:weight (membership-field-of c it community/strength))
Operand order is hyperedge-then-member. Amendment AG names the object as the (member, hyperedge) pair, and that spelling is the model’s naming, not an operand order: here the order runs from the half the
<qname>annotates — the owningHyperedgeType— outward to the member, which is alsomembers-of’s andupdate-membership’s order. One order, three forms.Both operands are subject to discipline 1. A hyperedge operand not of the qname’s owning type and a member operand not of the declaration’s
:membertype are eachE-EVAL-033; a pair that is a well-typed non-membership — both elements exist, the member is simply not in that hyperedge’s list — isE-EVAL-038, its own code because it is a different fact about the graph and a reader should not have to guess which one a code meant.Absence past that is unreachable, not silent: §2.8 makes payload initialisation total at mint and §3.9 clause 6 makes it total at hydration, so a membership that exists carries every declared payload field of its pair. Discipline 2’s “a field the element carries no value for” therefore has no membership case to cover, which is the point of paying for the completeness check at load.
It is a keyed lookup (D38): charged at 1 + its two element operands, never multiplied by a ceiling (§3.7). Type and kind propagate from the declaration under discipline 4, so the payload’s
:kindreaches §3.4 exactly as afield-of’s does — the:weightabove is mandatory becausecommunity/visibilityis declared intensive.
2.11 Metric registration
§2.5 said :metric “reads a registered graph-level metric” and stopped
there. It never said who may register one, what determinism obligations a
registration carries, whether a Rust domain crate’s per-tick output qualifies,
or whether a metric may be indexed by element. The last question is the one
that blocks work: every topological score the OODA seam needs — degree and
betweenness centrality, articulation-point cutsets, isolation — is per-node,
and a graph-scope scalar cannot carry any of them to content.
<metric-decl> ::= "(" "metric" <symbol>
":type" <type-name>
":kind" ( "intensive" | "extensive" )
<domain>
":provider" <symbol>
")"
<domain> is §2.3’s production, reused unchanged: (domain :graph)
declares a graph-scope metric read by a :metric binding, and (domain
NodeType/ORGANIZATION) declares an element-indexed metric read by
metric-of.
(metric betweenness-centrality
:type coefficient :kind intensive
(domain NodeType/ORGANIZATION)
:provider topology-scores)
(binding centrality :expr (metric-of self betweenness-centrality))
[draft ruling — Phase 1 review, R9 chapter C9] A metric form
declares, it does not define — exactly as intrinsic does, and for exactly
the reason D9 gives for deffield: the typechecker and the fuel-bound
checker must be computable from content alone for this document to satisfy
III.12(a), and a metric whose type, kind and domain lived only in a Rust
registration would make a second implementation underivable from the spec. The
kernel provides the value; the declaration is checked against the kernel’s
registration and a disagreement is E-LOAD-025. An unregistered metric name
remains E-LOAD-011 — never 0.0, which is one of §6.3’s four corrected
silent degradations.
Reading a metric through the wrong form for its declared domain is
``E-LOAD-012`` — a graph metric via metric-of, or an element-indexed
metric via a :metric binding. Both are static: the declaration and the
reading form are both content. At evaluation, a metric-of whose referent is
not of the declared domain type is E-EVAL-036, and a metric the provider
produced no value for is E-EVAL-037 — the same discipline as §2.10’s
accessors, and for the same reason: absence is never a zero.
Determinism obligations a registration carries. These are the substance of the contract, and they are obligations on the provider, enforced by review and by the determinism contract’s golden vectors rather than by the typechecker:
A metric is a pure function of the graph pre-state at the anchor position at which it is read. Not of wall clock, not of RNG, not of I/O, and not of any rule’s effects within the position.
Its value is stable across every read at one position. Whether a provider recomputes between positions is its own business; what it may not do is return two values to two rules at one position.
Its arithmetic obeys §4.3 — IEEE-754 basic operations, correctly rounded, no FMA contraction, no transcendental that is not a pinned intrinsic. A provider that cannot meet that bit-exactly must either declare an
Intordinal (which is exact) or carry golden vectors with a written tolerance derivation in Determinism Contract.A Rust domain crate’s per-tick output qualifies as a provider only if the crate is inside that document’s pinned-toolchain set and carries those vectors. This is the answer to the question three surveys asked independently: the seam is legitimate, and it is not free.
What enters which hash. A metric’s name, type, kind and domain are
content: they are metric forms, hashed into their own digest exactly as
deffield/intrinsic/manifest are (§5.5). A metric’s value is
runtime and appears in no content hash — it enters the tick hash only
through the fields rules write from it. An implementation that hashed metric
values directly would be hashing the provider’s schedule rather than the
game’s state.
Fuel. The provider’s computation is not metered against the reading
rule: a rule cannot bound a betweenness computation, and pretending otherwise
would put a number in :fuel that means nothing. The read costs
1 + cost(operand) (§3.7), the same as any other accessor. The kernel’s own
budget for provider work lives in the determinism contract, which is where the
cost honestly went — this document declines to hide it in a rule’s meter.
2.12 Attributed membership
Amendment AG clause (i) (CONSTITUTION.md v3.2.0, ADR189, ratified
2026-08-10) adds a third element kind to the exposed hypergraph model of
Amendment D: the (member, hyperedge) incidence pair is a first-class
attributed membership carrying declared, typed payload fields — the
role/strength/visibility family the frozen CommunityMembership carries
(src/babylon/models/entities/community.py), and the reason a system whose
scoring depends entirely on per-membership payload was unauthorable in the
revision that recorded D66. The amendment rejects the other candidate landing
in its own words: a per-(member, hyperedge) dyadic edge would re-expose
precisely the incidence encoding sub-ruling D-1 confines to internal storage.
This section states what the kind is. Its three language surfaces live in the sections that own them: the declaration in §2.9, the read in §2.10, the write in §2.8.
Implementation status (Community port train, Task 12): the kind is
ratified language, unserved in the engine — membership-field-of,
update-membership, deffield’s :member operand and §6.2 family 23
all refuse with the AG(i) lane’s citation, blocked on the attributed-
membership ceremony, issue #653 (the evaluator’s
UNSERVED_EXPRESSION_HEADS row and the refusal texts name it by number;
the Community port’s own un-need is D220 — its worlds carry no payload by
design). The Community train’s requirements against the ceremony are
reports/community-membership-shape-note-2026-08-18.md.
[draft ruling — Phase 1 review, Amendment AG (i)] A membership is denoted
by its key, and the language mints no fourth reference kind. A membership is
identified by the pair (hyperedge, member) exactly as a dyadic edge is
identified by (source-id, target-id, edge-type), and every form that
reaches one takes both halves as operands. §3.1 gains no MembershipRef,
§2.6 gains no memberships-of query head, and §3.1 gains no fourth set
type.
The rejected alternative, recorded so it is not re-proposed. A reference
kind would have dragged in a set type, a query head, a ceiling row for a
cardinality :max-members already declares, and an ordering key for an
object that has no id — and the only honest order available is the member
list’s, which the keyed forms already give. It would have bought no
expressiveness the pair-keyed forms lack, at the price of four new obligations
in a chapter whose amendment re-seals the closure (AG (iii)). The element kind
is first-class in the model, where the amendment puts it; in the language
it is named by its key, which is how the language already treats the only
other keyed element it has.
What the kind carries, stated against the amendment’s obligations:
Typing. Payload fields are typed exactly like node, edge and hyperedge fields: one
deffield, one:typefrom §3.1’s table, one:kindunder §3.4. Nothing about §3.2’s currency lane, §3.3’s promotion rule or §3.4’s aggregation law is special-cased for them.Iteration order. The memberships of one hyperedge iterate in the member list’s ruled order — ascending member node-id byte order (D25) — so a fold over
members-ofreading payload is ordered, and it is ordered by the key §2.6 fixed in this document’s first revision. The kind introduces no new order and no new tiebreak.Ceiling.
:max-membersremains the only membership cardinality axis (AG (i)). A payload field adds no axis,ceiling(members-of)is unchanged (§3.7), and a fold over members reading payload is bounded by the same declared number as a fold over members reading nothing.Hashing. Payload is element state, hashed exactly as a node’s, an edge’s or a hyperedge’s declared field is. This document does not restate the tick-hash field set — that is Determinism Contract’s — it fixes only that membership payload is state of the same standing as the other three kinds’ fields and is not exempt from it. The declaration is content and hashes into the
deffielddigest (§5.5), whose shape is unchanged because:memberencodes as an ordinaryopt(D20).Mutation. Effects only:
update-membership(§2.8) is the sole writer after mint, and no accessor mutates (§2.10 discipline 3).Anti-Pattern VIII.9 survives verbatim. A member list crosses whole, never
C(n,2). No verb converts a member list into pairwise anything, attributed membership changes what a membership carries rather than how many objects cross, and the fuel bound over an attributed member list is stillΣ|members|at the declared ceilings (§3.7) — linear in the incidence count, as it was before the payload existed.
Worked shape — the read this kind exists for. A two-hop fold naming the
outer element with :as (D54), reading payload off the inner one:
(binding peak-exposure :expr
(fold max (hyperedges-of self HyperedgeType/COMMUNITY) :as c
(fold mean (members-of c HyperedgeType/COMMUNITY)
(membership-field-of c it community/visibility)
:weight (membership-field-of c it community/strength))))
Neither operator is decoration. The inner :weight is mandatory because
community/visibility is declared :kind intensive, so §3.4 makes the
unweighted mean E-TYPE-042. The outer operator is max — kind-neutral,
legal over a body of any kind — and it is deliberately not sum: the
inner weighted mean is itself intensive (D90), and summing per-community
visibilities across the communities one class belongs to is E-TYPE-041,
which is the recorded variance error in the very shape this section exists to
enable. What the binding names is therefore the class’s peak community
exposure, a measure; a total would have to be built from an extensive payload,
and community/strength is the extensive one.
The kind law bites on membership payload exactly as it bites on node and edge fields — which is what “typed exactly like node/edge fields” costs, and the reason the amendment wrote it that way.
2.13 Declaring enums and the graph vocabulary
[Director ruling 2026-08-11, Organization-as-game-object spec §1 Q12 —
approved twice: the live brainstorming popup and the written spec review]
§3.1’s seventh <type-name> row needed a declaration form and a
governing law of its own; this section is that form. It is also, because
the same ruling’s Q1/Q15 consumers needed the graph vocabulary populated
rather than left permanently empty (§3.6’s own text: that registry “today
has zero production call sites”), the closed graph vocabulary’s own
declaration form. This section’s enum row explicitly supersedes D94’s
exclusion — D94 sealed §3.1’s table at six rows and wrote, in its own
words, that “no <type-name> position can name” a seventh kind.
Recorded, with the supersession named explicitly, as D101 below.
<defenum> ::= "(" "defenum" <enum-type>
"(" <enum-member>+ ")" ")"
<defvocabulary> ::= "(" "defvocabulary" <enum-type>
"(" <enum-member>+ ")" ")"
Both are <top-form>s (§2.2), parsed and validated at content load
like deffield/manifest/metric. <enum-type> is §1.4’s
existing production (an uppercase-initial identifier — the
reader’s existing <enum-ref> lexing, unchanged by this section) and
<enum-member> is §1.4’s existing <enum-member> production, also
unchanged. defvocabulary’s type-name operand is additionally
semantically restricted to §3.6’s own closed set — NodeType /
EdgeType / HyperedgeType / EventType — which needs no dedicated
grammar production: the restriction is a load-time check
(E-LOAD-030 if the name is not one of the four, the same code §3.6
already uses for an unregistered <enum-ref> type name), not a lexical
one, exactly as a ceiling row’s <enum-ref> operand is syntactically
any enum-ref but semantically restricted to a registered graph-element
type (§2.9). A duplicate defenum type name, or two defvocabulary
forms naming the same <enum-kind>, is E-LOAD-001 like any other
duplicate declaration; member order inside a defenum is
normative — it is the ordinal §3.1’s enum row stores — while member
order inside a defvocabulary is not (§3.6’s registry has never had an
ordinal; membership is the only fact it carries).
Two registries, one lexical production, never a guess between them.
An <enum-ref> (§1.4, Type/MEMBER) is checked against exactly one
of two registries, and where the reference sits — never a fallback
search — decides which:
In a §2.6 class-rule operand position (D74) — a query head,
the, a structural verb’s type operand,emit— the type name is checked against the closed graph vocabulary (§3.6), populated bydefvocabulary. Unknown-type and unknown-member there stayE-LOAD-030/E-LOAD-031, exactly as §3.6 already states; a content set that declares nodefvocabularyfor a kind leaves that kind’s checking exactly as inert as it is today, which is what makes this section’s arrival backward-compatible with every existing content set (none of them declares one).In an
:enum-type-declared field’s value position (§2.9) — a.bscnnode/edge body seeding it, or a structural-verb write to it — the type name is checked against the content-declaredEnumRegistrytypedefenumnames, resolved at the field’s own:enum-typedeclaration. Unknown type there isE-LOAD-054; unknown member isE-LOAD-055.
The two registries are deliberately not one, and reusing one for the
other’s job would break a real invariant each way: ClosedVocabulary
(§3.6) sorts and deduplicates its members by design, which is correct for
a set with no ordinal to preserve and wrong for one where declaration
order IS the stored value; an EnumRegistry type’s member order is
that ordinal (§3.1’s enum row) and must never be reordered. Forcing
the structural kinds through an ordinal-preserving registry would gain
them nothing; forcing a defenum type through the sort-and-dedup
registry would silently corrupt whatever field values its ordinals
already back.
The write/read law. An :enum-type-declared field is written and
read only as an <enum-ref> of its declared type, in every
direction, with no fallback and no default member:
A
.bscnnode or edge body seeding such a field with anything other than a matching<enum-ref>— a bare number, an<enum-ref>of a different declared type, any other atom — isE-LOAD-056. The ordinal is never a surface value; there is no “seed it as a number and let the engine resolve the member” path, the same “a name outside the registry is a load error, never a fallback” law §3.6 already states for the structural kinds (D31’s own module doc).A structural-verb write (
update-nodeand its siblings, §2.8) to such a field, evaluating to anything other than a matching<enum-ref>— most concretely a bareReal, the eval-time form of the same mistake — isE-EVAL-042. This is the same law re-checked at the one boundary content cannot be checked once and for all at load, the same two-site pattern the store boundary and range checks already use (§3.7, §4.3).E-EVAL-042also covers anadd/sub/scaleupdate-op targeting such a field (D118):Enum<T>supports no arithmetic (the “No aggregation kind” paragraph below states the same fact for folds), so combining a stored ordinal with an operand’s is never a coherent write against this field’s declared type — the same write-shape law, not a special case bolted onto it.A read of such a field (via a
:fieldbinding, §2.5) renders the stored ordinal back to its member as aValue::Enum— never a bare number, so awhenguard or any other comparison always compares members, never ordinals a rule author could confuse for magnitude. A stored value that fails to round-trip against the field’s declared type — non-integral, or outside[0, member-count)— is a loud integrity failure at the read boundary, never a clamp and never a silently-substituted default member: Constitution III.11 binds a corrupted store exactly as it binds a malformed load.
No aggregation kind. §2.9’s widened <deffield> production
structurally omits :kind for the enum branch; the full statement
of why — Enum<T> supports no arithmetic, so an enum-typed value never
reaches §3.4’s aggregation-law table with a kind to check — is recorded
there, beside the production it explains, rather than repeated here.
The field-of read path (D102, discharged). An
:enum-type-declared field is read through a :field binding
exactly as any other node field is (§2.5), and through §2.10’s
field-of accessor — the two read routes agree, rendering the same
Value::Enum through the same ordinal→member conversion. D102
originally deferred field-of on an enum-declared field, refusing it
loudly at load with no error code; the Territory port train (P27)
discharged the deferral once Territory’s _find_sink_node became its
chartered first consumer — a rule reading a neighbor’s enum-declared
field has no :field binding to reach it through, exactly the gap
D102 named. Discharging the read path narrows nothing else: a
field-of-sourced Enum<T> value is still refused as a
select-max/select-min score (D46, E-TYPE-016, §2.7) and still
refused in every arithmetic lane (§2.13’s no-arithmetic law, D101/D118)
— those two refusals were always independent mechanisms, never D102’s
own job, so nothing about them changed. See D102 below for the full
history and the reference implementation.
Declaration sharing via a prelude (D157, Train B item 4, issue #591).
Every declaration this section describes — defenum, defvocabulary,
defconst, deffield — is otherwise scenario-scoped: §3.9’s own
one-(scenario …)-form-per-source rule means a second scenario wanting
the same defenum type has always had to re-declare it verbatim,
byte-for-byte, or refuse to load at all. A declaration prelude is the
escape from that: a source string holding ONLY these four top-forms — no
(scenario …) wrapper, and never node / edge / edge-attr (a
prelude declares, it never seeds a graph). The Rust engine seam,
babylon_bsl::scenario::load_scenario_with_prelude(prelude_src,
scenario_src, graph), reads the prelude first and threads its
registries — the EnumRegistry, the defvocabulary/vocabulary trio,
consts, fields — into the scenario load that follows, so a field
declared enum <Type> or a node/edge enum-ref resolves a
prelude-declared type exactly as if the scenario itself had declared it.
This does not relax the closed-declaration discipline the rest of this
section states, and the relaxation it DOES grant is scoped to
defenum alone — a scenario re-declaring a defenum type its
prelude already declared must match EXACTLY (same name, same members, same
order) to be recognized as the same fact rather than a conflict —
EnumRegistry::declare’s identical-recognition arm returns the
prelude’s own EnumTypeId; a re-declaration that reorders, renames,
adds, or drops a member still refuses with E-LOAD-001’s
DuplicateType, exactly as two colliding defenum forms inside one
file always have. The other three prelude-eligible forms gained NO such
arm: deffield, defconst, and defvocabulary each still refuse
ANY second declaration of the same name unconditionally, whether or not it
is identical to the first — a scenario re-declaring a prelude-supplied
deffield/defconst/defvocabulary, even byte-for-byte verbatim,
still refuses. Content sharing one of those three via a prelude must NOT
re-declare it in the consuming scenario. Nothing about the two-registry law
above, the write/read law, or the no-aggregation-kind rule changes when a
defenum type arrives via a prelude rather than a bare declaration — a
prelude only changes WHERE a declaration’s text lives, never what
declaring it means.
3. Static semantics
Every check in this chapter runs at content load, before any tick executes. All of them are loud (Constitution III.11): there is no warning level, no degraded mode, and no rule that loads “partially”.
3.1 Types
Type name |
Domain |
Notes |
|---|---|---|
|
|
Counts, ticks, thresholds. Overflow is loud (§4.3). |
|
|
The result type of every |
|
|
Fixed point. See §3.2. |
|
|
Kernel scalar. |
|
|
Kernel scalar. |
|
|
Kernel scalar. |
|
one member of a content-declared closed |
§2.13 addendum (Director ruling 2026-08-11, Organization-as-
game-object spec §1 Q12 — approved twice, live popup and written
spec): the declared-order ordinal of the member, stored in the
existing binary64 attribute lane (§5.2’s |
|
|
Train B item 6 (#591) — the eighth declarable row, D155: the
honest declared home for what the store already does — a verbatim
finite |
|
|
The unbounded intermediate type (§3.3) — the typechecker
classification of every binary64 expression. The STORABLE spelling
is the lowercase |
|
|
§1.5 addendum (Director ruling 2026-08-11, #492/ADR194): a
declared-domain positive scale factor. Not storable. Its one legal
operation is |
|
members of closed enum |
Comparable with |
|
one graph element |
Produced by |
|
the result of a |
Only consumable by |
|
UTF-8, NFC |
Only |
There are no type variables, no subtyping, no coercions, and no user-defined types. Every expression has exactly one static type, computed bottom-up.
[Director ruling 2026-08-11, ADR191 R4; the seventh row minted the same
day by a separate, later ruling — see below] A <type-name> is a
lowercase symbol, and the seven rows above that name one are its whole
vocabulary. The first seven rows — int, bool, currency,
probability, intensity, coefficient, and enum — are the
types a deffield or a metric may write after :type; the first
six are spelled here exactly as §1.4 lexes them, which the capitalized
spellings this table used to carry were not — no capitalized run matches
any §1.4 atom class, so that spelling was unlexable as written. That
six-row closure was recorded as D94, and its own text sealed the table by
name: no <type-name> position can name a seventh kind. The seventh
row, ``enum``, was minted afterward by the Director’s own ruling (the
Organization-as-game-object spec, §1 Q12, 2026-08-11 — approved twice,
once live in the brainstorming session and once again reviewing the
written spec, “sealed twice this month” being the question put to her
directly) — a knowing supersession of D94’s closure, not a silent
reopening. §2.13 is the row’s declaration form and full law; D101 in the
register below records the supersession explicitly, by name, so a reader
of D94 alone is never left believing the table is still six rows.
Enum<T> (the next row) is unaffected: it remains the typechecker
classification of an <enum-ref> expression’s static type, while
enum is what a deffield declares to make a field HOLD one member —
two different jobs that happen to share a root word, not one construct
under two names. The remaining rows — Real, Enum<T>, the three
reference kinds, the three set kinds and Str — are typechecker types
that no <type-name> position can name: Real is the unbounded
intermediate and is not storable (§3.3), the reference and set kinds are
produced by expressions and never declared, and Str appears only at
:material-basis and in vector ids. They keep their capitalized names
because those names are this document’s, not tokens; nothing lexes them,
so nothing needed re-spelling. D94 itself is left unedited (Immutability
of History: it captured what was true through that review), and this
paragraph is the current-law correction sitting beside it.
[Train B item 6, #591 — the eighth row, D155] The eighth declarable
row, real, was minted by Train B item 6 — a knowing supersession of
D98’s “Real is not storable”, the same posture D101 took toward D94.
real (lowercase, §1.4-lexable, D94’s own spelling law) is what a
deffield or a metric writes after :type to declare a field in
the finite binary64 lane with NO declared-domain range law; Real
(capitalized) remains the typechecker classification of every binary64
expression — the enum/Enum<T> two-jobs-one-root pattern exactly.
The “remaining rows” sentence above is left unedited as history; the
current law is: the reference and set kinds, Enum<T>, Str and
Ratio are the typechecker types no <type-name> position can name,
and Real is no longer among them. D155 in the register below records
the supersession explicitly, by name.
Ratio (added by the §1.5/§3.2 addendum below, #492/ADR194 — recorded as
D99, not a re-opening of D94) holds the non-storable-literal category
alone after D155: it is produced by a literal and consumed by one
operator, never declared as a field’s or a metric’s type.
3.2 Currency operator and rounding table
Copied verbatim from the design document §6.1, which is the authority:
Currency is i128 micro-units with
checked_*arithmetic everywhere; overflow is a loud III.11 failure — never wrapping, never saturating. […] Operator semantics are pinned, never implicit:Currency ± Currency → Currency(checked);Currency × Coefficient → Currency, rounded half-even to micro-units;Currency ÷ Currency → Coefficient, computed at i256 intermediate width then rounded half-even;Currency ÷ integer → Currency, half-even. Truncation is never implicit; intermediate widths and rounding points live in the III.12(a) reference with conformance vectors.
Those are the only legal operations mixing Currency with anything
else — plus the one addendum below (Director ruling 2026-08-11,
#492/ADR194): Currency × Ratio. Every other mixed-lane expression is
E-TYPE-030. In particular Currency + Real, Currency × Currency,
and Currency × Int are type errors; multiply by a Coefficient or a
declared-domain Ratio, or divide by an Int, instead. An UNDECLARED
coefficient greater than 1 in Currency-multiply position — a bare
Real (a computed value, or a p/i/c binding) outside
[0,1] — stays exactly E-TYPE-030: the fifth operation is legal only
for the Ratio type specifically, never for an out-of-range Real.
Filling in the three points the verbatim table leaves to this document:
Currency ± Currencyis checked on both ends: a result below0isE-EVAL-010(the domain is[0, ∞), matching thege=0constraint the PythonCurrencytype carries today), and a result exceedingi128range isE-EVAL-011.Currency ÷ Currencywith a zero divisor isE-EVAL-012; theCoefficientresult must land in[0,1]or it isE-EVAL-013.Currency ÷ integerwith a zero or negative divisor isE-EVAL-012.
Half-even, defined. Given an exact rational result r and a target
granularity g (10^-6 for micro-units), the stored value is the multiple
of g nearest r; when r is exactly midway between two multiples, the
one whose micro-unit integer is even is chosen. Implementations must
compute this from exact integer arithmetic at the stated intermediate width
(i256 for Currency ÷ Currency) — never by converting to binary64
and rounding there. The same algorithm is what the round-half-even
intrinsic exposes to rules.
Addendum — the declared-domain scale operation (Director ruling
2026-08-11, #492/ADR194). Currency × Ratio → Currency, rounded
half-even to micro-units — the identical algorithm and rounding law as
Currency × Coefficient above, over Ratio’s (0, ∞) domain (§1.5)
instead of Coefficient’s [0,1]. Commutative in source position, like
Currency × Coefficient: both (* currency ratio) and
(* ratio currency) are legal. This is the ONE new operation the ruling
selected — “scalar multiplication isn’t new mathematics” — added to the
verbatim table above rather than inside it, so the design document’s own
text stays an exact quotation.
Why this closes director-gate #492. Territory’s eviction pipeline
(rent_spike_multiplier, declared domain (0, ∞)), Metabolism’s
entropy_factor ((1.0, 3.0]) and Lifecycle’s pareto_alpha
((0, 10]), early_mortality_modifier and
carceral_transition_modifier ([0, 10], of which this addendum’s
Ratio lane carries the open interior (0, 10] — the zero endpoint’s
disposition follows separately, §1.5) are runtime-moddable coefficients whose
declared domain exceeds [0,1] — §1.5’s p/i/c cap and §3.2’s
original table gave them no legal way to multiply Currency or even to
be written as a literal at all (content/rules/lifecycle.bsl’s header,
recorded while porting Lifecycle: “there is no legal defconst for a
value like 1.5… that is not itself a dollar amount”). Ratio closes
the literal gap (§1.5); this addendum closes the operator gap. Porting
these five rules to BSL is explicitly OUT of scope for the change that adds
this addendum — it lands the machinery only, in its own right-sized,
reviewable unit; each consumer ports in its own train.
Domain rule and error codes. Ratio’s own domain is (0, ∞) — a
literal outside it is E-LEX-027 (§1.5), loud at lex time, exactly as
p/i/c’s [0,1] cap is E-LEX-024. A consumer needing a
TIGHTER domain narrows it via the Rust reference’s defconst
:floor/:cap extension — Rust/.bscn-dialect machinery, not an rst
production (§1.5’s addendum explains the D93 boundary this respects).
:cap narrows the UPPER end INCLUSIVE (pareto_alpha’s (0, 10]:
:cap 10r); :floor narrows the LOWER end EXCLUSIVE
(entropy_factor’s (1.0, 3.0]: :floor 1r, load-bearing — the
floor IS the thermodynamic point, not decoration). Each declared bound is
checked twice, per III.11’s loud-failure standard applied at both
checkpoints rather than trusted once: at the defconst’s own declaration
(E-LOAD-052 — the declared literal itself must not violate the domain it
declares, including floor < cap self-consistency when both are present)
and again at every Currency × Ratio evaluation that consumes it
(E-EVAL-041 — the operation re-checks rather than trusting a value
handed to it, the same defense-in-depth the store boundary already
practices at E-EVAL-020). Through defconst — the only producer of a
bounded Ratio this revision wires — the two checks can never disagree
(the value is fixed between load and use), so E-EVAL-041’s live case
today is a value reaching the operator through any OTHER path a future
revision adds; the check exists now so that path inherits it rather than
needing to invent it. Reference implementation: reader::classify_ratio
(E-LEX-027), scenario::load_defconst/load_ratio_defconst
(:floor/:cap, E-LOAD-052), evaluator::Value::Ratio/
currency_mul_ratio (E-EVAL-041), babylon_kernel::Currency::
mul_ratio (the arithmetic, mirroring mul_coefficient) — all in
rust/crates/babylon-bsl/src/ and
rust/crates/babylon-kernel/src/currency.rs. Recorded as D99; see the
Draft-Ruling Register.
3.3 The two numeric lanes
BSL has exactly two numeric lanes and they never mix implicitly:
Fixed point —
Currency,i128micro-units, exact, table of §3.2.Binary64 —
Probability,Intensity,Coefficient,Real, andIntwhen it appears in a binary64 expression.
[draft ruling — Phase 1 review] Bounded-scalar arithmetic promotes to
Real. (+ p q) where both are Probability has type Real, not
Probability: adding two probabilities can leave [0,1], and silently
clamping is exactly the kind of quiet degradation III.11 forbids. The range
check happens once, at the store boundary: an update-node whose
resulting value falls outside the target field’s declared range is
E-EVAL-020 — a loud runtime failure, never a clamp. Comparisons accept
Real on either side. Int promotes to Real in a binary64 expression
but never to Currency.
3.4 The intensivity kind rule
Every deffield declares :kind intensive or :kind extensive. Kind is
a property of the field, not of the scalar type: wealth (Currency) is
extensive, consciousness (Intensity) is intensive, and there is no type at
which that is decidable. Kind propagates through expressions:
a literal is kind-neutral;
a
:fieldbinding and afield-ofaccessor (§2.10) both carry thedeffield’s declared kind, whether the owning type is a node type, anEdgeTypeor aHyperedgeType— the kind rule does not care which, and the implicit<edge-type>/strengthfield isextensive(§2.9); amembership-field-ofaccessor carries its payloaddeffield’s declared kind the same way [draft ruling — Phase 1 review, Amendment AG (i)], so an intensive payload folded with an unweightedmeanisE-TYPE-042like any other intensive field; a:constbinding is kind-neutral [draft ruling — Phase 1 review] (a coefficient has no extent); a:metricbinding and ametric-ofaccessor carry the declared:kindof their §2.11 registration [draft ruling — Phase 1 review, R9 chapter C9], which supersedes the metric half of D12 — the earlier revision made them kind-neutral only because there was nowhere to declare a kind, and §2.11 is that place;+/-require both operands to have the same kind, or one to be kind-neutral; the result carries the non-neutral kind. Mixing intensive with extensive isE-TYPE-040;*: kind-neutral absorbs either way; whichever operand is non-neutral, its kind carries through unchanged. Extensive × intensive is legal too, result extensive — a stock scaled by a fraction or a rate (population × per-capita-rate) is the ordinary case, not an area-of-an-area, since multiplying by a dimensionless factor does not create a new dimension the way multiplying an extensive quantity by itself does. Intensive × intensive is [draft ruling — Phase 1 review, #491 T1, controller adjudication 2026-08-18] now licensed too, result intensive — a rate scaled by a dimensionless coefficient is still a rate (the same “scale by a dimensionless factor” reasoning as extensive × intensive, applied to the other pairing); see the Draft-Ruling Register. Extensive × extensive alone staysE-TYPE-040(an area-of-an-area) — the one case this bullet has always named, and the only same-kind-squared combination still refused;/: kind-neutral absorbs the same way. Extensive ÷ extensive is [draft ruling — Phase 1 review, #491 T1] licensed, result intensive:w̄ = wealth ÷ populationis the textbook definition of an intensive quantity (density = mass ÷ volume), the same unit-algebra standing D90 (§2.12) already took for the symmetric weighted-mean gap — see the Draft-Ruling Register. Intensive ÷ intensive is [controller adjudication, 2026-08-18] now licensed too, result intensive — a ratio of two intensive quantities is a dimensionless share; simplex normalization (dividing a part by a whole built from parts of the same kind) is the canonical intensive operation. An extensive operand paired with an intensive one, in either position, is nowE-TYPE-040— the pre-split bullet named this pair TWICE, contradictorily (“extensive if exactly one operand is extensive” and “intensive if exactly one is intensive” both matched it, and it was assigned neither), so this is a newly-minted prohibition resolving that internal contradiction conservatively, not a continuation of a prior refusal: deliberately conservative, a Phase-1 review item, and division is not commutative, so*’s licensed mixed case does not carry over to it;ifrequires both branches to have the same kind, or one to be kind-neutral (the same absorption rule as+/-/*//) — mismatched non-neutral kinds areE-TYPE-040.
The aggregation law, per fold operator:
Fold op |
Body kind |
Rule |
|---|---|---|
|
extensive or neutral |
Legal. Result extensive. |
|
intensive |
``E-TYPE-041`` — summing an intensive quantity is meaningless. |
|
extensive or neutral |
Legal unweighted. Result carries the body kind. |
|
intensive |
Legal only with an explicit |
|
extensive, intensive or neutral |
Kind-neutral operation. Result carries the body kind. |
|
enum ( |
``E-TYPE-044`` (#551, discharged by the Territory port train,
P27) — |
|
any, including enum |
Result |
This is the narrow, true form of the law: it rejects the unweighted mean of an intensive field across classes or space (the recorded variance error), and it does not reject correct weighted code.
[draft ruling — Phase 1 review, AG verification repair] The weighted
intensive mean has a result kind, and it is intensive. The row above
stated legality and stopped, while the other four rows all state a result —
which left the kind of (fold mean … :weight …) over an intensive body
undetermined, and undetermined only until such a fold appears in a
kind-checked position, as §2.12’s two-hop shape does. Two implementations
free to read the blank differently would disagree on whether that program
loads, which is a III.12(a) failure rather than a style question. The value is
Σ(w × x) / Σ(w), which is in the units of x: a weight-normalised mean
of an intensity is an intensity. Stating it is unit algebra, not new
mathematics, and it is stated here because deriving it through the
*// bullet is deliberately unavailable — that bullet rejects
extensive ÷ extensive as E-TYPE-040, which is why the fold operators carry
their result kinds in this table instead of leaving them to decomposition.
Exemptions. A field may carry an exemption row in the declared
EXTENSIVE_INTENSIVE_EXEMPTIONS ledger with a mandatory reason string.
Adding a row takes the same sign-off as adding a sentinel exemption. An
exemption suppresses E-TYPE-041/042/043 for the named field
only and is itself content, inside rules_hash.
3.5 Binding resolution
At load, for every rule and every declared binding:
The source must resolve — the field/const/metric must exist in the closed vocabulary (
E-LOAD-010/E-LOAD-011/E-LOAD-030).A binding that is not
:optionaland whose source can be absent for any node the rule can be evaluated against is a load error (E-LOAD-010).[draft ruling — Phase 1 review]
:optionalrequires:default. A bare:optionalisE-PARSE-031. The design document pairs the two in its single example; requiring the pair removes the need for a dominance analysis overbound?guards, keeps every expression total, and means no rule ever observes absence — it observes a declared default. There is consequently nobound?predicate in the language.Every
:defaultdeclaration must appear in the migration corpus’s allowlist (the trap DSL’s pinned absent-reads-as-0 sites). A:defaultoutside the allowlist is a lint failure requiring Director sign-off — not a load error, because the allowlist is program state, not language state.
3.6 Closed vocabulary
Enum types, node types, edge types, hyperedge types, event types, field names, metric names and intrinsic names are all closed: a name that is not in the registry is a load error, never a fallback. Adding a member is amendment territory, not modding territory (design §5, modding boundary). Modders author rules and coefficients over the closed vocabulary; fuel + the closed intrinsic set + no I/O is a sandbox with no escape to express.
[draft ruling — Phase 1 review, R9 chapter C3] Graph-scope state is
ordinary node state on a declared carrier node type. Twenty-two of the
thirty-four frozen systems read or write state that belongs to the graph rather
than to any node — the opposition registry, the market-scissors axis, the
electoral registers, the national wealth vector, the imperial-rent pool, the
phase latches — through graph.graph[...], set_graph_attr or
context.persistent_data (R9 gap analysis §2, Q6: the single most pervasive
gap in the estate). None of it had a BSL home: <bind-src> closes at
:field/:const/:metric/:tick, :metric is read-only by
construction, and no §2.8 verb writes anything but a node, an edge, a hyperedge
or an event.
The ruling adds no new grammar and no new storage class. A value of
graph scope is declared as an ordinary deffield owned by a carrier node
type — a NodeType member whose manifest :ceiling is 1 — read with
(field-of (the NodeType/…) …) and written with (update-node (the
NodeType/…) … ). Everything the rest of this document says about node state
then applies unchanged: the value is hashed as node state, iterated in the
order of §2.6, bounded by the same ceilings, visible to the inspector and to
the write log, and subject to §3.4’s kind rule. Adding a carrier NodeType
member costs exactly one closed-vocabulary member and is therefore amendment
territory under this section — which is the right weight for a decision this
load-bearing, and is the ruling’s price rather than a side effect of it.
The rejected route, recorded so it is not re-proposed. The alternative was a
:global bind-src plus an update-global verb. It was rejected because it
invents a second storage class whose determinism, iteration, hashing, kind and
inspection obligations would every one of them have to be restated — a
document’s worth of duplicated law to avoid one enum member — and because
state that is not node state is invisible to the two mechanisms the engine
already built for exactly this scrutiny (the derivation inspector’s write log,
and the ceiling-bounded content hash). A closed verb set is a property worth
more than the convenience of writing update-global.
What the ruling does not do. It does not make every register a singleton:
per-sovereign and per-county registers are ordinary nodes of ordinary types,
reached by ordinary queries. the and the carrier discipline are for the
values that are genuinely one-per-graph. And it does not introduce a staging
or double-buffering construct — see §4.7.
3.7 The load-time fuel bound check
The bound is computed against declared cardinality ceilings, not the runtime
graph. Each scenario manifest declares per-NodeType, per-EdgeType and
per-HyperedgeType :ceiling values, themselves inside the content hash.
[draft ruling — Phase 1 review] The member-count axis (Amendment D). A
hyperedge type has two independent cardinalities, so its manifest row
declares two numbers: how many hyperedges of that type may exist
(:ceiling) and how many members any one of them may carry
(:max-members, §2.9). Without the second number a fold over members-of
would have no static bound at all. This is the ceiling revision the ruling
forces: under the dyadic working assumption an n-member formation was going to
be some number of edges, and one edge-type ceiling covered it; under a native
hyperedge the honest cost is Σ|members|, and :max-members is what makes
that quantity declarable at load rather than discovered at hydration.
Define cost(n) over the AST:
cost(literal) = 0
cost(variable-ref) = 1
cost(arith | cmp | bool) = 1 + Σ cost(children)
cost(intrinsic call) = 5 + declared_cost(callee) + Σ cost(args)
cost(fold) = 2 + cost(query)
+ ceiling(query) × (cost(body) + cost(weight))
The first five base numbers — literal 0, variable-ref 1, arithmetic/comparison/boolean 1, intrinsic call 5 + callee, fold 2 + ceiling × body — are copied from the design document’s Phase-0 cost model and are pinned by conformance vector; revising them is a vector re-bless (§6). The remaining rows are this document’s completion of that model and are [draft ruling — Phase 1 review]:
cost(if) = 1 + cost(cond) + max(cost(then), cost(else))
cost(exists | forall) = 2 + cost(query) + ceiling(query) × cost(body)
cost(query) = 1 + cost(element predicate, if any)
cost(update-op) = 1 + cost(operand) ; add|sub|set|scale
cost(structural verb) = 3 + Σ cost(operands)
cost(members list) = Σ cost(members) ; grouping, no base cost
cost(guard) = 1 + cost(cond) + Σ cost(effect-items)
cost(field path | enum-ref) = 0 ; static, like a literal
cost(field-of) = 1 + cost(element expr) ; §2.10, R9 C1
cost(edge-between) = 1 + Σ cost(operands) ; §2.10, R9 C2
cost(the) = 1 ; §2.10, R9 C3
cost(metric-of) = 1 + cost(element expr) ; §2.10, R9 C9
; provider work is
; not rule-metered
cost(membership-field-of) ; §2.10, AG (i)
= 1 + Σ cost(element exprs)
cost(member item) = Σ cost(children) ; §2.8, AG (i)
; grouping, no base cost
cost(domain) = 0 ; §2.3, R9 C4
cost(select-max | select-min) ; §2.7, R9 C5
= 2 + cost(query)
+ ceiling(query) × cost(score)
cost(for-each) ; §2.8, R9 C6
= 2 + cost(query)
+ ceiling(query) × Σ cost(effect-items)
cost(:expr binding) = cost(expr) ; §2.5, R9 C7
cost(:as name) = 0 ; §2.6, R9 C8
; a reference costs 1
bound(rule) = Σ cost(:expr bindings)
+ cost(cond of <when>)
+ Σ cost(effect-items)
[draft ruling — Phase 1 review, R9 chapters C1–C2] Accessors are keyed
lookups, not iterations. Every §2.10 accessor charges a variable-reference
base of 1 plus its operands and is never multiplied by a ceiling, because
none of them ranges over a set: field-of reads one element’s one field, and
edge-between resolves one (source, target, type) key. The static bound
of a rule using them is therefore the same shape as before — the accessors add
constants, and only the iteration constructs (fold, exists/forall,
and the chapter-C5/C6 forms) carry ceiling factors. That is what keeps the
Power-of-10 Rule 2 claim static as the accessor set grows.
[draft ruling — Phase 1 review, Amendment AG (i)] Attributed membership
adds a lookup, not an axis. membership-field-of is a keyed lookup like
the rest and is charged as one; update-membership charges under the
cost(structural verb) row above, 3 + Σ cost(operands), exactly as the
other three update verbs do, and is given no row of its own because a second
normative statement of one cost is one too many. The ceiling side is
unchanged: :max-members remains the only membership cardinality axis, so
a fold over members-of whose body reads payload is bounded by the same
declared number as one whose body reads nothing, and the three ceiling axes
below stay three.
[draft ruling — Phase 1 review, Amendment AG (ii)] Lattice declarations
are unmetered. A rung or an adjunction (§2.9, §3.9) is manifest-class
content: no rule AST contains one, so bound(rule) never sees one and
neither is charged or given a cost row. The folds and for-eachs that
realise a rung are priced exactly where they already were —
ceiling(neighbors), D52’s lesser of the :via edge type’s and the
result node type’s ceilings — so declaring a lattice adds no ceiling axis, no
cost row and no term to any bound.
[draft ruling — Phase 1 review] Query operand charging (implementation-
discovered, 2026-07-30, Phase 1 Task 13). The cost(query) row names only
the element predicate, but three query heads (neighbors, members-of,
hyperedges-of) also carry an operand expression that §4.5 charges when
it is evaluated; omitting it would make the static bound under-count the
runtime meter — the loud-failure inversion. The bound checker therefore reads
the row as 1 + Σ cost(children): identical for the predicate queries
(enum-refs and direction keywords cost 0), and additionally charging the
operand where one exists.
ceiling(query) is the manifest ceiling of the queried type — which is why
§2.9 makes a queried type carrying no manifest row E-LOAD-045 rather than a
defaulted or skipped bound; for neighbors it is [draft ruling — Phase 1
review, revised by R9 chapter C8] the lesser of the queried edge type’s
ceiling and the annotated result node type’s ceiling — neither bound can be
exceeded, so the smaller is the
honest one, and the annotation C8 makes mandatory is what makes the second
number available. (A per-node degree ceiling would be tighter still and remains
the Phase-1 review item D15 recorded.) For the three hyperedge queries
[draft ruling — Phase 1 review]: hyperedges uses the hyperedge type’s
:ceiling; members-of uses that type’s :max-members; and
hyperedges-of uses the type’s :ceiling — a per-node incidence-degree
ceiling would be tighter there, the exact dual of the neighbors review item
above, and is deferred with it.
The bound therefore composes over three ceiling axes rather than two:
node-type and edge-type cardinality as before, plus per-hyperedge member count
wherever a rule folds over members-of. A fold over members nested inside a
fold over hyperedges costs ceiling(T) × max-members(T) × cost(body),
which is exactly Σ|members| at the declared ceilings — linear in the
incidence count, and never the C(n,2) a clique expansion would have cost.
That is the fuel-side consequence of the ruling: the representation that VIII.9
mandates is also the one whose static bound stays computable at national scale.
bound(rule) > :fuel is E-LOAD-040 — rejected at content load, so
the Power-of-10 Rule 2 claim is a static property rather than a dynamic trap.
An add-hyperedge whose <members> list is longer than the declared
:max-members is E-LOAD-042 — the list’s length is fixed in the source
text, so that check is static, not a runtime one. A hydration that
exceeds a declared ceiling — including a hydrated hyperedge carrying more
members than :max-members — is itself a III.11 load failure
(E-LOAD-041). The runtime meter of §4.5 remains as the backstop.
3.8 Deliberate absences and their re-modellings
Seven things the frozen estate reaches for do not exist in BSL and are not going to. Each is recorded here with the re-modelling that replaces it, so that a future port reads the absence as a decision rather than an oversight and does not re-propose the construct. None of these adds grammar; several delete a question. An eighth item follows them under its own heading: it is not a settled absence, and saying so is the point of recording it here.
1. Absence, and writing it back (R9 gap analysis §2, Q17). There is no null
literal, no unset update-op, and no bound? predicate — D13 removed the
last of those on purpose. But two systems genuinely need to say “this node has
no value on this axis”: one writes None when a node loses an axis, and one
skips permanently when a stock was never seeded.
:optional/:default is not the answer, and reading it as the answer
changes behaviour silently: :default 0.0 converts never seeded into
seeded with zero stock, which is a different eligibility population and a
different game. The landing is a companion presence field: a
deffield-declared Bool alongside each genuinely optional axis, written
by the same effects list that writes the value, under one guard so the pair
moves together or not at all. Absence is then representable, hashable and
inspectable — and “unset the axis” is an ordinary (set #f) on the presence
field rather than a verb the language does not have. The EpistemicHorizon
discipline (all three attributes or none) is already exactly this shape.
2. No sequence or map type (Q13). Three systems keep ordered or list-valued state: a FIFO agenda, an order-significant acquisition list, a set of suppressed field names. A sequence type would drag ordering into CAS, into the kind rule and into the fuel model, and a map type would need a key ordering this document has deliberately confined to graph-element ids. Each case re-models with what §2 already has:
a FIFO agenda becomes its own bounded
NodeTypecarrying aqueued-at-tickfield, and “the next item” becomesselect-minon that field (§2.7);an order-significant acquisition list becomes an edge type carrying
acquired-at-tick, and “the most recent” becomesselect-max;a set of suppressed field names becomes one
Boolfield per suppressible field.
All three land inside the closed vocabulary, inside the content hash, and inside the ceiling-bounded fuel model, which a list type would have left.
3. No same-tick event-history query (Q16). emit is write-only and
§2.6’s query heads do not include an emission log; two systems ask “was a
crisis emitted this tick?”. The re-modelling is better than the feature: the
emitting rule also stamps a field (a …-crisis-tick on a carrier or
subject node), and the consuming rule reads it as an ordinary :field. That
makes the cross-system dependency visible in content, hashable, and
inspectable — three properties an event-log query would not have, since a query
over emissions would make the dependency invisible in every artifact except a
runtime trace. It also means a crisis-gated system must be ported together
with its producer, or the consuming rule reads a field nothing writes.
4. No string payloads on emit (R9 gap analysis §3, B3). Str has no
operations (§3.1) and <expr> has no string literal — one in a payload is
E-PARSE-010, an atom rejected by position (§1.6) — so every
<payload-item> expression is a number, a bool or an enum-ref. Transcribed
systems carrying predicate or description strings, or a field name as a
string, convert them to enum-refs or drop them — the rule id already
identifies the rule, and an event whose payload restates its own provenance
in prose is carrying a log line, not state.
5. No ledger or receipt binding (B6). §2.8 prohibits I/O outright, and three surveys independently reached for a “ledger-write binding” anyway. There is nothing to add to BSL: a receipt is a kernel observation of an effect that already happened. The rule emits or writes; the kernel records. Making the rule write the receipt would put the same fact in the content hash twice and give a content author a way to record an effect that did not occur.
ADR224 makes that observation executable. After each successful rule, the
kernel reduces the actual collection-boundary events followed by the actual
apply-boundary writes into one continuous AuditReceipt sequence. Each row
carries the rule id, RuleRole, EvidenceClass, a u32 ordinal, and a
canonical identity-free effect signature. It carries no graph-element id and no
written value. The receipts publish only when the detached whole tick succeeds;
a later failure publishes none. This is Gate 2 in-memory audit evidence, not
Gate 3’s durable envelope, dirty-subject receipt, or Archive outbox.
6. No cascade semantics in the verb table (B7). What remove-node does
to incident edges and memberships is an engine-level observable, specified
outside this document (ADR185 R2: incident edges removed, memberships dropped,
one write-log record per cascaded item). §2.8’s verb table deliberately does
not restate it, because two normative statements of one behaviour is one too
many.
7. No bounded numeric iteration (Q15). One system runs a five-iteration
clamp-then-renormalise with an early-exit convergence check. A loop construct —
even a bounded one — would break the syntactic totality argument §2.7 rests
on, which is the property that makes the Power-of-10 Rule 2 claim static rather
than analysed. With :expr (§2.5) the five iterations unroll into five named
bindings, which is verbose and honest; failing that it is a legitimate Rust
domain-crate binding. Declaring a bespoke renormalize intrinsic would be
the worst of the three: it hides a mechanism inside the kernel, where neither
the content diff nor the inspector can see it, for a single call site.
8. No edge-endpoint accessors — an open item, not a settled absence
(R9 gap analysis §2, Q2; recorded on verification, 2026-08-10). No form yields
an EdgeRef’s source or target node. Twelve systems reach for one, the R9
chapter plan (report §7) assigned Q2 to no chapter, and it is written down here
because the alternative is that it reads as an oversight — which, unlike the
seven above, is closer to the truth: this is the one item of the gap analysis
this revision neither closes nor deliberately refuses.
What is expressible today reaches only the case where one endpoint is already
in hand. A rule holding self walks to its counterparties and resolves each
edge by key:
(fold sum (neighbors self EdgeType/SOLIDARITY :in NodeType/SOCIAL_CLASS)
(field-of (edge-between EdgeType/SOLIDARITY it self)
solidarity/strength))
That is correct and priced — §3.7 charges the extra keyed lookup per
neighbour — and it does not reach the general case: an EdgeRef taken
from a fold or a for-each over edges has both endpoints unknown,
which is what most of the twelve call sites need. Two landings are available,
and choosing between them is a chapter rather than a sentence: a
source-of/target-of pair in §2.10 — reads of the triple §2.6 already
treats as the edge’s key, minting no new kind of object — or leaving those
systems on the self-anchored idiom and accepting that edge-iterating rules
cannot name their endpoints. Until it is chosen, a system that iterates edges
it did not start from is not authorable in BSL, and that is a port blocker
(D78) — the standing D66’s had until Amendment AG discharged it, and now the
only one this document carries. Amendment AG does not reach this item, and
nothing in the sections it adds should be read as ruling it.
3.9 Invariant substrate, hydrated data, and the scale lattice
Five systems aggregate up a scale lattice — county to commuting zone to state to nation, hex link to county pair to national, per-county sums then a reverse join — and one asks whether the language needs a grouping operator. It does not, and this section says why, what it needs instead, and where the boundary of this document’s authority to say so lies.
No group-by, and no keyed collection. A fold that grouped elements
by a runtime attribute value would have to return a map, which §3.1
deliberately lacks and §3.8 declines to add: a map drags a key ordering into
CAS, into the kind rule and into the fuel model. Everything the lattice needs
is instead expressible as graph content, because a scale level is a thing
in the world and membership in it is a relation:
(fold sum (neighbors self EdgeType/IN_SCALE :in NodeType/TERRITORY)
(field-of it territory/wage-bill))
Aggregation up one rung is then an ordinary one-hop fold, and distribution down
one rung is an ordinary for-each over the same query. This costs
closed-vocabulary members and a hydration contract; it costs no grammar.
Note
The boundary of this section, as Amendment AG (ii) redrew it. Declaring
a scale-lattice rung, and declaring allocate/aggregate
instances of the existing adjunction schema, are content acts — the
forms are §2.9’s and their validation is below. What stays closed under
Amendment AE (ii) is everything that would change the schema rather than
instantiate it: minting a new adjunction kind, altering the
conservation obligation between rungs, and any new level-lattice
algebra. A content set reaching for one of those is proposing
mathematics, not writing a scenario, and it costs an amendment as it always
did.
[draft ruling — Phase 1 review, R9 chapter C11] Invariant substrate is
declared, and structural verbs cannot touch it. The spatial substrate is
immutable (Constitution: political claims are overlays), and the Director’s
2026-07-30 spatial-adjacency ruling puts the invariant relations in static
lookup tables rather than per-tick state. A manifest ceiling row may
therefore carry the flag :invariant:
<ceiling> ::= "(" "ceiling" <enum-ref> ":ceiling" <int-lit>
( ":max-members" <int-lit> )? ":invariant"? ")"
:invariant is legal on a NodeType or EdgeType row and illegal on a
HyperedgeType row (E-LOAD-042, with the :max-members mismatches it
already covers). Its meaning is narrow and static: an add-node,
remove-node, add-edge or remove-edge naming an invariant type
is E-LOAD-013, checked at load off the verb’s <enum-ref> operand.
Field writes are unaffected — a territory’s stock changes every tick while the
territory’s existence and its rung in the lattice do not, and it is exactly
that distinction the flag encodes. The check is worth having in the language
rather than in a sentinel because it is decidable from the content set alone
and because “a rule rewired the substrate” is the failure it prevents.
[draft ruling — Phase 1 review, R9 chapter C11] The hydration contract,
and why there is no :reference bind-src. Five systems read external
keyed reference data — roughly fourteen (fips, year)-keyed series, a
tensor registry, a county crosswalk — through host calls, and a naive port
would invent a bind-src to match. It must not. ADR174 already draws the
boundary: data sources are Python-glue concerns, and values enter as declared
BSL bindings. The consistent landing is that the data-build pipeline
materialises keyed series as declared node fields at hydration, so a rule
reads them with an ordinary :field. That keeps §2.8’s no-I/O prohibition
intact, keeps the values inside the content hash rather than beside it, and
needs no language change at all.
What hydration may do, stated once because three chapters now depend on it:
It creates elements of declared types and writes declared fields, and nothing else. An undeclared field or type at hydration is the same
E-LOAD-0xxclass as it would be in content — hydration is not a back door into the closed vocabulary (§3.6).It is bounded by the declared ceilings, including
:max-members; an over-ceiling hydration isE-LOAD-041(§3.7), unchanged.It is the only writer of
:invariantstructure, which is what makes theE-LOAD-013check above meaningful rather than merely restrictive.A field a rule declares a plain
:fieldbinding against must be seeded by hydration or the rule does not load (E-LOAD-010, §3.5). This is the clause that makes “the reference-series hydration contract” a blocking dependency for the systems that read those series, rather than a source of zeros at tick 1.[draft ruling — Phase 1 review, R9 verification repair] It may not seed two dyadic edges sharing one
(source-id, target-id, edge-type)triple; a scenario that does isE-LOAD-044. §2.8 already refuses the duplicate at the verb (E-EVAL-031), and hydration is the only other way an edge enters the graph, so this is the clause that makes the triple a key rather than a sort field. Without it §2.6’s edge iteration order is not a total order — a duplicated triple has no defined position relative to its twin — and §2.10’sedge-betweenhas no rule for resolving two, having one only for none (E-EVAL-034). Node ids and hyperedge ids need no such clause: they are identities, and seeding one twice is not expressible.[draft ruling — Phase 1 review, Amendment AG (i)] A hydrated membership carries its complete declared payload. A scenario seeding a hyperedge whose members’ types declare payload fields (§2.9) writes every one of them for every member, and an omission is
E-LOAD-047— the same code and the same obligationadd-hyperedgecarries at mint (§2.8). Hydration and the verb are the only two ways a membership enters the graph, so a partly attributed membership has to be unrepresentable from both or from neither; this clause is the second half of that, and it is what lets §2.10 say that an existing membership never reads absent.[draft ruling — Train B item 3, issue #591 — D156] It seeds an edge attribute only through the scenario dialect’s
(edge-attr <EdgeType/MEMBER> <from-name> <to-name> <field-qname> <value>)form, and only under four conditions, each a loud refusal: both endpoints and the(source, target, edge-type)triple itself were seeded ABOVE the form (the top-to-bottom law — an attribute write never mints an edge, exactly asupdate_edgenever mints an attribute row for one); the qname’s owner segment names the edge’s own type (§2.10 discipline 1, checked at hydration exactly ascheck_edge_referent_typechecks it at evaluation); the qname does not end in/strength(D32’s implicit field seeds via theedgeform’s own 4th slot only — one datum, one writer; the guard is unconditional becauseload_deffieldaccepts an explicit(deffield <edge-type>/strength …)that onlyprepare_rules’sE-LOAD-001refuses later, and without the guard the write would fall into the substrate’s/strengthfork (D143) and silently rewrite the mint strength slot); and the field was declared bydeffield, the value converting through the same per-type literal law a node attribute does (Currencyrefused identically). A scenario seeding one(edge-type, source, target, field)quadruple twice isE-LOAD-057— clause 5’s key argument one axis wider: the file would carry two values for one datum with only the later surviving.
[draft ruling — Phase 1 review, Amendment AG (ii)] Rungs and adjunction
instances are manifest children, not a top-level form of their own. Two
reasons, the first D79’s verbatim: §5.5 hashes deffield, intrinsic,
manifest and metric into sibling digests that ContentDigest
combines, and ContentDigest’s composition is
Determinism Contract’s — a new top-form would owe a new
sibling digest and an edit to a document this one does not reach into. The
second is locality, and it is worth stating exactly because the two standing
rulings do not check against the same thing. The substrate ruling is checked
against :invariant ceiling rows — children of the very form a rung
joins — so putting the rung among them keeps that check inside one object. The
weighting ruling is checked against deffield kinds, so it spans the
manifest and field digests exactly as any content-wide check does; what the
manifest landing buys there is not one digest but no new one, which is
reason 1 again. Both checks read declared content only, which is the
property that matters for III.12(a).
; illustrative; the delineation counts are a scenario's, not this document's
(manifest usa-2026
(ceiling NodeType/TERRITORY :ceiling 3143 :invariant)
(ceiling NodeType/COMMUTING_ZONE :ceiling 741 :invariant)
(ceiling EdgeType/IN_SCALE :ceiling 3143 :invariant)
(rung county-cz NodeType/TERRITORY NodeType/COMMUTING_ZONE
:via EdgeType/IN_SCALE :substrate)
(adjunction wage-bill
territory/wage-bill commuting-zone/wage-bill
:rung county-cz)
(adjunction unemployment
territory/unemployment-rate commuting-zone/unemployment-rate
:rung county-cz :weighted-by territory/labor-force))
What each form declares.
A
rungnames one step of a lattice. Its two positional<enum-ref>s areNodeTypemembers, finer first and coarser second, and:viais theEdgeTypemember carrying the relation, directed finer → coarser (a county’s edge points at its commuting zone). That one convention serves both forms and both directions of travel, so theneighborsreads at the top of this section are unambiguous without a second annotation: aggregation from the coarser element is(neighbors self <via> :in <finer>), and distribution is the same query underfor-each.An
adjunctionnames one instance of theallocate⊣aggregateschema along a declared rung. Its two positional<qname>s are the fields at the rung’s finer and coarser ends in the rung’s own order,:rungcites the rung by name, and:weighted-bynames the extensive field the intensive case is weighted by.Names are content-set-unique (
E-LOAD-001, §2.2), and every type a rung names owes a manifestceilingrow like any other type the content set uses (E-LOAD-045). An<enum-ref>of the wrong kind at any of the three positions isE-TYPE-011under §2.6’s class rule.
[draft ruling — Phase 1 review, Amendment AG (ii)] The first binding
ruling: a substrate rung resolves through the static lookup estate. The
Director’s 2026-07-30 spatial-adjacency ruling puts the invariant relations in
static per-resolution lookup tables and never in per-tick state, and Amendment
AG (ii) binds it to every declared rung. :substrate is how a rung says it
is one of those, and the flag obliges all three of its types — finer, coarser
and :via — to carry :invariant manifest rows. A :substrate rung any
of whose three types does not is E-LOAD-049.
With the flag in place the ruling is the language’s, by composition and not
by promise: :invariant makes add-node/remove-node/add-edge/
remove-edge naming those types E-LOAD-013 (D63), and clause 3 of the
hydration contract above makes hydration their only writer. A substrate
rung is therefore built once, from the lookup estate the data-build pipeline
materialises, and no rule can rewire it mid-run. The flag is declared rather
than inferred from the three :invariant rows for the same reason
:invariant is itself declared: an inferred classification would silently
reclassify a rung the day someone marked its edge type invariant for an
unrelated reason. A rung without the flag is perfectly legal — the social
lattice’s rungs are not substrate — and carries no invariance obligation.
[draft ruling — Phase 1 review, Amendment AG (ii)] The second binding
ruling: an intensive adjunction is weighted or it does not load. An
adjunction whose two fields are declared :kind intensive and which
carries no :weighted-by is E-LOAD-050 — the load error the amendment
names in so many words, and the recorded variance error (an unweighted mean of
an intensive quantity across classes or space) caught one level earlier than
§3.4 catches it. The weight field must be :kind extensive
(E-TYPE-043, the code §3.4 already uses for a non-extensive weight).
The two checks are not redundant. §3.4’s E-TYPE-042 catches the fold
that implements an aggregation; E-LOAD-050 catches the lattice that
specifies one, which exists before any rule is written and outlives any
particular transcription of it. A scenario that declares an unweighted
intensive rung has made the error whether or not a rule pack has yet realised
it, and the amendment puts the obligation on the declaration.
Fit to the schema, in one code. E-LOAD-051 is “this instance does not
fit the schema at its declared rung”: a :rung naming no declared rung; a
positional <qname> whose owning type is not the rung’s node type at that
end; the two fields disagreeing in :kind; a :weighted-by on an
extensive pair (there is nothing to weight) or one whose field is not owned by
the rung’s finer type. One code because they are one fact — the declaration
and the rung do not agree — and minting five synonyms is the hygiene defect
D75 ruled against.
The conservation obligation is inherited, and there is nowhere to restate
it. The grammar gives an adjunction no clause, no keyword and no
expression in which to state a conservation law: an instance names its rung
and its fields and stops. That is how “instances, not kinds” is enforced by
construction rather than by review — the only conservation obligation
available to a declared pair is the schema’s, and altering it stays AE (ii)
territory exactly as the note above says.
What a declaration does not do. It declares; it does not execute. There is
no new verb, no evaluator behaviour and no runtime object: aggregation up a
rung is still the ordinary one-hop fold at the top of this section and
distribution down it still an ordinary for-each, and this document does
not — cannot — decide which fold in a rule pack is a declared adjunction.
What the declarations buy is that the lattice becomes checkable at load, that
the two standing rulings become load errors instead of review notes, and that
a reviewer has a named obligation to read a rule pack against.
Determinism. Rungs and adjunctions are validated, and their failures
reported, in ascending declared-name byte order — the key §4.2 already
uses for rule ids — so two conforming implementations reject a malformed
lattice with the same first error. Nothing about them is evaluated during a
tick, so none of it reaches a tick hash; the manifest bytes that carry them
reach ContentDigest exactly as the ceiling rows do (§5.5).
3.10 The intrinsic cap and the rider slate
§2.7 fixes the calling convention for intrinsics and says their contents are Phase-2 work. This section fixes what that leaves dangerous: how many intrinsics there may be, which authority says so, and why passing that test is not the same as being allowed.
The cap, and its authority chain, recorded exactly. The Program 28
roadmap’s R10 row holds the intrinsic set at {exp, log} at most, citing
ADR176 r21. r21’s own text pins a mechanism — transcendentals cross via a
pinned soft-float libm crate with golden vectors per intrinsic — and does not
enumerate a membership; the {exp, log} enumeration is the roadmap’s
rendering of it. R10 is operative for R9 and R10 purposes and this document
is written to it. The discrepancy is recorded rather than resolved, because
resolving it is the Director’s.
Concretely, as of this revision, nine names are declarable.
R10 caps the transcendental pair exp and log. ADR188 Row 2 separately
authorizes the floor intrinsic. That authority leaves R10’s
{exp, log} enumeration unchanged.
The ADR219 exact-arithmetic sextet (Director ruling 2026-08-22) completes
the set. sqrt takes Row 6’s fallback rider. round-half-even lands Row
3’s ratified housekeeping rider and resolves D70’s “recorded, not resolved.”
min/max/abs/clamp supersede Rows 4/5’s “no rider”
dispositions on #591 item 2’s accumulated port evidence. Like floor, all
six cross via IEEE-754 exactly-specified operations. They use neither pinned
soft-float libm nor a §4.3 golden-vector family. The normative paragraphs below
record each disposition.
The transcendental roster stays the R10 pair alone. Amendment AJ removes the
former rng-draw declaration. The historical carrier-key record below
grants no current authoring authority.
Cap-legality is not doctrine-legality, and this is the load-bearing
sentence. exp sits inside the cap. Three of the five exp call sites
in the frozen estate stipulate a logistic sigmoid that ADR173 and the standing
2026-07-29 no-imposed-functional-forms ruling retire: P(S|A), whose S-curve
must emerge from within-class wealth dispersion rather than be asserted; a
defection probability; a wage-pressure sigmoid. A verbatim transcription of
those formulas would pass the cap check and violate the theory line. There are
therefore two gates, and only one of them is mechanical:
Is the intrinsic declarable? Mechanical, checked at load against the set above (
E-LOAD-021for an undeclared call).Does this use stipulate a functional form? Not mechanical, and not checkable by any typechecker. It belongs to Director review, and the question it asks is always the same: can this be re-derived as a measure instead?
[draft ruling — Phase 1 review, R9 chapter C13] sigmoid is a reserved
prohibited intrinsic name. Declaring an intrinsic named sigmoid is
E-LOAD-024 — the same code §2.7 uses for a reserved form-head collision,
and here for a stronger reason: declaring sigmoid would hand content the
exact mechanism ADR172 ruling 5 forbids, pre-packaged and named. It is the one
part of gate 2 that can be made mechanical, so it is.
The rider slate. The table below records the R9 gap analysis §4 proposals
as proposals. It is not normative and declares nothing on its own; every
row was a question for the Director, and the “Proposal” column is the
analysis’s recommendation, not by itself a ruling. ADR188 (2026-08-10)
disposed all twelve rows — the Director’s “i approve all”, transcribed row by
row. Row 2 (floor/trunc) is RATIFIED and landed: see the normative
paragraph and Draft-Ruling Register D97 immediately after this table, and
declarations::DECLARABLE_INTRINSICS in the Rust reference implementation.
ADR219 (2026-08-22) then landed rows 3-6: Row 3 (round-half-even) is
landed (D70 resolved); Rows 4/5 (abs, min/max — and clamp
with them) are superseded by riders on #591 item 2’s accumulated evidence;
Row 6’s (sqrt) fallback rider is taken. The remaining rows’ dispositions
are recorded in ADR188 itself; landing each one’s own normative text (a table
row here, a §6.2 vector family, a canonical-name elimination) is separate
work, so the table below is left exactly as the R9 gap analysis wrote it — a
non-normative proposal record — except where a mark records Rows 2, 3, 4, 5
and 6.
# |
Candidate |
In cap? |
Proposal (non-normative) |
|---|---|---|---|
1 |
|
No |
No rider. Superseded by the calendar bindings of §2.5 — a seam, not mathematics. |
2 |
|
No |
RIDER RATIFIED AND LANDED (ADR188 Row 2; D97, below). §3.1 declares
no coercions and |
3 |
|
No |
RATIFIED AND LANDED (ADR188 Row 3; landed by ADR219, 2026-08-22 — D70 resolved). §3.2 and §2.7 already oblige the kernel to expose it to rules; the enumeration omitted it. Affirming it was not a widening; landing it was the owed work. |
4 |
|
No |
SUPERSEDED — RIDER RATIFIED AND LANDED (ADR219, 2026-08-22, on
#591 item 2’s accumulated evidence: every pack reinventing |
5 |
scalar |
No |
SUPERSEDED — RIDERS RATIFIED AND LANDED (ADR219, 2026-08-22:
|
6 |
|
No |
FALLBACK TAKEN — RIDER RATIFIED AND LANDED (ADR219, 2026-08-22). Original: Both presented. Preferred: re-derive platform fit as a measure (the share of a class’s interest dimensions a platform satisfies), which needs no norm — that branch still governs the platform-fit CALL SITE. Fallback: a rider — taken by the Director’s ruling, governing the LANGUAGE. A silent switch to squared magnitudes changes the metric’s scale and must never happen by default. |
7 |
|
Yes |
No rider needed; a theory ruling is. Three of five sites are imposed sigmoids under ADR173. Ask the Director to dispose each: re-derive as a measure, or except it explicitly as a bounded auxiliary. |
8 |
|
No |
Elimination presented first. Squashing a log-ratio into |
9 |
|
No |
Never declarable — ruled above, |
10 |
|
No |
No proposal. Nothing in the thirty-four systems asks for it. |
11 |
RNG draw |
n/a |
Not a rider. §2.8 already sanctions it as a kernel intrinsic; the key convention is below. |
12 |
bespoke |
No |
Recommend against, per §3.8 item 7: it hides a mechanism in the kernel for one call site. |
The floor intrinsic (ADR188 Row 2, ratified 2026-08-10). Unlike
exp/log, floor is not a transcendental: it crosses via
roundToIntegralTowardNegative, exactly specified by IEEE-754 itself —
not by §4.3, whose closed basic-op list is addition, subtraction,
multiplication, division and comparison only, and whose golden-vector clause
is for the transcendental pair. This is the specific point at which ADR188’s
consequences note (“the two ratified riders get normative intrinsic-table
rows + §6.2 vector families + libm golden vectors at implementation”)
does not apply to this rider: there is no libm crossing here to pin a
golden vector against, so that half of the consequence is declined rather
than owed, and this sentence is that disposition made explicit rather than
a silent omission. It joins the declarable set (§3.10’s opening paragraph)
under this rider’s own authority, not R10’s, and is wired into
babylon_tick::run_once — the seam the CLI driver and babylon-client’s
engine link both call — via intrinsic_host::KernelIntrinsicHost, not
merely exercised by a unit test.
Signature. One binary64-lane argument (the result of ordinary arithmetic, whose static type is
Real— §3.3), returningint.realis admitted as a<type-name>only in an<intrinsic-decl>’s:params/:returnsposition (Draft-Ruling Register D98) — adeffield’s or ametric’s:typestill cannot name it, since §3.1 rulesReal“Not storable” for a field. A worked declaration:(intrinsic floor :params (real) :returns int :cost N). Train B note (2026-08-15, D155): the “still cannot name it” half of this bullet is superseded —realbecame a storable:typespelling via D155 (§3.1’s eighth row, the register below). D98’s intrinsic-position law itself is unchanged::params/:returnsstill admitreal, and this signature stands as written.A non-``Real``-lane argument is refused, not coerced. §3.3 promotes
InttoRealonly within a binary64 expression; it does not reach the intrinsic-call boundary, and no full static typechecker exists yet to compare a call’s argument types against its declaration (§2.7: content is Program 27 Phase 2 work). A bare(floor 5)— anIntliteral, not the result of arithmetic — is therefore refused as a malformed call, with no numbered code (the reference names none for this class, matching the no-invented-codes precedent), consistent with the no-coercions rule (§3.1). Every ratified call site passes the result ofpopulation × rate, which is alreadyRealby the time it reachesfloor.Domain: ``[0, ∞)``. The rider’s own candidate name pairs
floorwithtruncbecause the two ratified call sites demote extensive people counts, never wealth: the frozen estate’svitality.py(_calculate_deaths:populationguarded> 0,attrition_rateclamped to[0, 1]beforedeaths = int(population * attrition_rate)) anddecomposition.py(la_population <= 0returns early;enforcer_fraction/proletariat_fractionare pydantic-constrained non-negative fractions beforeenforcer_pop_gain/proletariat_pop— the WEALTH lines at the same call site,enforcer_wealth_gainandproletariat_wealth, are notint()-demoted). Not a claim of §3.4 — the intensivity kind rule states nothing about sign. On this domainfloorandtruncare the same function. This document declares one intrinsic, namedfloor, and does not extend it to negative reals, where the two conventions diverge and ADR188 Row 2 names neither.Errors, all
E-EVAL-039, never a silent pick. A negative argument, a non-finite argument (NaN,±inf— already unrepresentable at any observable point per §4.3, so this is defense in depth), or a result that does not fitInt’si64domain (§3.1) is a loud evaluation failure. III.11 and this document’s own precedent (§3.3’s store-boundary range check, never a clamp) both forbid resolving any of the three silently — by rounding negative inputs one way or the other, or by wrapping/saturating an out-of-range result.
[draft ruling — Phase 1 review] The name and domain choice above is this
revision’s reading of a rider that ratifies that a Real→Int demotion enters
the intrinsic table without specifying which of floor/trunc or how
it treats negative reals (ADR188 Row 2’s text pairs the two names and is
silent on the negative domain). Recorded as D97; see the Draft-Ruling
Register. The choice is conservative by construction — it commits to nothing
ADR188 did not already imply for the ratified (non-negative) domain — but it
is a workforce reading, not itself a Director ruling, and is open to
correction the same way every other Phase-1-review row in this register is.
The real type-name-position widening this signature needed is a
separate reading, recorded as D98.
The sqrt intrinsic (ADR219, ratified 2026-08-22). Like
floor and unlike exp/log, sqrt is not a transcendental: it
crosses via f64::sqrt — IEEE-754’s own squareRoot, correctly
rounded by the standard’s own mandate — so there is no libm crossing to
pin a golden vector against, and §4.3’s golden-vector clause is DECLINED
for this rider, exactly as ADR188 Row 2’s landing declined it; this
sentence is that disposition made explicit rather than a silent omission.
Signature: one binary64-lane argument returning real —
(intrinsic sqrt :params (real) :returns real :cost N). Domain:
``[0, ∞)``. A negative argument is E-EVAL-044
(IntrinsicOutOfDomain; the §4.6 register), never a silent NaN;
-0.0 is in-domain (-0.0 < 0.0 is false, the D97 precedent),
and IEEE’s squareRoot(-0) is -0, so the zero’s sign is pinned by
the standard. A non-finite argument is refused at the same input guard —
load-bearing, not redundant: sqrt(+inf) through the crossing is
+inf (which would fail with the wrong code), and sqrt(NaN) would
silently propagate. No result-side re-check exists: sqrt of a
finite in-domain argument is finite and exactly specified, so a result
guard would be dead code — unlike exp’s overflow lane
(E-EVAL-014). The no-coercions boundary is floor’s: a bare
(sqrt 4) — an Int literal — is a malformed call, refused, never
promoted.
The round-half-even intrinsic (ADR219, landing ADR188 Row 3).
§3.2’s “Half-even, defined” paragraph closes with the obligation this
lands: “the same algorithm is what the round-half-even intrinsic
exposes to rules.” The crossing is f64::round_ties_even — IEEE-754’s
roundTiesToEven, exactly specified — so the libm/golden-vector
disposition is sqrt’s. The signature reading (register D227, open
to Director correction): (round-half-even x) : real → real — the
nearest integer VALUE to x within the binary64 lane, ties to the even
neighbor (2.5 → 2, 3.5 → 4, -2.5 → -2, -0.5 → -0.0; the
sign is the standard’s). §3.2’s exact-integer-arithmetic law is satisfied
by construction: a binary64 argument is already an exact rational, so
“exactly midway” is decidable exactly and no rational-to-binary64
conversion ever occurs. The Real→Int demotion remains floor’s alone
(ADR188 Row 2); a granularity-general (round-half-even x g) form is
declined as speculative until a call site needs one. Domain: total over
finite reals — at magnitudes ≥ 2^52 every binary64 is already integral,
so the intrinsic is the identity there. A non-finite argument is
E-EVAL-044; there is no result-side check (dead code — sqrt’s
disposition).
The min/max intrinsics (ADR219, superseding ADR188 Rows
4/5). Each (real real) → real. The comparison rule is pinned, and
the library functions are deliberately not used: Rust’s
f64::min/f64::max are licensed to return either zero on a
±0.0 tie and to propagate NaN — implementation-defined answers of
exactly the kind this document exists to forbid. The landed rule is built
from IEEE comparisons alone, which are exactly specified: min(a, b)
is b when b < a, else a; max(a, b) is b when a <
b, else a. On an equal comparison — +0.0 vs -0.0 included,
the two compare equal — the first argument wins, bit-pinned by the
conformance tests (D228). A non-finite argument on either side is
E-EVAL-044 — refused at the input, never silently propagated nor
silently dropped.
The abs intrinsic (ADR219, superseding ADR188 Row 4).
(real) → real via f64::abs — IEEE-754’s sign-bit abs, exact,
with nothing platform-variant to pin (sqrt’s disposition).
abs(-0.0) is +0.0 — the canonical zero, pinned to the bit. A
non-finite argument is E-EVAL-044 (abs(±inf) would be +inf
and abs(NaN) would be NaN — neither escapes).
The clamp intrinsic (ADR219). (clamp x lo hi) : (real real
real) → real — the LEGIBLE saturation §3.3’s silent-clamping
prohibition points at: the author writes the bound, and an argument error
is loud. lo > hi is E-EVAL-044, never a silent swap of the
bounds; lo == hi is legal (the result is that bound); an in-range
x returns bit-identical — the identity, never a re-rounded copy; a
crossed bound saturates to the bound. It composes the pinned comparisons
(min(max(x, lo), hi)), so the signed-zero disposition is the same
first-argument-wins rule (D228). A non-finite argument in any of the
three positions is E-EVAL-044.
Costs. Each new declaration’s :cost is content-declared (§2.7),
first-declarer-sets-the-number per the :cost provenance paragraph
below — the sextet’s arrival changes nothing about fuel accounting.
Note
The following RNG carrier-key discussion records the retired D69/D176
author-visible path. Amendment AJ and ADR248 supersede it: rng-draw is
no longer declarable, and finite-kernel realization is the only private RNG
seam.
[draft ruling — Phase 1 review, R9 chapter C13] The RNG carrier-key convention. §2.8 sanctions RNG as a kernel intrinsic with per-(session, tick, salt) seeding and stops there; the rst never showed the convention, and five systems need draws. The signature stays Phase-2 work (§2.7), but the key is language-visible and is fixed here:
The carrier key is
(session, tick, domain, stable_key).sessionandtickare kernel-supplied and are never operands — a rule cannot name them and therefore cannot replay a stream.domainis a closed-vocabulary enum operand, so content cannot mint a new stream; adding one is §3.6 amendment territory like any other member.stable_keyderives from the identities of the call’s reference operands, in operand order, using the same id bytes §2.6 orders by. It is therefore stable across runs and independent of insertion history.A draw is a pure function of its key, not a position in a stream. This is the property that matters, and it is stronger than the obvious alternative (“the kernel draws only when the guard consuming it passes”): because there is no stream position, a guard that skips a draw cannot shift any other draw, and §4.1’s input-dependent short-circuiting can never perturb the RNG. The determinism obligation holds unconditionally rather than by discipline.
Landed — #576 Task 5, superseding this D69 bullet’s ``domain`` clause
above. The enum-operand shape for domain this rider proposed is
undeclarable without a §5.6-CAS-touching grammar widening (no
<intrinsic-decl> :params position admits an enum type). The train that
lands the signature uses the firing rule’s own id string instead —
content cannot even name a stream this way, only mint a new rule, which
is already hash-covered content, which is stronger than the enum operand
on the “content cannot mint a new stream” axis while preserving every other
property (including the load-bearing “pure function of its key” clause
above, verbatim). This supersession is formally recorded as D176 (#576
Task 6, below), which also states the “undeclarable as written” argument
this note only gestures at.
The normative intrinsic table. ADR188’s own consequences paragraph
promised “the two ratified riders get normative intrinsic-table rows” (the
floor prose above is that promise kept in long form); this table is the
same promise kept as an at-a-glance reference, extended to the transcendental
pair R10 caps and — under ADR219 (2026-08-22) — to the exact-arithmetic sextet.
The table is normative for all nine names.
declarations::kernel_signature checks each name’s :params and
:returns at load.
Except for floor and log, every :cost cell below stays
“author-declared.” fuel.rs hard-codes no per-intrinsic cost. The first pack
to declare a name sets its number, and its conformance vector then pins that
number. The Community port’s c07 first declared log with :cost 40
(community.bsl, D210’s divisor note). exp and the sextet await their
first declarations.
Name |
|
|
|
Crossing, domain, and authority |
|---|---|---|---|---|
|
|
|
5 |
IEEE-754 |
|
|
|
author-declared; the first pack sets it, pinned by vector thereafter |
|
|
|
|
author-declared; the first pack sets it, pinned by vector thereafter |
As |
|
|
|
author-declared |
IEEE-754 correctly-rounded |
|
|
|
author-declared |
IEEE-754 |
|
|
|
author-declared |
Comparison-based, never |
|
|
|
author-declared |
As |
|
|
|
author-declared |
IEEE-754 sign-bit |
|
|
|
author-declared |
|
``:cost`` provenance. Shipped content declares two intrinsics today:
floor — (intrinsic floor :params (real) :returns int :cost 5),
declared byte-identically in THREE packs (territory.bsl,
decomposition.bsl, vitality-attrition.bsl; the co-load refusal that
triplication courts is #646, a loader matter this table does not govern) —
and log — (intrinsic log :params (real) :returns real :cost 40),
community.bsl’s first declaration (the Community port’s c07, D210’s
divisor note). The floor declarations are also the proof that the whole
intrinsic path is production-wired end to end, not merely
unit-tested. floor’s row reads 5 and log’s 40, quoted from
content.
fuel.rs hard-codes no per-intrinsic cost. No kernel-fixed number
exists for exp or the ADR219 sextet. The first content pack to declare each
name sets its :cost. Its conformance vector then pins that number.
4. Dynamic semantics
4.1 Evaluation order
Evaluation is strict, call-by-value, left to right, depth-first. For any form, operands are evaluated in the order they appear in the source (which, after §5.3’s canonicalization, is the order they appear in the canonical AST).
Exceptions, all deliberate:
andshort-circuits on the first#f;oron the first#t.ifandguardevaluate only the taken branch.
Short-circuiting makes consumed fuel input-dependent; it does not make it non-deterministic, and the bound of §3.7 is a static worst case. Conformance vectors therefore pin an exact consumed-fuel figure per (rule, environment) pair (§6.1).
4.2 The environment
A rule evaluates against: the graph (read-only during condition evaluation),
the defines environment (coefficients), the current tick, the subject node, and
the fuel meter. Bindings resolve first, in declaration order — the external
sources by lookup, the :expr bindings (§2.5) by evaluation against the
bindings already resolved. The engine applies effects after it evaluates the
complete condition. A rule cannot observe its own effects. The language
gives every subject firing of that rule the same prestate. Rules at one
resolved system position, however, compose sequentially: a later rule observes
the working-copy writes of every earlier rule, including an earlier
same-position rule (D116, ADR224). This is the governed composition model, not
a temporary divergence from a shared-prestate target.
Rules execute in the 34-slot causal order from §2.3. D16 orders rules at one resolved position by rule-id bytes. The engine applies their effects in that order. File order and load order cannot affect execution.
[draft ruling — Phase 1 review, R9 chapter C4] Subject enumeration order,
which this document had not specified. A rule whose domain is a node type
(§2.3) fires once per node of that type, in ascending node-id byte order —
the same key §2.6 uses for queries. All firings of one rule observe the same
pre-state (the law above is unchanged), and the effects they collect are
applied in that subject order, and within one subject in source order. A
(domain :graph) rule fires once and takes its place among the rules at its
anchor by rule id like any other.
The order is not a formality. Accumulation into a shared target — every class adding its slice to a carrier node (§3.6) — reduces in exactly this order, and the binary64 lane of §3.3 is not associative, so an unspecified subject order would make the result implementation-dependent while every other clause of this chapter held. Currency’s exact integer lane is immune; the bounded scalars are not, which is why the order is stated rather than left to the executor.
Task W2 (BSL Hygiene Knock-out, 2026-08-18) — same-tick ordering as LOAD
REFUSALS. The resolved phase order, D16’s same-position rule-id tie-break,
and D116’s recorded cross-rule same-tick visibility make a rule’s read order
content-visible: whether an :optional :default binding’s declared
default is ever observed depends on where its field’s writers execute. Two
load refusals make that dependency a checked property of the content set
rather than a silent hazard, in the same family as E-LOAD-001
(content-set-wide, checked at load, over whatever set is actually loaded —
never a hypothetical wider one).
Refusal 1 — E-LOAD-058 , stale-default read. For a binding
(binding b :field f :optional :default d) in rule R, the writer
set of f is every rule W in the loaded content set such that
W contains an (update-node <target> f …) effect, excluding
W where W.rule_id == R.rule_id. The exclusion is on rule
identity alone. It is independent of the write target — self,
it, a select-max result, or any NodeRef — and independent of
whether the read and the write resolve to the same node (justification:
this section’s own two clauses above — “a rule can never observe its own
effects” and “all firings of one rule observe the same pre-state”;
the second is the operative one when the read and write targets differ,
which is exactly solidarity/p0-transmit’s shape: it reads self
and writes a neighbour it, one rule, still self-excluded). If any
writer does not execute before R under the resolved phase rank and D16
tie-break, the loader refuses the content. The error names the field and both
rules.
Refusal 2 — E-LOAD-059 , unreset fan-in. A field written by two or
more distinct rules in the content set (via set, or via fan-in
add/sub/scale) requires an earlier unconditional set.
The rule has no (when …) at all, or its (when …) is the literal
#t, and the set is a direct member of the rule’s effects sequence.
A set beneath guard, for-each, or another construct that can
execute zero times is conditional and cannot discharge this refusal. The
analyzer performs no finer guard-dominance analysis between a reset and its
fan-in writers. The alternative is the D127 unconditional-recompute shape
(a writer meeting the same unconditional test whose :material-basis
cites D127). Sort the writers first by resolved execution rank and then by D16
rule-id bytes. The first writer must pass one of the two tests above.
Otherwise, the loader refuses the content and names the field and writer rules.
ADR224 activates both refusals. The analyzer consumes resolved phase ranks
from babylon-tick over the complete aggregate content set after
concatenation. Rank orders first; D16 rule-id bytes break only same-rank ties.
The former raw-ID, per-source adapter remains historical test support and does
not decide a production load. Thus Solidarity in Material Base correctly
precedes Consciousness in Consequences even though their raw ids sort in the
opposite order, while real same-position and later-writer hazards still refuse.
The public ranked analyzer also verifies its own input before it computes a
finding: every supplied rule id must equal the qname inside that rule form, and
the set of ids must be unique. A non-rule form, mismatched id, or duplicate id
returns a deterministic typed load refusal and no E-LOAD-058 or E-LOAD-059
finding.
Intentional findings use exact governed dispositions, not a reusable content escape hatch. An E-LOAD-058 row keys the reader rule, binding, field, and complete allowed non-earlier writer set. An E-LOAD-059 row keys the field, complete allowed writer superset, each allowed execution-earliest writer, and that writer’s reset-relevant shape. A new or near-match reader, binding, field, writer, earliest writer, or changed reset shape refuses. Every row carries its reason, Director owner, date, and ADR224 authority. The initial tables contain 13 E-LOAD-058 rows and 11 E-LOAD-059 field rows.
The historical Amendment AI draft is not ratified and grants no vocabulary.
:prior-tick, :complementary-writers, and
:sequential-accumulator are not active declarations. ADR224 preserves the
draft as design evidence but replaces its proposed implementation path with the
exact disposition tables above.
4.3 Arithmetic
Binary64 operations are the IEEE-754 basic operations only: addition, subtraction, multiplication, division, and comparison, each correctly rounded round-to-nearest-even. These reproduce bit-exactly across conforming implementations.
Fixed-point operations are exact integer operations at the widths of §3.2.
No transcendental is a language operation. Any that exists is a named intrinsic whose implementation is pinned by the kernel and validated by golden vectors with a written tolerance derivation. Which ones may exist is §3.10’s, and it is a shorter list than the illustrative names above suggest. The polynomial-vs-libm choice is ruled, not open: ADR176 ruling 21, reaffirmed by ADR188’s decision paragraph, mandates a pinned soft-float libm crate with per-intrinsic golden vectors —
expandlogcross vialibm 0.2.16(default-features = false), wrapped inbabylon_kernel::transcendental; see Determinism Contract’s Transcendental Crossing — exp/log chapter for the verified dispatch analysis and the written tolerance derivation.No fused multiply-add. An implementation that contracts
a*b+cinto an FMA is non-conforming.Intoverflow isE-EVAL-011.A binary64 operation producing a non-finite result (
inf,-inf,NaN) isE-EVAL-014. Division by zero in the binary64 lane isE-EVAL-012. Non-finite values are therefore not representable at any observable point, which is what makes the JSON/serialization inf-NaN trap unreachable by construction.The
floorintrinsic’s argument outside its ratified domain — negative, non-finite, or a result that would not fitInt’si64domain — isE-EVAL-039(§3.10, ADR188 Row 2, D97).
4.4 Query evaluation
A query is materialized in the sort order of §2.6 before the fold body runs.
The graph is not mutated during condition evaluation, so the materialized set
cannot change under the fold. mean over an empty set is E-EVAL-021
(never 0); sum over an empty set is the additive identity of the body
type; count over an empty set is 0; min/max over an empty set
are E-EVAL-021. exists over an empty set is #f; forall over an
empty set is #t.
4.5 Fuel accounting
Each AST node charges its base cost when it is evaluated — the same base
numbers §3.7 uses to compute the static bound, without the ceiling
multiplication (the multiplication is the static worst case; at runtime each
actual iteration charges the body’s cost once). The meter starts at the rule’s
declared :fuel and decrements. A :expr binding charges its expression
once, when the binding resolves; each later reference to it charges a
variable-reference 1 like a reference to any other binding. That asymmetry is
the whole of the fuel win C7 buys, and it is why the same algebra written twice
inline costs strictly more than the same algebra named once.
Reaching or passing zero is E-EVAL-040, which aborts the tick (§4.6) — it
never truncates a fold or returns a partial result.
[draft ruling — Phase 1 review, R9 verification repair] The meter is per
firing. A node-domain rule fires once per subject (§4.2), and each firing
starts a fresh meter at the declared :fuel: the budget is a property of
one evaluation, never of a rule’s whole pass over its subjects. That is the
only reading consistent with bound(rule) (§3.7), which carries no
subject-count factor, and the only one under which a rule’s legality at load
does not depend on how many nodes the scenario it is later hydrated against
happens to hold. Chapter C4’s subject enumeration made the multiplicity
explicit and therefore made this sentence necessary. It follows that a
conformance vector’s :fuel-used (§6.1) is also per firing; a vector whose
rule fires over several subjects — §6.2 family 12’s accumulation vector — states
the figure for the first subject in §4.2’s order, which is well defined
because that order is.
The cost table is pinned by conformance vector; any revision is a vector re-bless (design §5 Totality). This is what makes fuel a stable, hashable property of content rather than an implementation detail.
[draft ruling — Phase 1 review] The §3.7/§4.5 boundary is off by one
(implementation-discovered, 2026-07-30, Phase 1 Task 14). §3.7 rejects only
bound(rule) > :fuel at load, while this section’s meter must stay
strictly positive — “reaching or passing zero” — so a rule whose worst
case consumes exactly its :fuel loads and then E-EVAL-040s at
runtime. Both checks are implemented to the letter; authors should budget
:fuel ≥ bound + 1. The Phase-1 review may align the two by making the
load check bound ≥ :fuel.
4.6 Error taxonomy
Every error in this document is loud (Constitution III.11). There are exactly two times at which an error can occur.
Class |
Codes |
When, and what happens |
|---|---|---|
Lexical |
|
Content load. The content set is rejected; no engine starts. |
Syntactic |
|
Content load. As above. |
Static/type |
|
Content load. As above. |
Load/link |
|
Content load — unresolved bindings, unknown vocabulary, fuel bound
exceeded, ceiling violated at hydration, a missing or misplaced
|
Evaluation |
|
During a tick — checked-arithmetic failure, range violation at a store,
non-finite result, empty aggregate, edge-mode violation, hyperedge type
mismatch, fuel exhaustion; and, from the R9 chapters, an accessor whose
referent is of the wrong type or carries no value for the named field,
an |
Every code the R9 chapters add continues an existing sequence, and no code
that existed before this revision is renumbered. The new codes are
E-LOAD-0xx (eleven, because most of what those chapters add is decidable
from the content set alone), E-PARSE-0xx (six), E-TYPE-0xx (five) and
E-EVAL-0xx (five, all of them the “absence is never a value” discipline of
§2.10 applied at a new referent). That the load class grew fastest is the
intended shape: a chapter that made a new failure mode runtime-only would
have moved the language in the wrong direction.
The Amendment AG sections continue the same sequences. They add six
E-LOAD-0xx codes — three per construct — and one E-EVAL-0xx, and
no E-LEX,
E-PARSE or E-TYPE code at all: every parse- and type-class failure
they can produce already had one — E-PARSE-013 for a keyword outside its
form, E-PARSE-041 for two writers of one field in one form,
E-TYPE-011 for an <enum-ref> of the wrong kind, E-TYPE-014 for a
field-init owning off the wrong type, E-TYPE-041/042/043 for the
kind law — and minting a synonym for an existing class is exactly the hygiene
defect D75 ruled against.
Sequence continuation is meant literally, and is checkable by inspection: every
decade block of every family is contiguous, with no reserved and no
skipped number — E-LOAD 001–004, 010–013, 020–025, 030–033, 040–059;
E-PARSE 010–015, 020–022, 030–033, 040–042; E-TYPE 010–017, 020, 030,
040–044; E-EVAL 010–014, 020–021, 030–043; E-LEX 001–003,
010–011, 020–027. E-TYPE-044 (Territory port train, P27, #551 closure)
continues the SAME overrun block — the next free E-TYPE number at the
time of allocation, per the same rule. The E-LOAD 040 block now runs past its own decade, and
deliberately: opening a fresh block at 050 for the Amendment AG codes would
have reserved 046–049, and a reserved number is precisely what the rule
above forbids. Contiguity outranks decade tidiness. The §3.2 addendum
(#492/ADR194) continues the SAME overrun block with E-LOAD-052, and
continues E-EVAL with E-LEX-027 and E-EVAL-041 — the next free
number in each family at the time of allocation, per the same rule.
Repair, found while allocating those numbers: this paragraph’s E-EVAL
range previously read “030–038, 040”, silently skipping E-EVAL-039
(floor’s domain check, D97/ADR188 Row 2) — a transcription gap in this
paragraph specifically, not a gap in the actual sequence (039 has been
allocated and implemented since D97 landed). Folded into the corrected range
above rather than left standing as a second inconsistency next to a new one.
The R9 chapters allocated per chapter and left two holes in
the E-TYPE sequence; they were closed by renumbering the two offending
new codes before any implementation pinned them, which is a liberty
available exactly once and only to codes this revision minted.
§2.13 (Organization spec §1 Q12) continues the same sequences a third
time. It adds four E-LOAD-0xx codes — E-LOAD-053 (the
:kind/:enum-type shape exclusivity), E-LOAD-054 (an
:enum-type naming an unregistered defenum type), E-LOAD-055
(an <enum-ref> naming a member its resolved type does not declare),
E-LOAD-056 (a non-<enum-ref> value seeding an :enum-type-declared
field at content-load time) — and one E-EVAL-0xx, E-EVAL-042 (the
same law’s runtime re-check, §3.7/§4.3’s two-site pattern), continuing the
same overrun E-LOAD block past 052 for the same reason the §3.2
addendum did: a fresh 060 block would reserve 057–059 for nothing. It
mints no E-LEX, E-PARSE or E-TYPE code: a defvocabulary
membership violation is not a new failure class at all — it reuses
E-LOAD-030/E-LOAD-031, the codes §3.6’s ClosedVocabulary
already carries, activated at three producers rather than left
unreachable (Task 8 of the Organization foundation plan); minting
parallel numbers for an identical check against a different registry
would be exactly the hygiene defect D75 ruled against, the same reasoning
the Amendment AG sections’ paragraph above already applies to its own
parse- and type-class reuse.
Train B item 3 (#591) continues the same E-LOAD block a fourth
time. E-LOAD-057 — a hydration seeding one
(edge-type, source, target, field) edge-attribute key twice (§3.9
clause 7, D156) — is the next free number at the time of allocation, per
the same rule.
Task W2 (BSL Hygiene Knock-out, 2026-08-18) continued the same
E-LOAD block a fifth time. E-LOAD-058 (stale-default read) and
E-LOAD-059 (unreset fan-in) are the next two free numbers at the time
of allocation, per the same rule; full normative text at §4.2’s own end
(same-tick evaluation order is that section’s subject). ADR224 activates both
rows over the post-phase-compile aggregate content set and governs the exact
intentional findings through disposition tables. No ordering vocabulary was
added. See §4.2 and ADR224.
PER-19 continues E-LOAD a sixth time. E-LOAD-060 is an
unauthorized effect by a restricted causal role. The loader walks the complete
nested effect tree. A Recognizer, ExternalEvent, or Intent field or
event effect must match an exact governed rule/role/effect row; every shape
effect refuses. Mechanic retains the ordinary typed effect surface.
The T2 practice-contract groundwork continues E-LOAD with five
pre-mutation topology refusals. E-LOAD-061 refuses the 4,097th exact
NodeType/ORGANIZATION row. E-LOAD-062 refuses the 257th exact
organization-to-NodeType/SOCIAL_CLASS EdgeType/SOLIDARITY edge for
one organization. E-LOAD-063 refuses an active organization without an
organization/action-budget value. E-LOAD-064 refuses non-canonical
ActionBudget storage. E-LOAD-065 requires both
organization/action-budget and organization/active to have the exact
int intensive declaration signature. These checks run before the loader’s
first graph operation. A duplicate canonical solidarity triple retains
E-LOAD-044; this addition does not assign it a second identity.
The #576 intrinsic-host train (Task 2) continues E-EVAL.
E-EVAL-043 — TranscendentalOutOfDomain: a non-finite exp/log
argument, or a non-positive log argument (§3.10, R10/ADR176 r21, ADR188
cap) — is the next free number at the time of allocation, per the same
rule.
The ADR219 exact-arithmetic rider train (2026-08-22) continues
E-EVAL once more. E-EVAL-044 — IntrinsicOutOfDomain: an
argument outside one of the six exact-arithmetic intrinsics’ ratified
domain — a negative argument to sqrt (-0.0 excepted, the D97
precedent), clamp’s lo > hi, or a non-finite argument to any of
sqrt/round-half-even/min/max/abs/clamp — is the
next free number at the time of allocation, per the same rule. Reusing
E-EVAL-043 was considered and rejected: these six are not
transcendentals, and a code whose name says Transcendental would lie
about half its referents.
Load-time errors report the offending file, line, column, form, and code, and reject the whole content set — there is no partial load and no “skip the bad rule” mode.
Evaluation errors abort the tick. The whole per-tick envelope transaction rolls back; there are no partial commits (design §9). The error carries the rule id, the AST path to the offending node, the binding environment, and the fuel remaining. An implementation must not convert an evaluation error into a default value, a skipped effect, or a log line.
4.7 Cross-system registers and one-tick handoffs
Once graph-scope state is node state (§3.6), a whole class of construct stops being necessary, and this section exists to say so rather than to add anything.
Several values in the frozen estate are one-tick-lagged handoffs between
systems at different anchor positions — Sovereignty’s output read by Metabolism,
MarketScissors’ correction read by WealthDistribution, Production’s value read
by ImperialRent. In the Python engine those live in persistent_data and the
lag is a property of where the write and the read happen to sit.
[draft ruling — Phase 1 review, R9 chapter C3] There is no staging,
double-buffering or “previous tick” construct, and none is needed. A rule
writes a carrier field at its anchor position; a rule at a later anchor
position in the same tick reads the new value; a rule at an earlier position
reads the value the previous tick left. Tick ordering already is the
staging mechanism, and it is the one mechanism whose behaviour §4.2 has
specified since this document’s first revision. Adding a previous accessor
or a staged-write verb would introduce a second notion of “when”, and every rule
in the estate would then have to be read twice to know which one it meant.
Two obligations follow, and they are content obligations rather than language ones:
The lag is declared by the anchor, so the anchor is load-bearing. A rule pack that moves a read across the writing system’s position silently converts a one-tick lag into a same-tick read. The anchor is inside
rules_hash, so the change is visible in the diff — but it is visible as an anchor edit, not as a semantic one, and review should treat it as the latter.A carrier field read before anything has written it reads what hydration seeded, which is why §3.5’s plain-binding rule matters here: a carrier field is an ordinary declared field, so a rule reading one that the scenario never seeded is
E-LOAD-010at load, not a zero at tick 1.
5. Canonical AST serialization
rules_hash is SHA-256 over the canonical AST serialization (CAS) of the
content set. CAS is whitespace-insensitive, comment-insensitive, file-layout
insensitive, and option-order insensitive: a formatting edit produces
identical bytes, while any change to a rule’s meaning — including its
:material-basis string and its :fuel budget — produces different bytes.
This chapter defines the bytes. What rules_hash is combined with
(ContentDigest), and how it relates to the tick hash and defines_hash,
belongs to Determinism Contract.
5.1 Primitive encodings
All multi-byte integers are big-endian, two’s complement where signed.
Name |
Width |
Meaning |
|---|---|---|
|
1 |
Unsigned length or tag byte. |
|
4 |
Unsigned length or child count. |
|
8 |
Signed integer literal value. |
|
16 |
Signed unscaled decimal / Currency micro-units. |
ASCII |
variable |
Names; always length-prefixed, never NUL-terminated. |
UTF-8 |
variable |
String payloads; NFC; always length-prefixed. |
5.2 Node encodings
There are exactly two node shapes.
atom ::= 0x01 u8 len(kind) kind_ascii u32 len(payload) payload
form ::= 0x02 u8 len(tag) tag_ascii u32 nchildren child*
Both are self-delimiting, so the encoding is unambiguously parseable back to the AST — a property implementations should exercise as a round-trip property test.
Atom kinds and payloads:
|
payload |
|---|---|
|
|
|
|
|
|
|
as |
|
as |
|
one byte: |
|
ASCII symbol, no sigil |
|
ASCII qualified name including its |
|
ASCII keyword name without the leading |
|
ASCII |
|
UTF-8 bytes after escape processing, NFC |
Form tags are the form’s head symbol verbatim (rule, bindings,
binding, when, effects, and, or, not, <, <=,
>, >=, =, !=, +, -, *, /, if, fold,
exists, forall, nodes, edges, neighbors, hyperedges,
members-of, hyperedges-of, field-of, edge-between, the,
domain, select-max, select-min, metric, metric-of,
quantize-mass, guard, for-each, choose, branch,
update-node, update-edge,
add-node, remove-node, add-edge, remove-edge,
add-hyperedge, update-hyperedge, remove-hyperedge, members,
member, membership-field-of, update-membership,
emit, add, sub, set, scale, anchor, deffield,
intrinsic, manifest, ceiling, rung, adjunction,
defenum, defvocabulary), plus the synthetic tag opt for a
keyword option.
The six tags the Amendment D revision added — hyperedges, members-of,
hyperedges-of, add-hyperedge, remove-hyperedge, members — obey
that same rule (the tag is the head symbol), so they need no registry entry,
no numeric id, and no new atom kind; :max-members is an ordinary
keyword and encodes as an opt form like every other option. Nothing else in
this chapter changes. In particular the §5.6 worked example contains none of
these forms, so its then-current 421 canonical bytes and both digests were
unchanged by this revision — a hyperedge-bearing example would need its own vector
(§6.2), not a recomputation of that one.
The R9 tags obey the same rule, and the worked example survives them too.
Every form tag the R9 spec chapters add — listed in the paragraph above
alongside the originals — is its own head symbol, needs no registry entry, no
numeric id and no new atom kind; every keyword they add encodes as an opt
form. None of them appears in §5.6’s example, and none of the R9 chapters makes
a previously-optional child of rule mandatory, so §5.6’s then-current
421 bytes and both digests stayed unchanged. That invariance was deliberate: it is
the cheapest available proof that the chapters are additive.
The Amendment AG tags obey it a third time. member,
membership-field-of and update-membership (§2.8, §2.10, §2.12) are
their own head symbols, needing no registry entry, no numeric id and no new
atom kind; :member encodes as an opt form under D20 like every other
keyword. deffield gains one optional child and add-hyperedge’s
<members> gains an alternative item shape that a bare member list never
uses, so no existing form’s encoding moves. Clause (ii)’s rung and
adjunction are the same story one level up: their tags are their head
symbols, their keywords are opt forms, and they are optional children of
a form that already has a digest (§5.5’s manifest), so a manifest that
declares no lattice encodes byte-for-byte as it did. None of these appears in
§5.6’s example, and no previously-optional child of rule becomes mandatory
— §5.6’s then-current 421 bytes and both digests stayed unchanged.
The Organization contract’s Q12 tags obey it a fourth time — with one
payload-shape correction, D117 (#528 fix round, adversarial-verifier
found). defenum and defvocabulary (§2.13) are their own head
symbols, needing no registry entry and no numeric id. “No new atom
kind” is still true — the kind tag stays the SAME “enum” string — but an
earlier revision of this paragraph overstated WHY, claiming “the <enum-ref>
values they govern already encode with the existing atom kind”, as though
only values these forms GOVERN were ever encoded. That is true of an
:enum-type-declared field’s own stored value (a genuine <enum-ref>
pair, unchanged), but false of defenum/defvocabulary’s OWN
operands: the type-name operand and each member-list item are BARE
<enum-type>/<enum-member> atoms (§2.13’s own EBNF — no / at
all), not <enum-ref> pairs, so encoding them at all requires that
SAME kind’s payload to admit a SECOND shape — declared above in the
atom-kind/payload table, discriminated by the presence of exactly one
/. The correction is additive, not a new kind tag: every existing
<enum-ref> payload is byte-identical to before, and the bare shape is
new bytes for a construct (defenum/defvocabulary) that did not
exist before Q12 either. deffield gains one more optional
alternative in an existing keyword slot (:enum-type beside :kind,
§2.9), not a new child position, so no existing deffield encoding
moves. None of these forms appears in §5.6’s example, and neither
deffield nor any other form gains a newly mandatory child —
§5.6’s then-current 421 bytes and both digests stayed unchanged, the same
proof of additivity every prior extension in this
section carries.
ADR224 moves the worked example deliberately. :role and
:evidence are mandatory valued options on every rule. They use the existing
opt shape and ASCII option ordering, but their mandatory presence adds two
children to §5.6’s rule. The current vector is therefore 500 bytes with eight
children. Its CAS digest is
9b49c1e87a63ccb64dee96bd179c8ffecd3fe476c81a4f81771daac237156396;
§5.6 records the one-rule rules_hash.
The earlier 421-byte statements above remain historical invariance claims
about their own additive revisions; they do not override the current vector.
A keyword option is encoded as a two-child form:
opt ::= form("opt", atom("kw", <name>), <value node>)
A flag keyword (:optional) encodes as form("opt", atom("kw","optional"),
atom("bool", 0x01)) [draft ruling — Phase 1 review] so that every option
has the same shape.
5.3 Canonical child order
Within any form, children are emitted in three groups:
the form’s fixed positional operands, in the order the §2 grammar declares them;
all keyword options, sorted by keyword name in ascending ASCII byte order;
the variadic body, in source order.
Group 2’s sort is what makes option order a formatting concern. Group 3’s source order is load-bearing: order is structure (the effect application order of §2.8 is exactly this order).
[draft ruling — Phase 1 review, R9 chapter C4] <domain> encodes in
its grammar position. Like <anchor>, <bindings>, <when> and
<effects>, a domain form is a child of rule emitted in the order
the §2.3 grammar declares it — immediately before anchor. It is optional
and absent from §5.6’s example, so that example’s byte count and both its
digests are unaffected. Its own children follow the general rule: an
<enum-ref> domain encodes as one atom enum child, and (domain
:graph) as one opt form carrying the graph flag under D20.
5.4 Determinism obligations
Comments and whitespace never appear in CAS.
Decimal literals are minimal-scale (§1.5), so
0.50cand0.5cproduce identical bytes.Currency literals are micro-unit integers, so
1000.5$and1000.500$produce identical bytes.Strings are NFC by load-time check, so “the source bytes” is a canonical form.
No floating-point value is ever serialized. There is no
binary64in CAS and therefore no float-formatting ambiguity anywhere in the hash path.str()-style fallbacks are banned outright: every node kind has an explicit encoding above, and an encoder that meets an unencodable value must fail loudly rather than stringify it.
5.5 rules_hash
rules_hash = SHA-256( 0x03 || u32 N || CAS(r_1) || … || CAS(r_N) )
where r_1 … r_N are all rule forms in the content set sorted by rule id
in ascending ASCII byte order, and N is their count. deffield,
intrinsic, manifest and metric forms are hashed the same way into
their own digests, which ContentDigest combines
(Determinism Contract). The digest is rendered as 64
lowercase hex characters — never truncated. (Truncation to 16 hex is exactly
the defect the defines_hash triad carried; see the determinism contract’s
worked-example chapter.)
5.6 Worked example
Source form:
; a rule is data; this comment is not part of the hash
(rule demo/hunger
:role mechanic
:evidence derived
:material-basis "subsistence deficit at the point of reproduction"
:fuel 64
(bindings
(binding wealth :field social-class/wealth))
(when (< wealth 1000.5$))
(effects
(update-node self social-class/agitation (add 0.05i))))
Canonical AST after §5.3 reordering (the option keys appear in ASCII order:
evidence, fuel, material-basis, role):
form "rule" (8 children)
atom qname "demo/hunger"
form "opt" : atom kw "evidence", atom sym "derived"
form "opt" : atom kw "fuel", atom int 64
form "opt" : atom kw "material-basis",
atom str "subsistence deficit at the point of reproduction"
form "opt" : atom kw "role", atom sym "mechanic"
form "bindings" (1)
form "binding" (2)
atom sym "wealth"
form "opt" : atom kw "field", atom qname "social-class/wealth"
form "when" (1)
form "<" (2)
atom sym "wealth"
atom cur 1000500000 ; 1000.5 × 10^6 micro-units
form "effects" (1)
form "update-node" (3)
atom sym "self"
atom qname "social-class/agitation"
form "add" (1)
atom intn (unscaled 5, scale 2)
Canonical bytes — 500 bytes, hex (wrapped at 64 characters for display only):
020472756c65000000080105716e616d650000000b64656d6f2f68756e676572
02036f70740000000201026b770000000865766964656e6365010373796d0000
00076465726976656402036f70740000000201026b77000000046675656c0103
696e7400000008000000000000004002036f70740000000201026b770000000e
6d6174657269616c2d626173697301037374720000003073756273697374656e
636520646566696369742061742074686520706f696e74206f6620726570726f
64756374696f6e02036f70740000000201026b7700000004726f6c6501037379
6d000000086d656368616e6963020862696e64696e677300000001020762696e
64696e6700000002010373796d000000067765616c746802036f707400000002
01026b77000000056669656c640105716e616d6500000013736f6369616c2d63
6c6173732f7765616c746802047768656e0000000102013c0000000201037379
6d000000067765616c7468010363757200000010000000000000000000000000
3ba26b2002076566666563747300000001020b7570646174652d6e6f64650000
0003010373796d0000000473656c660105716e616d6500000016736f6369616c
2d636c6173732f616769746174696f6e0203616464000000010104696e746e00
0000110000000000000000000000000000000502
Reading the first 32 bytes: 02 (form) 04 72756c65 ("rule")
00000008 (8 children) 01 (atom) 05 716e616d65 ("qname")
0000000b (11 payload bytes) 64656d6f2f68756e676572
("demo/hunger").
Digest of this single rule alone:
SHA-256(CAS(rule)) = 9b49c1e87a63ccb64dee96bd179c8ffecd3fe476c81a4f81771daac237156396
rules_hash for a content set consisting of exactly this one rule — that is,
SHA-256(0x03 || 0x00000001 || CAS(rule)), 505 bytes of input:
rules_hash = bf2f15517d1b4d10e44af36983c76249b49d8fa2dc71e6d8c1d2607b37b2f20f
Static fuel bound for this rule, by §3.7:
cost(when) = 1 + 1 + 0 = 2;
cost(update-node) = 3 + 1 + 0 + (1 + 0) = 5;
bound = 7 ≤ the declared :fuel 64. The rule loads.
Both digests above are reproducible from this document alone; the reference encoder used to produce them is 90 lines and derives entirely from §5.1–§5.5.
6. Conformance
6.1 Vector-file format
Conformance vectors are written in BSL’s surface syntax — homoiconic,
diffable, and hashable at the file level — but they are fixtures, not
canonical content (D91 below). A vector file is a sequence of vector
forms:
<vector> ::= "(" "vector" <string>
":rule" <rule>
":env" "(" <env-entry>* ")"
( ":graph" <graph-lit> )?
<outcome>
( ":fuel-used" <int-lit> )?
( ":cas" <string> )?
")"
<env-entry> ::= "(" <symbol> <literal> ")"
<outcome> ::= ":expect" <literal> | ":expect-error" <symbol>
<graph-lit> ::= "(" "graph" <node-lit>* <edge-lit>* ")"
<node-lit> ::= "(" "node" <symbol> <enum-ref> <field-init>* ")"
<edge-lit> ::= "(" "edge" <enum-ref> <symbol> <symbol> <expr> ")"
[draft ruling — Phase 1 review, post-R9 audit] Vector files are
fixtures, not content. A vector file is read by §1’s reader, but no
vector form is canonical content: §5 encodes the content forms of
§2, and a vector form is never encoded under §5 nor hashed into any
content digest — “hashable” above is file identity, the byte hash of the
vector file itself. The flag/valued dichotomy of §1.6 and its closed flag
table (D42) therefore govern content forms only. Within a vector form,
:graph, :fuel-used and :cas are optional vector-format
keywords, and the collision with :graph’s content classification as a
flag — here it takes a <graph-lit>; there it takes nothing — is a scope
boundary, not an amendment to it. An implementation’s canonical encoder never
sees a vector form; handing it one is a caller error, not a defined
encoding (D91).
[Director ruling 2026-08-11, ADR191 R5] The ? binds to the
keyword-and-value GROUP, not to the value. The production above used to
write ":graph" <graph-lit>?, which makes the keyword itself mandatory and
its value optional — the reverse of what the bullets below state
(:fuel-used is mandatory on every non-error vector and therefore absent on
error vectors; :cas is optional outright) and a shape no reader of this
section would expect. The repair is the grammar’s, not the prose’s: each of
the three is now written as an optional group, so the keyword is optional
and its value is mandatory whenever the keyword appears. A :graph,
:fuel-used or :cas keyword with no operand is E-PARSE-010, the
existing code for a keyword in value position, exactly as it would be in a
content form. This closes the second of the two repairs §7 deferred to the
Phase-1 review, and §7’s appendix carries the same three groups. Recorded as
D95.
Semantics of a vector: load :rule (the load must succeed unless
:expect-error names a load-class code), hydrate :graph if present, bind
:env, evaluate, and compare.
:expect— the rule’s condition value, or for effect-bearing vectors the resulting field value, must equal the literal exactly (bit-exact for binary64, integer-exact for fixed point). Conformance is not tolerance-bounded; tolerances belong to the cross-implementation numeric layer described in Determinism Contract, not to the evaluator.:expect-error— the named error code must be raised, at the class’s declared time (load vs evaluation). Raising the right code at the wrong time is a failure.:fuel-used— mandatory on every non-error vector. This is the mechanism that pins the cost table: changing any base cost changes these numbers, and a cost-model revision is therefore a vector re-bless ceremony, visible in the diff.:cas— optional expected canonical serialization, as lowercase hex. Every syntactic construct in §2 must be covered by at least one:casvector so the byte layout is pinned independently of the evaluator.
Vector files live under a declared conformance root, are sorted by vector id for execution, and every implementation must run all of them. A vector that no implementation can satisfy is a spec defect, not a vector defect.
6.2 Required vector families
At minimum, an implementation claiming conformance passes:
Lexical — one accepting and one rejecting vector per
E-LEX-0xxcode.Literal canonicalization —
0.50c/0.5cbyte-equality;1000.5$/1000.500$byte-equality; scale and range boundaries.Currency operators — every row of §3.2, including half-even ties in both directions, the
i256intermediate width forCurrency ÷ Currency, and both overflow ends.Kind rule — the six rows of §3.4’s table, accepting and rejecting, including the weighted-intensive
mean’s result kind (D90): the same weighted fold nested under an outersum, which must rejectE-TYPE-041, and under an outermax, which must accept.Fuel — the static bound for a fold at a declared ceiling; a rule rejected at load for exceeding its budget; a rule exhausting fuel at evaluation; a query against a type the manifest declares no row for (
E-LOAD-045); a node-domain rule fired over three subjects whose:fuel-usedis one firing’s and not three (§4.5); and per-vector:fuel-used.CAS — one
:casvector per form tag and per atom kind, plus the §5.6 worked example verbatim.Transcription — §6.3.
Determinism — the whole vector set replayed twice in one process and once in a fresh process, byte-identical.
Hyperedge (Amendment D) — the iteration order of
hyperedges,members-ofandhyperedges-of, including a hyperedge hydrated with its members in descending id order to prove declared order is unobservable; theE-EVAL-032type mismatch;add-hyperedgeat exactly:max-members(loads) and one over it (E-LOAD-042); a manifest row missing:max-memberson aHyperedgeTypeand one carrying it on aNodeType(bothE-LOAD-042); and a fold overmembers-ofwhose static bound equals the declared:max-members.Edge and hyperedge attributes (chapter C1) —
field-ofover anEdgeRef, aHyperedgeRefand aNodeRef; the §2.4 coverage row written as asumand as a weightedmeanover<edge-type>/strength;sumover an intensive edge field rejectedE-TYPE-041and the same fold accepted with a:weight; afield-ofwhose referent is of another type (E-EVAL-033); adeffieldwhose first segment names no registered type (E-LOAD-023); a vocabulary with aNodeType/EdgeTyperendering collision (E-LOAD-032); a re-declaration of<edge-type>/strength(E-LOAD-001); an ambiguous foreign-type:fieldreference under two same-type bodies (E-TYPE-013); and anintrinsicdeclared with a reserved form-head name (E-LOAD-024).Edge mutation (chapter C2) —
update-edgeunder each of the four<update-op>forms, against<edge-type>/strengthand against adeffield-declared edge field; the same write reaching a range boundary (E-EVAL-020) and an I.15-illegal mode transition (E-EVAL-030);edge-betweenresolving, and failing to resolve (E-EVAL-034);add-edgecarrying<field-init>s, one of them namingstrength(E-PARSE-041) and one owning off the wrong type (E-TYPE-014); anupdate-edgewhose referent is of another edge type (E-EVAL-033); anedge-betweenwhose enum-ref names aNodeType(E-TYPE-011); and a hydration seeding two edges of one type between one ordered pair (E-LOAD-044).Graph-scope carriers (chapter C3) —
theresolving against a:ceiling 1manifest row;theagainst a row whose ceiling is not 1 (E-LOAD-043);theagainst a graph that hydrated no such node (E-EVAL-035); a read and a write of one carrier field throughfield-of/update-node;theagainst anEdgeTypemember (E-TYPE-011); a manifest carrying no row for the carrier type (E-LOAD-045); and an accumulation vector — three subject nodes each adding a bounded scalar to one carrier — whose expected value pins the §4.2 subject order by being sensitive to it, and whose:fuel-usedis the first subject’s firing (§4.5).Rule domain (chapter C4) — an inferred node domain (the §5.6 rule, unchanged, is one); a rule with no self-scoped reference and no
<domain>(E-LOAD-004); a rule whose self-scoped references name two node types (E-LOAD-004); an explicit(domain NodeType/…)overriding a would-be ambiguity; a rule whose<domain>and self-scoped reference disagree (E-TYPE-010);(domain :graph)firing exactly once against a multi-node graph;selfreferenced in a graph-domain rule (E-TYPE-015);:graphused outside adomainform (E-PARSE-013); a(domain EdgeType/…)(E-TYPE-011); and a:casvector for each of the twodomainshapes.Element selection (chapter C5) —
select-maxandselect-minover each of the six query heads, proving the result’s element type; a tie vector whose two elements score equally, pinning that the lower id wins for both operators; selection over an empty query (E-EVAL-021); aBooland anEnum<T>score (E-TYPE-016); a selection whose result is the element operand ofupdate-nodeand offield-of; and a selection over an intensive score, which must accept (the kind rule polices aggregation, not ordering).Effect-position iteration (chapter C6) —
for-eachoveredgesapplyingupdate-edgeandemitper element, with the expected per-element results in iteration order;for-eachwhose query would have changed had it seen an earlier verb’s effect, proving pre-state materialization; nestedfor-eachand its static bound;for-eachover an empty query, which applies nothing and must not error; and afor-eachwhose:fuelis one short of its static bound (E-LOAD-040).Computed bindings (chapter C7) — a
:exprover earlier bindings, with:fuel-usedproving the expression is charged once and each reference 1; the same rule written with the algebra inlined twice, whose:fuel-usedmust be strictly larger; a forward reference and a self-reference (E-PARSE-032);:optionalon a:expr(E-PARSE-033);itinside a:expr(E-TYPE-012); a foreign node type’s:fieldreferenced from a:expr(E-TYPE-010); and a:exprwhose kind is intensive feeding an unweightedmean(E-TYPE-042), proving kind propagates through the binding.Typed neighbours and element naming (chapter C8) — the first
neighborsvectors this document has ever required: a fold overneighborsreading the annotated type’s field (which must typecheck), a graph whose traversal reaches two node types proving the operand filters, a three-operandneighbors(E-PARSE-042, arity), the two operands swapped (E-TYPE-011at both positions), a multiplicity vector — a graph where two qualifying edges reach one node, whosefold countoverneighborsmust be1— and a static bound equal to the lesser of the two ceilings; and for:as, a two-hop nested fold naming the outer element,itinside the inner body resolving to the inner element, a:asname referenced outside its body (E-TYPE-012),:as itand:as self(E-PARSE-022), and a:ascolliding with a binding name (E-PARSE-030).Metric registration (chapter C9) — a graph-domain
metricread by a:metricbinding and an element-indexed one read bymetric-of; each read through the other’s form (E-LOAD-012); a declaration disagreeing with the kernel’s registration (E-LOAD-025); an unregistered name (E-LOAD-011, the §6.3 correction, re-proved for both forms); ametric-ofagainst a referent of another type (E-EVAL-036) and one the provider produced no value for (E-EVAL-037); a stability vector — two rules at one anchor position reading one metric, whose expected values must be equal; a metric declared:kind intensivefeeding an unweightedmean(E-TYPE-042), proving the declared kind propagates; and a:casvector for themetricform under both<domain>shapes.Deliberate absences (chapter C10) — a family of rejecting vectors, so the absences of §3.8 are pinned as loudly as the presences:
(bound? x)(E-LOAD-021, an undeclared intrinsic); a string literal in anemitpayload (E-PARSE-010— the string lexes, the position rejects it); an(unset …)update-op (E-PARSE-015); and one accepting pair proving each re-modelling works — a presence-field guard writing value and presence together, aselect-minoverqueued-at-tickreturning the FIFO head, and a producer-stamped tick field read by a consumer rule at a later anchor.Invariant substrate and the lattice (chapter C11) — a one-hop aggregation fold over an
IN_SCALErelation and thefor-eachdistribution that mirrors it;add-edgeandremove-edgenaming an:invariantedge type, andadd-node/remove-nodenaming an:invariantnode type (allE-LOAD-013); anupdate-nodefield write on an invariant type, which must accept, proving the flag constrains structure and not state;:invarianton aHyperedgeTyperow (E-LOAD-042); and a hydration that seeds a keyed reference series as declared fields against a rule reading them with a plain:field, plus the same rule against a hydration that omits the series (E-LOAD-010).Hyperedge fields and reference identity (chapter C12) —
update-hyperedgeunder each<update-op>, and one whose<qname>owns off another hyperedge type (E-EVAL-033); a roster change proving membership is still whole-object replacement;=and!=on two references of the same kind, both outcomes; a reference compared with<and one compared across kinds (bothE-TYPE-017); and the intersection idiom above, whose:fuel-usedmust show the quadratic cost the deferral is paying.The intrinsic cap and calendar bindings (chapter C13) — a call to an intrinsic outside the declared set (
E-LOAD-021); anintrinsicdeclaration namedsigmoid(E-LOAD-024);:year,:tick-of-yearand:tick-in-cycleat a known tick, with a boundary case at each cycle wrap;:tick-in-cycle 0and a negative length (bothE-PARSE-014). The retiredrng-drawvectors remain historical implementation evidence only; they do not belong to the current language acceptance set. Thefloorintrinsic (ADR188 Row 2, D97) — a zero argument, an exact-integer argument, and a fractional argument, proving the round-toward-zero result on the ratified[0, ∞)domain (a wrong-direction implementation must fail this row); negative zero, which must accept as0(IEEE-754:-0.0 < 0.0is false — a sign-bit test rather than a value test must fail this row); the largestf64strictly below2^63(the exacti64-domain accept boundary — a coarsely-mutated ceiling constant must fail this row, unlike a boundary vector at a much smaller magnitude); a negative argument, a non-finite argument, and an argument whose floor reaches or exceeds2^63, all threeE-EVAL-039and none of them silently coerced or wrapped; and a bare non-Realargument (anIntliteral, not the result of arithmetic), refused as a malformed call. The ADR219 sextet (chapter C13’s own host suite, D226-D228) —sqrt: a perfect square exact, a non-square pinned to the correctly-rounded bit,-0.0accepted with its sign pinned, a negative argument and each non-finite argumentE-EVAL-044;round-half-even: the tie cases2.5 → 2,3.5 → 4,-2.5 → -2,-0.5 → -0.0bit-pinned, non-tie nearest, the identity at already-integral magnitude, theReal(neverInt) return variant, a non-finite argumentE-EVAL-044;min/max: the extreme in both argument orders, the ±0.0 tie returning the FIRST argument bit-pinned (neverf64::min/f64::max’s implementation-defined pick), a non-finite argument on either sideE-EVAL-044;abs: the sign dropped,-0.0canonicalized to+0.0bit-pinned, non-finiteE-EVAL-044;clamp: the in-range identity bit-exact, saturation to each crossed bound, the bounds themselves accepted,lo > hiloud (E-EVAL-044, never a silent swap),lo == hireturning the bound, non-finite in any positionE-EVAL-044; for every one of the six, a non-Realargument and a wrong arity refused as malformed calls; and the lockstep vector — everyDECLARABLE_INTRINSICSmember carrying akernel_signaturerow and a dispatch arm, so a cap widening that forgets either half fails the suite rather than shipping unchecked.Attributed membership (Amendment AG (i)) —
membership-field-ofreading a payload field of each declared scalar type, inside a fold overmembers-ofand from an effects list; the read against a well-typed pair that is not a membership (E-EVAL-038); the read whose hyperedge operand is of anotherHyperedgeTypeand the read whose member operand is of anotherNodeType(bothE-EVAL-033);update-membershipunder each of the four<update-op>forms, one reaching a range boundary (E-EVAL-020) and one against a non-membership pair (E-EVAL-038);add-hyperedgewhose annotatedmemberitems initialise every declared payload field, one omitting a field and one using a bare item under a payload-declaring hyperedge type (bothE-LOAD-047), one initialising a field twice (E-PARSE-041), one naming a field owned by another type (E-TYPE-014) and one whose member is not of the annotated type (E-EVAL-033); a hydration omitting a payload field (E-LOAD-047); afield-ofnaming a membership qname and amembership-field-ofnaming a hyperedge’s own field (bothE-LOAD-046); adeffieldcarrying:memberwhose first segment renders aNodeType(E-LOAD-048) and one whose:membernames anEdgeTypemember (E-TYPE-011); an ordering vector — a hyperedge hydrated with its members in descending id order, folded with a non-commutative-in-binary64 body, pinning that iteration follows D25’s ascending member id; an intensive payload under an unweightedmean(E-TYPE-042) and the same fold accepted with a:weight; §2.12’s two-hop worked shape verbatim, which must load — its outermaxis kind-neutral where asumover the same intensive result would beE-TYPE-041(D90); a roster replacement proving a dropped member’s payload does not survive it; and a fold overmembers-ofreading payload whose static bound equals the declared:max-members— the ceiling axis unchanged by the payload.Lattice instances (Amendment AG (ii)) — a
manifestdeclaring a substrate rung with an extensive and an intensive adjunction along it, loading clean, with this section’s opening aggregation fold and its mirroredfor-eachdistribution evaluated over the declared rung; a:substraterung one of whose three types carries no:invariantrow (E-LOAD-049); an intensive adjunction with no:weighted-by(E-LOAD-050) and the same declaration accepted with one; a:weighted-bynaming an intensive field (E-TYPE-043); an adjunction citing an undeclared rung, one whose<qname>is owned by the other end’s node type, one whose two fields disagree in:kind, and a:weighted-byon an extensive pair (allE-LOAD-051); two rungs and two adjunctions sharing a name (E-LOAD-001); a rung whose positional operand names anEdgeTypeand one whose:vianames aNodeType(bothE-TYPE-011); a rung naming a type the manifest carries no row for (E-LOAD-045); a diagnostic-order vector — a manifest carrying two independently malformed declarations, whose reported first failure is the lower declared name in byte order; anupdate-nodefield write on a substrate rung’s node type, which must accept (the rung constrains structure, not state); and:casvectors forrungandadjunctionunder both the flagged and unflagged, weighted and unweighted shapes.
Families 10–22 are the R9 spec chapters’ (the chapter letters cite
reports/bsl-gap-analysis-2026-08-10.md §7); families 23 and 24 are
Amendment AG’s, one per clause. Two obligations are stated
once here rather than repeated in every family: each new form tag also owes a
:cas vector under family 6, and each new construct owes its exact
:fuel-used figure under family 5. Both make a chapter’s landing a
rules_hash surface change and therefore a vector re-bless ceremony,
which the teams should plan rather than discover.
6.3 Transcription contract
The conformance seed is the existing Python evaluator test estate: 271
lines in tests/unit/domain/doctrine/test_mechanics.py plus 628 lines in
tests/unit/engine/test_event_evaluator.py — 899 lines, verified by
wc -l on 2026-07-29.
Each existing test case transcribes to one or more vector forms. The
transcription is recorded in a ledger with one row per source test:
Column |
Type |
Example |
Meaning |
|---|---|---|---|
|
test id |
|
The Python test being transcribed. |
|
list of vector ids |
|
The BSL vectors that replace it. |
|
|
|
Whether BSL reproduces the observed behavior, deliberately differs, or
the case ceases to exist (e.g. a test of the |
|
string |
— |
Mandatory when |
Grammar-superset honesty. BSL is a superset of the two existing grammars’ expressible sets, not of their failure semantics. The design document (§5) names exactly four silent-degradation behaviors that are deliberately broken; copied verbatim:
Four silent-degradation behaviors are deliberately broken as III.11 corrections: unknown graph metric → 0.0 (
event_evaluator.py:313), unknown aggregation → False (:439), unknown comparison operator → False (:405), empty precondition set → True (:103). The ~899 lines of existing evaluator tests (271 doctrine + 628 event-evaluator) transcribe as the conformance seed with a documented delta at exactly those four points.
Their BSL dispositions:
Python behavior |
BSL behavior |
Where enforced |
|---|---|---|
unknown graph metric → |
|
§2.5 ( |
unknown aggregation → |
|
§2.7 ( |
unknown comparison operator → |
|
§2.4 ( |
empty precondition set → |
|
§2.3 ( |
Every transcribed test that asserted one of these four behaviors takes
verdict = corrected with a note naming the row. There is a fifth,
lower-profile delta the transcription must also record: the doctrine DSL’s
absent variable reads as ``0`` (honest-null, mechanics.py module
docstring) becomes an explicit :optional/:default 0 declaration
(§3.5), so transcribed doctrine vectors that relied on it carry
verdict = corrected and their rules carry an allowlisted :default.
6.4 Review gates on the transcription
Transcription is where the design document’s failure classes F1–F4 bite. The ledger is reviewed against them: eyeball-before-golden (F1 — a vector’s expected value is read by a human before it is blessed, never captured from a run), tautology ban (F2 — a vector whose expectation is computed by the same code path it tests is invalid), transcription review with an idiom-mismatch checklist (F3), and spec-completeness (F4 — every construct §2 defines has at least one vector).
7. Consolidated grammar
Every production of §§1, 2 and 6.1, collected into one file and included here. The grammar collects; it does not amend. On any divergence between the §1/§2/§6 text and this appendix, the section text wins, and the divergence is a defect in the appendix to be repaired there. Nothing in this section adds a form, retires one, or changes what one means — an inclusion is not a second home, which is the property that keeps this document the one normative home its Program-27 charter makes it (D92).
Text, not merely production. The trigger is deliberately the section text
rather than a section production, because nine of the appendix’s productions
have no code block behind them at all — the sections state them in prose,
and a grammar needs a right-hand side. They are Char (§1.1),
whitespace, comment and delimiter (§1.2, §1.4), operator
(§1.4’s draft ruling), escape (§1.5), intrinsic-name (§2.7),
type-name (§2.9/§2.11 use it, §3.1 names the types) and vector-file
(§6.1). Under a production-only trigger those nine would adjudicate
themselves — the appendix legislating in exactly the places where no section
production exists to check it against, which is the reverse of what this
section is for.
Three things the file carries that the sections do not. It states a single
EBNF dialect — W3C EBNF, the XML 1.0 §6 notation whose operator set §1.4 and
§2.1 already use — and applies it uniformly, so that a reader is never left
inferring which dialect a ? came from. It supplies the nine prose-sourced
right-hand sides above, each carrying its citation. And it collects, in
comments, the context conditions an EBNF cannot express: maximal munch
within a token run, the string literal’s exemption from it, the closed keyword
set, the reserved element names self and it, and the whole of §3’s
static semantics. Read without them the file both accepts programs this
language rejects and rejects programs it accepts — the token-run rule applied
naively to a string would cut every non-trivial :material-basis
apart — and the file says so at the top rather than leaving either direction
to be discovered.
Where the sections are silent or disagree with themselves, the file collects the reference implementation’s reading and flags it. That wording is exact, and an earlier “records the gap instead of choosing” was not: a production must have a right-hand side, so writing one is choosing, and the honest record names the reading taken and what cuts against it. Two places arose, and both were ruled by the Director on 2026-08-11 (ADR191 R4 and R5); the appendix now collects a ruling rather than flagging a gap:
<type-name>carried no §1.4 atom class, while §3.1 spelled the type names capitalized and §2.11’s own worked example wrote:type Coefficient. No capitalized spelling is lexable under §1.4, so the appendix collected the reference implementation’s lowercase-symbolreading and recorded the worked example that contradicted it. Ruled: the lowercase reading is blessed — §3.1’s six declarable type names and §2.11’s example are re-spelled lowercase, and §1.4 gains no atom class for capitalized type names (D94).§6.1’s
:graph/:fuel-used/:caswere written with the?binding to the value, which made the keywords themselves mandatory against §6.1’s own prose. Here the section production existed, so the appendix transcribed it verbatim and named the divergence in place. Ruled: the three become optional GROUPS — keyword optional, value mandatory when the keyword appears — in §6.1 and in the appendix together (D95).
What the appendix does not reach. The .bscn scenario-file dialect is
outside its scope — no section specifies it, and D91’s fixture/content split
is why — so the shape conflict that follows is recorded as D93, not resolved
here.
docs/reference/bsl.ebnf — the consolidated grammar/* =====================================================================
BSL — the consolidated grammar
=====================================================================
Every production of the Babylon Scripting Language, collected from the
scattered code blocks of `docs/reference/bsl-language.rst` §§1, 2 and
6.1. This file is part of that document by inclusion (§7): it COLLECTS,
it does not AMEND. On any divergence between the §1/§2/§6 TEXT and the
text collected here, the SECTION text wins and the divergence is a
defect to be repaired here.
The trigger is the section TEXT and not merely a section PRODUCTION,
deliberately: nine productions below are collected from prose rather
than from a code block (listed under DEVIATIONS, item 3), and a
production-only trigger would leave exactly those nine adjudicating
themselves — the appendix legislating in precisely the places where no
section production exists to check it against.
NOTATION — W3C EBNF, the notation of the XML 1.0 (5th ed.) §6
production grammar. Chosen over ISO 14977 for one reason: §1.4 and §2.1
already write their productions in `::=` / `|` / `?` / `*` / `+` /
quoted-terminal form, which IS W3C EBNF's operator set, so collecting
them is transcription rather than translation. ISO 14977 would have
demanded rewriting every production of a normative text into comma-
concatenation, `{ }` repetition and `;` termination — transcription
risk paid for nothing, against a document whose whole standard is that
two implementations be derivable from it (Constitution III.12(a)).
The dialect subset used here:
name ::= expr a production
A | B alternation
A? A* A+ zero-or-one, zero-or-more, one-or-more
( … ) grouping
"lit" 'lit' terminal (either quote; single quotes where the
terminal contains a double quote)
[a-z] character class
[^abc] negated character class
#xNN character by code point
A - B set subtraction
slash-star … comment. Written out in words rather than shown,
star-slash because the first star-slash closes a comment: a
comment containing the literal sequence would end
early, and a reader stripping comments with the
obvious regex would then read prose as grammar.
DEVIATIONS FROM THE SECTION TEXT. The first two are spellings of the
same set rather than changes to it; the third is a real addition and is
listed exhaustively because it is where this file carries the most
weight:
1. §2 writes nonterminals as `<name>`; W3C EBNF writes them bare. The
angle brackets are dropped, nothing else.
2. §1.4 writes character ranges as `"0" … "9"`; this file writes the
W3C character class `[0-9]`. Same set, one dialect.
3. NINE productions below have no §1/§2/§6 code block behind them: the
sections state them in PROSE, and a grammar needs a right-hand side.
They are `Char` (§1.1), `whitespace`, `comment` and `delimiter`
(§1.2, §1.4), `operator` (§1.4's draft ruling), `escape` (§1.5),
`intrinsic-name` (§2.7), `type-name` (§2.9/§2.11 use it, §3.1 names
the types) and `vector-file` (§6.1). Each is transcribed from the
prose that governs it and carries its citation; `type-name` is the
one whose prose does not determine a single answer, and its
production records both the reading taken and the section text that
cuts against it.
WHAT AN EBNF CANNOT CARRY, and where it lives instead. These are
context conditions on a derivation, not productions. Read without them
this file BOTH accepts programs the language rejects (nothing here
enforces §3) and rejects programs it accepts (the token-run and comment
rules below are not context-free and would otherwise cut string
literals apart):
- tokenization is maximal munch within a token run (§1.4): a run is
read to the next delimiter and classified WHOLE, so `1000.5$x` is
one unclassifiable run (E-LEX-003), never `1000.5$` then `x`;
- a token ends at whitespace, "(", ")", ";" or end of input (§1.4);
- THE STRING LITERAL IS THE EXCEPTION TO BOTH RULES ABOVE, and it is
load-bearing: a `string` lexes as ONE token from its opening quote
to its closing quote (§1.4, §1.5), so the run-terminators do not
apply inside it. A space, a "(", a ")" or a ";" between the quotes
is ordinary string content — `"a; b (c)"` is one atom, not four
tokens and not a comment. Every `:material-basis` in the estate
depends on this;
- whitespace and comments separate tokens and are otherwise
insignificant (§1.2); comments are whitespace;
- `operator` is valid ONLY in form-head position (§1.4);
- a keyword is never a value: it appears in option position followed
immediately by its operand, or alone if §1.6's table marks it a
flag. A keyword in value position is E-PARSE-010, and so is a
`string` in expression position (§1.6, D75);
- the keyword set is CLOSED (§1.6): an unrecognized keyword is
E-PARSE-013, never ignored;
- `self` and `it` are reserved symbols, never declared and never
shadowed (§2.5, E-PARSE-022);
- all typing, kind (§3.4), scope, cardinality, fuel-bound (§3.7) and
vocabulary (§3.6) checks are static semantics, not syntax.
===================================================================== */
/* =====================================================================
1. LEXICAL GRAMMAR (bsl-language.rst §1)
===================================================================== */
/* --- 1.2 Whitespace and comments ------------------------------------ */
whitespace ::= #x20 | #x9 | #xA | #xD /* §1.2 */
/* Exactly these four. #xC and the Unicode space
separators are NOT whitespace. */
comment ::= ";" ( Char - #xA )* /* §1.2 */
/* §1.2 in full: "A comment begins with `;` OUTSIDE A
STRING LITERAL and extends to the next LF or to end of
file." The carve-out is not decoration and cannot be
expressed in the production: a `;` between the quotes
of a `string` is string content, so this production
applies only where a token is not already open. There
are no block comments and no reader macros (D2). */
delimiter ::= whitespace | "(" | ")" | ";" /* §1.4 */
/* Ends a token RUN. It does not end a `string`, which
runs quote to quote — see the string-literal bullet in
the header. */
Char ::= [#x0-#xD7FF] | [#xE000-#x10FFFF] /* §1.1 */
/* Any Unicode SCALAR value — §1.1's own words — which is
every code point except the surrogate range
#xD800-#xDFFF, since a surrogate is not a scalar value
and cannot be encoded in UTF-8. A source file is UTF-8;
invalid UTF-8, or a BOM anywhere but offset 0, is
E-LEX-001 (§1.1). Stated as a real right-hand side
because a production whose RHS is only a comment is not
a production in this dialect at all: a literal reading
would collapse `string-char` to escapes and `comment`
to a bare ";". */
/* --- 1.4 Atoms ------------------------------------------------------ */
DIGIT ::= [0-9] /* §1.4 */
LOWER ::= [a-z] /* §1.4 */
UPPER ::= [A-Z] /* §1.4 */
symbol ::= LOWER ( LOWER | DIGIT | "-" )* /* §1.4 */
/* Max length 64 (E-LEX-010). */
qname ::= symbol ( "/" symbol )+ /* §1.4 */
/* Max 4 segments, 128 bytes total (E-LEX-011). */
keyword ::= ":" symbol /* §1.4, §1.6 */
enum-ref ::= enum-type "/" enum-member /* §1.4 */
enum-type ::= UPPER ( UPPER | LOWER | DIGIT )* /* §1.4 */
enum-member ::= UPPER ( UPPER | DIGIT | "_" )* /* §1.4 */
/* The member is the enum member IDENTIFIER, never its
serialized value: NodeType/SOCIAL_CLASS, never
NodeType/social_class. Registry membership is checked
at load (E-LOAD-030 / E-LOAD-031, §1.5). */
bool-lit ::= "#t" | "#f" /* §1.4 */
/* The only two boolean tokens; `true` / `false` are
ordinary symbols. */
operator ::= "<" | "<=" | ">" | ">=" | "=" /* §1.4 */
| "!=" | "+" | "-" | "*" | "/"
/* The tenth atom class, added by the §1.4 draft ruling
(implementation-discovered 2026-07-30): §2 quotes these
as terminals and §5.2 lists them as form tags, so the
atom-class table had to carry them. Lexed by exact
match against this closed set; valid only in form-head
position; CAS encodes them as form tags, never as
atoms. `-5` still lexes as an integer literal. */
/* --- 1.5 Literals --------------------------------------------------- */
digits ::= DIGIT ( "_"? DIGIT )* /* §1.4 */
/* Underscores are digit-group separators, removed before
interpretation; leading, trailing or doubled
underscores are E-LEX-003. Leading zeros are
insignificant. */
int-lit ::= "-"? digits /* §1.4, §1.5 */
/* Must fit i64 (E-LEX-020). Static type Int. */
u32-lit ::= digits /* AJ */
/* Must fit u32. Used for append-only kernel slots. */
scaled-lit ::= "-"? digits ( "." digits )? suffix /* §1.4, §1.5 */
/* A leading digit is mandatory: `.5c` is E-LEX-003.
Canonicalized to minimal scale; Currency further to
integer micro-units, so `0.50c` ≡ `0.5c` and `1000.5$`
≡ `1000.500$` (D4). */
suffix ::= "$" | "p" | "i" | "c" | "r" | "m" /* §1.4, §1.5, AJ */
/* The kind suffix is MANDATORY on every non-integer
literal — a bare `0.5` is E-LEX-021, which is the
lexical enforcement of the house prohibition on bare
floats (D3). $ = Currency [0,∞), scale ≤ 6;
p/i/c = Probability/Intensity/Coefficient [0,1],
scale ≤ 9. r = Ratio (0,∞), scale ≤ 9, non-positive is
E-LEX-027 (§1.5 addendum, D99, #492/ADR194).
m = Mass [0,∞), exact unsigned nanounits at
scale ≤ 9 (AJ). */
mass-lit ::= digits ( "." digits )? "m" /* AJ */
/* Exact, nonnegative Mass in unsigned nanounits. A
negative spelling, scale above nine, or value above
u64::MAX nanounits is rejected at read time. */
string ::= '"' string-char* '"' /* §1.4, §1.5 */
/* NFC-checked at load (E-LEX-002, D1); max 1024 bytes
after escape processing (E-LEX-026). Strings appear
only at `:material-basis` and in conformance-vector
identifiers; `Str` has no operations (§3.1). */
string-char ::= ( Char - ( '"' | "\" | #xA ) ) /* §1.4, §1.5 */
| escape
escape ::= "\" ( '"' | "\" | "n" | "t" ) /* §1.5 */
/* The only four escapes. Any other backslash sequence,
and a raw LF inside a string, are E-LEX-025. §1.4
spells this class as the four resulting values
(`"\\" | '\"' | "\n" | "\t"`); the same set, written
as the source sequences that produce it. */
literal ::= int-lit | scaled-lit | bool-lit /* §2.7 */
/* NOTE the asymmetry, and it is deliberate: `string` is a
well-formed atom but NOT a `literal`, because <expr>
has no string form (§1.6, §3.8 item 4). */
type-name ::= symbol /* §3.1 */
/* RULED, D94 (Director, 2026-08-11, ADR191 R4). This
production once RECORDED A GAP and collected the
reference implementation's reading while flagging it:
§2.9 / §2.11 / §2.7 write <type-name> as a grammar
nonterminal and never assign it a §1.4 atom class,
while §3.1's table spelled the type names capitalized
(`Currency`, `Int`, …) — and a bare capitalized run
matches NO §1.4 atom class (an enum-ref needs its `/`,
`symbol` is lowercase-only), so that spelling was
unlexable as written. §2.11's own worked example wrote
`:type Coefficient`, cutting against the reading.
The Phase-1 review owned two repairs — give §1.4 an
atom class for capitalized type names, or re-spell
§3.1's table and §2.11's example lowercase — and THE
SECOND WAS TAKEN. Type names are lowercase symbols:
`int` / `bool` / `currency` / `probability` /
`intensity` / `coefficient`, exactly the set
rust/crates/babylon-bsl/src/declarations.rs::parse_type_name
already accepts. §3.1 and §2.11 now spell them that
way, so the section and this appendix agree and the
production is a transcription rather than the defect it
used to name. §3.1's remaining rows (`Real`, `Enum<T>`,
the reference and set kinds, `Str`) are typechecker
types no <type-name> position can reach, so nothing
lexes them and nothing needed re-spelling.
ADDENDUM (Director ruling 2026-08-11, Organization spec
§1 Q12 — a LATER ruling than D94 above, recorded as
D101 and explicitly superseding D94's six-row closure,
never a silent reopening of it): a seventh lowercase
symbol, `enum`, joins this production's whole
vocabulary. Its storage/read law lives in §3.1 and the
`defenum`/`defvocabulary` declaration forms live at
§2.13, below §2.11 in this file — this comment block is
left otherwise unedited (D94's own record stands for
what was true through that review) rather than
rewritten to read as if it always said seven. */
/* ADDENDUM (Train B item 6, #591, 2026-08-15 — a LATER
row than D101 above, recorded as D155 and explicitly
superseding D98's "`Real` is not storable", never a
silent reopening): an eighth lowercase symbol, `real`,
joins this production's whole vocabulary — the finite
binary64 lane as a STORED field type, carrying no
declared-domain range law. Its storage/seed/write law
lives in §3.1's eighth row and §1.5's acceptance
paragraph; a `deffield`'s or `metric`'s `:type` may now
name it, so the `intrinsic-type-name` production below
(D98) keeps its explicit `"real"` alternative as a
subsumed historical record, not as a widening this
production lacks. The D94/D101 records above stand
unedited (Immutability of History). */
intrinsic-type-name ::= type-name | "real" /* §2.7 */
/* D98 (workforce draft ruling, Phase 1 review). Widens
type-name with `real` — legal ONLY in an intrinsic-decl's
:params/:returns position, below. A deffield's or a
metric's :type still writes bare type-name (§2.9, §2.11)
and still cannot name Real: §3.1 rules it "Not storable",
and this production does not touch that one. Needed
because every binary64 expression's static type is Real
(§3.3), so before this row no intrinsic's argument could
be declared at all — which made ADR188 Row 2's `floor`
rider (§3.10) undeclarable in content. */
/* =====================================================================
2. SYNTACTIC GRAMMAR — CONTENT FORMS (bsl-language.rst §2)
Every non-atomic construct is a parenthesised FORM whose first element
is a symbol (or an `operator`) naming the form. `(` and `)` are the
only structural delimiters: no brackets, no quote syntax, no dotted
pairs, no vectors (§1.3).
===================================================================== */
/* --- 2.2 Content files ---------------------------------------------- */
file ::= top-form* /* §2.2 */
top-form ::= rule | deffield | intrinsic-decl /* §2.2 */
| manifest | metric-decl | defenum | defvocabulary
/* File boundaries and file names carry NO semantics: the
same forms split across different files produce the
same rules_hash (§5.5). Duplicate rule ids, field,
intrinsic, rung or adjunction names across the content
set are E-LOAD-001. `defenum`/`defvocabulary` (§2.13,
D101, Organization spec §1 Q12) join this list without
moving any existing form's encoding — see §5.2's
fourth "obeys it" paragraph. */
/* --- 2.3 Rules ------------------------------------------------------ */
rule ::= "(" "rule" qname /* §2.3 */
":role" rule-role
":evidence" evidence-class
":material-basis" string
":fuel" int-lit
( ":projects-kernel" qname )?
domain?
anchor?
bindings
when?
effects
")"
/* The four valued keyword options may appear in ANY source
order (§2.3); the canonical serialization sorts them
(§5.3), so the fixed order above is this grammar's
spelling, not a constraint. All four are mandatory.
`:material-basis` must be present and non-empty
(E-PARSE-011); `:fuel` must be > 0 and ≤ 1_000_000
(E-PARSE-012). Role and evidence values are closed sets;
an off-set value is E-PARSE-015. */
rule-role ::= "mechanic" | "recognizer" | "external-event" | "intent"
/* §2.3, ADR224 */
/* `external-event` is the role for exogenous shocks.
`intent` writes only governed next-week intent carriers.
Non-mechanic effects are default-deny under E-LOAD-060. */
evidence-class ::= "observed" | "derived" | "calibrated" | "designed"
/* §2.3, Article IV */
/* This class names the rule's evidentiary basis. It does
not grant write authority. */
/*
An omitted <when> is unconditional. An EMPTY condition
is NOT expressible: `(when)` is E-PARSE-020, and a rule
meaning "always" writes `(when #t)` or omits the
clause — one of §6.3's four III.11 corrections. */
domain ::= "(" "domain" ( enum-ref | ":graph" ) ")" /* §2.3, D43 */
/* Optional, with §2.3's stated inference as its default.
The enum-ref is a NodeType member (E-TYPE-011
otherwise). `(domain :graph)` fires the rule exactly
once per tick and leaves `self` unbound (E-TYPE-015).
`:graph` is a FLAG keyword, legal only here
(E-PARSE-013 elsewhere, D42). */
anchor ::= "(" "anchor" ( ":after" | ":before" ) symbol ")" /* §2.3 */
/* Optional: an anchorless rule takes the position of the
system named by its rule id's first segment (D5). A raw
position float is not expressible. */
bindings ::= "(" "bindings" binding* ")" /* §2.3 */
when ::= "(" "when" cond ")" /* §2.3 */
effects ::= "(" "effects" effect-item+ ")" /* §2.3 */
/* --- 2.4 Conditions ------------------------------------------------- */
cond ::= bool-lit /* §2.4 */
| "(" "and" cond+ ")"
| "(" "or" cond+ ")"
| "(" "not" cond ")"
| "(" cmp expr expr ")"
| "(" "exists" query elem-name? cond? ")"
| "(" "forall" query elem-name? cond ")"
/* `and` / `or` are variadic with at least one operand:
`(and)` and `(or)` are E-PARSE-021 — there is no
implicit identity element. `exists` / `forall` bind no
variable of their own; the element is `it` (D6).
`(exists <query>)` with no body means "the query is
non-empty". References compare with `=` / `!=` only,
against a reference of the same kind (E-TYPE-017, D67).
A head symbol outside a closed terminal set is
E-PARSE-015; an operand count differing from a
production is E-PARSE-042 (D75). */
cmp ::= "<" | "<=" | ">" | ">=" | "=" | "!=" /* §2.4 */
/* --- 2.5 Bindings --------------------------------------------------- */
binding ::= "(" "binding" symbol bind-src bind-opt* ")" /* §2.5 */
/* Binding names are rule-scoped; a duplicate in one rule
is E-PARSE-030, and naming `self` or `it` is
E-PARSE-022. */
bind-src ::= ":field" qname /* §2.5 */
| ":const" qname
| ":metric" symbol
| ":tick"
| ":year"
| ":tick-of-year"
| ":tick-in-cycle" int-lit
| ":expr" expr
/* `:field` is NODE-scoped and stays node-scoped (D29): an
edge's or hyperedge's field is read by `field-of`
(§2.10). `:tick` / `:year` / `:tick-of-year` are flag
keywords; `:tick-in-cycle`'s length is a LITERAL and
must be > 0 (E-PARSE-014, D68). A `:expr` may reference
only bindings declared BEFORE it — a forward or self
reference is E-PARSE-032, which makes the dependency
graph a DAG in source order (D49). */
bind-opt ::= ":optional" | ":default" literal /* §2.5 */
/* `:optional` requires `:default` (bare is E-PARSE-031,
D13); `:default` takes a literal, never an expression;
both are illegal on a `:expr` (E-PARSE-033). */
/* --- 2.6 Queries ---------------------------------------------------- */
query ::= "(" "nodes" enum-ref node-pred? ")" /* §2.6 */
| "(" "edges" enum-ref edge-pred? ")"
| "(" "neighbors" expr enum-ref direction enum-ref ")"
| "(" "hyperedges" enum-ref hedge-pred? ")"
| "(" "members-of" expr enum-ref ")"
| "(" "hyperedges-of" expr enum-ref ")"
/* `neighbors` takes FOUR operands: the element, the
EdgeType traversed, the direction, and the result
NodeType — mandatory since D51, and the operand
FILTERS (a node's edges may reach several types) where
`members-of`'s ASSERTS (D24). Every enum-ref operand
position is kind-checked, E-TYPE-011 for all of them
(D74). A query result is a SET: each element appears
once however many edges reach it (D72), iterated in
ascending id byte order (D7, D25). */
elem-name ::= ":as" symbol /* §2.6, D54 */
/* Names an iterating form's element so a nested body can
still reach it; `it` always denotes the INNERMOST
enclosing iterating form's element (D53). */
direction ::= ":out" | ":in" | ":any" /* §2.6, D42 */
/* Flag keywords, legal only on `neighbors`. */
node-pred ::= cond /* §2.6 */
edge-pred ::= cond /* §2.6 */
hedge-pred ::= cond /* §2.6 */
/* --- 2.7 Expressions, intrinsics, folds, selections ----------------- */
expr ::= literal | symbol | enum-ref /* §2.7 */
| "(" arith expr expr ")"
| "(" intrinsic-name expr* ")"
| "(" "if" cond expr expr ")"
| "(" "quantize-mass" expr ")"
| fold
| accessor /* §2.10 */
| selection
/* Arithmetic is strictly binary: `(+ a b c)` is
E-PARSE-040 (D8), keeping the reduction order explicit
in the source. Both branches of `if` must have the same
static type (E-TYPE-020) and the same kind (§3.4). */
arith ::= "+" | "-" | "*" | "/" /* §2.7 */
fold ::= "(" "fold" fold-op query elem-name? /* §2.7 */
expr ( ":weight" expr )? ")"
/* An intensive body makes `sum` E-TYPE-041 and requires
an extensive `:weight` on `mean` (E-TYPE-042 /
E-TYPE-043, §3.4). */
fold-op ::= "sum" | "mean" | "min" | "max" | "count" /* §2.7 */
/* Closed five-member set; anything else is E-PARSE-015 —
the "unknown aggregation → False" correction (§6.3). */
selection ::= "(" "select-max" query elem-name? expr ")" /* §2.7, D45 */
| "(" "select-min" query elem-name? expr ")"
/* Returns the extremising ELEMENT where a fold returns
the extremised VALUE. Ties break to the first element
in §2.6's iteration order — a property of the language,
not of each rule. An empty query is E-EVAL-021; a score
that is not a comparable scalar is E-TYPE-016. */
intrinsic-name ::= symbol /* §2.7 */
/* A symbol declared in the intrinsic table. BSL cannot
DEFINE an intrinsic; transcendentals and
`round-half-even` are never language primitives. Every
§5.2 form-head symbol is reserved against this
namespace (E-LOAD-024, D33), `sigmoid` is prohibited
outright (D71), and §3.10 holds the declarable set at
{exp, log}. A call to an undeclared intrinsic is
E-LOAD-021. */
intrinsic-decl ::= "(" "intrinsic" symbol /* §2.7 */
":params" "(" intrinsic-type-name* ")"
":returns" intrinsic-type-name
":cost" int-lit
")"
/* Declares what the kernel provides, so the typechecker
and the fuel bound checker are computable from content
alone. A signature disagreeing with the kernel's
registration is E-LOAD-020 (rust/crates/babylon-bsl/
src/declarations.rs::kernel_signature). */
/* --- 2.8 Effects — the typed structural verbs ----------------------- */
effect-item ::= verb /* §2.8 */
| "(" "guard" cond effect-item+ ")"
| "(" "for-each" query elem-name? effect-item+ ")"
| choose
/* `for-each` is bounded iteration in effect position
(D47): the query is materialized against the rule's
PRE-state before any effect applies (D48), the body
runs once per element in iteration order, and an empty
query applies nothing rather than erroring. */
choose ::= "(" "choose" ":sample" qname ":slot" u32-lit /* AJ */
branch+ ")"
/* `:slot` is statically restricted to u32. A choose is a
direct top-level Mechanic effect and is non-nestable;
those are context conditions rather than productions. */
branch ::= "(" "branch" enum-ref ":mass" expr
"(" "effects" effect-item* ")" ")" /* AJ */
/* The mass expression is statically restricted to Mass.
A branch body may be empty and is statically restricted
to deterministic Mechanic effects: no `emit` and no
nested `choose`. */
verb ::= "(" "update-node" expr qname update-op ")" /* §2.8 */
| "(" "update-edge" expr qname update-op ")"
| "(" "add-node" enum-ref expr field-init* ")"
| "(" "remove-node" expr ")"
| "(" "add-edge" enum-ref expr expr ":strength" expr
field-init* ")"
| "(" "remove-edge" enum-ref expr expr ")"
| "(" "add-hyperedge" enum-ref expr members field-init* ")"
| "(" "update-hyperedge" expr qname update-op ")"
| "(" "remove-hyperedge" expr ")"
| "(" "update-membership" expr expr qname update-op ")"
| "(" "emit" enum-ref payload-item* ")"
/* Ten structural verbs plus `emit`. The id operand of
`add-node` / `add-hyperedge` is written <expr>, but no
expression form yields a FRESH identity: the executor
reads it as a SYMBOL introducing an effect-list-scoped
name for the minted object (§2.8's draft ruling,
implementation-discovered 2026-07-30). A <field-init>
naming the implicit <edge-type>/strength on `add-edge`
is E-PARSE-041 (D37); one owning off another type is
E-TYPE-014 statically on the minting verbs and
E-EVAL-033 at evaluation on the updating ones.
`update-membership` takes TWO element operands — the
hyperedge then the member — because BSL mints no
membership reference kind (D80, D82). There is no
add-member / remove-member verb and no clique
expansion: a member list crosses whole (D26, VIII.9). */
update-op ::= "(" "add" expr ")" /* §2.8 */
| "(" "sub" expr ")"
| "(" "set" expr ")"
| "(" "scale" expr ")"
/* Exactly today's four-operation effect enum. The set is
closed: a fifth head — the `(unset …)` the frozen
estate reaches for — is E-PARSE-015 (§3.8 item 1). */
members ::= "(" "members" member-item+ ")" /* §2.8 */
/* `+` makes a zero-member hyperedge unexpressible; the
upper end is the declared `:max-members` (§3.7),
checked STATICALLY because the list length is fixed in
the source text (E-LOAD-042). */
member-item ::= expr /* §2.8 */
| "(" "member" enum-ref expr field-init* ")"
/* A bare item where the hyperedge type declares no
membership payload; the annotated form where it does,
whose field-inits are EXACTLY that pair's declared
payload fields — no more and no fewer (E-LOAD-047,
D83). The enum-ref is the member's NodeType and it
ASSERTS: a member not of that type is E-EVAL-033. */
field-init ::= "(" qname expr ")" /* §2.8 */
payload-item ::= "(" symbol expr ")" /* §2.8 */
/* No string interpolation and no string payloads: a
string literal here is E-PARSE-010 (§3.8 item 4). */
/* --- 2.9 Field and manifest declarations ---------------------------- */
deffield ::= "(" "deffield" qname /* §2.9 */
":type" type-name
( ":kind" ( "intensive" | "extensive" )
| ":enum-type" enum-type )
( ":member" enum-ref )?
")"
/* The qname's first segment names the OWNING element
type — a NodeType, EdgeType or HyperedgeType member
(D31), rendered by lowercasing the member identifier
and replacing `_` with `-`; an unregistered segment is
E-LOAD-023. `:member` is what makes a deffield a
MEMBERSHIP-payload declaration (D79): its operand is a
NodeType member and its qname's first segment must
render a HyperedgeType (E-LOAD-048 otherwise).
`:kind`/`:enum-type` are mutually exclusive and jointly
exhaustive against `:type` (§2.13, D101, Organization
spec §1 Q12): every `:type` but `enum` requires `:kind`
and forbids `:enum-type`; `:type enum` requires
`:enum-type` (naming a `defenum`-declared type) and
forbids `:kind` — violating either side is E-LOAD-053.
Every EdgeType additionally carries one IMPLICITLY
declared field, <edge-type>/strength, `:type
Coefficient` `:kind extensive` — re-declaring it is
E-LOAD-001 (D32). Kernel disagreement is E-LOAD-022. */
manifest ::= "(" "manifest" symbol ceiling+ rung* adjunction* ")" /* §2.9 */
/* A manifest owes a `ceiling` row for every type the
content set queries, mutates, reaches with `the`, or
names in a `rung`; an omission is E-LOAD-045 (D76). */
ceiling ::= "(" "ceiling" enum-ref ":ceiling" int-lit /* §2.9, §3.9 */
( ":max-members" int-lit )? ":invariant"? ")"
/* `:max-members` is MANDATORY on a HyperedgeType row and
illegal on the other two; `:invariant` is legal on a
NodeType or EdgeType row and illegal on a HyperedgeType
row — any mismatch is E-LOAD-042 (D27). `:invariant`
makes add-node / remove-node / add-edge / remove-edge
naming that type E-LOAD-013, statically; field writes
are unaffected (D63). */
rung ::= "(" "rung" symbol enum-ref enum-ref /* §2.9, §3.9 */
":via" enum-ref ":substrate"? ")"
/* One step of a scale lattice. The positional operands
are NodeType members, FINER FIRST and coarser second,
and `:via` is the EdgeType carrying the relation,
directed finer → coarser (D86). `:substrate` obliges
all three types to carry `:invariant` (E-LOAD-049,
D87). */
adjunction ::= "(" "adjunction" symbol qname qname /* §2.9, §3.9 */
":rung" symbol ( ":weighted-by" qname )? ")"
/* One INSTANCE of the allocate ⊣ aggregate schema along a
declared rung; the two qnames are the fields at the
rung's finer and coarser ends IN THE RUNG'S ORDER. An
intensive field pair with no `:weighted-by` is
E-LOAD-050 and a non-extensive weight is E-TYPE-043
(D88); any other misfit at the declared rung is the
single code E-LOAD-051 (D89). The grammar gives an
adjunction NO clause in which to state a conservation
law — that is how "instances, not kinds" is enforced by
construction. */
/* --- 2.10 Element accessors ----------------------------------------- */
accessor ::= "(" "field-of" expr qname ")" /* §2.10 */
| "(" "edge-between" enum-ref expr expr ")"
| "(" "the" enum-ref ")"
| "(" "metric-of" expr symbol ")"
| "(" "membership-field-of" expr expr qname ")"
/* Accessors read from an element the rule already holds a
reference to. The QNAME carries the type annotation
because a reference carries none (§3.1); a referent of
another type, or a field it carries no value for, is
E-EVAL-033 — never a default and never an absent read
(D34). No accessor mutates (§2.10 discipline 3).
`the` is legal only against a NodeType whose manifest
ceiling is exactly 1 (E-LOAD-043, D40).
`membership-field-of` keys the pair hyperedge-then-
member, one order shared with `members-of` and
`update-membership` (D81). */
/* --- 2.11 Metric registration --------------------------------------- */
metric-decl ::= "(" "metric" symbol /* §2.11 */
":type" type-name
":kind" ( "intensive" | "extensive" )
domain
":provider" symbol
")"
/* Reuses §2.3's <domain> unchanged: `(domain :graph)`
declares a graph-scope metric read by a `:metric`
binding, `(domain NodeType/…)` an element-indexed one
read by `metric-of`. A metric form DECLARES what the
kernel provides (D55); kernel disagreement is
E-LOAD-025, an unregistered name E-LOAD-011, and
reading one through the wrong form for its declared
domain is E-LOAD-012. */
/* --- 2.13 Declaring enums and the graph vocabulary ------------------- */
defenum ::= "(" "defenum" enum-type /* §2.13 */
"(" enum-member+ ")"
")"
/* Director ruling 2026-08-11, Organization spec §1 Q12 —
supersedes D94's exclusion, recorded as D101. Member
order is NORMATIVE: it is the declared-order ordinal
§3.1's `enum` row stores. A duplicate type name, or a
duplicate member within one declaration, is
E-LOAD-001. Reused (not reinvented) productions:
`enum-type` and `enum-member` are §1.4's, unchanged. */
defvocabulary ::= "(" "defvocabulary" enum-type /* §2.13 */
"(" enum-member+ ")"
")"
/* The operand is syntactically an `enum-type` but
SEMANTICALLY restricted to §3.6's own closed set —
NodeType / EdgeType / HyperedgeType / EventType — an
unknown one is E-LOAD-030, the same code an unknown
`<enum-ref>` type name already uses there. Populates
the closed graph vocabulary (§3.6) `defenum` never
touches; member order carries no ordinal and is not
normative. Two `defvocabulary` forms for one
`<enum-kind>` is E-LOAD-001. */
/* =====================================================================
3. VECTOR-FILE FORMAT — FIXTURES, NOT CONTENT (§6.1, D91)
Conformance vectors are written in BSL's surface syntax and read by
§1's reader, but no `vector` form is canonical CONTENT: §5 encodes the
content forms of §2, and a `vector` form is never encoded under §5 nor
hashed into any content digest. "Hashable" in §6.1 means file
identity — the byte hash of the vector file itself.
The consequence this section exists to keep visible (D91): §1.6's
closed flag/valued keyword dichotomy governs CONTENT forms only.
Within a `vector` form, `:graph`, `:fuel-used` and `:cas` are
OPTIONAL vector-format keywords (D95), and the collision with
`:graph`'s content classification as a flag — here it takes a
graph-lit, there it takes nothing — is a scope boundary, not an
amendment to it.
An implementation's canonical encoder never sees a `vector` form;
handing it one is a caller error, not a defined encoding.
===================================================================== */
vector-file ::= vector* /* §6.1 */
/* Vector files live under a declared conformance root and
are sorted by vector id for execution. */
vector ::= "(" "vector" string /* §6.1 */
":rule" rule
":env" "(" env-entry* ")"
( ":graph" graph-lit )?
outcome
( ":fuel-used" int-lit )?
( ":cas" string )?
")"
/* RULED, D95 (Director, 2026-08-11, ADR191 R5). An earlier
transcription wrote `":graph" graph-lit?` — the `?`
binding to the VALUE, which made the keywords themselves
mandatory against §6.1's own prose (`:fuel-used` is
"mandatory on every non-error vector", so absent on
error vectors; `:cas` is "optional" outright). The
divergence was recorded here and belonged to the §6.1
text to repair; the repair landed in §6.1 and in this
file together. The `?` now binds to the KEYWORD-AND-
VALUE GROUP: the keyword is optional, its value is
mandatory whenever the keyword appears, and a bare
keyword is E-PARSE-010. */
env-entry ::= "(" symbol literal ")" /* §6.1 */
outcome ::= ":expect" literal | ":expect-error" symbol /* §6.1 */
/* `:expect` compares EXACTLY — bit-exact for binary64,
integer-exact for fixed point; conformance is not
tolerance-bounded. `:expect-error` requires the named
code at its class's declared time (load vs
evaluation). */
graph-lit ::= "(" "graph" node-lit* edge-lit* ")" /* §6.1 */
node-lit ::= "(" "node" symbol enum-ref field-init* ")" /* §6.1 */
edge-lit ::= "(" "edge" enum-ref symbol symbol expr ")" /* §6.1 */
7.1 The rigor index
Where each artifact of this language’s rigor lives. Pointers only: every row’s content belongs to the place it names, and this table restates none of it.
Artifact |
Home |
What it fixes |
|---|---|---|
Consolidated grammar |
§7 / |
Every production of §§1, 2 and 6.1 in one stated dialect. Normative by inclusion; the section text wins on divergence. |
Lexis and syntax |
§1, §2 |
The productions themselves, with the rulings that shaped each. |
Static semantics |
§3 |
Types (§3.1), the currency lane (§3.2–§3.3), the intensivity kind rule (§3.4), binding resolution (§3.5), the closed vocabulary (§3.6), deliberate absences (§3.8), the invariant substrate and scale lattice (§3.9), the intrinsic cap (§3.10). |
Dynamic semantics |
§4 |
Evaluation order (§4.1), the environment and subject order (§4.2), arithmetic (§4.3), query evaluation (§4.4), cross-system handoffs (§4.7). |
Cost model |
§3.7 (static bound), §4.5 (runtime meter) |
|
Error-code register |
§4.6 |
The five families ( |
Canonical encoding |
§5, worked example §5.6 |
The CAS byte layout, canonical child order, and |
Conformance vectors |
§6.1 (format), §6.2 (24 required families), §6.3 (transcription) |
What an implementation must pass to claim conformance, and the four silent degradations deliberately broken. |
Decision register |
Draft-Ruling Register, below |
Every point the design document under-determined, D1–D92, each a Phase-1 review item. |
Reference implementation |
|
The executable reading: |
Editor tooling |
|
A tree-sitter grammar derived from |
Determinism contract |
What |
Draft-Ruling Register
Every decision this document made where the design document under-determined the language. Each is a Phase-1 review item.
Note
Amendment AJ supersedes the register’s D69 and D176–D179 rng-draw
decisions. Those rows remain historical rationale only; the ratified finite
kernel addendum above is the complete current randomness surface.
Resolved — the Amendment D question (was open question 3 on this document’s
first revision). That question read: “Amendment D is unratified, so
<query>‘s data shape is written against the dyadic working assumption.
If Phase 0 rules hyperedge, §2.6, §2.8 and the edge-side ceiling in §3.7 all
need revision.” Phase 0 ruled: NATIVE HYPEREDGE, 2026-07-29, Amendment AE
clause (vi) (CONSTITUTION.md v3.0.0), recording
ai/_inbox/amendment-d-analysis-p27.md §9 (PR #353) sub-rulings D-1…D-7.
All three sections were revised in this document’s second revision; the dyadic
forms coexist unchanged (D-2). Rows D24–D28 below are the new
under-determined points that revision introduced — the question is closed, its
consequences are the ordinary kind of review item.
# |
Section |
Ruling |
|---|---|---|
D1 |
§1.1 |
String literals must be NFC; non-NFC is a load error. |
D2 |
§1.2 |
No block comments, no reader macros. |
D3 |
§1.5 |
Kind-suffixed literals ( |
D4 |
§1.5 |
Decimal canonicalization to minimal scale; Currency to integer micro-units. |
D5 |
§2.3 |
Anchorless rules inherit the system named by their rule-id’s first segment. |
D6 |
§2.4 |
|
D7 |
§2.6 |
Query iteration order is ascending id byte order, not storage order. |
D8 |
§2.7 |
Arithmetic is strictly binary; no variadic |
D9 |
§2.9 |
|
D10 |
§3.2 |
|
D11 |
§3.3 |
Bounded-scalar arithmetic promotes to |
D12 |
§3.4 |
|
D13 |
§3.5 |
|
D14 |
§3.7 |
Cost rows for |
D15 |
§3.7 |
|
D16 |
§4.2 |
Rules at one anchor position evaluate in ascending rule-id byte order. |
D17 |
§4.3 |
No FMA contraction; non-finite results are unrepresentable. |
D18 |
§4.4 |
|
D19 |
§5.2 |
The two-shape (atom/form) length-prefixed binary CAS, big-endian, with ASCII tag names rather than a numeric tag registry. |
D20 |
§5.2 |
Flag keywords encode as |
D21 |
§5.3 |
Canonical child order: positional, then options sorted by keyword name, then variadic body in source order. |
D22 |
§5.5 |
|
D23 |
§6.1 |
Conformance vectors are BSL content; |
D24 |
§2.6 |
|
D25 |
§2.6 |
A hyperedge’s declared member order is unobservable; |
D26 |
§2.8 |
Two typed verbs ( |
D27 |
§2.9, §3.7 |
A hyperedge manifest row declares two numbers — |
D28 |
§3.7 |
|
D29 |
§2.5, §2.10 |
Edge and hyperedge fields are read by the |
D30 |
§2.5 |
A foreign-node-type |
D31 |
§2.9 |
A |
D32 |
§2.9 |
|
D33 |
§2.7 |
Every §5.2 form-head symbol is reserved against the intrinsic
namespace; declaring an intrinsic with one is |
D34 |
§2.10 |
Accessors take their owning type in the |
D35 |
§2.8 |
|
D36 |
§2.8, §2.10 |
|
D37 |
§2.8 |
|
D38 |
§3.7 |
Accessors are keyed lookups charged at 1 + operands and never multiplied by a ceiling, so only iteration constructs carry ceiling factors in the static bound. |
D39 |
§3.6 |
Graph-scope state is ordinary node state on a carrier |
D40 |
§2.10 |
|
D41 |
§4.7 |
No staging, double-buffering or |
D42 |
§1.6 |
|
D43 |
§2.3 |
|
D44 |
§4.2 |
A node-domain rule fires over its subjects in ascending node-id byte order and applies their effects in that order — previously unspecified, and load-bearing because the binary64 lane is not associative. |
D45 |
§2.7 |
|
D46 |
§2.7 |
The score expression must be a comparable scalar ( |
D47 |
§2.8 |
|
D48 |
§2.8 |
Every expression in an effects list — verb operands, |
D49 |
§2.5 |
|
D50 |
§3.7, §4.5 |
A |
D51 |
§2.6 |
|
D52 |
§3.7 |
|
D53 |
§2.5, §2.6 |
|
D54 |
§2.6 |
|
D55 |
§2.11 |
A |
D56 |
§2.10, §2.11 |
Element-indexed metrics are read by the |
D57 |
§2.11 |
Provider work is not metered against the reading rule (the read costs 1 + operand); metric values enter no content hash and reach the tick hash only through the fields rules write from them; a Rust domain crate qualifies as a provider only inside the determinism contract’s pinned toolchain and with golden vectors. |
D58 |
§3.8 |
Optional axes take a companion presence field written under one
|
D59 |
§3.8 |
No sequence or map type. FIFO agendas become a |
D60 |
§3.8 |
No same-tick event-history query. The emitting rule stamps a field and the consumer reads it, which makes the dependency content rather than trace — and makes a crisis-gated system unportable apart from its producer. |
D61 |
§3.8 |
Four standing “nothing to add” rulings recorded so they stop
returning: no string payloads on |
D62 |
§3.9 |
No |
D63 |
§2.9, §3.9 |
|
D64 |
§3.9 |
No |
D65 |
§2.8 |
|
D66 |
§2.8 |
Not ruled here (when written). Per-membership payload — D26’s
first half — is a missing kind of object, not a missing verb, and
changing the exposed hyperedge model is Amendment-AE-(vi) territory.
Recorded as a port blocker with its two candidate landings named
and neither specced. Ruled since: Amendment AG clause (i)
( |
D67 |
§2.4, §3.1, §2.7 |
References compare by identity with |
D68 |
§2.5 |
Calendar reads land as |
D69 |
§3.10 |
The RNG carrier key is |
D70 |
§2.7, §3.10 |
The cap’s authority chain is recorded as it actually reads: R10 holds
|
D71 |
§3.10 |
|
D72 |
§2.6, §3.1 |
A query result is a set: |
D73 |
§2.6, §2.10, §3.9 |
A hydration seeding two edges with one |
D74 |
§2.3, §2.6, §2.8, §2.10 |
|
D75 |
§1.6, §2.7, §4.6 |
Error-code hygiene, ruled once. Arity gets |
D76 |
§2.9, §3.7 |
A manifest owes a |
D77 |
§4.5, §6.1 |
The fuel meter is per firing: each subject of a node-domain rule
starts a fresh meter at the declared |
D78 |
§3.8 |
Not ruled here. Edge-endpoint accessors (gap item Q2) are recorded
as an open item rather than a deliberate absence: the chapter plan
assigned Q2 to no chapter, the |
D79 |
§2.9, §2.12 |
A membership payload field is declared by |
D80 |
§2.12, §3.1, §2.6 |
No fourth reference kind and no |
D81 |
§2.10 |
|
D82 |
§2.8 |
|
D83 |
§2.8, §3.9 |
Mint-time payload initialisation is total and annotated:
|
D84 |
§2.12, §3.4, §3.7 |
What the kind carries: payload types and kinds exactly as node/edge
fields do (an intensive payload under an unweighted |
D85 |
§2.9, §3.9 |
Scale-lattice rungs and |
D86 |
§3.9 |
One orientation convention serves both forms: a |
D87 |
§3.9 |
|
D88 |
§3.9, §3.4 |
An |
D89 |
§3.9, §3.7 |
An |
D90 |
§3.4, §2.12 |
A weighted |
D91 |
§6.1, §1.6 |
Scope split between the vector-file format and canonical content:
|
D92 |
§7, §1.1, §1.2, §1.4, §2.1, §2.11, §6.1 |
The grammar is consolidated as an INCLUDED ASSET, not a second
home. |
D93 |
§7, §2.9, §6.1 |
The |
D94 |
§3.1, §2.11, §2.9, §7 |
A |
D95 |
§6.1, §7 |
§6.1’s vector keywords are optional GROUPS, not optional values — the
second of D92’s two deferred repairs, ruled (Director, 2026-08-11,
ADR191 R5). |
D96 |
§2.6, §3.9 |
The tick hash is NOT invariant under a reordering of a scenario’s
declarations, and §2.6’s order guarantee is weakened to what it
delivers (Director, 2026-08-11, ADR191 R2). The sentence promised
fold results “independent of insertion history and of the underlying
graph library”; |
D97 |
§3.10, §4.3, §6.2 |
The |
D98 |
§2.7, §3.1, §7 |
``real`` is admitted as an ``<intrinsic-decl>`` ``:params``/
``:returns`` type-name, and only there, through a dedicated
``<intrinsic-type-name> ::= <type-name> | “real”`` production — a
Phase-1-review reading needed to make D97’s own Signatures are enforced, not merely declared — the companion
Rust landing ( Declaration-malformity errors stay uncoded, per the crate’s
standing no-invented-codes precedent: a missing |
D99 |
§1.5, §3.1, §3.2, §4.6 |
The declared-domain Currency scale operation (Director ruling
2026-08-11, #492/ADR194 — “Add one legal operation: Currency scaled
by a defconst-declared positive coefficient whose domain is stated at
declaration and enforced loudly at load/eval. Scalar multiplication
isn’t new mathematics — this reads as machinery, keeps defines’
moddable shape intact”). Closes director-gate #492 (Blocker-1: a
runtime-moddable coefficient with a declared domain beyond Design chosen, and what was rejected. A NEW literal suffix,
The operation, added to §3.2 rather than inside its verbatim
design-doc quotation: The domain declaration. A bare (undeclared) ``r`` literal needs no ``defconst`` at all —
it is an ordinary The zero endpoint. Error codes, contiguous with the existing sequences (§4.6):
CAS round-trip. A Reference implementation: |
D100 |
§2.2, §4.2 |
ADR222/PER-17 supersedes this scheduling record. The multi-rule admission and duplicate-id refusal remain. The global byte-order fallback and inert-anchor clauses below describe the pre-ADR222 driver. The content-set loader admits more than one Disclosure (adversarial-panel finding FB7, Program 28 B2’s own fix
round). Byte order INVERTS the frozen Python engine’s own tick
order across the current estate: the frozen engine runs Vitality
(position 1) before Lifecycle (7) before Dispossession (10) before
Metabolism (13), while byte order sorts
Reference implementation: |
D101 |
§2.13, §3.1 |
The |
D102 |
§2.13, §2.10 |
Discharged (Territory port train, P27, 2026-08-12).
|
D103 |
§4.2, §2.8 |
Resolved (query-evaluation plan Q1). |
D104 |
§2.8, §4.2 |
Resolved (query-evaluation plan Q2). Under D103’s
collect-then-apply split, |
D105 |
§2.6, §2.10 |
Query-evaluation plan Q3, left deliberately uncoded. A query
OPERAND naming no live element — a dangling |
D106 |
§2.6 |
Query-evaluation plan Q4, recorded not ruled. Whether a
self-loop edge places a node in its own |
D107 |
§2.7, §3.4, §4.2 |
Resolved (query-evaluation plan Q5). Weighted |
D108 |
§3.3, §4.3, §4.4 |
RULED (Director, 2026-08-11, query-evaluation plan Q6).
|
D109 |
§3.2 addendum, §4.4 |
Resolved (query-evaluation plan Q7). |
D110 |
§2.7, §2.8 |
Resolved (query-evaluation plan Q8) — a misdiagnosis corrected,
not a spec gap filled. |
D111 |
§2.9, §2.13 |
Query-evaluation plan Q9, recorded not resolved — Territory-port
facing. |
D112 |
§3.7, §4.5 |
Resolved (query-evaluation plan Q10) — a property stated, not a
change made. §3.7’s |
D113 |
§2.7, §3.4 |
Resolved (query-evaluation plan Q11) — a fix-round finding,
corrected before this document’s own text was checked against the
implementation. §2.7’s |
D114 |
§2.7, §4.4 |
Resolved (query-evaluation plan Q12) — an implementation
boundary named, not a spec gap. §4.4’s empty- |
D115 |
§3.4 row 6, §3.7, §4.5 |
Resolved (query-evaluation plan Q13). |
D116 |
§4.2 |
Query-evaluation plan Q14, recorded not fixed — a second,
narrower instance of D103’s same divergence, one anchor level up.
D103 repaired the WITHIN-one-rule half of §4.2’s own sentence
(“rules within one system position observe the same pre-state”):
every subject firing of ONE rule now observes that rule’s shared
pre-tick state. The RULE-to-rule half is still open:
Correction (Task W2, BSL Hygiene Knock-out, 2026-08-18): the
“Latent today” premise above is FALSE. It generalized from
|
D117 |
§5.2 |
Resolved (#528 fix round, PR #528’s own adversarial-verifier
finding — the CAS resolution for ``defenum``/``defvocabulary``’s
bare atom). §5.2’s own Q12 paragraph stated “no new atom kind”
needed for |
D118 |
§2.13, §3, §4.6 |
Resolved (#528 fix round, MAJOR item 2 + MINOR item 3) — a
declared class widened, then the SAME law moved earlier, neither
move minting a new code. |
D119 |
§2.13, §3.6 |
Resolved (#534 fix round item 1, adversarial-panel finding,
mutation-reproduced). Extended (G2, #534 fix round 2 item 2, mutation-reproduced).
The SAME conflation this row already records for the sixteen §2.6
rule-form positions recurred, independently, at the SCENARIO
HYDRATION positions — a Disclosed (H2, #534 fix round 3): the split is ALSO
registry-relative, not just positional. A scenario-declared
|
D120 |
§4.2 |
Territory port train (P27 PR B, Task 8) — recorded, relying on
D116, not a repair. |
D121 |
§2.9, §3.1 |
Territory port train, Task 5. |
D122 |
§3.2, §3.10 |
Territory port train, Task 5. |
D123 |
§2.6 |
Territory port train, Task 5 vs Task 6 — the frozen asymmetry,
transcribed, not repaired. The eviction sink walk
( |
D124 |
§2.7, D45 |
Territory port train, Task 5 — a comparison this port owes,
resolved by NOT resolving it (both stand, independently correct
within their own systems). The frozen |
D125 |
§3.3, §3.10 |
Territory port train, Task 4 vs Task 6 — transcribed faithfully,
not repaired. |
D126 |
§1.5, §3.5 |
Territory port train, Task 3. The frozen engine reads every
attribute via |
D127 |
§2.8, §4.2 |
Territory port train, Task 5 (p2) and Task 6 (p3) — hash-neutral
no-op writes where the frozen engine skips the write entirely.
(a) p2’s no-sink fallback: when a latched territory has no
qualifying adjacent sink, this pack’s |
D128 |
§4.3 |
Territory port train, Tasks 5-6 — measured BSL expecteds are the
oracle (ADR183), never chased to bit-match the frozen engine’s own
operation sequence. Two sites: (a) the rent-spike lane computes
|
D129 |
N/A (frozen |
Territory port train, Task 3 — provably uniform, transcribed
directly rather than built as an override. The frozen
|
D130 |
§2.5, §2.6, §2.7, §2.10 |
Resolved (Territory port train, Task 6) — P6, the graph-threading
gap ADR197 recorded but left open.
|
D131 |
§3.4 |
Territory port train, Task 3 (fix round, 2026-08-12) — a
typecheck-forced storage choice, filed after the fact: the
original fixture landed the choice without a register row and
mis-cited D111/Q9 for it. |
D132 |
§4.2 |
Production port train (issue #565, Task 5) — recorded, relying on
D116, not a repair. CATCHES UP (fix round, 2026-08-12) with the
producer-side push redesign D136 records: this row once described
the SUPERSEDED pull-fold design (four rules, a
per-territory fold reading ``social-class/production-value``
directly) — corrected here to the FIVE rules and the THREE-stage
dependency the landed pack actually has. |
D133 |
N/A (frozen |
Production port train, Task 5 — provably dead, transcribed by
omission (same class as Territory’s D129, Dispossession’s D-1/D-2).
The frozen |
D134 |
§2.9, §3.1 |
Production port train, Tasks 2-3 — the ``la_production``
graph-scope channel, reformulated as an ordinary node field. The
frozen engine publishes |
D135 |
§2.7, D45 |
Production port train, Task 2 — a comparison this port owes,
resolved by NOT resolving it (same class as Territory’s D124, both
stand independently correct within their own systems). The frozen
|
D136 |
§2.6, §4.2 |
Production port train, Task 4 — RESOLVED (fix round, 2026-08-12):
adversarial verification caught the original row’s “no `.bsl`-level
fix is available within port-as-is” conclusion as FABRICATED,
corrected here rather than silently overwritten —
the same “mechanism, corrected” discipline D129’s own row uses for
an earlier fix round’s false claim. The original OBSERVATION
stands, independently re-confirmed: a territory-side PULL A grammar-forced narrowing, inert on the estate (MINOR-3, fix
round). |
D137 |
§1.5, §3.2 |
Production port train, Task 1 — a fragility flagged at
declaration, not yet triggered. |
D138 |
§3.4 |
Production port train, Task 4 — the scout dossier’s own headline
correction (``reports/production-bsl-surface-facts-2026-08-12.md``
§5), transcribed into the register. CORRECTED (fix round,
2026-08-12, MINOR-1): this row’s own account of what ``p4`` does is
now HISTORY, not the live design — D136’s producer-side push
redesign discharges the fold entirely, so this row’s own
``field_ref_for`` restriction is no longer what ``p4`` works
around; the restriction explains why ``social-class/production-
value`` (D134) exists as a per-node, already-filtered field in the
FIRST place, before the push design existed. A naive per-
territory |
D139 |
§2.9, §3.4 |
T2 (issue #559), Task 2 — the D32 implicit-strength seeding is
WIRED, and its trigger is a deliberate NARROWING of D32’s literal
text. The implicit |
D140 |
§2.6 |
T2 (issue #559), Task 3 — ``Element``’s cross-kind Ord RULED:
``Node`` sorts before ``Edge``, by declaration order. §2.6 defines
a total order WITHIN each query kind’s own result set only — it is
silent on comparing a |
D141 |
§2.10, §2.9 |
T2 (issue #559), Task 1 — ``GraphSubstrate::edge_attribute`` takes
the FULL QNAME, checks ONLY the ``/strength`` suffix, and NEVER the
owner segment. The one new substrate method mirrors
|
D142 |
§2.10 |
T2 (issue #559), Task 7 — the ``the`` disposition: NOT folded into
T2; its own micro-train (T2.5), because serving it surfaces an
unscoped load-pipeline design gap. |
D143 |
§2.8, §2.9 |
T3 (issue #560), PR A — the double-storage ruling: an
``update-edge`` against ``<edge-type>/strength`` writes the EXISTING
strength slot, never a fifth-section row. ADR198 R1 rules full
symmetric edge attributes and R2 rules the fifth canonical section
holding them, but no ruling text named where a |
D144 |
§2.9 |
T3 (issue #560), PR A — the fifth canonical section’s shape,
RULED: tag ``0x05``; entries ``str type ‖ u64 from ‖ u64 to ‖ str
qname ‖ u64 value-bits``; ascending ``(type, from, to, qname)``;
ELIDED WHEN EMPTY; and the hash contract is VERSIONED from this
train. ADR198 R2 fixed the what (a fifth section, hashed only
when at least one edge attribute exists) and left the layout to
the implementing train. The entry layout mirrors section |
D145 |
§4.2, §2.8 |
T3 (issue #560), PR B — ``PendingWrite``’s target is a SUM TYPE
(``WriteTarget::Node | WriteTarget::Edge``), not a parallel
edge-write batch: the collected batch’s application law settles the
widening shape. ADR198 R3 charters |
D146 |
N/A (frozen-engine divergence by construction, not a BSL construct) |
W10 class-surface ternary port (issue #588), Tasks 3-4 — the
RE-POINTED ACCUMULATOR (the headliner): the (r, l, f) ternary is
stored and updated directly on the class node — |
D147 |
N/A (frozen-formula surface — ADR202 R7’s retirement, not a BSL construct) |
W10 (issue #588), Task 3 — the Curve-5 Gaussian is NOT
transcribed; the linear chauvinist pass-through IS. The
wage-balance agitation MAGNITUDE component (the frozen Gaussian at
|
D148 |
N/A (frozen graph-attribute surface, not a BSL construct) |
W10 (issue #588), Task 3 — ``wage_deterioration`` is stubbed
``0.0c``: the frozen engine reads last tick’s
|
D149 |
N/A (frozen electoral-register surface, not a BSL construct) |
W10 (issue #588), Task 3 — ``popular_front_suppression`` is
stubbed ``0.0c``: the frozen engine reads the electoral register
one tick stale ( |
D150 |
N/A (frozen services-side buffer write — no ported consumers; not a BSL construct) |
W10 (issue #588), Task 3 — the ``material_conditions`` buffer
write is not ported ( |
D151 |
§2.6, §4.2 |
W10 (issue #588), Task 3 — solidarity pull→push redesign (the
D136 fix-round pattern), with three recorded narrowings. Exact
vs the frozen fold-sums ( |
D152 |
N/A (a gate read re-pointed at the stored ternary — the W1 unification re-home, not a BSL construct) |
W10 (issue #588), Task 3 — the class-source percolation gate
re-pointed: the frozen gate reads the source’s
|
D153 |
§3.5 |
W10 (issue #588), Task 3 — positioned-only agitation:
|
D154 |
§4.2 |
W10 (issue #588), Task 3 — same-tick closure heal observed
(D116 reliance): |
D155 |
§3.1, §2.9, §1.5 |
Train B item 6 (issue #591) — |
D156 |
§3.9, §4.6 |
Train B item 3 (issue #591) — the |
D157 |
§2.13 |
Train B item 4 (issue #591) — scenario-declaration sharing via a
|
D158 |
N/A (a write re-pointed at the stored ternary — the W1 unification re-home, not a BSL construct) |
Wave C (issue #605) — the Solidarity @8.0 port re-points frozen
|
D159 |
§2.8, §4.2 |
Wave C (issue #605) — multi-inbound-edge last-write-wins, a
genuine behavioural divergence from frozen. The frozen engine
applies each SOLIDARITY edge’s delta sequentially, each against the
PREVIOUS write ( |
D160 |
§2.10, §4.2 |
Wave C (issue #605) — the first rule pack to read another node’s
field, making the collect-then-apply pre-state semantics
observable for the first time. The transmission delta needs the
TARGET’s current value, so |
D161 |
N/A (a domain content-model consequence of D158’s re-point, three verified mitigations — not a BSL construct) |
Wave C (issue #605) — the open simplex window, position 8.0 to
position 17.0. |
D162 |
N/A (a verified content-model narrowing — one rule, not two; not a BSL construct) |
Wave C (issue #605) — org-sourced SOLIDARITY edges are provably
inert for this system, so |
D163 |
§2.10, §3.5 |
Wave C (issue #605) — target liveness AND target consciousness
must both be seeded; the port narrows, it does not diverge in
behaviour. Frozen’s per-edge TARGET read uses TWO permissively-
defaulting accessors on the same node, not one:
|
D164 |
N/A (frozen dead-coefficient surface — zero call sites in
|
Wave C (issue #605) — |
D165 |
N/A (a content-model reformulation — find-first graph scan versus fold-sum aggregation; not a BSL construct) |
Decomposition+ControlRatio port train (issue #591 family), the
census FIND-FIRST -> PER-NODE-SUM reformulation —
registered here per the controller-routed obligation from the
Task 2 review; prose-only, until this row, in
|
D166 |
N/A (a content-model reformulation — the non-graph persistent_data dict to a graph-backed singleton carrier; not a single BSL construct) |
Decomposition+ControlRatio port train (issue #591 family) — the frozen
|
D167 |
N/A (a structural-verb refusal — |
The frozen |
D168 |
N/A (an omitted read path — no BSL |
The frozen engine’s |
D169 |
N/A (companion to D165 — the int-ordinal rejection and the fold-body laws that force the per-node reformulation; not a new construct) |
Companion to D165 (the census FIND-FIRST -> PER-NODE-SUM reformulation itself,
which this row does not repeat) — records the REMAINING content both
2026-08-12 phase-1 inventories’ Adjudications recommend and this port train
REJECTS. Both inventories (decomposition §6 row |
D170 |
N/A (an observable-state-surface widening — the port publishes every tick where the frozen system gates behind readiness; not a construct) |
|
D171 |
N/A ( |
Four distinct payload divergences across this pack’s four |
D172 |
N/A (D100’s class — the global rule-id byte-order sort inverting a frozen tick-position order; not a new construct) |
ADR222/PER-17 supersedes this implementation record. The executable registry now runs Decomposition before ControlRatio. The zero-delay acceptance test requires the same-tick crisis at tick 1. This text records the former global-byte-order hazard and its prior rationale.
|
D173 |
N/A (four inherited frozen-code defects, transcribed verbatim per port-as-is law, ADR183; not BSL constructs) |
(1) Docstring drift, THREE sites (fixed forward, final review M5 — a third
site added; the first two remain off the SAME stale 30/70 split).
|
D174 |
N/A (a RESERVED-LINE transcription statement — Constitution IX.5 / ADR070 / Program 19; not a BSL construct) |
|
D175 |
§4.3, §3.10 |
|
D176 |
§3.10 |
|
D177 |
§3.10 |
|
D178 |
§3.10 |
|
D179 |
§3.10 |
A campaign’s |
D180 |
§2.7, §3.10 |
Round-2 gate restoration addendum (2026-08-17 final whole-branch review,
finding I2; fix-forward). The verbatim-transcription claim above was
INCOMPLETE at first landing: |
D181 |
§3.4 |
The |
D182 |
§3.4 |
|
D183 |
§3.4 |
|
D184 |
§3.4 |
S1 relocates a kind straddle rather than resolving it — recorded,
not fixed, per review finding F2 (#491 T1’s task review,
``.superpowers/sdd/2026-08-17-491-rung-ladder/task-1-review.md``
§”F2”). |
D185 |
N/A (game-content unit reconciliation, not a BSL grammar construct) |
#491 T2 — the subsistence-unit reconciliation
( |
D186 |
N/A (game-content unit reconciliation, not a BSL grammar construct) |
τ, the subsistence horizon (§4 of the same record). The frozen
|
D187 |
§3.2 |
The money-vs-money law (§5 of the same record):
|
D188 |
N/A (game-content unit reconciliation, not a BSL grammar construct) |
The level-set assignment (ADR210 R13) and its owed divergence
D-row (§8.2 of the same record). R13
( |
D189 |
§1.5, §2.9 |
T3 (#491, OQ-J), Half 2 of the typed-attribute-seeding design —
Currency’s node-attribute canonical section lands as tag ``0x06``,
NOT the design doc’s assumed ``0x05``: entries ``u64 id ‖ str name
‖ i128 value`` (16 raw bytes, big-endian, via ``i128::to_be_bytes()``),
ascending ``(id, name)``, ELIDED WHEN EMPTY, ``CANONICAL_LAYOUT_VERSION``
bumped 2 → 3. The design doc
( |
D190 |
§4.2, §2.8 |
T3 (#491, OQ-J) — ``PendingWrite``’s reduced operand widens to a
SUM TYPE (``WriteOperand::Real(f64) | WriteOperand::Currency``), not
a parallel Currency-write batch: the SAME reasoning D145 already
settled for ``WriteTarget``, applied one field over. Currency’s
typed storage needs |
D191 |
§2.8, §3.2 |
T4 (#491, Phase 1 — “the carrier, inert”; ADR194 R1) — the K=16
wealth-mass carrier’s declared shape and its two governing laws,
I1 and I2. |
D192 |
§3.4, §5.4 |
T4 (#491, Phase 1) — I3 and I4’s status at the carrier; the
absence fence. I3 ( |
D193 |
§3.5, §6.3 |
T4 (#491, Phase 1) — the ``:default`` allowlist posture, and this
task’s own scope boundary. This task ships NO rule binding
|
D194 |
§6.2, §3.4 |
T5 (#491, Phase 3a) — the H2’ dual pair lands as the ladder’s
declared resolution, replacing OQ-B’s single-quantity reading.
|
D195 |
§6.2 |
T5 — the H3 hold-out-horizon identity, as a contract. Dividing
H2’s rung condition through by |
D196 |
§9/T5.1(3) |
T5 — ADR202 R2 is CARRIED, not satisfied, by this train (DP-10),
and the limitation is structural, not a shortfall in effort
(C-6). R2 asserts more intra-class dispersion implies less
switch-like rupture; |
D197 |
§3.2 |
T5 — the real-lane population finding, measured empirically (the
same species of gap T4.3’s Currency-drain spike found, one
operator over). |
D198 |
N/A (game-content derivation record, not a BSL grammar construct) |
T6.3 — κ derived, not picked (ADR210 R14’s obligation
discharged). |
D199 |
N/A (game-content divergence record, not a BSL grammar construct) |
T6.4’s DP-6 = B departure from OQ-H, recorded (the plan’s “one of
the two rows ships; never neither”). The mortality driver in
|
D200 |
§2.9 |
``:max-members`` is DERIVED FROM THE SEEDED POPULATION, never
stipulated (Community port train, Task 4, 2026-08-21; the plan’s
|
D201 |
§2.6 |
Slice 3’s cross-kind Ord ruling and the two-table move
(Community port train, Task 3, 2026-08-22; the plan’s |
D202 |
§2.8, §2.10, §2.5 |
Task 6’s read/write surface for hyperedge own-fields (Community
port train, E2b, 2026-08-22; the plan’s |
D203 |
§4.2, §2.8 |
The Community pack’s census decomposition (Community port train,
Task 8, 2026-08-22; the plan’s D-NF+3/D-NF+25). |
D204 |
§4.2, §2.8, §6.2 |
The c06 split and the ADR214 floor’s landing (Community port
train, Task 9, 2026-08-22). The plan’s c06 was ONE rule — “the
pack’s ONLY 14-arm dispatch” driving the |
D205 |
§4.2, §1.2 |
Cost modifiers, the decay, and the five Task-10 worlds (Community
port train, 2026-08-22). |
D206 |
§2.6 |
The ephemeral XGI rebuild collapses into the substrate (D-NF+1).
Frozen rebuilds a throwaway |
D207 |
§2.5 |
The ``community-register`` carrier is not a community node
(D-NF+2). The world’s singleton INSTITUTION registry gives
carrier-subject rules a subject; the |
D208 |
§4.2 |
The D116 same-tick cross-rule reliance, recorded as the Q14 train’s acceptance-criterion input for this pack (D-NF+4). Five reads (the plan’s §8b table), two of them FATAL if collect-across-rules ever lands (c05 reading pre-reset accumulators; c06a/c06b’s cache hand-off). The pack’s rules run in rule-id byte order (D16); this row exists so the Q14 repair train has the correct criterion in hand before it changes that. |
D209 |
§3.7 |
The 500-org cap does not port (D-NF+5). Frozen truncates
|
D210 |
§2.7 |
Shannon entropy lands on the ``log`` intrinsic (D-NF+7) —
LANDED at the DG-2 PUBLISH ruling (the 2026-08-18 sitting):
|
D211 |
§2.7 |
A second declared home for the hegemonic tie-break (D-NF+8) —
LANDED at DG-2 = PUBLISH. |
D212 |
§3.6 |
Unread published state is not declared (D-NF+9). Frozen
publishes |
D213 |
§5 |
The #653-gated half, itemized (D-NF+10). Threat scoring
( |
D214 |
§5 |
The off-``step()`` estate is not ported (D-NF+11). The four
repression helpers ( |
D215 |
§3.7 |
``CanonicalState`` section ``0x07`` (D-NF+14, landed one section
LATER than the plan’s ``0x06``). The III.7 widening mirroring
ADR198 R1/ADR203 landed as the SEVENTH listing
( |
D216 |
§3.6 |
Hyperedge scenario seeding, and why no rule mints one
(D-NF+15). |
D217 |
§2.6 |
One ``HyperedgeType`` member + a ``community/kind`` enum field
(D-NF+16). Type-as-identity (14 members) would force 14
near-identical copies of every uniform law, since |
D218 |
§5 |
``community-cost-modifier`` is a dead write, ported anyway
(D-NF+17). Frozen declares and writes it with zero readers
anywhere in |
D219 |
§2.11 |
The pack emits no events and reads no ``TickContext`` (D-NF+18).
Frozen emits nothing (whole-file grep over |
D220 |
§3.6 |
Memberships are UNATTRIBUTED in this train (D-NF+19). No
payload exists, so the worlds carry no role/strength/visibility
columns — deliberately absent, never defaulted, since a defaulted
role would fabricate the exact data #653 exists to carry. The
seeded |
D221 |
§3.4 |
The duplication ledger (D-NF+20). The §8a table’s copied
expressions (the tie-break, the decay triplication, the
|
D222 |
§2.6 |
The type-scoped hyperedge enumerator widens ``GraphSubstrate``,
not ``CanonicalState`` (D-NF+21) — a declared crate-boundary
crossing (§3.6). |
D223 |
§3.7 |
The singleton INSTITUTION carrier is an estate-wide invariant;
this pack mints no second one (D-NF+23). |
D224 |
§2.3 |
The c06 split’s companion note (D-NF+6’s landing shape). The
floor table is a |
D225 |
§2.7, §2.10 |
The DG-2 readout landed (the 2026-08-18 sitting: PUBLISH).
|
D226 |
§3.10, §4.6 |
The |
D227 |
§2.7, §3.2, §3.10 |
The |
D228 |
§3.10 |
The |
See Also
Determinism Contract — the constitutional hash catalog, the three float-tolerance regimes, and (from Program 27 Phase 0) the tick-hash field set,
ContentDigestcomposition, andrules_hash’s place in it. This document defines the bytesrules_hashcovers; that one defines what it is compared against.Precision & Quantization Reference — the quantization Gatekeeper Pattern (
SnapToGrid,1e-5), the drift-prevention mechanism BSL’s fixed-point Currency lane partially supersedes.Runtime and Tool Configuration —
GameDefinesanddefines.yaml, the coefficient environment that:constbindings read.Topology System Reference —
NodeType/EdgeType, the closed graph vocabulary<enum-ref>draws on.Error Codes — the engine’s existing error-code estate; the
E-LEX/E-PARSE/E-TYPE/E-LOAD/E-EVALfamilies defined here are registered there when Phase 1 lands code.docs/superpowers/specs/2026-07-28-program-27-refoundation-design.md— the Director-approved design; §5 (the language), §6 (the kernel), §8 (correctness), §9 (error handling and determinism), §10 (sequencing).CONSTITUTION.mdIII.11 (Loud Failure), III.12 (Behavioral Contracts, Amendment Q), III.8 (Aleksandrov Test), Amendment AE clause (vi) (Amendment D — native hyperedge, ratified v3.0.0), II.9 (the strictly dyadic morphism layer that coexists with it), VIII.9 (the clique-expansion anti-pattern the ruling discharges structurally), and Amendment AG (attributed membership and lattice instances, ratified v3.2.0, recorded inai/decisions/ADR189_amendment_ag_attributed_membership_lattice_instances.yaml) — the amendment this document’s fourth revision specifies.ai/_inbox/amendment-d-analysis-p27.md— the Phase-0 Amendment D analysis (PR #353); §9 records the Director’s ruling and sub-rulings D-1…D-7 that §2.6, §2.8 and §3.7 of this document implement.