Learn Lemma
A guided path from your first Spec to composing Specs across time and registries. Read the chapters in order, or jump to a topic.
1. Getting started
Start with Getting started. It walks you through installing Lemma, writing your first Spec, and running it from the CLI.
2. Specs, Data, and Rules
Specs, Data, and Rules explains how a Spec is structured. You learn about open inputs, constraints, and how Rules reference each other.
3. Conditional logic
Conditional logic covers Unless chains and boolean literals, which is how a Rule chooses between outcomes.
4. Types and units
Types and units is the widest chapter. It covers literals, operators, the stdlib units, conversions, ranges, and dates, and it introduces Veto.
5. Extending Data
Extending Data shows how to build on parent types, apply Data commands, and reuse definitions across Specs.
6. Composing Specs
Composing Specs brings everything together with Uses, temporal versions, planning checks, repositories, and the registry.
7. Numeric precision
Numeric precision closes the guide by explaining exact rational arithmetic and how clients should parse the numbers Lemma returns.
Language reference
For exhaustive syntax, operators, and Data commands, see the Language reference.