> ## 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.

# Execution

> Deterministic execution engine for authority verification outcomes.

# @parmanasystems/execution

The Execution package provides the deterministic execution engine used by Parmana to evaluate policies, generate execution fingerprints, enforce replay invariants, and produce authority verification outcomes.

This package is responsible for ensuring that the same policy and the same signals always produce the same result.

## Installation

```bash theme={null}
npm install @parmanasystems/execution
```

## Responsibilities

The execution layer provides:

* Deterministic policy evaluation
* Execution fingerprint generation
* Replay-safe execution semantics
* Authority verification outcome generation
* Invariant enforcement
* Execution state transitions

## Why it exists

AI systems are probabilistic.

Authority verification must be deterministic.

The execution package creates a boundary between:

* Probabilistic systems that generate requests
* Deterministic systems that verify authority

This guarantees reproducibility.

## Execution flow

```text theme={null}
AI Request
    ↓
Signals
    ↓
Policy Evaluation
    ↓
Execution Fingerprint
    ↓
Replay Protection
    ↓
Authority Verification Outcome
```

## Core concepts

### Execution Fingerprint

Every execution generates a deterministic fingerprint:

```text theme={null}
sha256(
  canonical(policyId +
            policyVersion +
            signals)
)
```

The fingerprint provides:

* Semantic identity
* Replay protection
* Audit traceability
* Independent reproducibility

### Replay Protection

An execution fingerprint may execute only once.

If a duplicate execution is attempted:

```text theme={null}
INV-013
Replay Detected
```

is returned and execution stops.

### Determinism

Given:

* identical policy
* identical policy version
* identical signals

the execution outcome must be identical.

This property is required for:

* audits
* regulatory review
* independent verification
* long-term reproducibility

## Relationship to other packages

| Package                             | Responsibility           |
| ----------------------------------- | ------------------------ |
| `@parmanasystems/execution`         | Deterministic evaluation |
| `@parmanasystems/execution-runtime` | Runtime orchestration    |
| `@parmanasystems/signing`           | Attestation signing      |
| `@parmanasystems/verifier`          | Independent verification |
| `@parmanasystems/audit-db`          | Audit persistence        |

## Authority Verification

The execution package does not grant authority.

Humans define authority through policy.

The execution engine evaluates whether a requested action satisfies that authority.

The result is an authority verification outcome that can be signed, audited, and independently verified.

## Design principles

### Deterministic

Same inputs produce the same outputs.

### Replay-safe

The same execution cannot be performed twice.

### Auditable

Every outcome can be reconstructed.

### Portable

Verification does not require access to the original runtime.

## See also

* `/packages/execution-runtime`
* `/packages/signing`
* `/packages/verifier`
* `/concepts/execution-authority`
* `/concepts/execution-authority-verification`
