# PRIOR Product Documentation

Welcome to the PRIOR product documentation. This is the customer-facing guide set for operators
and integrators running a licensed PRIOR engine (v1.2.2).

**PRIOR is a licensed, self-hosted inference engine that enforces behavioral and factual policy by
injecting deterministic constraints directly into a model's latent space**, at a calibrated
*golden layer* in the residual stream. Because policy is applied geometrically rather than through
prompt text, it holds up against obfuscation, jailbreaks, and stale context. PRIOR speaks the standard
OpenAI chat API, so it drops in behind any existing client.

> © Eagle Logic. Proprietary and licensed. Not open source. Use requires a valid, node-locked
> license. See **[Licensing](licensing.md)**.

---

## Start here

| If you want to… | Read |
|---|---|
| Run the engine and make your first request | **[Getting Started](getting-started.md)** |
| Understand *how* PRIOR enforces policy | **[Concepts](concepts.md)** |
| Integrate against the HTTP API | **[API Reference](api-reference.md)** |
| Deploy to production (Docker/Kubernetes) | **[Deployment](deployment.md)** |
| Author or ingest your own policies | **[Policy & Packs](policy-packs.md)** |
| Operate from a browser dashboard | **[WebUI Operator Guide](webui.md)** |
| Understand tiers, node-locking, capabilities | **[Licensing](licensing.md)** |

> **Need a link you can share?** These docs are public, so any page here is safe to send on. If
> you're pitching a colleague or a security reviewer, the [measured results](https://eagle-logic.com/capabilities)
> and the [interactive demos](https://eagle-logic.com/showcase) on the website make the better link.

---

## The 60-second picture

```
                       ┌──────────────────── PRIOR engine (one container) ─────────────────────┐
   OpenAI-compatible   │                                                                        │
   client ───Bearer───▶│  POST /v1/chat/completions                                             │
                       │     │                                                                  │
                       │     ├─▶ Tri-State WHEN gate  ── routes every prompt BEFORE generation  │
                       │     │      🟢 GREEN  → answer normally (bit-for-bit vanilla)            │
                       │     │      🟡 YELLOW → answer + inline confirm notice                   │
                       │     │      🔴 RED    → deterministic refusal via golden-layer steering  │
                       │     │                                                                  │
                       │     └─▶ x-prior-* response headers (zone, pack, decision id)            │
                       │                                                                        │
   operator ──Bearer──▶│  /admin/*   governance: packs, keys, license, calibration, audit       │
                       │  /metrics   Prometheus   ·   /health   liveness                         │
                       └────────────────────────────────────────────────────────────────────────┘
```

- **One immutable container**, no external calls in the inference path (air-gapped tier available).
- **Native Rust serving path** with no Python in production. Default port **`8089`**.
- **OpenAI-compatible.** A vanilla client that never sends PRIOR's `prior_options` extension is
  completely unaffected; policy still applies.
- **Operator-owned policy.** You ship, tune, mute, or author detection packs. They hot-reload with no
  restart.

---

## Product surfaces

| Surface | What it is | Port (default) |
|---|---|---|
| **Engine API** | The OpenAI-compatible inference + `/admin` governance server | `8089` |
| **WebUI** | An optional browser dashboard (a standard API client with no special privileges) | `8080` |
| **License** | A node-locked, ED25519-signed `license.bin` from Eagle Logic | n/a |

---

## Conventions used in these docs

- `Bearer <key>`: an API key issued through `/admin/keys` (or seeded via `PRIOR_API_KEY`).
- 🟢 / 🟡 / 🔴: the three gate zones (GREEN / YELLOW / RED).
- `prior_options`: the optional vendor-extension object on chat requests.
- Roles are **Observer / Operator / Admin**.

Questions or licensing: **support@eagle-logic.com** · <https://eagle-logic.com>.
