Tutorials · Lesson 5 of 7

5 · Govern with policies

You'll attach best-practice policies and turn trace check into a real gate — the GOVERNED axis. You need: your trace.json with a goal.

Computable Governance

A policy is a machine-checkable rule evaluated over the trace — written in LTLf (temporal logic over the trace's actions), with a plain-English rationale and a pass/fail verdict. Policies are how you encode "the evidence was derived correctly": a proof was required on a high-stakes path, tests ran before commit, a model was autoformalized. This is the GOVERNED axis from Lesson 4, made mechanical.

Find and attach a policy

ponens registry update                       # refresh the policy gallery
ponens policies search testing               # browse by keyword
ponens policies add tests_before_commit --into trace.json

Or attach a whole pack (DO-178C, MISRA, NIST AI RMF, …) via the goal's policies block, as you did in Lesson 4. Browse them in the gallery.

Run the gate

ponens trace check trace.json                # → PASS / FAIL (exit code)

This is a real, automatic gate — fully offline, keyed on the exit code, so it drops straight into CI. Policies block by default. Add --strict to also fail on an uncovered intent clause or a failing governed axis.

Disable or waive — on the record

Sometimes a policy doesn't apply. You can disable or waive it — but never silently: the waiver is recorded on the trace, with your justification, so the exception is auditable rather than invisible.

Author your own rule

When no gallery policy fits, write one. The Writing policies guide walks through the LTLf grammar and the operators; the Policy Language spec is the full reference.

What you learned

  • Policies are machine-checkable rules — the GOVERNED axis, made mechanical.
  • trace check is a real gate (exit code, offline); policies block by default.
  • Exceptions are waived on the record, never silent — that's what keeps it auditable.