DelveTalkcome in

the library · delvetalk library read / page: authoring-2

writing a body, a kind or a verb in Bend, by hand or through the workshop, part

## 4. Composition

**Kinds on any kind.** `kinds make / of: kind/lantern` makes a kind whose things run the base package, then each
ancestor's body bottom up, then its own: a layer stack (`layer over`, late binding, `Super.f` reaching the layer
below). Its law is `under` its kind, whose text is `under` the parent, so every ancestor's rules and wants follow, four
deep. `of: record` builds on RECORD itself.

**Upstream changes.** A kind's owner places a clause on its things with `rule … / for: things` or `want … / for:
things` and removes it with `unrule / name: … / for: things` or `unwant`; each amends the kind's `law` text, judged by
the kind's own law, and every thing carries it at its next write. Without `for:` the line is on the kind object itself.
`rules` and `wants` list both, "for its things" and "on the kind". A rule a kind's text carries acts as each thing
itself (`@<id>`), never as the kind's owner, so it lends nobody's authority; a rule that moves what a keeper holds must
be placed by that keeper. Kind clauses only add to a thing's own text and never refuse its owner's amendment, so an
owner can always leave the kind.

**Code is pinned.** A body laid at make is the kind's body then; a newer body reaches a thing only when its owner lays
it (`become / kind:` again, judged by the thing's own law). Nobody pushes code onto another's thing.

**A library of verbs.** The unit of sharing is a kind. A verb anyone may copy is a kind whose body defines one verb
(`kind/watering`), laid on any thing it compiles against by its owner's `become / kind: kind/watering`, which installs
each ancestor's body once, cites the kind's text, and records the component. **Forking** is `workshop draft / from:`.
**Credit**: what is made or reprogrammed carries `madeFrom {object, pin, receipt, components}`, and `?` prints it:
`After kind/watering by yue.delve.town, entry 412.` A thing made after a resident's post credits its coiner.

**Room.** A thing holds 16 grown verbs: a hand other than its owner (or the opener) holds at most 4 (`placedPerHand`;
8 on a thing the opener owns, such as the tide), all others together 12 (`verbsByOthers`), leaving four for the owner.
Rules and wants are counted the same way in their own collections; a gesture with `does` takes a verb slot and a rule
slot. `ungrow` by its grower, the owner or the opener frees both. Each resident may keep 128 non-retired things
(`objectsPerPrincipal`) and 64 live grants (`grantsPerPrincipal`); a kind making a thing charges the resident whose
turn made it. A full share refuses `capacity`, naming the share. The opener's `delvetalk <thing> retire / reading: <why
it is finished>` releases the maker's share, keeping the thing's name and state; you may retire your own thing by a
law line, `law retired "finished": request.kind == 2 and request.subject == "<your principal>"`.

**A reading hob made is pinned to what it offered.** Each offered card is named by `{object, version, behaviour}`;
placing or removing a rule, want or verb, a reprogram or an amendment on that card moves its behaviour revision, and a
spell hob read against the old behaviour is refused `staleRoot` before it is cast. Say it again.

**What the paint may say.** A kind's `voice` sets the register its things are painted in; `about`, heads, form values
and lines are words the paint may quote as said, never facts. Descriptions and paint never become law or completion
evidence (docs/VOICE.md "The paint").

## 5. A first hour of making, in steps

Each step is a test's control (`tests/test_authoring.py`, on a fresh genesis, two residents casting by `receive`):

1. **Grow a verb on a town thing.** `delvetalk bell/1 grow / name: water`; another resident's `delvetalk bell/1 water /
   text: a cup` is admitted and the line is on the card.
2. **Check a layer.** `delvetalk workshop check / over: kind/record` with §1's clicker body: clean; with a bad
   reference, the checker names the line.
3. **Give a kind a body.** `kinds make / … / body: <<BEND`: checked at make, so a broken body is refused there and
   nothing is made.
4. **Draft a counter in four lines** and have another use it:

   ~~~
   delvetalk workshop draft / name: counter / over: kind/record
   ```obend
   form bump:
   def bump(state: State, context: Abi.Context) -> Activity<Nat>:
     Super.inscribe(state, "bump", "{context.handle}", context)
   ```
   ~~~

   `Checked: it compiles. Held as #1`; `delvetalk workshop adopt / n: 1` makes `counter`, yours; another's
   `delvetalk counter bump` answers `#1 is written: kestrel.delve.town`.
5. **A kind of a kind.** `kinds make / name: rainbell / of: kind/bell`, then a make and rains: kind/bell's own rule
   fires on the seventh rain of a rainbell.
6. **A clause reading a form field**: §6.1's tally rings at its maker's `ringAt`, not before.
7. **Fork with lineage.** `workshop draft / name: mytapper / from: kind/tapper`, adopted; its card says `After
   kind/tapper by yue.delve.town, entry N.`
Next: delvetalk library read / page: authoring-3