Skip to main content

Documentation Index

Fetch the complete documentation index at: https://parmanasystems.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

What is a policy?

A policy is a JSON document that defines:
  1. A schema — which signals are required and what types they must be
  2. Rules — ordered list of conditions and outcomes; first match wins
  3. IdentitypolicyId + policyVersion that are embedded in every attestation
Policies are versioned, immutable artifacts. Changing a policy means creating a new version — the old version remains valid and independently verifiable.

Full policy example

This is the claims-approval/v1 policy included in the repository:
{
  "policyId": "claims-approval",
  "policyVersion": "v1",
  "schemaVersion": "1.0.0",

  "signalsSchema": {
    "insurance_active": { "type": "boolean" },
    "risk_score":       { "type": "integer" },
    "vip_customer":     { "type": "boolean" },
    "claim_amount":     { "type": "integer" }
  },

  "rules": [
    {
      "id": "high-risk-reject",
      "condition": {
        "signal": "risk_score",
        "greater_than": 80
      },
      "outcome": {
        "action": "reject",
        "requires_override": false,
        "reason": "risk_score_exceeded_threshold"
      }
    },
    {
      "id": "vip-fast-track",
      "condition": {
        "signal": "vip_customer",
        "equals": true
      },
      "outcome": {
        "action": "approve",
        "requires_override": false,
        "reason": "vip_customer_approved"
      }
    },
    {
      "id": "standard-approval",
      "condition": {
        "all": [
          { "signal": "insurance_active", "equals": true },
          { "signal": "risk_score",       "less_than": 70 }
        ]
      },
      "outcome": {
        "action": "approve",
        "requires_override": false,
        "reason": "standard_approval"
      }
    },
    {
      "id": "catch-all-reject",
      "condition": { "all": [] },
      "outcome": {
        "action": "reject",
        "requires_override": true,
        "reason": "policy_requirements_not_satisfied"
      }
    }
  ]
}

Schema reference

Top-level fields

FieldTypeRequiredDescription
policyIdstringStable policy identifier, embedded in every attestation
policyVersionstringVersion string (e.g. "v1", "1.0.0")
schemaVersionstringSchema format version
signalsSchemaobjectMap of signal names to type declarations
rulesarrayOrdered list of rules; first match wins

Signal types

Type stringJavaScript equivalent
"boolean"true / false
"integer"number (must satisfy Number.isInteger)
"string"string

Rule fields

FieldTypeRequiredDescription
idstringUnique rule identifier; embedded in the DecisionResult
conditionobjectThe match condition (see below)
outcomeobjectThe decision if this rule matches

Condition operators

OperatorApplies toExample
equalsany type{ "signal": "vip_customer", "equals": true }
greater_thaninteger{ "signal": "risk_score", "greater_than": 80 }
less_thaninteger{ "signal": "risk_score", "less_than": 70 }
allcompound{ "all": [ ...conditions ] }
An empty all: [] matches every input — use it as the final catch-all rule.

Outcome fields

FieldTypeDescription
action"approve" | "reject"The governance decision
requires_overridebooleanWhether human escalation is required
reasonstringMachine-readable reason string embedded in the attestation

Rule evaluation semantics

Rules are evaluated in order, top to bottom. Evaluation stops at the first match. A well-formed policy must end with a catch-all rule so that all possible signal combinations resolve to a decision.
If no rule matches, the runtime throws an invariant violation. Always include a "condition": { "all": [] } catch-all as the final rule.

Using the CLI to inspect policies

# Inspect policy structure
parmana policy inspect ./policies/claims-approval/v1/policy.json

# Visualize rule graph
parmana policy graph ./policies/claims-approval/v1/policy.json

# Simulate a batch of decisions without signing
parmana policy simulate ./policies/claims-approval/v1/policy.json ./test-records.json
See CLI Reference for full documentation.