Skip to main content
When a SkillSpec-backed skill runs, the result is not only a final response — it is a record you can inspect. The CLI writes an append-only decision trace as the rule engine evaluates your contract, and the runtime writes an execution ledger as phases progress and evidence is captured. After the run, skillspec trace align compares both artifacts against the contract and produces a structured alignment report with a three-valued verdict: aligned, partial, or unproven. The third verdict — unproven — is the methodological core. Binary pass/fail forces an evaluator to treat missing evidence as either success or failure. The convention that the absence of an error means success is exactly what hides dropped steps. SkillSpec reports unproven when the trace lacks the evidence to decide, rather than inferring success from silence.

Decision trace

When you run skillspec decide with --trace-dir, the CLI creates a run directory:
The decision trace records what the rule engine did: which rules it evaluated, which matched, which route was selected, and what effects accumulated.

Trace event kinds

The trace vocabulary is a closed set. An event either appears in the trace or it does not — absence is informative. The route_selected event carries a basis field that explains why the route was chosen:
  • rule_prefer — a matched rule’s prefer field set it
  • route_order_default — a rule changed route order and the first in that order won
  • default_route_order — no rule acted; the first ranked route was used
This basis field is what makes decision replay deterministic: re-running the spec on the captured input must produce the same route by the same mechanism.

Execution ledger

The execution ledger lives alongside the decision trace:
The ledger records what actually happened during the run. Structured events include: The ledger is written by the agent or harness as work proceeds, not by the spec engine. Its completeness is a variable — a high unproven rate in an alignment report often signals that the harness is not writing structured events, not that the skill is broken.

Alignment

skillspec trace align compares the decision trace and execution ledger against the contract:
The aligner:
  1. Re-runs the spec on the captured input to produce an expected decision
  2. Checks that the trace records the same route, matched rules, forbids, elicitations, and after-success closures
  3. Derives execution obligations from the selected route and matched rules
  4. Checks the ledger for structured evidence that each obligation was satisfied
  5. Writes alignment.json and a proof digest to the run directory

Alignment properties

The aligner produces one of three verdicts per check and an aggregate per run:

aligned

The trace contains evidence that the expectation held. The decision was reproduced and execution obligations have structured proof.

partial

Some expectations met, at least one obligation unproven or violated. The run partially aligns — report the concrete missing-proof rows.

unproven

The trace lacks the events needed to decide. This is not failure — it means the harness didn’t record enough structure, or execution wasn’t traced.
The aggregate report carries two layers:
  • Decision replay — did re-running the spec on the captured input produce the same route, rules, forbids, and elicitations?
  • Execution proof — does the ledger prove the route was fulfilled, forbids were not violated, elicitations were answered, and after-success closures ran?
SkillSpec never infers success from the absence of errors. An unproven verdict is the honest report when evidence is missing — not a soft pass.

Trace event JSON example

A route_selected event in trace.jsonl:
A requirement_satisfied event in execution.jsonl:

Trace spec section

The trace section of a skill.spec.yml declares which events the evaluator should persist. Setting required: true tells a conforming harness it must either write the trace or state that tracing is unavailable before relying on the decision.
When record is empty or absent, an evaluator may record every v0 event kind. The spec does not contain per-rule file-writing instructions — it declares intent, and the evaluator acts on it.
The alignment report is the difference between “the run completed” and “the run completed and we can prove it”. Running skillspec trace align at the end of each durable run turns the trace into a first-class artifact alongside the final response.