Technical Reference

Complete specification — invariants, schemas, APIs, stage types, and gap taxonomy.

System Invariants

  1. No content transit. Raw inputs/outputs, model weights, PII never leave the customer environment. Only commitment hashes transit to api.primust.com. For Bounded Inference: only merkle_root transits — per-operator outputs stay in customer environment.
  2. Fail open, fail honest. Primust failures do not block customer pipelines. All failures become gaps.
  3. Weakest-link proof level. proof_level_floor = minimum across all records. DERIVED — never set manually.
  4. Gaps recorded honestly. detectable_from_surface: false means "unknown" not "ungoverned."
  5. Domain-neutral core. No agent_id, tool_name, trace, pipeline_id in core schema.
  6. Promotion gates in code. P1 → SHAREABLE impossible without override + watermark.
  7. Manifest hash per record. Every CheckExecutionRecord stores manifest_hash at time of execution.
  8. Customer private key never leaves customer environment. BYOK signing: Primust calls customer signing endpoint with payload.
  9. upstream_vpec_verify proof ceiling is Mathematical. Ed25519 verification is deterministic. Never downgrade.
  10. Bounded Inference profiles are Primust-signed. Profile signature verifiable offline against Primust public key. Tampered profile is detectable.

Proof Levels

LevelEnumMechanismTrust requiredExamples
MathematicalmathematicalNoir, UltraHonk, Modal CPUNone — pure mathRegex, allowlist, threshold, OPA local, Cedar, Drools, ODM, decision path (XGBoost/RF/logistic), Ed25519 verify
Verifiable Inferenceverifiable_inferenceONNX-to-circuit (EZKL), Modal GPUTrust model weightsMLP classification heads <263K params only. Full transformers fail EZKL.
Bounded Inferenceoperator_boundPer-operator Merkle + signed drift profileTrust the measurementHuggingFace transformers (any size), DistilBERT, BERT, RoBERTa, DeBERTa
ExecutionexecutionModel-hash-binding circuitTrust the model (public, auditable)Named ML model, pinned LLM API, custom code (hash-bound)
WitnessedwitnessedTwo RFC 3161 + Ed25519 sigTrust reviewer identityHuman review (human_approval stage), lightweight approval (acknowledged stage)
AttestationattestationInvocation-binding circuitTrust process owner's wordOpaque process, OTEL records, hosted ML APIs (AWS Comprehend etc.)

Stage Types

Stage typeProof ceilingNotes
deterministic_ruleMathematicalRegex, allowlist, threshold, formula
policy_engineMathematical (local) / Attestation (remote)OPA, Cedar, Drools, IBM ODM. Local eval = Mathematical. Remote = Attestation.
statistical_testMathematical (deterministic) / ExecutionOLS, GARCH: Mathematical. Sampling/bootstrapping: Execution.
decision_path_modelMathematicalXGBoost, RandomForest, logistic regression, linear SVM. Decision path committed as arithmetic constraints. Auto-inferred by SDK from sklearn/xgboost object types.
zkml_modelVerifiable InferenceMLP heads <263K params. EZKL circuit. Tier 2 — demand-gated.
bound_committed_inferenceBounded Inference (operator_bound)HuggingFace transformers with Primust profile. Auto-inferred from transformers.Pipeline objects. Includes auto boundary_rule decomposition.
open_source_mlExecutionShallow neural nets, open weight LLMs, any ML model without a profile.
llm_apiExecution (pinned) / AttestationClosed LLM APIs, self-hosted APIs. Pinned = Execution. Unpinned or hosted API = Attestation.
boundary_ruleWraps another stage typeAdds Mathematical pre/post conditions around any stage type. Auto-applied by SDK for bound_committed_inference and llm_api.
human_approvalWitnessedFull: Ed25519 keypair, display_hash, dual RFC 3161, min_review_seconds.
acknowledgedWitnessedLightweight: OAuth identity hash, challenge hash, single RFC 3161. 30-min setup. Same proof_level enum as human_approval.
upstream_vpec_verifyMathematicalEd25519 verification is deterministic. Proof ceiling never downgraded.
custom_codeExecution (hash-bound) / AttestationCustomer code. Hash-bound = Execution. No hash = Attestation.

Data Flow — What Transits Primust

