Orkena
▸ Browse docs — Guides

▸ SECTION C · Guides

Build your first policy pack

Last updated: 2026-08-16

This guide takes you from blank page to an active policy pack that denies irreversible actions from tainted input.

1. Create the pack

Open Policies → New pack. Name it refund-guard v1. Packs are Cedar text with a version.

2. Write the rule

Start with the rule that matters most for a refund workflow:

// deny irreversible actions derived from untrusted input
forbid (
  action in [Action::"invoke_tool"]
) when {
  resource.side_effects == "irreversible"
  && context.tainted
};

3. Test with what-if simulation

Before activating, run What-if against past runs. Pick a historical run where an agent proposed a refund, and evaluate the pack against it. The simulator shows the verdict the pack would have produced — without changing the run or its ledger record.

4. Activate

Activate the pack on a workspace. Activation is a ledger event, and the workspace pins the version.

5. Monitor

Open Policies → Verdicts for the workspace. You will see every policy decision with its verdict, reason, and latency. Watch for:

  • Denials on actions you expected to permit — adjust or escalate
  • Hold verdicts routing to gates — confirm the approver list is right
  • Latency outliers — policy evaluation is in-process and sub-5ms; anything else is worth investigating

Full grammar

See the Policy DSL reference for every construct, and Policy packs for the semantics.

Was this helpful?