Architecture Overview
Three-Stage Evaluation Pipeline
Every request flows through three stages:1. Pre-Evaluation (Sequential, Short-Circuit)
Evaluated in order. If any check fails, the pipeline stops immediately with DENY.2. Module Evaluation (Parallel)
All registered modules evaluate concurrently viaPromise.allSettled. Results are merged using most restrictive wins — the highest-severity action becomes the final decision.
10 governance domains, each with independent modules:
3. Post-Evaluation (Async, Non-Blocking)
After the decision is computed, evidence is emitted without blocking the response:- TealProof — Append decision hash to Merkle tree
- SIEM Export — Emit structured event (JSON/CEF/LEEF)
- Response Hooks — Invoke webhooks for violations
- OTel Spans — Emit governance telemetry
Separation of Duties
The architecture enforces a clear boundary between who defines governance and who implements applications:
This is enforced technically — not just organizationally. Forbidden config keys are rejected. FREEZE rules are immutable. Bundle signatures are verified on every load.
Evidence Layer
Every decision produces a TEEC v2.0.0 evidence envelope containing:- Decision action + reason codes + risk score
- NHI identity (who triggered the action)
- Cryptographic proof (Merkle root + inclusion proof)
- Policy version + bundle hash
- Automation level + control ID + OWASP category
- Cost evidence (tokens, estimated cost)
- Correlation ID (OpenTelemetry-compatible)
Design Principles
Related Documentation
TealEngine v1.3 API
Full evaluation pipeline API
Governance at Scale
Enterprise operating model
TEEC Evidence Contract
Evidence envelope schema
10 Governance Domains
Domain-specific controls

