AI fill
Deciding how a slot is filled, when you want a value the property's facts do not already hold.
Fill is the stage that turns your declarations into a draft: one value per slot, for one deliverable, before anyone opens the editor. You do not write the code that produces those values. You declare where each one comes from, and where the answer is "the model", the platform runs it.
What it is
A fill is one of the four things a slot's source can be, beside a fact, a slot ref
and compute(). Where a compute() names its inputs and a function over them, a
fill names its inputs, a brief — the instruction a model is given — and a
verb: what the model does with them. fill.write writes a value, fill.pick
chooses from candidates that already exist, and fill.find finds places and
addresses.
A fill is a function: the slot holding it declares its output, and the fill declares its verb and its input.
| Verb | Signature | Input (the fill's) | Output (the holder's) |
|---|---|---|---|
| write | fill.write({ brief, reads?, none? }) | reads | a value of the holder's kind — a text slot's own, a list's item, an object label's text slot |
| pick | fill.pick({ brief, reads?, unique? }) | the holder's candidates and reads | one candidate, or a list of them; the holder's kind is the candidates' kind |
| find | fill.find({ brief, reads?, none? }) | the platform's lookup — one search the model plans from brief and reads | a place or an address, or a list of them |
import { fact, fill, image, list, text } from "@homepages/concrete";
const headline = text.medium({
label: "Headline",
cap: 60,
source: fill.write({
reads: [fact.property.address, fact.property.description],
brief: "What makes the property worth seeing, in one sentence. Confident and plain, no exclamation marks.",
}),
});
const gallery = list({
label: "Gallery",
max: 8,
source: fill.pick({
brief: "Every photograph of the property, ordered as a walk through it. Drop anything that is not a photograph of the property, and return none when nothing is.",
}),
item: image({ from: fact.property.property_media }),
});headline is a text slot, so its write writes text to the slot's cap. A
number written is an estimate: the model proposes a figure, and the user confirms
it. A written list states its kind in item — item: text.short({ cap: 40 }), whose
cap is each element's budget.
A pick chooses from its holder's candidates on every holder, and names none of
its own. gallery's item is image({ from: fact.property.property_media }), so it picks a subset of
the property's photographs in order; a single image picks one the same way, a
select field picks one of the keys its from names, and a row picks one row of
its from table (fact.property.comparables). A list of poi() items is found: the model
plans one search around the home and chooses among what it returns, with the uploaded
documents' notes as context when it reads fact.property.uploads, and the
platform's place lookup supplies each row. The list's own min and max bound how many items any of
them yields, and a filled list must declare max.
A write composes and never births an asset, so a list of media is always picked: its items are files the user uploaded.
A list whose items are objects splits the work. The list's fill decides the set — which photographs, which comparables, which questions — out of the one field of the item's object that holds the candidates, and each other field declares its own fill, which reads the element it is filling for through that field:
import { fact, fill, image, list, object, text } from "@homepages/concrete";
const photo = image({ label: "Photo", from: fact.property.property_media });
const slides = list({
label: "Slides",
max: 8,
source: fill.pick({ brief: "The strongest photos, no two of one room." }),
item: object({
label: text.short({ cap: 60, source: fill.write({ reads: [fact.property.description, photo], brief: "Name what the photo shows." }) }),
fields: { photo },
}),
});A row can be picked the same way: row({ label, from, source: fill.pick({ brief }) })
lets the model choose which one row of its from table a section shows.
A slot may take several fills, as an ordered list:
source: [fill.pick({ brief: "The strongest exterior." }), fill.pick({ brief: "Any exterior." })]
fills a hero with the strongest exterior photograph, else any exterior at all. What several fills yield follows from the holder, and no
option says it: a list holds the union of what every fill yields, in fill order; a
single value, a row or a label holds the first fill, in order, that yields one. A
holder's candidates may span several lists the same way — from: [a, b] picks from
their union. A fill is never listed beside a fact, a slot ref or a compute(): a
derived value has no writer beside it.
Each verb takes only the options it can act on, and every key it takes is valid
wherever it sits: every fill takes brief and reads; a write and a find take
none; a pick takes unique. There is no count and no cap on a fill — the list bounds the count, and the holder holds the budget.
Why it works this way
Fill is declarative because it runs on the platform, not in your code. You do not write a function that fetches a property's content and decides what to do with it; you write a description of the value, and the platform carries it out. That is what makes the rest of the platform possible, and each of these fails on its own without it:
- Plan. Because every fill's inputs are declared, the platform can read a whole deliverable's declarations before running any of them and work out what has to happen, and in what order — a fill that reads another filled slot, in its own section or another, runs after it.
- Cache. A fill the platform can see whole is one it can compare against the last run — same inputs, same brief, same slot — and skip when nothing changed.
- Cost. The platform knows what each call is before making it, so it can budget a fill pass before starting one.
- Re-run one slot. Because a fill is scoped to the slot it produces, the platform can run exactly the ones a newly placed section adds, leaving everything else — including a user's own edits — alone.
An arbitrary callback would cost all four at once: the platform cannot plan around code it has not run, cannot know whether that code behaves the same way twice, cannot price code it cannot inspect, and cannot scope its effects to one slot. That is also, plainly, why you do not call a model yourself from inside a template — not because the network call is forbidden, but because a call your own code makes is the arbitrary callback the whole design routes around.
The verb is declared because it is the one thing about a fill a reader most needs
to see: a write can say something untrue, a pick can only name a candidate that
exists, and the two are checked, priced and trusted differently. The output is
the holder's, so it is never said again on the fill — a text slot's write writes
text to the slot's own cap, a written list's to its item's — and two statements
of one fact could disagree. A pick's input is its holder's candidates for the same
reason — the property's media a media slot offers by its kind and from, the
keys a select names, the table a row holds a row of — because what the model may choose from is what the user may, said
once. An option nothing enforces would be prose
the model may or may not honour, dressed as a setting. So a fill carries one prose
key — the brief — and a handful of options, each held to by code, each legal only on
a verb that can act on it. An option a verb does not take is a compile error.
If you have used other AI tooling, this is probably not what you expect: most of it hands you the model and lets your code decide what to do with the response. Here the declaration is the artifact you author.
How it works
brief is the one instruction
The brief is required and is the whole of what you tell the model: what to write or pick, who reads it, the shape it takes, and who speaks where the text is someone's own words. The platform adds only what is true for every template — facts come from the reads, the slot's cap and form bound the answer, text in a deliverable is written by the platform's writer, a real estate copywriter working to the brief, never invent a candidate. It adds no taste of its own beyond that writer, so a brief that only names the subject gets the writer's idea of a good one. Phrasing a brief is how to write one.
reads is exactly what the model sees
Beside the brief, the model sees its reads and nothing else: fact refs such as
fact.property.description and fact.property.uploads — every upload as what is known
about it, never a link or a storage key, the documents' notes riding along — slot
refs off other sections' filled slots, a
filled slot of its own section named by that slot's const, a member read off a
row in scope, and — inside a list's item — the element itself (photo). No standing selection of facts rides along, and one fill's reads never
widen another's — the unit of visibility is the one call. A write needs reads to
write from; one that reads nothing writes from nothing.
A pick is different. Its candidates are its holder's — the photos, the
table's rows, the options — so it sees them without reading anything, and reads only what its
brief judges them against. A fill never reads a bound or computed slot, which
settles only after every fill has run
(relations/fill-reads-computed).
An estimate is not a fact
A figure the platform holds — the asking price, the square footage, a comparable's
sale price — is a fact, and a slot showing it is bound to it, never filled: a fill
would only restate it, less reliably. A number takes a fill.write for the other
kind of figure, one that is a judgement rather than a fact — a suggested price, a
price band — which the model proposes from what it reads and the user confirms or
corrects. Say so in the brief, and read the facts the estimate rests on. The
answer is a plain number, rounded to a whole one unless the slot declares
decimals; a figure the model cannot give is retried once, then left empty for
the user to type.
none admits the empty answer
A fill that may legitimately produce nothing says so with none: true, and its brief
ends with the sentence saying when — the bar the model judges abstention against is
part of the one instruction, not a second one. none is what makes the empty answer
legal at all; without it, an empty answer is a defect the platform retries. What
"nothing" means follows the slot: an empty string for text, no asset for a single
asset or a number, an empty list for a collection, all of them values your markup
already has a branch for. none is legal on a write and a find. A pick takes none:
it judges every candidate, and only one it is sure belongs is picked, so a pick that
finds no candidate fits the brief leaves its slot empty without one — and a display
entry's pick always resolves a case. A find of places needs none either: no place
of a kind near the home is an answer, so a poi slot or a list of places that finds
nothing — no place fits the brief, or the home has no coordinates to search around —
fills empty, with or without none. An address find takes none like a write:
without it, finding nothing is a failed fill, and the slot keeps its previous value
while the editor shows the failure.
The holder names a pick's candidates
A pick names no candidates of its own: they are its holder's — an image's, the
images of the list its from names; a select's keys; a row's table; and on a
list those of its plain item, the item's own or one field's of its object. A write has no candidates
— its kind is its holder's, a text slot's own or a written list's
item. The list's min and max bound how many items come back. An answer still
short of min is kept, never padded — the platform does not invent items to reach
a number.
The candidates are also what the user is offered: the editor's picker re-picks out of the same set the model picked from (slots).
unique keeps a pick a set
A pick is a set by default: a list's pick never names one candidate twice, and a
pick on a field of a list's object item never repeats one value across the items.
unique: false lifts that, and instructs nothing else.
The budget is the kind's cap
The character budget lives on the slot, and the model writes to it: the text slot's
own cap, or the cap of a written list's item (item: text.short({ cap: 40 })),
which applies to each element. A fill has no cap of
its own. To ask for something shorter, lower the slot's cap or say so in the brief
(contract/cap).
A url, date, email or phone has no cap at all: its form bounds it. The
model is told the form, the platform repairs formatting alone — a missing
https://, a mailto: or tel: prefix, an unpadded 2026-6-3 — and a value still
out of form after one retry is a failed fill, never stored: a slot keeps what it
held, a list drops the item, an object's field stays blank.
What it is not
Not a prompt playground. You are not iterating against a live model response. You are writing a declaration the platform interprets the same way on every property, and the small, enforced option set is what keeps that interpretation predictable rather than a matter of how one prompt happened to land.
Not a live binding. A bound or computed slot follows what it reads. A filled slot is produced once, and after that the value is the user's: nothing re-fills it when a fact changes, and an edit to it stays on the page, because there is nothing to write back to.
Not run at render time. Fill has finished by the time your markup runs. See the pipeline for what runs when.
Not a guarantee of exact text. The same fill can come back shorter or longer from one run to the next. That is a design obligation on you, not a defect to route around: a section has to render acceptably across a range of plausible lengths, not only the one you happened to preview against.
Not a second place to declare structure. A list declares its bounds and its item — the object's fields and each field's own fill — once, in the slot. What the list's own fill adds is only which elements it holds, and in what order.
Where next
- Facts and provenance — the other routes a value arrives by, and what a re-fill does to an edited slot.
- Slots — which kinds take a fill, and which are binding-only.
- Phrasing a brief — what to say in a brief, and what the platform already says for you.
- Assign media by fill — a pick written against photos you cannot see.
fill— the three verbs, their options and where each is legal.
