Trust by design
Every AI decision is gated, redacted, and logged. Every consent state is enforced. Every parent can ask why and get a real answer.
TraceLayer
The audit spine. Every AI call writes a five-gate decision row to ai_decision_logs — consent, redaction, model, review, signed hash. 90-day default; up to 7 years on Campus.
AI consent gates
Per-child, per-feature consent states checked before any prompt is assembled. GDPR Art. 6 / 9, COPPA verifiable consent, UAE PDPL alignment — all enforced at the gate.
Article 15 / 17 + Art. 20 export bundle
GDPR Art. 15 (access), Art. 17 (erasure) and Art. 20 (portability — 37-collection tenant data export with SHA-256 manifest). Erasure produces an audit-hash receipt.
FERPA records review + COPPA verifiable consent
School-official-with-legitimate-educational-interest attribution on every record. Verifiable parental consent state, source, and verified-ts on every under-13 decision.
Crisis-language detector
Deterministic, pattern-only. ~36 English + ~13 Arabic patterns scan student-authored prose under 1ms. No LLM on this path — child-safety triage must be deterministic.
Image moderation
Fail-closed on AI-generation paths; fail-open on student-upload (so a child's submission isn't blocked by a moderation timeout). Both pinned by image-moderation-required.test.ts.
Safety blocks review queue
AI-prompt rejection rows land in safety_blocks for super-admin triage at /super-admin/safety/blocks. The queue UI is the authorised reveal surface.
Incident workspace
Five-template FSM with a regulator-notification clock. From triage through Article 33 reporting in one workspace, with TraceLayer evidence pinned to every step.
PII boundary + build-time attestation
TypeScript brand type plus a build-time scan that fails CI if any AI route skips redaction. The DPA is enforced before the code can compile.
Field-level encryption
SIS credentials, LTI client secrets, and SAML SP signing material encrypted at the field level. Plaintext never persists.
7-year SECURITY-class audit logs
Security-class events retained 7 years — long enough to satisfy any regulator who comes asking. AI-decision logs follow their own configurable retention.