Examples

Recipes that delegate to package code.

These examples describe intent and topology. Runnable examples, generated API docs, demos, install commands, and release material stay package-local.

recipe

Tiny Derived Value

Summary

The smallest useful recipe: explicit input facts, one derived reduction, one boundary observer.

Intent

Turn one or two changing inputs into a smaller derived value, then observe it at the boundary.

Topology

inputsstate or source factsderivedreduced valueeffectdisplay or external observer

Learns

declared inputsderived reductioneffect boundary

Recipe Shape

Use this when a UI, process, or integration needs one clear output from a small set of changing inputs.

  • Declare the inputs.
  • Derive the output value.
  • Observe the output at the edge.

recipe

Form Summary

Summary

A fan-in recipe for forms, settings panels, and other many-input surfaces.

Intent

Reduce many field updates into one validation or submission summary.

Topology

inputsfield statesderivedvalidation summaryeffectrender or submit boundary

Learns

no-placeholder stateglitch-free joinsderived reduction

Recipe Shape

Each field stays explicit. A derived summary waits for real input according to the package helper and publishes one reduced view for display or submit decisions.

  • Keep missing fields honest instead of using fake defaults.
  • Use a derived summary node for validation.
  • Let package-local examples provide exact syntax.

recipe

Event to State

Summary

A boundary recipe for turning external event streams into inspectable graph state.

Intent

Accept external events at a source boundary and reduce them into graph-visible state.

Topology

sourceexternal event boundarystatecurrent graph-visible valuederivedviews over state

Learns

source boundarystate as explicit nodeno hidden triggers

Recipe Shape

Use a package-owned source or adapter to bring events into the graph. Once inside, model state and projections as normal declared graph material.

  • Do not trigger internal work through hidden callbacks.
  • Keep async/event IO at the source boundary.
  • Derive views from explicit state.

recipe

Terminal Report

Summary

A recipe for imports, batch jobs, final summaries, and bounded streams.

Intent

Collect or reduce input until completion, then publish a final report.

Topology

inputbounded stream or processterminal reductionfinal reporteffectpublish result

Learns

terminal lifecycleterminal reductionscleanup boundary

Recipe Shape

Some outputs are meaningful only after upstream work settles. Keep that lifecycle in the graph instead of polling or reading caches from the side.

  • Use terminal-aware package helpers for syntax.
  • Keep cleanup at activation/deactivation boundaries.
  • Publish the final result through an effect or package adapter.

recipe

Boundary IO

Summary

A recipe for external systems: adapters at the boundary, declared facts inside the graph.

Intent

Connect files, network, workers, or remote graphs without putting async or hidden runtime behavior in the sync core.

Topology

adapterpackage-owned IO boundarygraph factsdeclared DATA inside graphderived/effectnormal graph composition

Learns

sync core boundarypackage-local adapterswire bridge discipline

Recipe Shape

The shared site describes the boundary discipline. Concrete IO helpers, worker integration, bridge setup, and runnable examples remain package-local.

  • Keep async work in sources, pools, or bridges.
  • Re-enter the graph through explicit facts.
  • Use package docs for environment-specific APIs.