A capability, end to end.

A pricing capability defined as a contract, compiled to WASM, and run from the CLI with a full trace.

pricing.toml

The contract declares the capability, links it to the governing spec it implements, and defines the input and output shapes as JSON Schema.

pricing.toml
[capability]
name    = "calculate-price"
version = "1.2.0"
wasm    = "pricing.wasm"

[governing_spec]
title   = "Pricing Policy v3"
source  = "docs/pricing-policy.md"

[input]
type = "object"
properties.sku      = "string"
properties.quantity = "integer"
required = ["sku", "quantity"]

[output]
type = "object"
properties.total    = "number"
properties.currency = "string"

traverse run

The runtime validates the input against the contract's preconditions, executes the WASM binary, and writes a trace artifact for the run.

terminal
$traverse run pricing --input '{"sku":"PRO","quantity":5}'
✓ Contract validated
✓ WASM executed (2.1ms)
→ {"total": 249.95, "currency": "USD"}

For a full walkthrough of installing the CLI and running this yourself, see the quickstart. More worked examples live in the GitHub repository.