{
  "run_id": "...",
  "workflow_id": "...",
  "policy_snapshot_hash": "sha256:...",
  "manifest_hashes": ["sha256:...", "sha256:..."],
  "check_execution_records": [
    {
      "manifest_id": "sha256:...",
      "input_commitment_hash": "poseidon2:...",
      "output_commitment_hash": "poseidon2:...",
      "check_result": "pass",
      "proof_level_achieved": "operator_bound",
      "merkle_root": "sha256:...",       ← Bounded Inference only
      "profile_id": "primust/distilbert-class/v1.2.0",  ← Bounded Inference only
      "gpu_class": "a10g",               ← Bounded Inference only
      "actor_id": "user_uuid | null",
      "explanation_commitment": "poseidon2:hex | null",
      "bias_audit": { ... } | null
    }
  ],
  "activity_chain": {
    "record_count": 47,
    "chain_root": "sha256:...",
    "governance_decision_summary": {"allowed": 45, "blocked": 2, "modified": 0}
  },
  "gaps": []
}

Never transits Primust: raw inputs/outputs, model weights, individual AgentActivityRecords, reviewer display content or rationale text, matched PII/secret values, per-operator ML outputs (only merkle_root for Bounded Inference), explanation text (only poseidon2 commitment hash), actual bias audit disparity values (only commitment hash).

API Endpoints

Base URL: https://api.primust.com. SDK endpoints use Authorization: Bearer pk_sb_xxx (sandbox) or pk_live_xxx (production). Dashboard endpoints use JWT.

Run Lifecycle

MethodEndpointDescription
POST/api/v1/runsStart a run. Body: workflow_id, policy_pack_id. Returns run_id, policy_snapshot_hash.
GET/api/v1/runs/:idGet run status and summary.
POST/api/v1/runs/:id/recordsCommit a check execution record. Returns record_id, chain_hash.
POST/api/v1/runs/:id/closeSeal the run — triggers VPEC issuance. Returns the VPEC.

VPECs & Evidence Packs

MethodEndpointDescription
GET/api/v1/vpecs/:idRetrieve a VPEC by ID.
POST/api/v1/packsAssemble Evidence Pack from VPEC IDs.
POST/api/v1/evidence-packs/:id/reportGenerate signed PDF audit report. P1 packs watermarked.

Model Profile Registry

MethodEndpointDescription
GET/api/v1/registry/profilesList all available profiles. Optional ?model_hash= filter — includes operator thresholds when filtered.
GET/api/v1/registry/lookup?hash={onnx_model_hash}Lookup profile by model hash. Returns profile_id or 404.
POST/api/v1/registry/calibration-requestsSubmit a model for calibration. Returns request_id. SLA: 7d standard, 48h Enterprise.

Analytics

MethodEndpointDescription
GET/api/v1/analytics/check-summaryPer check_id aggregates. Includes upgrade_available signal, inferred_ceiling, six-level proof distribution.
GET/api/v1/analytics/enforcement-summaryGovernance decision aggregates from VPEC governance_decision_summary fields — not activity stores.
GET/api/v1/analytics/proof-trendPer-day provable_surface_breakdown. Period: 30|90|365 days. Includes drift_events count.

Incident Packages

MethodEndpointDescription
POST/api/v1/incident-packagesAssemble signed incident package for a run_id. Returns package_id, download_url. Package signed by Ed25519 + RFC 3161.
GET/api/v1/incident-packagesList incident packages for org. Optional ?workflow_id= filter.

Policy & Manifests

MethodEndpointDescription
GET/api/v1/policy/bundlesList all policy bundles (7 built-in + org custom).
POST/api/v1/manifestsRegister manifest. Content-addressed — manifest_id = sha256(canonical(manifest_json)).
GET/api/v1/manifests/:idGet manifest. No auth required.

BYOK & Auth

MethodEndpointDescription
POST/api/v1/org/signing-keysRegister Ed25519 BYOK public key.
POST/api/v1/org/signing-keys/:id/verifyChallenge-response key activation.
GET/.well-known/primust-pubkey.pemServe public key by key ID. Used by primust-verify for online key resolution.
GET/api/v1/healthReturns {"status":"ok","db":"ok","kms":{"us":"ok","eu":"ok"}}

VPEC Schema (v6.0.0)

