Facts and provenance
Deciding where a value comes from, when you are choosing between a binding, a computation and a generated value.
A fact is a normalized, canonical piece of truth about a property, assembled during intake before your template is involved at all. Provenance is the record of which of those facts — or whose hand — put the value that is on the page there.
What it is
Your template reaches the property's account of itself two ways, and both name it in one vocabulary.
import { compute, fact, number, row, text } from "@homepages/concrete";
// A part of the address: read-only, because the address is stored whole.
const city = text.short({ source: fact.property.address.city, label: "City" });
// A stored fact: an edit can update it everywhere the property shows it.
const unit = row({ label: "Unit", from: fact.property.units, locked: true });
const beds = number({ source: unit.beds, label: "Bedrooms" });
// A computation: the fact graph itself, reduced to this slot's value.
const beds_and_baths = text.short({
source: compute({ reads: [unit.beds, unit.baths] }, (beds, baths) => `${beds ?? 0} bd · ${baths ?? 0} ba`),
label: "Beds and baths",
});fact.<container>.<field> is the address. The container is the resolution rule:
fact.property reads the property root. A table — fact.property.units, fact.property.contacts
— is a list's source or a row's, never a value: one element's members are read
through a row() that holds it, as unit.beds off
const unit = row({ label: "Unit", from: fact.property.units, source: el }) inside a list's item,
or off a locked row that holds the first row of the table. Hover any
entry to read what it holds.
compute() reads the graph rather than one field of it: every fact a binding can
name, plus the media no single slot could hold — the property's photos, videos,
tours, floor plans, documents, the notes distilled from them, and its always-on
description. A fact keeps the same container and the same name on both surfaces, so
unit.beds is both what a slot binds and what a compute() lists in its
reads, and there is no second vocabulary.
Why it works this way
A deliverable is not filled once. A property's facts get corrected after intake. A user opens the editor and rewrites a headline. Later, someone re-runs fill against the same deliverable — to pick up a fact that arrived late, or because a section was added to the composition afterwards. All of that happens to the same deliverable, repeatedly, over its life, and every pass has to leave it in a state that still makes sense.
That is harder than it looks. A value the user already edited must not be silently overwritten: their edit was a deliberate act, and re-running fill is not a reason to discard it. But a value nobody has touched should pick up a corrected fact rather than keep serving one already known to be wrong. Those are opposite behaviours for two slots that, looked at as bare values, are indistinguishable — both are a string sitting in a field.
They stop being indistinguishable the moment you ask not what a slot holds but how it got there. A slot bound to a source can be re-evaluated against that source and compared with what it produced last time; a slot a person overrode carries that instead, and re-evaluating it is exactly the wrong move. The distinction that resolves re-fill is provenance, not value.
It is also why a binding declares a source rather than copying that source's value in at authoring time. A copy is a snapshot: the instant it is taken the link back is gone, and nothing downstream can tell a copied value from one a person typed. A declared source keeps the link alive — the platform can always ask what the source says now and compare. Provenance is what turns editing a deliverable from a one-shot render into something that can be revisited, corrected and re-filled without losing what a person already did to it.
How it works
Four routes to a value, one record of which ran
A slot's value arrives by one of four routes: a source binding the platform
resolves per deliverable, a compute() the framework derives, an
AI fill, or a person's own edit. An edit is a route on
top of any of the other three — it takes precedence over what the slot was bound to,
and the binding itself is not disturbed by it.
Provenance is what tells those apart on a single slot. In the editor it surfaces per slot, so a user can see whether they are looking at the property's own data, a derived value, something a model wrote, or their own earlier edit.
A slot has one source
A slot is baked or it is generated, never both, and the shape says so: a fact, a
compute(), a slot ref and a fill — fill.write, fill.pick or fill.find —
are four answers to the one source key, so a slot cannot name two. A place or an
address is never generated — only fill.find fills one, by a lookup. A number is filled only when it is an
estimate rather than a fact: a figure the platform holds is always bound. A filled
slot is produced once and is the user's after; a bound or computed one stays linked
to what it reads.
A sourced slot writes where its value is stored
An edit goes where the slot's source: keeps its value, and nothing else declares
it. A slot bound to a fact (fact.property.listing_intent) or to a row's member
(agent.phone) offers its edit as "Update everywhere", which changes the
property's own fact for every deliverable that shows it. A mirror — a slot whose
source: is another slot, Hero.slots.title or a sibling's const — edits that
slot, and every mirror of it follows; a mirror of a locked slot is locked with
it. Two kinds of fact are read-only, because neither is stored on its own: a part
of an address (fact.property.address.city, comp.address.latitude), whose parts
and pin must agree, and a computed member (comp.status, comp.distance_m,
comp.price_period). An edit to a slot bound to one stays on the page, as an edit
to a compute(), a fill or an unsourced slot does: each holds the slot's own value.
A slot seeded from a value but free to diverge is a compute() over it —
compute({ reads: [contact.name] }, (name) => name) — and locked is the one
option that takes editing away.
A source with nothing behind it does not fill the slot
Whether a given source has a value for a particular property is not something you
can guarantee in advance. The input material varies, and nothing forces every fact
to be present. A binding with nothing behind it leaves the slot empty, so a section
needs a sane story for that: the slot renders its marked empty branch, and a section
that should not appear at all says so through its display visibility. That is an
authoring-time decision, because the platform cannot make it up on the property's
behalf.
What it is not
Not a database you query at render time. By the time your markup runs, sourcing is over and the value has arrived on its binding. Nothing in a template looks anything up.
Not a place for template-specific data. Facts describe the property, not the template. Content that is the same for every deliverable is a static asset shipped with the template or a value your markup owns, never a binding to a fact that does not exist.
Not a schema you extend. The vocabulary is a closed set the framework owns, for the same reason a slot's kind is: an unrecognised name is a mistake to catch at the call site, not a value to leave silently unfilled.
Not a curated subset, either. Closed is not narrow. Every fact the platform holds about a property is in the vocabulary by construction; what is held back is plumbing — a storage key, an id tying a derived row to the upload it came from — which says where a value is kept rather than anything about the property. So the question to ask of something you want is whether it is a fact about the property at all.
Where next
- AI fill — the other route a value arrives by.
- Slots — where a
sourceis declared. - Bind a slot to a property fact — one field of the graph on one slot, start to finish.
- Compute a value from facts — the same trip when one field is not enough.
- Sources — the
factnamespace by container, and the refs acompute()reads.
