Content reference
A content repo is the site. This is everything it may say.
site.yaml branding, language, mail, the search box
aggregates.yaml the state machine of every bucket
needs.yaml what the site is for (read by iris, never by portal)
questions/
index.yaml the front page, served at /
about.yaml served at /about
review/
_section.yaml applies to everything under /review
index.yaml served at /review
[record].yaml serves /review/<anything>
Nothing here is required except a questions/ tree with something in
it. Portal’s lint refuses content it cannot serve honestly: in CI
(iris check), as the site starts, and at every Load.
What a visitor sees, and the YAML that makes it:
| on the page | in the YAML |
|---|---|
| a page | a file under questions/ (a question) |
| a card on it | an entry of alternatives: |
| a part of a card: an icon, a heading, a line | an entry of features: |
| a field | an entry of requirements: |
| a list of records | resource: on a feature |
| a desk: our name for a page a group opens to work its cases | a page with qualifies: whose list over a bucket has transitions: |
| what a form sends | a record, kept in a bucket (record_as:) |
| the stages a record goes through | the bucket’s states: and transitions: in aggregates.yaml |
The lint names things the same way: “card 1 › feature 3 › field 4”.
site.yaml
title: Vestmark kommune # the browser title and the header
wordmark: /site/logo.svg # an image instead of the title
wordmark_ink: true # a one-colour SVG mark drawn in the page's own ink
wordmark_invert: true # flip it in dark mode
wordmark_height: 2.4 # rem
lang: no # portal's own words: en, nb (or no), nn, sv, da, de
stylesheet: theme.css # a file in the repo, served at /site/theme.css
favicon: icon.svg # likewise: .svg, .png or .ico
hero: { kind: module, module: hero.js } # or { kind: plain }, or { kind: map }
mail:
from: Vestmark kommune <post@vestmark.example>
reply_to: post@vestmark.example
invite: { subject: "...", body: "..." } # rewords the built-in invite mail
search: { pages: [/] } # a search box above the options; see below
nav: bar # the way round the site in the header, by who the cards are for; or foot. See below
player: { streams: [{ name: Radio, url: /live.opus }] } # a bar on every page for the site's stream and its audio files; see below
mfa_groups: [board, treasurer] # these count only after a strong sign-in; see operations, "Groups that need a strong sign-in"
account_url: https://id.example.no/account # where a person adds a passkey; Rauthy's own page when unset
editor: { repo_cards: true } # the rich-text editor's "Repo" button and pasted repo links as cards, for the content's own Gitea; off unless set
timezone: Europe/Oslo # what a time typed in a form is in, for calendars; the default (CET/WET/EET zones or UTC)
addresses: kartverket # who suggests addresses in a `type: address` field: kartverket or off. Left out: kartverket for nb/nn, nobody otherwise
programs: # programs beside the site that move records; see below
scanner:
moves: [{ bucket: hires, from: out, to: returned }]
mail.from is required as soon as any state declares a mail.
A date (2026-10-06) or a date and time (2026-10-06T15:00) in a
record reads in the site’s language wherever portal shows it: in a
list’s or a desk’s row and in a state mail’s {field}, “tirsdag 6.
oktober 2026”, “tirsdag 6. oktober kl. 15:00” (“Tuesday 6 October at
15:00” in English). A time with an offset, or anything else, is shown
as it was written. A calendar (.ics) gives a time typed in a form in
timezone (TZID=Europe/Oslo, with the zone’s rules for the
Central European zones), and one with an offset in UTC.
Any text a person reads (name, description, label,
placeholder, a mail’s subject and body, consequence,
encouragements) may be a list instead of one string: one entry per
storyline, all lists the same length.
A map of the site’s places
hero: { kind: map } makes the front page’s header a map with a pin
for every place the site’s pages are about: quick ways in for a site
whose pages are somewhere (a river path, a playground, a yard).
# site.yaml
hero: { kind: map }
# questions/riverpath.yaml: a page that says where it is
name: Where does the river path go?
place: { lat: 59.6631, lon: 11.0084, zoom: 15, name: The river path }
-
Which pages. Every first-level page (
/riverpath, not/groups/path) with aplace:. Or the ones the site names, at any depth and in that order:hero: { kind: map, pages: [/riverpath, /groups/playground] }. -
Records too.
resource:puts a bucket’s records on the map, beside the pages or alone. It is a list as any other: who may read it (public: trueorrequires_group:),states:,where:andlimit:mean what they mean on a feature.hero: kind: map resource: source: { bucket: playgrounds } public: true states: [open] title: name # the field a pin is named by to: /playgrounds # the page a pin opens; /playgrounds/{id} for a page eachA record’s pin stands at the first place its answers hold (a
type: location, or atype: addressthat was found); a record that says nowhere has none. Withoutto:a pin is a name on the map. The newest come first, which is whatlimit:keeps. -
A pin is a link to its page, named by the place’s
name, else by the page’s question. A place of several pins (points:) has a pin at each, named by the point’s ownnamewhere it has one. An area or a path has its pin in the middle of its points. The map fits them all; one pin alone opens at its place’s ownzoom. -
Names that would overlap. Where two pins’ names would lie over one another, one is shown: a record’s before a page’s, and otherwise the earlier pin’s. The others show under the pointer or the keyboard’s focus, and on a touch screen at the first touch of their pin, the second opening its page. A name comes back as soon as the map is moved or zoomed to where there is room for it.
-
Who sees what. A page the visitor may not open has no pin.
-
Room around the pins. The map fills its box, and the pins keep the box’s padding from its edges:
.hero-map { padding: 8rem 3rem 6rem; }in the site’sstylesheet:for a header that lies over the top of the map, with a media query for narrow screens if it wants another there..hero-map .maplibregl-ctrl-top-right { display: none; }takes the zoom buttons away. -
Under the map the same places stand as links, for a keyboard, a screen reader, and an instance with no map tiles (
MAPBOX_TOKENunset), where the links are all there is.
The lint refuses a map with no place to show, a page named in
pages that is not there or has no place:, and a resource: whose
bucket no form asks a place for, that nobody may read, or whose to:
is no page.
A marker on any map portal draws in the browser (this one, a shows: map list, the pin of a type: location field) is in the site’s
--accent, so a site’s stylesheet: that sets its palette has set
its maps too. The map under them is the instance’s (MAPBOX_STYLE,
operations).
A hero module
hero: { kind: module, module: hero.js } lets a JavaScript module the
repo ships (served at /site/hero.js) draw the front page’s header.
It exports mount(container), returning a handle with stop(), which
portal calls when the page is left, and optionally ready, a promise
for the first frame where that takes a while. Portal mounts it as the
HTML is parsed and again on every return to the front page.
Between pages the header’s words and the drawing move separately
(view-transition-name: hero-copy and hero-piece): the words glide
to their new place while the drawing slides with the page, and the new
page shows once the drawing is ready, so nothing pops in late. The
drawing holds --hero-piece-height (55svh) until it draws; set that
on .hero-module to size it, or give .hero a min-height to keep
the same room on every page.
A search box
A visitor who does not want to read every card can say what they need in their own words, and is shown which option is theirs.
search:
pages: [/, /apply] # where the box shows; [/] when left out
label: Say what you need # optional; a list is one per storyline
placeholder: For example, the roof leaks when it rains # optional
model: route # optional; a model's name beside learn
search: with nothing under it is the box on the front door, in the
interface’s own words in the site’s lang. No search: at all is no
box anywhere, which is how every site reads until it adds one.
A visitor writes a few words and presses Enter. When the model is sure, the card that fits gets a strong ring, the page scrolls to it, and the box says This looks like yours: Roof repairs. When it is not, the nearest gets a faint ring and Closest match: Roof repairs. Pick the one that fits best., with a Show it button. Only cards a visitor can act on are marked; nothing is reordered or hidden, and typing again clears the ring. The words answer this visitor and are never kept (see Learning).
Content asks for a box; the instance draws it only while its learn
answers (Operations), as a site
without a map token draws no maps. If learn stops answering, the box
is gone from the next page until it is back.
One box for the whole site
search:
scope: site # page (the default, as above) | site
placeholder: What do you need? # optional; label too, as above
With scope: site the box sits in every page’s header and ranks every
card on the site this visitor may act on: pages they can open
directly, and a group’s pages only for its members, so someone signed
out is never sent to a desk. pages: is refused beside it.
Enter goes to the nearest card, on this page or another. The nearest three stay listed under the box, and Enter again goes to the next; Escape closes the list. Across a whole site the right card is first less often than on one page, but in the top three about as often, which is why it lists three.
Refused at load, at every reload and by the lint: a listed page that
does not exist, a page that serves many URLs ([record].yaml), a page
that offers fewer than two options to most visitors (a card that only
describes, one shown as not open yet, and one only a link shows do not
count), an empty pages, any key the block does
not know, a model that is a path rather than a name (a path on one
host is that instance’s LEARN_MODEL), and search_ready, which only
the instance may say. A site’s own stylesheet: can restyle the box
(.search-box) and the rings (.search-match, .search-closest).
The way round the site
nav: bar # a row in the header, by who the cards are for
nav: foot # the lists of other pages at the foot of each page, alone
nav: bar puts, on the wordmark’s line after the mark, one tab for
each name the site’s cards are for (for:). A
tab opens onto its cards wherever on the site they are, each page’s
under the question it asks, and a click lands on the card on its page.
On a narrow screen the tabs take a line of their own. A group’s tab
carries the group’s label, the same its room has; a word for people is
the tab as it is written. Read across, the row says who the site is
for, and each tab what they do here.
Any tab is anyone’s to open, signed in or not: the bar is a way of looking at the site, and the pages stay as they are for everyone. A card kept from the person looking is listed with the line it carries on its page (“For Artists”, “Opens after Newcomers”).
What is everyone’s has no tab, so the top of a page stays light. A
card that says nothing of who it is for, on a page anyone opens, is
reached from its page, and the foot of every page goes on listing
those pages (“Also worth asking”). A group’s own pages (qualifies)
move from the foot into the group’s tab: their cards, the ones that
say nothing included, and a page with no card to go to by its
question. They are told of to that group alone; to anyone else only a
card there that says who it is for.
nav: foot draws no bar and keeps both lists at the foot, as every
site had them; a site may use for: and stay on the foot. Left out, a
site whose cards say who they are for has the bar, and any other site
the foot.
The bar is <nav class="roles">, each tab a <details class="role">,
so it opens without a script and a stylesheet: can restyle or hide
it.
A player
A site with something to listen to gets one bar along the bottom of every page: its stream, and any audio file a page shows.
player:
streams:
- name: Radio # what the bar calls it
url: /live.opus # where the sound is, a path on this site
now: /now.json # optional: what is playing, and whether anything is
The bar plays one sound at a time, and keeps playing while the visitor moves through the site. The first stream is the one it offers; with several, the visitor picks.
An audio file in a list or on a record (a type: file field holding
an .mp3, .flac, .wav, .ogg, .opus, .m4a, .aac or .weba)
gets a Play button beside its name. Playing a file pauses the stream;
when the file ends, or is stopped, the stream comes back if it was
playing. Back to Radio in the bar does the same at once.
now answers JSON: { "on_air": true, "title": "…", "by": "…" },
asked every fifteen seconds. The bar shows the title and who it is by
beside the stream’s name, and with on_air: false says the stream is
off the air and offers nothing to play. A stream with no now is
shown by its name alone and taken to be on the air.
Both addresses are paths on this site (/live.opus), since a page
plays sound from its own address only: whatever serves the stream is
routed under the site’s own name by the host. Refused at load and by
the lint: no stream, a stream with no name, an address on another
host, and any key the block does not know. A site’s own stylesheet:
can restyle the bar (.site-player-bar, its data-state one of
ready, stream, file, off) and the buttons (.answer-play).
A question
One YAML file is one page.
id: /apply # defaults to the file's path
name: Apply to build
description: What we need from you.
qualifies: case_officers # a Kanidm group may open this page
requires_chain: /start # or: an answer they must already have given
followup: true # keep it out of the nav until earned
responsible: { name: Solveig, contact: post@vestmark.example }
# or a group's: no account is made for the inbox, and any signed-in
# member of the group may suggest a change to the page
responsible: { name: The board, contact: board@vestmark.example, group: board }
# and the page's own words above its suggest-a-change form
responsible:
name: The board
contact: board@vestmark.example
group: board
suggest: Only the annual meeting can change the bylaws. Say what you would change, and the board helps you word it.
# a locked page takes no suggested changes, from anyone, whoever answers
# for it: no form is drawn and the server refuses one. In a directory's
# _section.yaml it locks every page under it; `locked: false` on a page
# opens that one. A locked page is changed in the content repo
locked: true
event: # this page announces an occasion
starts: 2026-10-14T18:00
duration: 2h
place: The town hall
place: # this page is about somewhere
lat: 59.8938
lon: 11.0332
zoom: 15
name: The town hall
alternatives: [ ... ]
qualifies, requires_chain and responsible are inherited from the
nearest _section.yaml.
The person responsible names, signed in, finds “Suggest a change to
this page” at its foot. Where the instance has a token for the content
repo (EDIT_GITEA_TOKEN) that is a conversation: a model asks until
the change is clear, a larger one drafts it as edits to this repo, and
the read-back shows what would change, who would gain or lose access,
which links would stop landing, and the map before and after. On their
yes the change is checked, committed in their name on a branch, and
merged once this repo’s own check passes; “Undo my last change” turns
it round the same way. Without the token it is a plain form whose
words become a case for whoever keeps the site (see
Training). The form
opens with the interface’s own line, You are listed as responsible
for this question…; responsible.suggest puts the page’s own in its
place (and above the conversation, which has none of its own), for a
page a change to which means something else: bylaws that only an
annual meeting may change, a text someone else wrote. A list is one per
storyline. event makes a page an occasion with a time;
place makes it a place, drawing its maps under the question and
opening any type: location field on the page at its first point
rather than on the whole world. One point is
place: { lat, lon, zoom, name }; several are points: with a type:
place:
type: path # pins (the default), area or path
name: The river path
follow: walking # a path only: along the ways, as Mapbox's directions go
points: # at most 25
- { lat: 59.6631, lon: 11.0084, name: The pump house }
- { lat: 59.6662, lon: 11.0101, zoom: 16 }
Pins are a map per point, each a slide in a strip the visitor swipes,
one pin as much as several, named by the point’s name or the place’s.
An area (three points or more) is one map with the points as its
outline, shaded; a path (two or more) one map with a line through them
in order. Both are framed to fit. follow: walking, cycling or
driving draws the path along the ways instead of in straight lines,
asking Mapbox’s directions once per route and keeping the answer. A page with a slideshow too has the map as the
strip’s first slide instead, the strip’s full width, with the
pictures after it.
The foot of a page
Every page ends the same way, whatever shape it has: a question, a gate, or the nothing-here a wrong address gets.
The question nav lists where else the visitor may go, in up to two
lines. “Also worth asking” holds the pages open to anyone. “For your
group” holds the ones they see because of a group they hold, the pages
that qualifies for it; when one group applies the line names it by its
label, the same label the group’s room has (“For Board”). A signed-out
visitor only ever has the first line, and a line with nothing on it is
not drawn. On a site with the bar in its header
(nav:) a group’s pages are under its tab
there, and the foot keeps the first line, the way back and a group’s
handbook.
Under the nav, on a site with sign-in (OIDC_ISSUER or KANIDM_URL), comes a quiet last
line in <footer class="session-foot">. Signed out it is a link to sign
in that comes back to the same place: “Log in for questions your role
can answer”. Signed in it says who is here and offers the way out:
“Signed in as Kari · Log out”. A site without sign-in has no such line.
It is a spare to the header’s .session nav, with a class of its own,
so a stylesheet: that hides .session keeps this way in. A site that
wants neither hides .session-foot as well.
Pictures across the page
slideshow lays a strip of pictures under the question, the full
width of the screen: every picture as tall as the strip and as wide as
its own shape, swiped or arrowed through, its caption over its foot.
slideshow:
max_height: 60 # svh; 60 unless set, between 20 and 100
slides:
- image: images/built/01.webp # a path in the content repo, or https://
caption: The canteen at the theatre, renewed
width: 3207 # the picture's own size, optional:
height: 1400 # holds its place before it has loaded
Pictures in the content repo are served from this origin under
/site/; webp, avif and jpeg may be kept by the browser for an
hour. Keep them web-sized: around 1400 pixels tall is plenty.
Programs that move records
A barcode scanner at the counter, a script, n8n: a program beside the
site can move a record the way a desk button does. site.yaml names
it and the moves it may make:
programs:
scanner:
moves:
- { bucket: hires, from: out, to: returned } # scanned back in
The instance gives the program’s key that name (DHD_KEYS=<key>=scanner,
or a token in DHD_TOKENS for one over HTTPS; see operations,
“Programs that dial the site”). The program then sends a Move on a
record, and the site makes it as it makes a desk’s: the same states,
the state’s mail, the same row for the automations, the log saying scanner
moved it. It may make only the moves listed, from where the record is
now, and a move decided on a record that has moved since is refused.
A move carries no fields.
Refused at load, at every reload and by the lint: a move
aggregates.yaml does not declare, a bucket with no states, a program
with no moves, a name that is not lowercase letters, digits and -,
and a name a key is already named for (mail, payments, note,
may, watch, submit, credentials, asks, answers, rooms, rank, load, read).
Files at the site root
A repo’s .well-known/ directory is served at the root of the site, at
the same paths it has in the repo:
.well-known/security.txt -> https://<site>/.well-known/security.txt
.well-known/assetlinks.json -> https://<site>/.well-known/assetlinks.json
.well-known/matrix/server -> https://<site>/.well-known/matrix/server
This is the one part of the URL space a repo may write into directly.
RFC 8615 reserves /.well-known/, and a question’s id comes from a file
name under questions/, which cannot begin with a dot - so nothing
shipped here can shadow a page. A path that is not in the repo answers
404, not the app shell, so a program looking for one of these can
tell a missing file from a present one.
A file with no extension is served as JSON, which is what the
extensionless well-known files are. .txt, .xml, .webmanifest and
.mobileconfig are typed as themselves; the last matters because iOS
only offers to install a configuration profile that arrives as
application/x-apple-aspen-config.
Paths a reverse proxy claims in front of portal never reach the repo -
mail autoconfiguration (/.well-known/autoconfig/) and the CalDAV and
CardDAV redirects are usually handed to a mail server that generates
them.
A configuration profile
An iPhone can’t find a mail server’s settings by itself, and an
account added by hand often fails as if the password were wrong. A
configuration profile states the hosts and ports, and sets up mail,
calendars and contacts in one install. Portal serves one at
/profile.mobileconfig when site.yaml says where its values come
from:
profile:
pacc: https://mail.example.no/.well-known/user-agent-configuration.json
name: Example # what the accounts are called on the device
organization: Example AS # the profile's publisher, defaults to name
pacc is the mail server’s PACC document (Stalwart serves one).
Every host, port and path comes from it, so the profile follows the
server; where it gives no port, the standard TLS one is used (993,
465, 443). The profile holds no address or username, since iOS asks
for those at install, so one file serves everyone. Reinstalling
replaces the accounts rather than adding a second set.
The profile is unsigned, so iOS calls it Unverified but installs it.
A PACC document iOS can’t use (JMAP only, or no outgoing server) is an
error, not a half-empty profile. Without profile:, the address is a
404.
An alternative
One choice. Never two actions behind one heading: if two things can be done, they are two alternatives.
alternatives:
- name: Send the drawings
description: We answer within twelve weeks.
action: /sent # the page to go to; /shape/{field} templates
record_as: applications # the bucket the answer lands in
disabled: false
consequence: [What happens next]
encouragements: [It takes two minutes]
images: [/site/drawing.png]
features: [ ... ]
Three things an alternative may do instead of, or beside, recording an answer:
self_transition: # the person moves their own record
bucket: applications
to: complete
from: [open, incomplete] # defaults to the initial state alone
label: Send them
invite: { group: case_officers } # bring someone into a group
# or with words of its own, using any field of the form:
# invite:
# group: guests
# mail: { subject: "...", body: "... {arrival} ... {link} ..." }
# or with no group: the account and the one-time link, and no more
# invite: {}
An alternative may instead hold a conversation (see Training):
- name: Get something built
anchor: project # for links: an interview has no action
description: Tell us about your business ...
interview: { model: qwen3:8b, lang: en } # both optional
A model asks the visitor about their business one question at a
time, reads back what it understood, and on their yes the brief is
queued for the kit. interview: alone is the instance’s model in the
site’s lang. It is the card’s one action: no form fields, no
record_as, action, self_transition or invite beside it;
features that inform are welcome. model is a name (letters, digits
and . _ : / -), never a path or a command, and lang a code such
as en or nb; both are refused at load otherwise.
self_transition.from is what keeps a person in dialogue with their
case: an applicant written to for a missing drawing answers from
incomplete, and may withdraw from wherever the case has got to.
Omitted, it is the initial state alone, which is what a one-shot
unsubscribe link means. Each state listed becomes its own access rule,
and the lint refuses a from -> to the state machine does not declare.
An invite needs a required name and email (or, with a group,
phone) on the same alternative, sits on a page gated by qualifies,
and the inviting group must be allowed to invite that group by the
policy.
With no group (invite: {}, or only mail:), the invite makes the
account, sends the mail with the one-time link, and joins no group.
Someone who has an account already keeps it and is told to sign in. Its
own mail, if any, must name {link} and cannot name {group}. It
needs a Kanidm to make the account: on a site on memberships with no
Kanidm beside it, it cannot mean anything, and the lint refuses it (see
Memberships).
Every card has an id, so a link can land on it: uhhm.no’s front door
has /#project, /#subscribed, /#applied and /#joined. The id is
anchor: when the alternative sets one (lowercase letters, digits and
single dashes, its own on the page); else the last segment of its
action: when that is a plain site path no other card on the page
also ends in (/board/case gives case; /, [record], {field},
a query or a # do not count); else its heading, lowercased with æ,
ø, å as ae, o, a and dashes between the words. A later card with an
id already taken gets -2, -3. Set anchor: where links point at
a card whose action or heading may change. The lint refuses a bad or
repeated anchor: and warns on an in-site link or action: whose
# names no card on its page.
An action: may land on a card the same way: action: /#join is the
front door, at the card join; action: board#case a card on the
sibling page board; action: "#case" a card on the page itself.
The page must be there, as for any action; the card is the warning
above.
Who a card is for
for: says who a card is for, in one name or a list:
- name: Put a mix in rotation
for: artists # a sign-in group: the card is theirs
- name: Go on air
for: !newcomers # everyone signed in outside that group
- name: Plan the week
for: [hosts, artists, "!newcomers"]
- name: Send a message
for: Listeners # a word for people: it guards nothing
A group’s id (lowercase letters, digits and underscores, as groups are
written everywhere else) makes the card that group’s. Everyone who
opens the page sees the card, its description and what it takes. Its
members get the form, the lists and the button; everyone else reads
“For artists” where the button would be. The server holds the same
line: a form of the card, a file for it, its conversation and its
lists are taken from, and shown to, the card’s groups alone, and the
search box offers the card to them alone. On a page that is itself a
group’s (qualifies), a card for another group takes both.
! before a group turns it round, the way a systemd condition is
turned round: the card is for everyone signed in who is outside that
group. Groups without ! are any one of them; every group with !
holds as well. A card that names only ! groups takes signing in,
since what someone is outside is only known of someone known. To a
member of such a group the card reads “Opens after newcomers”. A
state’s revokes: is how someone leaves a group (see
State machines).
YAML reads a bare !newcomers as a tag, and portal reads that tag as
the name it looks like. Alone and in a - list it takes no quotes;
inside [ ], write "!newcomers".
Use ! to steer people along and a group to lock. Wherever portal
cannot tell what someone is in, a card for a group stays closed and a
card kept from a group opens. The lint refuses ! on a group in
mfa_groups for that reason: held back from a sign-in that was not
strong, the group is one its members then seem to be outside.
Any other word (“Listeners”, “Venues and promoters”) is a word for the
people the card is for, and guards nothing. The lint refuses a word
that is a group’s name but for its spelling (for: Artists where
artists is a group), which would read as closed and be open.
A feature
What an alternative offers, explained. A feature that is only layout is a feature wasted: each one says something true about the choice.
features:
- name: What you need
description: The case number from the letter.
icon: lucide:file-text # an Iconify icon, prefix:name
color: "#8ec2c0"
requirements: [ ... ] # form fields; beside a resource, what narrows it
resource: { ... } # live data
icon names an Iconify icon as
prefix:name, such as lucide:file-text or mdi:home: lowercase
letters, digits and hyphens on either side of the colon. The site
fetches it from Iconify once, keeps it, and serves it itself at
/icons/<prefix>/<name>.svg, so a visitor’s browser asks no one else;
it is painted in the feature’s colour. A name without a prefix, or one
the set does not have, shows nothing.
A feature with no form and no list informs; the button acts. It says
what is so about the choice: what it costs, how long it takes, who it
is not for, what to have ready. “Most kitchens take three to five
weeks” informs. “Bring the last two energy bills”, “Is this for you?”
and “Press Send below” act, and the lint warns on each, naming
the alternative as its page and its place there (/kitchen#2). A
plan’s facts become features of this kind, word for word, and
bratac build refuses a fact that acts.
A requirement (a form field)
requirements:
- name: email # snake_case; this is the stored key
label: Your email
placeholder: you@example.no
type: email
optional: false
value: "{key}" # a preset; a dynamic page's segment fills it
- { name: from, label: First day, type: date, min: today, max: today+365 }
- { name: weight, label: Weight, type: number, min: 0, step: 0.5, unit: kg }
- { name: postcode, label: Postcode, inputmode: numeric, pattern: "[0-9]{4}", pattern_says: Four digits }
- { name: story, label: Tell us, type: textarea, rows: 8, maxlength: 2000 }
- { name: agree, label: I accept the terms, type: checkbox }
- { name: name, label: Your name, autocomplete: name }
Each attribute is held twice: the browser stops at it, and the server refuses an answer that breaks it as it refuses one of the wrong kind.
| attribute | on | what it does |
|---|---|---|
min, max | number, range, money | the least and the most. A place’s count says min: 1 and max: its at_most, so nobody signs up minus one guest |
min, max | date, datetime-local | the first and last day: 2026-12-01, today, today+365, today-7. A booking says min: today |
min, max | time | the earliest and latest time of day: "17:00" |
step | number, range | the steps a value goes in, counted from min |
unit | number, range, money | what it is counted in, beside the field and with its name in a list (“Weight (kg)”) |
units | duration | the units offered, of minutes, hours, days, weeks, months, years; [days] unless said |
from, count | collection | the browser’s list it sends, and whether each line has a count (max is then the most of one thing) |
minlength, maxlength | text, textarea | the fewest and most characters |
pattern, pattern_says | text, tel, email, url, search | the shape of the whole answer as a regular expression, and the words the person is told when theirs does not have it. Always both |
inputmode | any typed field | the keyboard a phone offers: numeric, decimal, tel, email, url, search, text, none |
autocomplete | any typed field | what the browser may fill it from: name, email, tel, street-address, postal-code, organization, bday, off and the rest of HTML’s list. Left out, an email is email, a tel is tel and a field named name is name |
rows | textarea | how many lines tall |
The lint refuses an attribute on a type it means nothing for, a min
above its max, a pattern that is not a regular expression or comes
without pattern_says, and a type portal does not draw.
value: "{user.email}" or "{user.name}" is the signed-in person’s
own, and a field it fills is carried rather than asked: someone the
site knows is not asked who they are. A visitor gets the field, empty.
profile: starts a field from what the person’s provider says of them
and leaves it asked, so it can be put right: profile: phone_number,
street_address, postal_code, locality, country, birthdate,
given_name, family_name, name or email, OIDC’s standard claims.
Sign-in asks the provider for the scope a claim needs (phone,
address) only where its discovery lists the scope, so a provider that
lacks one is never refused a sign-in for it; the field is then empty, as
it is for a visitor. A value the content gives wins over profile.
profile_save: true beside it saves what is given on the person’s
account too, where what makes the accounts keeps it (Rauthy: the names,
the phone number, the address and the birth date); the field says so
(“saved on your account”). Signed in only, after the answer is filed,
and never email or name, which are who the account is.
type is one of:
| type | what it is |
|---|---|
text | the default: one line |
textarea | several lines |
email, tel, url, search | one line, checked as the browser checks it |
number, range | a number; a range is a slider |
money | a number of whole kroner, none below zero: what a state’s payment: { amount: { field } } reads |
date, datetime-local, time, month, week | a day, a day and a time, a time of day, a month, a week |
duration | a length of time, as a count and a unit; kept as ISO 8601 (P7D) and said in the site’s language (“7 days”). units: [days, weeks] says what may be picked between, days alone unless said. What a hold runs for (State machines) |
color | a colour, as #rrggbb |
checkbox | one tick, stored as true or false. Not optional, it must be ticked (the terms accepted). A list shows it as yes or no |
select | one choice, or multiple: true for any number |
file | an upload, with accept:. With roll: true, several, picked or shot, put in order before sending (A roll) |
prosekit | a rich-text editor. Holds HTML, cleaned against one allow-list when it is written and when it is shown: paragraphs, headings, lists, emphasis, and https, mailto and tel links (rel="nofollow ugc"). Anything else goes, its text kept; a script goes with what is in it. A picture is a type: file field beside it |
location | a pin on a map, stored as {lat, lon, zoom}; two number inputs, stored as {lat, lon}, where the instance has no MAPBOX_TOKEN or the map will not load |
address | a street address on one line. Where the site has a register to ask (addresses: in site.yaml), the browser’s own list suggests addresses as the person types, and one picked is kept with its street, postcode, town, municipality, place (lat, lon) and the register’s id; one only typed is kept as its words. A list and a mail say the line ({field}). The browser asks the site and the site asks the register, so no third party sees the visitor |
record | a record of another bucket: the one this belongs to, carried in, or a row picked from a list beside it |
collection | the rows a visitor gathered from a list elsewhere (collect:), kept in their browser until this form sends them: ids, or with count: true each with how many (gathering from a list) |
gesture, voice | a drawn stroke or a recording, through a redoal relay |
hidden | a carrier value, no label row |
The server holds a submission to the same rules as the form: a field
that is not optional must have a value, and a value must be what its
type says (email, number, date, time, datetime-local, url,
one of a select’s options, a point for location, a tick for a
checkbox), inside its bounds, steps, length and pattern. What the content
never gave a value (a hidden field with no value) cannot be asked
for. A select drawn from a resource: is checked to be a choice, not
that the resource still offers it.
A select takes either inline options: [...] or a resource: to
draw them from, with id_field: naming each item’s stable id.
collaborative: a text written together
- name: wording
label: The proposal as it will be put
type: prosekit
collaborative: true
Where a list opens the form to change a record (edit:, see “A
resource”), everyone who may change that record writes in the same
text at once, sees who else has it open, and sees their cursors. Saving
is as for any field: the text as it stands goes in the record’s log as
one edit, and someone else’s save of the same text is not a change made
meanwhile, since what you save has it already. A new submission has
nobody to write with, and is an editor as before.
The first person in starts the shared text from what the record says.
It is kept between saves, across a restart, and dropped when nobody has
had the record open for ten minutes; the next person starts it again
from the record. Only on a type: prosekit field, and only on a form
some list’s edit: opens: the lint refuses anything else. The editor
loads a large script (about 0.8 MB) on the pages that have such a
field, and on no others.
A roll of files
A file field takes one file. A roll takes several, and lets the person look them over before anything is sent:
- name: pictures
type: file
accept: image/jpeg,image/png,image/webp
roll: true # the strip
camera: true # offer the device's camera too
at_most: 12 # how many it takes; left out, 12
What is picked lands in a strip of thumbnails that scrolls sideways.
Each can be taken out or moved earlier or later, and the order of the
strip is the order kept: the first picture is the one a gallery card
shows. Picking again adds to the strip. With camera, a button turns
on a live view with a button that puts a still in the strip; the
camera is off until that button is pressed, off again when it is
pressed once more, and the button is not there on a device with no
camera to offer. Nothing leaves the browser until the form is sent,
so a shot taken out was never uploaded.
A picture longer than 2400 points on its long side is scaled down to
that, as a JPEG, before it is sent; every file goes up by itself, each
within the 20 MB an upload may be. The field holds the files’ keys as
a list. A list shows them side by side, pictures as thumbnails that
open, and each is fetched at /attachment/<bucket>/<record>/<field>/<n>,
counted from nothing, under the same rule as any file: through a
record the reader may see. On a form opened on a record that has a
roll, leaving the strip empty keeps what is there, and filling it
replaces all of it.
camera and at_most belong to a roll, and a roll to a file field;
the lint refuses them anywhere else, and an at_most outside 1 to 50.
multiple: true without roll still sends one file, the first.
type: record
How one case belongs to another — an objection to the application it objects to, an appeal to the decision it appeals.
- name: case
type: record
of: applications # the bucket the other record is in
value: "{key}" # arrives on the link, on a dynamic page
Nobody types one of these: the stored value is the parent’s record id, which is a chain hash. It arrives the way it was given out, so the field carries rather than asks, and renders hidden. A submission naming a record that is not there is refused, so a reference in a stored record is one that resolved at least once.
The other half is a listing that asks for the children:
resource:
source: { bucket: objections }
requires_group: case_officers
where: { field: case, equals: "{key}" }
And the way there from a list: link puts a link on every listed
record to a page about it, with {id} for the record’s id and
{field} for any of its fields. A notice on a public board links to
/notices/{id}, the dynamic page /notices/[key] whose form carries
the notice’s id back in with value: "{key}":
resource:
source: { bucket: notices }
public: true
link: { to: "/notices/{id}", label: I can lend or borrow this }
A resource
Live data, declared by content and read by the server. What a resource reads is never a client-supplied parameter.
resource:
source: { bucket: applications }
key: abc123 # one record instead of the list
public: true # or requires_group: case_officers
states: [approved, refused] # only these; empty means all
where: { field: case, equals: "{key}" }
jq: ".[] | {name, url: .html_url}"
limit: 1 # at most this many, after jq
empty: Nothing decided yet.
title: name # the field that is the record's heading
show: [summary, lead] # a row is its title and these fields; the rest stay on the record
meta: false # no state, no time on a row (default true)
link: { to: "/notices/{id}", label: Answer this } # a page per record
collect: { into: cart, label: Add to my list } # a button per row, into a list the browser keeps
# or only on records with a field filled in:
# link: { to: "/events/{id}", label: Sign up, when: places }
calendar: Put them in your calendar # a board's /ics/<bucket>.ics, while the list has rows
transitions: # the desk's buttons
- { from: complete, to: on_hearing, label: Send it out }
source: { bucket: b } lists the site’s own records in bucket b (it
was written kind: kv before 1.0, which still reads the same). Every
other source says its kind: gitea_starred, gitea_releases, url
(someone else’s page or feed)
or ledger. What the programs beside the site ask its people needs no
list: it waits in their header (Operations).
source: { kind: ledger, account: "dues:{year}" } reads the
ledger (State machines): one account’s
balance, with what came in and went out; account: "stock:*" every
balance under a prefix, one row each; statement: true the account’s
lines, newest first, each with its text, amount, the two accounts and
the record it came from; bucket: orders, record: "{key}", statement: true a record’s own lines, what one job cost. unit: pcs
reads in a unit other than kroner; since and until (YYYY-MM-DD)
bound a statement to a period. {key} is the page’s and {year} this
year’s. The read needs public: true or a requires_group, as any
resource does; who sees a balance is the page’s to say. A balance is
rendered as a card with its amount written out (250,00 NOK, 7,5 hours); jq: reshapes either as it does any resource.
title: name names the field that is each record’s heading. A
committee is its name, an event too, and a name read as one small
field among equals is not read first: with title, that field comes
first and larger, with no field name over it, and is left out of the
fields under it. On a card (a record with a picture) it is the
heading instead of the first text. It is plain words: the lint
refuses a prosekit, file or location field here, and a field no
form filing into the bucket has.
show: [summary, lead] makes a row its title and those fields, in the
records’ own order, and leaves the rest out of the row; the record, and
the page about it (link:), keep them. A list of committees on a page
about the association is each committee’s name, one line and its leader,
not the long text its own page has. meta: false leaves a row’s state
and time out, for a public list where neither means anything to a reader
(“active”, the moment a record was imported). The lint refuses a show
field no form filing into the bucket has - or, for a bucket portal fills
itself (portal_payments, portal_asks), one portal does not
write on its records (state machines, “fields”).
link: { ..., when: places } puts the link only on a record whose
places holds something: not missing, blank, false or an empty
list. A list of events where some take sign-ups reads as one list, with
“Sign up” on those that have places and nothing on the rest. The lint
refuses a when no form filing into the bucket has.
calendar: Put them in your calendar is a link under the list to the
bucket’s calendar, /ics/<bucket>.ics, and it is there only while the
list has something in it: nobody is offered a calendar with nothing in
it. The bucket must be a board with a plan, which is who may
subscribe (A board, a plan and a calendar);
the lint refuses it otherwise.
limit: 1 shows only the first item — for a feed where only the newest
matters. A releases card wants the cut someone should run, not every
cut there has ever been, and a page that grows by one card per release
gets longer forever. It applies after jq, so a filter can reorder
and the limit takes the top of that ordering. A source that yields a
single record has no length and ignores it; limit: 0 on a list shows
nothing, and the empty line speaks instead.
A spec with neither public: true nor requires_group is
unreachable: reads fail closed, and mutations always need a group
whatever public says. The one exception is a list of records that
are their sender’s own (owned_by:, see
State machines): it needs
neither, and shows each person what is theirs or shared with them.
A field with several choices (a multiple select) holds each of them:
where: { field: topic, equals: traffic } finds a record that chose
traffic among others, and where: { field: topic, any_of: [traffic, paths] }
one that chose either. any_of takes the page’s {key} as equals does.
none_of: [archived, spam] is the rest: a record holding none of them,
which one with nothing in the field is.
where: { field: email, equals: "{user.email}" } is “my cases”: the
records carrying the signed-in person’s own address, read from the
session. A file on such a record is theirs alone to open.
A record that carries a picture (a type: file field holding a JPEG,
PNG, WebP, AVIF or GIF) is shown rather than read when the list has no
transitions: a card with the picture on top, the first field as its
heading, and the other fields under it, with no field names, state or
time. The cards appear in the order the records were put up. That is
how a site shows the people who work there, or a gallery of what it
has built. On a desk, the same picture is a thumbnail that opens.
accept: image/jpeg,image/png,image/webp on the field makes a phone
send a JPEG whatever it keeps its photos as. What the person wrote is shown as
markdown on stricter rules than the site’s own: paragraphs, line
breaks as typed, lists, emphasis and links to https, mailto or tel
(marked nofollow ugc); no images, no raw HTML.
A desk (a list with transitions) shows every record still moving,
and of those in a final state - one the state machine has no move out
of - only the three most recently decided, newest first. “Show older”
under the list brings three more each time it is pressed. The desk
stays about the work in hand however long the site has run; nothing
is hidden from a read-only list, and leaves_after still takes a
record out of every list altogether.
A releases manifest - a kind: url resource whose JSON is
{ name, latest, versions: [{ version, date, notes, assets: [{ platform, url, sha256, size }] }], channels: { arch: { repo, package, note }, ios: { testflight, note } } }, newest version first, as a release
pipeline writes it - renders as one card: the newest version, the file
for the visitor’s own platform first (read from the browser: ios,
macos, linux-x86_64, linux-aarch64, windows, android), the
other files and the channels folded under “All downloads”. Linux gets
the package repo lines beside its file; iPhones and Macs get
TestFlight. Platforms a manifest lacks fall through to the folded
list.
A desk’s buttons reach only what it lists: where holds for a move as
for a read, and a move is refused for anyone the desk is not for, so a
committee given where: { field: group, equals: <its group> } on
portal_memberships sees and moves its own and no one else’s.
The buckets portal keeps itself list the same way: portal_memberships
(who is in a group, Memberships), portal_invites,
portal_events, and portal_payments, the ledger of money asked for
by a state’s payment:. A treasurer’s
desk lists it with states: [requested] and the one button a desk may
have on it, { from: requested, to: registered, label: Paid into the account }: the money came some other way, seen by that person. paid,
failed, expired and refunded are the money service’s, and a desk
naming them fails the lint. The whole ledger is never public.
states and where narrow a listing. They matter most for a register
that is public by law — public about what was decided, not about what
was withdrawn — while the desk working the same bucket is a different
spec and still sees all of it. A record that has no such field never
matches: “everything that did not say” is not something a page can ask
for by accident.
Someone else’s page or feed: kind: url
source: { kind: url, url: https://… } reads an address on another
site each time the list is drawn. What it reads is as::
resource: # JSON, the default: jq shapes it
source: { kind: url, url: "https://api.example/search?query=Tomter" }
jq: '.items[] | {title: .name, url: .link, date}'
public: true
resource: # a feed, RSS or Atom
source: { kind: url, url: https://town.example/rss, as: feed }
jq: '.[] | select(.title | test("Tomter"))'
public: true
resource: # a web page, by CSS selector
source:
kind: url
url: https://town.example/plans/hearings/
as: html
rows: a.teaser-title # one row for each element this selects
fields:
title: "." # the row's own words
url: "@href" # one of its attributes
deadline: "time @datetime" # or of an element inside it
keep: 1 hour
public: true
empty: Nothing is out for hearing.
- A feed gives each item’s
title,url,description(its words),date, and for an event itsstartandend, times as RFC 3339. - A page gives a row for each element
rows:selects, in the page’s order, at most 200. A field is a CSS selector inside the row (the first match),.for the row itself, and@nameat the end for an attribute rather than the words. Anhreforsrccomes whole (https://town.example/…), whatever the page wrote. - A row named
title(orname) with aurlis a heading that links there;descriptionis its text; any other field is listed under it.jq:reshapes or narrows the rows as it does any resource’s. - Only words are taken. No markup of theirs reaches the page, and
a link that is not
http(s)is dropped. keep:is how long an answer is kept before the address is asked again (15 minutes,1 hour,1 day; no months): a quarter of an hour for a page or a feed, and not at all for JSON, where nothing is said. While their server does not answer, the last answer stands.- What is sent. A JSON endpoint gets the list’s filters as its
query, as before; a page or a feed is asked for as written. Only
https://on a public address is fetched.
A page read this way is theirs to change: when its markup does, the
list goes empty (empty: says so) until the selectors are updated.
Say where the rows come from in the feature’s description, and ask
the site’s owner before leaning on it.
A list as a file: download
download: on a group’s list puts a link under it to the same list as
a spreadsheet file (CSV), for a board that prints who is coming or
sorts who has paid.
resource:
source: { kind: kv, bucket: signups }
requires_group: board
title: name
show: [guests, email]
download: Download as a spreadsheet # the words on the link
- What is in it. One row per record the list has, as the visitor has narrowed it: search for a name and the file holds those. A desk’s finished records are in it too, each with its state.
- Columns. The
title:field, then theshow:fields (every field withoutshow:), under the form’s labels; then the state in the site’s words, and when the record came in, by the site’s clock. - Who gets it. Whoever the list lets in, checked again when the
file is asked for. The lint refuses
download:on apublic: truelist, on a list with norequires_group:, and besidejq:orkey:. - Opens in a spreadsheet as it is. Semicolons between the fields on a site in a language that writes numbers with a comma, commas in English. A cell that would be read as a formula is kept as words.
How a list is drawn: shows
The same records can be drawn several ways. shows: on a list picks
one; the checks, the filters and a desk’s moves stay as they are.
resource:
source: { bucket: hires }
requires_group: counter
shows: calendar
| shows | what it draws | needs |
|---|---|---|
rows | a row per record, its fields under each other; cards where every record has a picture. The default | |
cards | a card per record, a picture or not | |
table | a column per field, in the order show: names them (every field, without it), then where each stands | |
board | a column per state, in the order of states:, each record a card with the desk’s moves on it | states in aggregates.yaml |
calendar | a month, each record on its days; the month before and after a press away | a holds: on the bucket, or a type: date on its form |
map | one map, a marker per record at its place. Rows on an instance without maps | a type: location on the form |
count | how many records the list has, as one number | no limit: |
A calendar puts a record on the days its bucket’s holds: holds it,
else on the day of the first date its form asks for. A count counts
what the list would show: after states:, where: and the visitor’s
filters.
Narrowing a list: the resource’s own requirements
A feature with a resource: and requirements: has requirements on
the resource: they show above the list, and the visitor narrows it
with them. On an alternative that records nothing they are no form,
and nothing of them is sent or kept; on one that records, they are
sent with the answer too (see Booking from a
list).
- name: Past events
resource:
source: { bucket: events }
public: true
states: [held]
limit: 10 # the newest ten; a search finds the rest
requirements:
- name: title # a field of the records
label: Search the titles
- name: kind
label: Kind
type: select
multiple: true
options: [party, work day, meeting]
Each lives in the page’s address under its name, so
/events?kind=party,meeting&title=summer opens the list already
narrowed, and a link, Back and a reload keep it. The list asks the
resource the same names: a kv list keeps the records whose field of
that name holds what was asked (in the form’s answers, or on the record
itself, such as state), and a url or Gitea source is asked them as
query parameters. Words (type: text) are found anywhere in the field,
whatever their case; a select keeps a record holding one of the
chosen options as written, any of them for multiple. Nothing chosen
is the whole list. limit: counts what is left after them, so a list
of ten can be searched through everything.
A filter is its own list’s. Where two lists on a page narrow by a field
of the same name (three lists of an archive, each with a group),
each keeps its own in the address under its list’s name and the
field’s, /archive?documents.group=Traffic, so narrowing one leaves
the others as they were. The list’s name is its feature’s name as an
id (“Plans and accounts” is plans-and-accounts), with its
alternative’s before it where two lists on the page are named alike. A
field only one list on the page narrows by stays under its own name.
On an alternative that records (below), what is asked beside a list is
the form’s too and always lives under its name.
They only ever narrow: where: and states: still decide what the
list may show at all, and the page’s address never reaches them. The
lint takes type: text, a select with its own options:, the two
type: date days a holds: holds the list’s records by, and on an
alternative that records, a type: record of: the list’s bucket; and it
refuses the names the page’s address already uses (chain, email,
edit, back).
Booking from a list: days and a picked row
Where a bucket holds the records of another over days (holds:, see
State machines), a page books one by
narrowing a list of them to the visitor’s days and picking a row:
name: When do you need a machine?
alternatives:
- name: Book a machine
description: Say your days and pick a machine that is free all of them.
record_as: hires
action: /hire/thanks
features:
- name: Free on your days
description: Every machine nobody has from your first day to your last.
resource:
source: { bucket: machines }
public: true
states: [for_hire] # a machine in the workshop is never offered
requirements:
- { name: from, label: First day, type: date }
- { name: until, label: Last day, type: date }
- { name: machine, label: The machine, type: record, of: machines }
- name: Who you are
requirements:
- { name: name, label: Your name }
- { name: email, label: Email, type: email }
- Days narrow the list. A pair of requirements beside the list,
named as a
holds:on its records names its days, keeps the records nobody holds on any of them:fromanduntil, twotype: datefields, orfromandfor, a date and atype: duration(“first day” and “how long”). They live in the address, so/hire?from=2026-12-01&until=2026-12-05opens the list already narrowed. With either left out, the list is the whole list. - An alternative that records sends them. On an alternative with
record_as, the requirements beside a list are part of its form: they narrow the list and are sent with the answer, so the hire’s days are the days its list was narrowed by. They are asked for unless they sayoptional. - A record beside its list is picked from it. A
type: recordrequirementof:the list’s own bucket is answered by the Pick button on each row, or several rows withmultiple: true. The pick lives in the address too, so Back and a reload keep it. Only a row the list would show can be sent: a record in one of itsstates:, and free on the days.
Whether the machine is still free is decided as the hire is written, with the hire: someone who took it meanwhile leaves this booking refused, with nothing kept, and the visitor told to pick another or other days. Lists are live, so a machine someone else books leaves an open page’s list as it happens.
Gathering from a list, sending from a form
A catalogue on one page, the order on another: collect: on a list
puts a button on every row, and what a visitor adds waits in a list
their browser keeps until a form sends it.
# /machines: the catalogue
- name: The machines
resource:
source: { bucket: machines }
public: true
states: [for_hire]
title: name
collect: { into: cart, label: Add to my list }
# /hire: the form that sends the list
- name: Book your list
record_as: hires
action: /hire/thanks
features:
- name: Your list
requirements:
- { name: machines, label: The machines, type: collection, of: machines, from: cart }
- { name: from, label: First day, type: date }
- { name: until, label: Last day, type: date }
collect: { into, label }names the list (letters, digits,-and_). The button readslabel, or Add to the list, and In the list once pressed; pressed again, it takes the row out.type: collectionis the list as a field: its rows by name, each with Take out.of:is the bucket andfrom:the list’s name, and the lint wants both ends to agree. The form sends the records’ ids as one answer, so one booking names every machine; withoptional: truean empty list may be sent.count: truegives each line a count, one unless changed, and the answer is[{ id, count }].max: 5is the most of one thing. For what there are many of (fence panels, fuel cans); a thing aholds:holds is one thing, so the lint refusescountthere.- The list is the visitor’s own. It lives in this browser (local storage), follows them from page to page and through a reload, and is emptied when its form has sent it. Another browser or phone has its own. The site knows nothing of it until then.
On the server each line is checked again: the record is there and in a
state a list that gathers into the same name shows, so nothing taken
off offer is ordered from an old list. A holds: over the field holds
every record in it, and a booking with one thing taken on its days is
refused whole, with the list kept. A desk’s list shows the lines by
name (Mini digger, 3 × Site fence panel), and so does a mail:
{machines} in a subject or body.
Changing a record from a desk
features:
- name: Announcements
resource:
source: { bucket: announcements }
requires_group: editors
edit: {} # this list's group, the one form
transitions:
- { from: draft, to: out, label: Put it out }
A list with edit: lets a group change a record’s fields, in any state.
“Change” opens the same form, filled in with the record, and
the rest of the page steps aside; a file stays unless a new one is
chosen. It goes through what a submission goes through (rich text
cleaned, references checked), and is written as an event in the record’s
log: who, and for each field the value before and after. “History”
on the row reads it. The state does not move, no mail goes,
no clock starts again, and a public list shows the new value at once. Two
people changing one record: the one saving second is told to look again,
and nothing of theirs is kept. A desk whose page is older than a save
looks again too.
group says who may, the list’s requires_group by default; page and
alternative say which form, needed when more than one files into the
bucket; label replaces the words on the link. A public list can carry
it with a group. The bucket must be in aggregates.yaml, since a
change needs a log to go in. The form must be on a page of its own (not
[key], not requires_chain) that the group may open, and be one that
only keeps a record: no invite, one_per_person or self_transition.
On a bucket of places (places:, see State
machines), a save changes the
board’s ledger first, as a sign-up takes its place there first. The
place keeps its seat, or its turn on the waiting list. It counts for
more only where there is room for that (otherwise the save is refused,
with words saying why, and nothing changes), and what it gives back
goes to the next in line, who gets the seated state’s mail. It stays on
the thing it was taken on: the form opens without the slot field to
choose, and a save naming another thing is refused.
# questions/desk/signup.yaml: a form of its own, for the desk
name: Sign someone up
qualifies: hosts
alternatives:
- name: Sign someone up
action: /desk
record_as: signups
features:
- name: Who is coming
requirements:
- { name: event, type: record, of: events }
- { name: name, label: Name }
- { name: email, label: Email, type: email }
- { name: party, label: How many, type: number, min: 1, max: 2 }
# on the desk's list of an event's sign-ups
resource:
source: { bucket: signups }
requires_group: hosts
where: { field: event, equals: '{key}' }
edit: { page: /desk/signup, alternative: Sign someone up }
The same form, sent on its own, signs someone up as the public form does: the ledger seats them or puts them in line, and the mail goes to the address given.
A record with its own date (portal import, see
Operations) shows that date on its
row and sorts by it.
A board, a plan and a calendar
A list over a bucket with board: (see
State machines) is read in the
order of the things’ own starts, and every record says how full it
is: a bar, 2 of 3 places taken, how many wait, and what is still
needed (Still needs: Someone with a key). Where a place counts for
more than one seat (count: and at_most: on places:, see State
machines) the fill counts seats:
two parties of three waiting read 6 on the waiting list. A board
whose places are something else says so: words: { places: quotes, full: Enough quotes } on the board: makes the row 2 of 3 quotes
and, when it is full, Enough quotes, and iris map says 3
quotes. A board of one says the noun as one too (place: machine):
0 of 1 machine. That is the coordinator’s desk and, with public: true and
states: [open, full], the public plan. A resource with key: "{key}" on a thing’s own context shows the one record the same way,
fill included, instead of its raw data. On a dynamic context, where: { field: shift, equals: "{key}" } is filled from the segment, so the
shift’s desk lists the places on that shift.
The whole board is a calendar at /ics/<board>.ics for whoever its
plan names, and a person’s own places are one at
/ics/<places>/<id>.ics?email=<address>, the link {ics_link} gives
in a mail. A list of the board links the first with calendar:
(calendar: Add the rota to your calendar), which shows the link
only while the list has a thing in it; a link written into a
description is there whether the calendar has anything or not.
A notice bucket’s archive is a list with public: true and states: [<sent>], which the lint allows only with archive: true.
A narrowing requirement may carry a value:, what the list is read
with until the address says otherwise: a year’s accounts open on this
year with the earlier ones to pick (value: "2026", options: ["2026", "2025"]), a desk’s list of hours opens on the signed-in person. The
requirement’s name is a placeholder for a kind: ledger read on the
same feature (account: "dues:{year}"), so the year picked is the
year read.
needs.yaml
What the site is for, as a checkable spec: who wants what, which
bucket the answer must land in, which group carries it to a finished
state. The runtime never reads it. iris check proves the site meets
it, and iris replay runs cases through the real engine.