{
  "vpec_id": "vpec_a1b2c3...",
  "schema_version": "6.0.0",
  "org_id": "org_x9y8z7",
  "run_id": "run_8f3a2b...",
  "workflow_id": "loan-underwriting-v3",
  "policy_snapshot_hash": "sha256:...",
  "environment": "production",          // "sandbox" | "production" — NOT test_mode
  "partial": false,
  "state": "signed",
  "proof_level_floor": "operator_bound",  // weakest-link, DERIVED — never set manually
  "provable_surface": 0.87,              // hero metric — NOT coverage_verified_pct
  "provable_surface_breakdown": {
    "mathematical": 0.52,
    "verifiable_inference": 0.00,
    "bounded_inference": 0.18,           // NEW in v6 — Bounded Inference share
    "execution": 0.12,
    "witnessed": 0.05,
    "attestation": 0.00
  },
  "provable_surface_pending": 0.00,      // verifiable_inference proofs in-flight
  "provable_surface_ungoverned": 0.05,   // manifest checks with no record this run
  "provable_surface_basis": "executed_records",  // | "manifest_checks"
  "provable_surface_suppressed": false,
  "gaps": [],                            // NOT governance_gaps — that name is banned
  "merkle_root": "sha256:...",           // present on bound_committed_inference VPECs only
  "profile_id": "primust/distilbert-class/v1.2.0",  // same
  "issuer": { "issuer_id": "primust.com", "issuer_type": "platform" },
  "signature": {
    "algorithm": "Ed25519",
    "public_key_id": "key_m3n4o5",
    "trust_anchor_url": "https://primust.com/.well-known/primust-pubkey.pem",
    "value": "base64..."
  },
  "timestamp_anchor": { "method": "rfc3161", "value": "base64..." },
  "issued_at": "2026-03-17T14:23:01Z"
}
Banned field names
proof_level (single field) → use proof_level_floor
governance_gaps → use gaps
coverage_verified_pct → use provable_surface
proof_distribution / proof_level_breakdown → use provable_surface_breakdown
test_mode → use environment: "sandbox"
pk_test_xxx → use pk_sb_xxx

Check Execution Record

{
  "record_id": "rec_f1g2h3...",
  "run_id": "run_8f3a2b...",
  "manifest_id": "sha256:...",
  "manifest_hash": "sha256:...",
  "input_commitment_hash": "poseidon2:...",
  "output_commitment_hash": "poseidon2:...",
  "commitment_algorithm": "poseidon2",
  "check_result": "pass",
  "proof_level_achieved": "operator_bound",
  "merkle_root": "sha256:...",           // bound_committed_inference only
  "profile_id": "primust/distilbert-class/v1.2.0",  // same
  "gpu_class": "a10g",                   // same
  "operator_count": 48,                  // same
  "actor_id": "user_550e8400 | null",
  "explanation_commitment": "poseidon2:hex | null",
  "bias_audit": { ... } | null,
  "chain_hash": "sha256:...",
  "check_open_tst": "2026-03-17T14:22:18.003Z",
  "check_close_tst": "2026-03-17T14:22:18.145Z",
  "idempotency_key": "idem_a1b2c3..."
}
check_result values
passCheck passed
failCheck failed — gap recorded
errorCheck threw an exception
skippedCheck explicitly skipped with rationale
degradedCheck ran in reduced mode

Model Profile Schema

{
  "profile_id": "primust/distilbert-class/v1.2.0",
  "model_class": "distilbert",
  "architecture": "DistilBertForSequenceClassification",
  "calibrated_gpu_classes": ["cpu", "a10g", "a100", "h100"],
  "calibration_passes": 1000,
  "calibration_date": "2026-03-17",
  "safety_margin": 2.0,
  "operators": {
    "Linear":    { "p99": 2.86e-4, "p99_9": 5.49e-4, "p99_99": 7.93e-4 },
    "LayerNorm": { "p99": 3.19e-5, "p99_9": 3.91e-5, "p99_99": 4.23e-5 },
    "Softmax":   { "p99": 4.59e-6, "p99_9": 5.78e-6, "p99_99": 7.55e-6 },
    "GELU":      { "p99": 3.43e-5, "p99_9": 4.20e-5, "p99_99": 4.96e-5 },
    "Dropout":   { "p99": 4.88e-4, "p99_9": 7.32e-4, "p99_99": 9.52e-4 }
  },
  "profile_signature": "Ed25519:...",
  "signed_by": "primust.com/.well-known/primust-pubkey.pem"
}

Gap Taxonomy — 49 Types

Core (22)

gap_typeSeverityDescription
check_not_executedHighA declared check was not executed during the run
enforcement_overrideCriticalCheck enforcement was overridden
engine_errorHighGovernance engine encountered an error
check_degradedMediumCheck ran in degraded mode
external_boundary_traversalHighData crossed an external boundary without governance instrumentation
lineage_token_missingHighDelegation handoff missing lineage token
admission_gate_overrideCriticalAdmission gate bypassed or overridden
check_timing_suspectMediumReview duration below minimum threshold — possible rubber-stamping
reviewer_credential_invalidCriticalReviewer credential failed validation (expired, revoked, or malformed)
witnessed_display_missingHighWitnessed record lacks display_hash proving what reviewer saw
witnessed_rationale_missingHighWitnessed record lacks rationale_hash
witnessed_timestamp_invalidHighWitnessed record has invalid or tampered timestamp
deterministic_consistency_violationCriticalSame input produced different check results across runs
skip_rationale_missingHighCheck skipped without skip_rationale_hash
policy_config_driftMediumPolicy configuration changed between manifest snapshot and execution
proof_level_floor_breachCriticalRecord proof level below policy bundle's declared minimum floor
zkml_proof_pending_timeoutMediumEZKL proof generation timed out
zkml_proof_failedHighEZKL proof generation failed
system_errorHighUnrecoverable system error during governance processing
sla_breachMediumGovernance SLA target not met
explanation_missingMediumAI decision lacks explanation commitment (required when compliance_requirements set)
bias_audit_missingHighDecision on protected categories lacks bias audit record

