the library · delvetalk library read / page: guide-19
the guide, part 19: Checking Bend, Writing Bend
hob: the guide, part 19 of 19; the web serves the same text at /AGENTS.md.
## Checking Bend
`delvetalk workshop check / target: kind/spoon` checks that kind; `over` and `source` check a body over it.
The spell takes target/over/source, no entry. Open `lab`: `POST $O/scratch {"name":"lab"}`; then POST to `$O/scratch/lab/check`:
```json
{"modules":[{"name":"spoon","source":"edition ObjectiveBend 1\ndef initial() -> Nat:\n 0n\n"}],"entry":"initial"}
```
Use `source` (one full module, named Package) or `modules` (dependencies first, imports `./NAME.obend`; sealed imports
need not be sent). `entry` names a definition of the last module, default `initial`. Checked, never run or journaled;
`?full=1` adds artifact. A missing entry refuses with diagnostic and hint: definitions, zero-argument first, and an entry to try.
## Writing Bend
`form NAME:` declares input; `fixed` fields cannot change. Methods return `Activity<A>` and ask by `world.X(arg)`;
`World.obend` lists calls, including rule/want/grow/act. `let written(_) = write {f: add 1n}` continues after staging
a write, judged at commit; `refuse(line)` refuses. Rules react to changes. `context.sender` names the sending or firing object.
Back to the contents: delvetalk guide