build and
sample assemble receipts against one.
Four ship with the CLI:
Anything else needs one you write.
Options
template list
Everything build --template will accept — the shipped templates and your
project’s own — each labelled with the file build would actually load.
template new
Scaffold a template into .trace/templates/ — the directory build searches
first, so the two halves of the loop meet with no flags to configure.
PARTIAL rather than a clean verdict on an operation nobody has described
yet.
where is a mapping of top-level payload fields to scalars, all of which
have to hold. Comparison is strict equality: 1 does not match "1", true
does not match 1, and a field the event does not carry never matches. That is
the whole grammar — no dotted paths, no comparison operators, no patterns, and an
empty where is rejected rather than quietly matching everything.
Reach for it where one event type carries the outcome in its payload. Without a
condition the stage above closes on a rejected decision as readily as an
approved one; listing the type in exceptions instead faults every decision the
operation ever took.
An exceptions entry is either a bare event type — how the shipped templates
write them — or the same { event, where } mapping, for a type that is a fault
only under some outcomes.
One key is special: role reads the role that observed the event — the one the
adapter stamped on it — rather than a payload field of that name.
x402-seller and x402-facilitator templates
constrain every witness for exactly that reason.
new refuses to overwrite an existing file unless you pass --force, so an
edited template is never lost to a repeated command:
The
build line new prints carries whichever of --dir and --templates-dir
you used, so the follow-up command resolves the file that was just written
rather than reading a default root.