System Availability (1)

gap_typeSeverityDescription
system_unavailableHighPrimust API unreachable — SDK queued locally, queue lost or TTL expired. Distinct from system_error.

Unstructured Check (1)

gap_typeSeverityNotes
archetype_unmappedMediumcustom_check VPEC exists but compliance officer has not mapped it. Auto-resolves on officer mapping.

Cross-Org Verification (7)

gap_typeSeverity
upstream_vpec_invalid_signatureCritical
upstream_vpec_sandboxHigh
upstream_vpec_key_revokedHigh
upstream_vpec_insufficient_proof_levelHigh
upstream_vpec_missing_claimMedium
upstream_vpec_issuer_mismatchCritical
upstream_vpec_missingHigh

Profile Registry (1 — new in v15)

gap_typeSeverityDescription
model_profile_missingMediumbound_committed_inference stage type declared or inferred but no Primust-signed profile exists for onnx_model_hash. Check falls back to Execution. Auto-resolves when Primust publishes a profile or customer submits for calibration. SDK advisory: "upgrade to Bounded Inference at app.primust.com/policy/registry."

Connector-Specific (16)

Pattern: {platform}_api_error (High) = vendor API unreachable or 5xx. {platform}_auth_failure (Critical) = vendor API 401/403.

Platforms: complyadvantage, actimize, blaze, odm, falcon, pega, wolters_kluwer, guidewire — each with _api_error and _auth_failure variants.

Not gaps
check_candidate findings from primust scan are scan advisories — NOT gap types. They do not appear in the VPEC gaps array and do not affect provable_surface.

Package Inventory

SDKs

PackageLanguageRegistryStatus
primustPythonPyPILive 1.0.0
primust-aiPythonPyPILive 1.0.0 — autoinstrument(), autoinstrument-level model detection
@primust/sdkTypeScriptnpmLive 1.0.0
com.primust:primust-sdkJavaMaven CentralPublished 1.0.0

Open Source

PackageLanguageLicenseDescription
primust-verifyPythonApache-2.0Offline VPEC verifier CLI. Free forever. No account required.
primust-checksPythonApache-2.0Open-source check harness. Run checks locally, prove they ran with Primust. 8 built-in checks, 7 bundles.

AI Framework Adapters

PackageTargetTestsStatus
primust-langgraphLangGraph14Live 1.0.0
primust-openai-agentsOpenAI Agents SDK14Live 1.0.0
primust-google-adkGoogle ADK14Live 1.0.0
primust-otelOpenTelemetry14Live 1.0.0
@primust/otelOpenTelemetry (TS)Live 1.0.0

Rule Engine Adapters (Mathematical ceiling)

PackageTargetProof ceilingStatus
primust-cedarAWS CedarMathematical (eval())Maven Central 1.0.1. GREEN.
primust-droolsRed Hat DroolsMathematical (eval() + Map facts)Maven Central 1.0.1. GREEN.
primust-odmIBM ODMMathematical (eval() via IlrSessionFactory)Maven Central 1.1.0. GREEN. Real ODM runtime verified.
primust-opaOPA v1.4.2Mathematical (local) / Attestation (remote)pkg.go.dev v1.0.1. GREEN. Gap-aware.

Regulated Connectors

primust-connectors (Apache-2.0) — 7 Python REST connectors, 321 tests. All Attestation ceiling (REST wrappers). Mathematical ceiling requires Java in-process SDK with vendor SDK licenses.

ConnectorTests
Guidewire ClaimCenter38
ComplyAdvantage48
NICE Actimize51
FICO Blaze + IBM ODM41
FICO Falcon45
Pega CDH46
Wolters Kluwer UpToDate46

Infrastructure

ComponentProvider
API hostingFly.io — always-on, dual-region
DatabaseNeon Postgres — US (aws-us-east-1) + EU (aws-eu-central-1)
SigningGCP KMS Ed25519 — HSM-backed, dual-region
ZK provingModal — CPU (Noir/nargo) + GPU (EZKL, Tier 2)
Artifact storageCloudflare R2 — US + EU buckets
FrontendVercel — app.primust.com, verify.primust.com, primust.com
DocsMintlify — docs.primust.com