Skip to content
Press / to search

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.

Living DocumentLast reviewed: Edit on GitHub
At a glance
ContextOS ContractPolicy & GatesCompiler & MemoryAdapter MeshContextActions

Four guided walkthroughs that teach the canonical execution contract by doing. Each tutorial builds on the previous one. By the end you have authored a Context Pack, executed a governed destructive action through the Tool Gateway, emitted a typed Decision Record, and closed the improvement loop with an operator correction.

Pick your starting point

TutorialWhat you buildTime
1. Ship your first Context PackA versioned, immutable-after-publication Context Pack that compiles into a CompiledContext for one intent.12 min
2. Bind a destructive tool through the Tool GatewayAn 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 entryA DecisionSpec with required_evidence that produces a typed DecisionRecord from the Critic.12 min
4. Close the improvement loopAn 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 tsx for the runnable harness.
  • A copy of the Quickstart running so you can see live output.

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.
  • They are not a marketing pitch — every line in each tutorial corresponds to a real contract field or a real runtime behavior.