Authoring · Volume 10
Volume 10 — Programming the Machine: Algorithmic Constructs
CURRENTsnapshot of 14 July 20267 min read← Volume 09 — Authoring FormatsVolume 11 — Extension Points and the Widening Discipline →
Reading aids · CoAgnes LabNot part of the specification; where they differ, the volume governs.
At a glance
- The two primitives of composition: sequence — one bind consumes another's publication, always through the log — and join — one bind gathers the activation channel and named demands under the barrier; branching is judgement, iteration is accumulation. §1
- The constructs a figure is built from, each with its intent, wiring and rules: the deterministic gate, the machine's
AND-gate; the semantic accumulation cell, with an explicit sufficiency threshold; the understanding canvas, cells feeding on each other's integrations under budgets; and the journal knot, a never-resetting observer. §2§3§4§5 - Unfold: a semantic service decides the breadth of the next stage — N question cells — while the pipeline fixes every form in advance, the closing bind included; the answer fixes only content and N. §6
- Guard patterns, which detect a boundary breach in parallel with the main figure and divert — built on the current rails, their declared future form (
polarity: out_of_boundsconditions,terminal: truedescriptors) reserved in the grammar and rejected until implemented — and the full hybrid figureproblem.frame, the proven composition of the constructs in causal order. §7§8 - Choosing the machine class per figure — deterministic, semantic or hybrid — and the obligations checklist, attribution, reachability and termination, to check before running any new figure. §9§10
Questions this volume answers
- What are the two moves every figure composes from? §1
- How does a figure branch, or loop, without a branch or loop construct? §1
- How does a figure wait until several named facts exist? §2
- How should a semantic cell's questions and threshold be chosen? §3
- Why are budgets mandatory on an understanding canvas? §4
- In an unfold, what does the answer decide, and what does the template fix? §6
- What can a guard do on the current rails, and what is its declared future form? §7
- What should be checked before running a new figure? §10
This volume is the systems-programming guide: how algorithmic constructs are formed from the machine's three stations. Programmes on the Nest VMNest runtime / Nest virtual machine (Nest VM)The whole machine this set specifies: wave log + processors (topology and observers) + membrane + settle loop. In the reference project the bare word Nest historically named the workbench shell; this set reserves the machine sense and calls the workbench Nest Studio. (Vol. 00 §5)Volume 15 — Terminology are not sequences of steps; they are figures — arrangements of knotsActivation knotAn accumulating unit that matches wave tuples, winds them, and tests readiness; it accumulates understanding. When ready, it activates bind descriptors. Its minimal form is a single condition matcher — a degenerate configuration of the same accumulator, not a different kind. aka knot, clew (for the per-key instance see clew). (Vol. 05)Volume 15 — Terminology and binds whose control flow is readinessReadinessThe state an activation knot reaches when its accumulated understanding satisfies its test; readiness is what activates bind descriptors. Readiness is reified: the topology commits it as a tuple carrying the understanding snapshot. (Vol. 02 §5, Vol. 04 §2.3)Volume 15 — Terminology and whose data flow is publication. Each construct below gives the intent, the wiring, and the rules that keep it within the three load-bearing obligations (attributionAttribution, reachability, terminationThe three load-bearing obligations of the decoupled model. (Vol. 01 §7)Volume 15 — Terminology, reachability, termination). Examples use the authoring grammar of Vol. 09.
§1. The two primitives of composition
Everything composes from two moves:
- Sequence — bind B consumes the publication of bind A: A's
emitfact type is collected by a knotActivation knotAn accumulating unit that matches wave tuples, winds them, and tests readiness; it accumulates understanding. When ready, it activates bind descriptors. Its minimal form is a single condition matcher — a degenerate configuration of the same accumulator, not a different kind. aka knot, clew (for the per-key instance see clew). (Vol. 05)Volume 15 — Terminology whose readinessReadinessThe state an activation knot reaches when its accumulated understanding satisfies its test; readiness is what activates bind descriptors. Readiness is reified: the topology commits it as a tuple carrying the understanding snapshot. (Vol. 02 §5, Vol. 04 §2.3)Volume 15 — Terminology activates B. Sequencing is always through the log, hence inspectable and re-bindable. - Join — a bind gathers several knots at once: the activation channel plus named demandsDemandA named binding (
as:) to an activation knot whose integrated understanding the bind descriptor gathers back. The gathering face of affinity, and the second method through which understanding enters the bind. aka tendril. (Vol. 06 §3–4)Volume 15 — Terminology under the barrierBarrierThe join policy over demands (currentlyall): the rendezvous at which the bound demands become simultaneously available. The current barrier latches: a later readiness refreshes a demand's entry until projection. (Vol. 06 §4)Volume 15 — Terminology. A join is applicative: demands ripen independently, in any order.
sequence: A ─emit▶ fact ─collect▶ knot ─ready▶ B
join: k₁ ─ready▶┐
k₂ ─ready▶┤ barrier(all) ─gates─▶ service ─▶ emit
k₃ ─ready▶┘Branching is judgement: gates split outcomes into emit vs reject publications, each bindable downstream. Iteration is accumulation: a knot with reduce: append and a threshold condition loops "collect until sufficient" without any loop construct.
§2. Deterministic gate (rendezvous latch)
Intent: proceed only when named things exist. The machine's AND-gate.
- id: intake.ready
strategy: deterministic
wind:
collect:
- { as: topic, match: topic.received, reduce: latest }
- { as: query, match: query.received, reduce: latest }
condition: "topic != null && query != null"Rules: keep gates free of semantics (they only detect presence); pick latest for idempotent re-supply; pair with reset: never when the gate must hold open across repeated readinessReadinessThe state an activation knot reaches when its accumulated understanding satisfies its test; readiness is what activates bind descriptors. Readiness is reified: the topology commits it as a tuple carrying the understanding snapshot. (Vol. 02 §5, Vol. 04 §2.3)Volume 15 — Terminology. A gate plus an emit descriptorEmit descriptorThe minimal bind form: one activation, immediate truthful publication. (Vol. 06 §2)Volume 15 — Terminology is the machine's acknowledgement pattern (intake.seen → intake.acknowledged).
§3. Semantic accumulation cell
Intent: windWindThe act of integrating a matched tuple into the knot's wound state. Deterministic winding completes locally; semantic winding unfolds through the world — the knot projects a winding intention and later winds the returned integration. (Vol. 05 §1, §5)Volume 15 — Terminology a stream of material into one integrated understanding with an explicit sufficiency threshold — the machine's semantic register.
- id: intent.understanding
strategy: semantic_evaluator
wind:
collect:
- { as: user_messages, match: chat.message.received, reduce: append, field: message }
integrate: through_world # or local for the deterministic class
condition:
questions: ["Is the user's end goal clear?", "Are the required parameters gathered?"]
threshold_grade: 0.8Design rules:
- The
questionsare the cell's angle of perceptionAngle of perceptionThe framing a head tuple or a knot's questions inject into the computation they seed, specialising a general capability to the declared need. (Vol. 05 §5, Vol. 10 §3)Volume 15 — Terminology — write them as the test the understanding must pass, not as a task description. - Set
threshold_gradefrom calibration runs; grades are model-honest, not guaranteed monotone. A gate downstream (min_grade) re-checks at the bind. - Always consider
budget(terminationAttribution, reachability, terminationThe three load-bearing obligations of the decoupled model. (Vol. 01 §7)Volume 15 — Terminology): an unbounded through-world cell on a noisy stream can wind indefinitely. - One in-flight intention per clewClewOne per-key executor instance of a registered knot definition; parallel keys wind independent clews. (Vol. 05 §2)Volume 15 — Terminology is machine-enforced; throughput comes from parallel cells (per key or per lane), not from pipelining one cell.
§4. The understanding canvas (cross-pollination)
Intent: several cells windWindThe act of integrating a matched tuple into the knot's wound state. Deterministic winding completes locally; semantic winding unfolds through the world — the knot projects a winding intention and later winds the returned integration. (Vol. 05 §1, §5)Volume 15 — Terminology in parallel and feed on each other's integrationsIntegrationThe understanding a bind descriptor forms and publishes as a wave tuple; received by others through binding — as an activation or as a demand — so integrations compose into higher-order understanding. (Vol. 06 §1)Volume 15 — Terminology, converging on complementary understandings.
Wiring: each cell marks its winding protocol with a lane; controllersOutput controllerA receiver of committed tuples facing outward: it claims tuples by kind/fact type and discharges them to the external world exactly once per runtime. It neither judges nor integrates — a third station beside the activation knot and the bind descriptor, standing outside the propagation cycle on its own cursor. aka effector, egress handler. (Vol. 07 §2–3)Volume 15 — Terminology echo the lane into answers; sibling cells collect inference.response facts of other lanes via where clauses:
- id: cell.truth
strategy: semantic_evaluator
wind:
lane: truth
budget: 4
collect:
- { as: seed, match: question.seeded, reduce: append, field: text,
where: [ { field: cell, equals: truth } ] }
- { as: sibling, match: inference.response, reduce: append, field: state,
where: [ { field: lane, not_equals: truth } ] } # complementarity
integrate: through_world
condition: { questions: ["…truth angle…"], threshold_grade: 0.7 }Rules:
- Multi-rule cells label deltasDeltaThe unit of new material a collection rule extracts from an accepted fact. On a canvas, deltas are labelled by their rule name. (Vol. 05 §3, §5.4)Volume 15 — Terminology by rule name (
[sibling] …), so the integration sees provenance (Vol. 05 §5.4). - Budgets are mandatory on a canvasUnderstanding canvasSeveral clews winding in parallel and collecting one another's committed integrations through
whereclauses over lanes — cross-pollination under budgets. aka canvas. (Vol. 10 §4)Volume 15 — Terminology — cross-pollination is a positive feedback loop; the budget is its resonance damper. A starved cell stalls visibly rather than looping. - Exclude self-lanes with
not_equalsto avoid self-feeding. - AttributionAttribution, reachability, terminationThe three load-bearing obligations of the decoupled model. (Vol. 01 §7)Volume 15 — Terminology on a canvas is by
lane+where; keep lanes unique per cell.
§5. Journal knot (never-resetting observer)
Intent: accumulate a side-record — e.g. all model reasoning per key — without participating in control flow.
- id: reasoning.journal
strategy: semantic_evaluator
wind:
collect:
- { as: reasoning, match: inference.reasoning, reduce: append, field: reasoning }
reset: never
condition: { questions: ["What reasoning has accumulated?"], threshold_grade: 0 }With threshold 0 the journal reports readinessReadinessThe state an activation knot reaches when its accumulated understanding satisfies its test; readiness is what activates bind descriptors. Readiness is reified: the topology commits it as a tuple carrying the understanding snapshot. (Vol. 02 §5, Vol. 04 §2.3)Volume 15 — Terminology on every windWindThe act of integrating a matched tuple into the knot's wound state. Deterministic winding completes locally; semantic winding unfolds through the world — the knot projects a winding intention and later winds the returned integration. (Vol. 05 §1, §5)Volume 15 — Terminology; downstream binds that demandDemandA named binding (as:) to an activation knot whose integrated understanding the bind descriptor gathers back. The gathering face of affinity, and the second method through which understanding enters the bind. aka tendril. (Vol. 06 §3–4)Volume 15 — Terminology it latch its current understanding at their rendezvous (Vol. 06 §4.1). Read-time folding absorbs the repeated readiness (Vol. 03 §8). Use threshold_grade: 0 + reset: never deliberately and sparingly.
§6. Unfold: generative fan-out with a declared closing form
Intent: let a semantic serviceServiceThe function evaluated over the bound scope to produce the integration. Its kind (model instruction, deterministic function, other) is an assembly property. aka service function. (Vol. 06 §3, Vol. 08 §5)Volume 15 — Terminology decide the breadth of the next stage (N question cells) while the pipeline fixes every form in advance. This is the machine's bounded in-wave authoring construct (Vol. 06 §7).
The figure (the proven problem.frame shape):
planner bind (operator)
service: "unfold the problem into questions"
│ answer: {questions: [q₁ … qₙ]}
┌───────────────┼───────────────────┐
sys.knot.defined ×N sys.descriptor.defined head facts ×N
cell.q1 … cell.qN harvest bind, demands question.seeded {cell: qᵢ}
(canvas cells, q1…qN (one per item) (seed each cell; angle
lanes q1…qN) injected via {item.*})
│ ▲ │
└── wind, ripen ────┴──── readiness ×N ──────┘
│ barrier(all) + gates
▼
harvest service → problem.frame.readyDesign rules:
- The template fixes: cell ids (
cell.q{index}), lanes, budgets, conditions ({item.question}as the sown angle), the head fact type, and the closing bind with one demandDemandA named binding (as:) to an activation knot whose integrated understanding the bind descriptor gathers back. The gathering face of affinity, and the second method through which understanding enters the bind. aka tendril. (Vol. 06 §3–4)Volume 15 — Terminology per item. The answer fixes only content and N. - Bound N in the schema (
maxItems) — the terminationAttribution, reachability, terminationThe three load-bearing obligations of the decoupled model. (Vol. 01 §7)Volume 15 — Terminology obligation. - The
emittedBystamp on every sown emissionEmissionA wave tuple without itsoffset— the form in which content is handed to the engine; the engine assigns the offset at append. (Vol. 03 §1)Volume 15 — Terminology keeps the sowing thread explicit — the attribution obligation. - Reachability: each head fact must satisfy its cell's
where(cell: q{index}↔ collect clause), and each cell's readinessReadinessThe state an activation knot reaches when its accumulated understanding satisfies its test; readiness is what activates bind descriptors. Readiness is reified: the topology commits it as a tuple carrying the understanding snapshot. (Vol. 02 §5, Vol. 04 §2.3)Volume 15 — Terminology must be demanded by the close — the compiler checks the placeholder/schema side; review the rest. - The closing bind gates each demand (
min_grade) so a weak cell rejects the harvest visibly instead of diluting it.
§7. Guard patterns
Intent: detect a boundary breach in parallel with the main figure and divert.
Current rails: a semantic cell whose questions are control questions ("Does the problem fall within a supported class?") with a threshold chosen so readinessReadinessThe state an activation knot reaches when its accumulated understanding satisfies its test; readiness is what activates bind descriptors. Readiness is reified: the topology commits it as a tuple carrying the understanding snapshot. (Vol. 02 §5, Vol. 04 §2.3)Volume 15 — Terminology means breach likely, feeding an emit descriptorEmit descriptorThe minimal bind form: one activation, immediate truthful publication. (Vol. 06 §2)Volume 15 — Terminology that publishes an out-of-bounds fact for the shell to act on. The declared future form — polarity: out_of_bounds conditions and terminal: true descriptors — is reserved in the grammar and rejected until implemented (Vol. 11 §5). Design rule: guards observe the same facts as the guarded figure (same collect surface), never its internals.
§8. The full hybrid figure: problem.frame
The proven composition of the constructs above, in causal order:
- intake gate (deterministic, §2) admits the request;
- truth cell (§3, through-world) windsWindThe act of integrating a matched tuple into the knot's wound state. Deterministic winding completes locally; semantic winding unfolds through the world — the knot projects a winding intention and later winds the returned integration. (Vol. 05 §1, §5)Volume 15 — Terminology the request into a framed understanding;
- journal (§5) accumulates reasoning per key alongside;
- planner bind projects an unfoldUnfoldThe constrained in-wave authoring form: a service result instantiates declared knot/close/head templates. (Vol. 06 §7)Volume 15 — Terminology serviceServiceThe function evaluated over the bound scope to produce the integration. Its kind (model instruction, deterministic function, other) is an assembly property. aka service function. (Vol. 06 §3, Vol. 08 §5)Volume 15 — Terminology; the controllerOutput controllerA receiver of committed tuples facing outward: it claims tuples by kind/fact type and discharges them to the external world exactly once per runtime. It neither judges nor integrates — a third station beside the activation knot and the bind descriptor, standing outside the propagation cycle on its own cursor. aka effector, egress handler. (Vol. 07 §2–3)Volume 15 — Terminology sows N question cells + heads + harvest bind (§6);
- question cells ripen as a canvasUnderstanding canvasSeveral clews winding in parallel and collecting one another's committed integrations through
whereclauses over lanes — cross-pollination under budgets. aka canvas. (Vol. 10 §4)Volume 15 — Terminology (§4), cross-pollinating within budget; - harvest bind gathers all cells under gates and publishes
problem.frame.ready.
The reference implementation's recorded acceptance run: 87 tuplesWave tupleAn immutable record in the wave log: offset, kind, key, payload. The unit of fact. aka tuple. (Vol. 03 §1)Volume 15 — Terminology, zero failures, zero unanswered intentions — the shape of a healthy hybrid run (settledSettledQuiescent with no discharge in flight. (Vol. 03 §7)Volume 15 — Terminology, finished). Study its vault: lids read backwards — harvest fact ← planner unfold ← intake emit.
§9. Choosing the machine class per figure
| Need | Construct | Class |
|---|---|---|
| standard process steps, routing, joins | gates + emit descriptors + deterministic services | deterministic |
| judgement over accumulated material | semantic cells + operator binds | semantic |
| process skeleton with semantic islands | gates and rendezvous around cells; deterministic gates re-checking semantic grades | hybrid |
Recipes:
- Deterministic pipeline: knotsActivation knotAn accumulating unit that matches wave tuples, winds them, and tests readiness; it accumulates understanding. When ready, it activates bind descriptors. Its minimal form is a single condition matcher — a degenerate configuration of the same accumulator, not a different kind. aka knot, clew (for the per-key instance see clew). (Vol. 05)Volume 15 — Terminology
deterministiceverywhere; operator bindsOperator bindThe full bind form: activation + demands + gates + a service crossing the membrane. (Vol. 06 §3)Volume 15 — Terminology allowed, discharged by a deterministic function-host controllerOutput controllerA receiver of committed tuples facing outward: it claims tuples by kind/fact type and discharges them to the external world exactly once per runtime. It neither judges nor integrates — a third station beside the activation knot and the bind descriptor, standing outside the propagation cycle on its own cursor. aka effector, egress handler. (Vol. 07 §2–3)Volume 15 — Terminology (the serviceServiceThe function evaluated over the bound scope to produce the integration. Its kind (model instruction, deterministic function, other) is an assembly property. aka service function. (Vol. 06 §3, Vol. 08 §5)Volume 15 — Terminologyinstructionnames the function; the schema fixes its result) — the reference formats'service.kind: functionrecords show the target shape. - Semantic pipeline: cells
through_world; every operator instruction is a bounded task over the gathered scope; schemas close every published result. - Hybrid: default to deterministic for control, semantic for content; gates before every semantic service (cheap rejection); budgets everywhere a model can loop.
§10. Obligations checklist for any new figure
Before running a figure, check:
- AttributionAttribution, reachability, terminationThe three load-bearing obligations of the decoupled model. (Vol. 01 §7)Volume 15 — Terminology — does every fact a knotActivation knotAn accumulating unit that matches wave tuples, winds them, and tests readiness; it accumulates understanding. When ready, it activates bind descriptors. Its minimal form is a single condition matcher — a degenerate configuration of the same accumulator, not a different kind. aka knot, clew (for the per-key instance see clew). (Vol. 05)Volume 15 — Terminology collects identify its lane (key/lane/
where)? Do sown records carryemittedBy? Can two concurrent keys interleave without cross-winding? - Reachability — for every demandDemandA named binding (
as:) to an activation knot whose integrated understanding the bind descriptor gathers back. The gathering face of affinity, and the second method through which understanding enters the bind. aka tendril. (Vol. 06 §3–4)Volume 15 — Terminology, which publication chain feeds it? Trace input → collect → readinessReadinessThe state an activation knot reaches when its accumulated understanding satisfies its test; readiness is what activates bind descriptors. Readiness is reified: the topology commits it as a tuple carrying the understanding snapshot. (Vol. 02 §5, Vol. 04 §2.3)Volume 15 — Terminology → bind → emit → collect… to the final publication; a missing edge is a stall by design. - Termination — is every through-world cell budgeted? Is every unfoldUnfoldThe constrained in-wave authoring form: a service result instantiates declared knot/close/head templates. (Vol. 06 §7)Volume 15 — Terminology schema-bounded? What does the figure look like when a serviceServiceThe function evaluated over the bound scope to produce the integration. Its kind (model instruction, deterministic function, other) is an assembly property. aka service function. (Vol. 06 §3, Vol. 08 §5)Volume 15 — Terminology fails — which facts record it, and does the wave still settleSettleThe runtime algorithm alternating propagation with membrane discharges until the machine settles. (Vol. 08 §3)Volume 15 — Terminology?
A figure that passes on paper and stalls in practice is still a healthy outcome: the log shows exactly which lid stayed open and which socket stayed empty (Vol. 08 §8) — fix the figure, not the record.