ADL 0.6.0 · Companion Teaching Edition
The ADL 0.6 Handbook
Build a declarative application with Kalos, Aegis, and Journeys
Across 18 chapters and 4 appendices, this handbook develops an instrument register into a governed calibration review application — where technicians save immutable measurement revisions, submit them, and obtain independent inspector approval backed by Aegis policies, chained history evidence, and a compiled two-step Journey.
Runnable Workshop Laboratory · Baseline ba8b39c61
Executable Domain Sources & Verification Suite
Every chapter ends with a practical workshop grounded in two complete standalone
adl: "0.6.0" domains checked against the strict C++ validator, independent
reference checker, Journey compiler, and 21 SQLite runtime observations (forged provenance,
self-approval refusal, independent approval, immutable fields, and hash-chain verification).
01-foundation.yaml
The introductory instrument register before governance, state transitions, and policies are added.
Open YAML source → Runnable YAML02-calibration.yaml
The governed calibration application with state guards, Aegis training-claim policy, chained history, and inspector Journey.
Open YAML source → Appendix A & BAnnotated Listings & Evidence
Read both complete domain listings inline alongside the implementation baseline and evidence map.
Read Appendix A →Part I · The application model
Records, relationships, and a first executable definition
- 1 Begin with the application's promises
The workshop has instruments, measurements, and people. A technician records a measurement for an instrument. An inspector reviews it. The organization wants to prevent the person who submitted a measurement…
- 2 Bring the first domain into view
The first example is intentionally ordinary: a register of instruments with a generated identifier, a unique serial number, and a name. It is small enough that every declaration has a visible purpose. Open…
- 3 Give values a precise meaning
A measured offset is more than a number. It has a unit, a permitted range, an origin, and a time at which it becomes part of a reviewed record. A type declaration supplies part of that meaning. The rest…
- 4 Connect records without losing their boundaries
A calibration names an instrument because the measurement has meaning only for that instrument. Storing instrumentId gives us a reference value. Declaring the relationship tells the application model what…
Part II · Authority, review, and evidence
Connect a business requirement to the operations that enforce it
- 5 Read an expression in its execution context
The independent-review rule fits on one line:
- 6 Give each operation the authority it needs
The application has two everyday roles: technicians create candidates, and inspectors review them. Alice holds both roles in the laboratory. That is deliberate. If the test gave the submitter no inspector…
- 7 Make review a state transition
The lifecycle is short: draft becomes submitted; submitted becomes certified or rejected. Certified and rejected are final states. The graph is easy to draw. The useful engineering work is identifying what…
- 8 Put a policy beside the operation it governs
An inspector role answers one question: may this kind of caller review a calibration? The workshop also requires current training. That is a separate fact, supplied by trusted context and evaluated when…
- 9 Establish trusted context and handling rules
A claim is useful only when its origin is trustworthy for the decision being made. The string review_trained: true in a request body cannot certify the requester's training. A server-controlled expression…
- 10 Preserve evidence with a stated threat model
The workshop wants to know what was submitted and what was certified. Its history declaration captures instrument, revision, offset, and actor fields at those transitions. This is application history: it…
Part III · Tasks and execution
Journeys, interfaces, effects, and commit boundaries
- 11 Describe the caller's task with a Journey
The server knows how to read a calibration and how to attempt approval. The inspector thinks in terms of a task: select a submitted calibration, inspect its content, and certify it if the review succeeds. A…
- 12 Build an interface from the task's meaning
An inspector needs to find work, understand the submitted measurement, and record a decision. A generic table editor can expose the same data while making those actions hard to distinguish. Journey metadata…
- 13 Separate decisions from the work they trigger
After certification, the workshop may notify an equipment owner, update a report, or dispatch a certificate to another service. These effects extend the application beyond the single record. They also…
- 14 Follow the commit boundary
The workshop's approval changes a record and records history. An extension may also record a policy decision. It is tempting to call the whole request atomic. The useful question is more specific: which…
Part IV · Change and operation
Keep the application and its evidence aligned
- 15 Change the model without erasing its meaning
A model version is a promise about interpretation. If the workshop changes a field's unit, allowed values, or lifecycle, old records do not become correct merely because the new YAML validates. Migration is…
- 16 Treat every result as a disclosure
A calibration application eventually needs more than individual records. An operator asks how many instruments are awaiting review, which technician has the largest queue, and how long approvals take. Queries…
- 17 Turn a fixed bug into a lasting example
A bug fix is a change in behavior under a particular trigger. Teaching that trigger is more useful than printing a list of closed issue numbers. A reader should be able to see the old failure, understand the…
- 18 Operate the application you have actually verified
The application document is only part of a release. The engine, plugins, store, identity configuration, policy mode, imported definitions, and clients participate in the behavior users observe. A release that…
Appendices (A–D)
- Appendix A
The complete example documents
These listings are included from the exact YAML files checked by the laboratory. The first is the introductory register. The second is the governed calibration application. A fragment in a chapter is…
Open appendix → - Appendix B
Implementation baseline and evidence map
This edition was prepared against ba8b39c6199a8cb2861cb636af136653458df2a6 on November 14, 2026. The source tree reports kalos_adl 0.125.1 and kalos_compliance 0.3.0. The policy extension interface declares…
Open appendix → - Appendix C
Reproduce the recorded checks
Run the following commands from the repository root. The runtime check uses Python httpx and built Release binaries. Each stage starts a temporary loopback-only SQLite host and retains its own logs under…
Open appendix → - Appendix D
Reading paths, terminology, and lineage
For exact field syntax, use ADL 10 and 11. For what an actor can do, use ADL 21 and the operation's own chapter. For state movement and assignment ordering, use ADL 22. For the caller's sequence of work, use…
Open appendix →