> ## Documentation Index
> Fetch the complete documentation index at: https://docs.manthan.systems/llms.txt
> Use this file to discover all available pages before exploring further.

# Policy Evaluation

> How Parmana evaluates verified facts against policy to determine whether an action is authorized

# Policy Evaluation

Policy evaluation is the core function of Parmana.

Parmana evaluates verified facts against policy and determines whether an action is authorized.

```text theme={null}
Verified Signals
        ↓
Policy Evaluation
        ↓
Decision
        ↓
Attestation
```

Policy evaluation occurs before execution.

No action should execute until policy evaluation has completed.

***

## Purpose

Parmana answers a single question:

> Do the verified facts satisfy the policy requirements for this action?

If the answer is yes:

```text theme={null}
Authorize
```

If the answer is no:

```text theme={null}
Reject
```

If additional authority is required:

```text theme={null}
Require Override
```

***

## Core Principle

Parmana does not trust AI outputs.

Parmana evaluates verified facts.

```text theme={null}
AI Request
      ↓
Verified Signals
      ↓
Parmana Evaluation
```

AI may initiate a request.

AI does not determine authorization.

Policy determines authorization.

***

## Inputs

Policy evaluation requires:

```text theme={null}
Policy
Policy Version
Verified Signals
```

Example:

```json theme={null}
{
  "policyId": "claims-approval",
  "policyVersion": "1.0.0",
  "verifiedSignals": {
    "insurance_active": true,
    "risk_score": 10,
    "vip_customer": false,
    "claim_amount": 100
  }
}
```

The policy defines the requirements.

The verified signals provide the facts.

***

## Verified Signals

Verified signals are facts that have already been validated by external systems.

Examples:

```text theme={null}
Customer Authenticated
Insurance Active
Account Verified
Balance Available
Destination Verified
Fraud Check Completed
```

Example:

```json theme={null}
{
  "insurance_active": true,
  "risk_score": 10,
  "claim_amount": 100
}
```

Important:

```text theme={null}
Parmana does not verify signals.
```

External systems verify signals.

Parmana evaluates them.

***

## Rule Evaluation

The policy engine evaluates verified signals against policy rules.

Example:

```text theme={null}
Policy
      ↓
Rule 1
Rule 2
Rule 3
      ↓
Decision
```

Example policy:

```text theme={null}
IF insurance_active = true
AND risk_score < 50
AND claim_amount <= 1000

THEN approve
```

The evaluation process is deterministic.

The same policy and signals always produce the same result.

***

## Decision Outcomes

Policy evaluation produces a decision.

Possible outcomes:

```text theme={null}
Approve
Reject
Require Override
```

Example approval:

```json theme={null}
{
  "action": "approve",
  "requires_override": false,
  "reason": "standard_approval"
}
```

Example rejection:

```json theme={null}
{
  "action": "reject",
  "requires_override": false,
  "reason": "policy_requirements_not_satisfied"
}
```

Example override requirement:

```json theme={null}
{
  "action": "reject",
  "requires_override": true,
  "reason": "manual_authority_required"
}
```

***

## Rule Trace

Parmana records how a decision was reached.

Example:

```json theme={null}
{
  "ruleTrace": [
    {
      "ruleId": "high-risk-reject",
      "matched": false
    },
    {
      "ruleId": "standard-approval",
      "matched": true
    }
  ]
}
```

This provides transparency into policy evaluation.

***

## Override Requirements

Some policies require escalation.

Example:

```json theme={null}
{
  "requires_override": true
}
```

Evaluation produces:

```text theme={null}
Pending Override
```

The workflow becomes:

```text theme={null}
Evaluation
      ↓
Pending Override
      ↓
Human Review
      ↓
Approval or Rejection
```

Overrides are separate from policy evaluation.

The original decision remains unchanged.

***

## Attestation Creation

After evaluation, Parmana creates a signed attestation.

```text theme={null}
Decision
    ↓
Attestation
```

The attestation records:

* Policy
* Policy Version
* Decision
* Evidence Fingerprint
* Provenance
* Signature

Example:

```json theme={null}
{
  "executionId": "claim-001",
  "policyId": "claims-approval",
  "policyVersion": "1.0.0",
  "decision": {
    "action": "approve"
  },
  "signature": "..."
}
```

The attestation becomes the authorization record.

***

## Determinism

Policy evaluation is deterministic.

```text theme={null}
Same Policy
      +
Same Signals
      =
Same Decision
```

Example:

```text theme={null}
Policy v1.0.0
      +
Verified Signals
      =
Approve
```

Repeated evaluation produces the same result.

This property is essential for verification and auditing.

***

## Banking Example

A customer requests a transfer through an AI assistant.

```text theme={null}
Customer
      ↓
AI Assistant
```

The AI captures the request.

```text theme={null}
Transfer ₹10,000
```

The bank verifies facts.

```text theme={null}
Customer Authenticated
Account Verified
Balance Available
Destination Verified
```

The verified signals are sent to Parmana.

```text theme={null}
Verified Signals
        ↓
Parmana Evaluation
```

Parmana evaluates the transfer policy.

```text theme={null}
Approve
```

An attestation is issued.

```text theme={null}
Decision
      ↓
Attestation
```

The bank can now execute the transfer.

***

## Auditability

Policy evaluation creates evidence that can be audited later.

Auditors can determine:

```text theme={null}
Which Policy Applied?
Which Facts Were Evaluated?
Which Rules Matched?
Which Decision Was Produced?
```

This creates a verifiable authorization trail.

***

## Separation of Responsibilities

```text theme={null}
AI
 ↓
Captures Request

External Systems
 ↓
Verify Facts

Parmana
 ↓
Evaluates Policy

External Systems
 ↓
Execute Action
```

Each component has a clearly defined role.

***

## How Policy Evaluation Fits Into Parmana

```text theme={null}
Task
 ↓
Policy
 ↓
Schema
 ↓
Verified Signals
 ↓
Policy Evaluation
 ↓
Decision
 ↓
Attestation
 ↓
Execution
```

Policy evaluation is the step where verified facts are compared against organizational authority rules.

The result is a deterministic decision that can be signed, audited, verified, and enforced before execution.

***

## Core Insight

Policies define authority.

Verified signals provide facts.

Parmana evaluates those facts against policy.

```text theme={null}
Verified Signals
        ↓
Policy Evaluation
        ↓
Decision
```

This is how Parmana ensures that autonomous systems follow human rules before they act.
