Tutorials
Hands-on, step-by-step walkthroughs of the canonical execution contract — author a Context Pack, bind a destructive tool, wire a Decision Catalog entry, and close the improvement loop.
Four worked walkthroughs build the context, tool, decision and improvement contracts for one workflow. The repository exercises deterministic compilation and validators; a live payment gateway, approval service and production stores are supplied by the implementation. Reading or running reference examples does not execute a real refund or establish runtime conformance.
Pick your starting point
| Tutorial | What you build | Time |
|---|---|---|
| 1. Ship your first Context Pack | A versioned, immutable-after-publication Context Pack that compiles into a CompiledContext for one intent. | 12 min |
| 2. Bind a destructive tool through the Tool Gateway | An adp_payments.issue_refund capability with native risk, a v1 destructive projection, GATE_FINANCE_APPROVAL, and a frozen evidence snapshot. | 15 min |
| 3. Wire a typed Decision Catalog entry | A DecisionSpec with required_evidence that produces a typed DecisionRecord from the Critic. | 12 min |
| 4. Close the improvement loop | An operator correction in the Feedback Store → a StrategyRule from the Strategy Compiler → release-gated promotion. | 18 min |
What you need
- The TS reference compiler under
src/lib/contextos/— already in this repo. npx tsxfor the runnable harness.- The Quickstart as the worked artifact map; it does not deploy the runtime services.
For current production obligations, read Execution Contract, Control Profiles and Conformance. They preserve base envelopes while specifying exact admission, full stored approval, current authority/boundary/data checks, durable effect recovery and shared limits. The teaching examples defer to those requirements; local illustrative helpers are not shipped enforcement services. Estimated reading times are illustrative.
What these tutorials are not
- They are not a replacement for the foundations — read those for the spec narrative.
- They are not a production deployment guide — see the Deployment Blueprint for that.
- Local illustrative helper or deployment-protocol fields are not additional required base-schema fields; verify the actual published types and implementing runtime behavior.