A select slot — a closed set of choices
Give the user a closed set of choices — an editable content slot, distinct from a behavioral enum option.
Give the user a closed set of choices — an editable content slot, distinct from
a behavioral enum option.
The delta
Section titled “The delta”A select slot still needs a source or a produced_by, exactly like every
other slot type — values alone only declares the closed set the editor’s
dropdown offers. The cleanest no-AI fill for a closed set is usually a
direct() fact that already resolves to one of a closed set of strings:
// schema.ts — add a select slot, seeded from a closed-vocabulary factproperty_type: { type: "select", editable_by_user: true, required: false, values: ["single_family", "condo_townhome", "multi_family", "investment"], source: direct("property_type"), display_name: "Property type",},// Renderer.tsx — read it like any other text-shaped slot<Slot id="property_type" textLeaf> <span>{slots.property_type}</span></Slot>slots.property_type is string | null (required is false). The general
source/produced_by contract still applies to a select slot, but no
fill-spec decision type constrains its output to the closed values set —
so source: direct(...) (a fact that already resolves within the set) is
the reliable way to fill one.
Commands
Section titled “Commands”None — this is a pure content edit. No CLI command beyond the author loop below.
Verify
Section titled “Verify”Verify with the author loop.
See also
Section titled “See also”- The closed vocabulary — the slot-type table, including
where
selectsits next totext/number/etc. - The schema system — the full
schema.tscontract, includingdirect()/derived()binding.