Usage Guide

The Usage Guide collects the practical, day-to-day patterns for writing applications on top of causl. Where the SPEC is normative — it tells you what the engine must do — these pages are advisory: they explain what experienced causl users have learned about how to wire a graph so that it stays small, observable, and easy to evolve.

Each page in this section is independent. You can read top to bottom if you are new to causl, or jump straight to the topic that matches the bug you are chasing. The code examples are real TypeScript against current @causl/core, @causl/react, and the rest of the published surface; they would compile and run as written.

Where to start

If you have not yet built anything with causl, read Getting Started first and step through the Tutorial. The Usage Guide assumes you understand createCausl(), graph.input / graph.derived, the transactional graph.commit(intent, fn) contract, and that derivations are pull-based Behavior a = GraphTime → a values rather than push-based event streams.

If you have built a feature or two and are now asking "how should I organise this as the product grows?" — start with Structuring Causl Graphs. That page is the longest in the section and the one most likely to save you a refactor a year from now.

Pages in this section

How this section is organised

The pages above are ordered roughly by how often you will reach for them on a typical day. Structuring and Derivations are foundational — you will read them once and re-read them when an architecture decision feels hard. Commits, React, and Async Resources are everyday material: you will return to specific snippets as you build. Persistence, Testing, and DevTools become important the week you ship.

For the reverse direction — the SPEC sections, race-class catalogue, and per-package TypeDoc — see the documentation index.