AI Governance
The Rules That Keep AI Safe in Leja
The Non-Negotiable Boundary
AI handles: triage, pattern surfacing, pre-filling, drafting, ranking, routing. Humans handle: consequential decisions — fraud flags, dispute resolutions, payment confirmations, attestations. This boundary cannot drift. Speed and cost do not override it. The moment AI makes consequential decisions autonomously because it is faster or cheaper, the witnessing model’s integrity begins to degrade. This is a product governance requirement, not an engineering preference.What AI Can Decide Autonomously
What AI Cannot Decide Autonomously
The aiConfidence Field Contract
Every AI-touched record carriesaiConfidence (0.0–1.0).
This field is permanent. It cannot be removed after the record is created.
It documents that AI was involved and how confident it was.
Threshold rules:
aiConfidence >= 0.85: Full AI assistance — standard flow0.60 <= aiConfidence < 0.85: AI assistance with flag — show warning to humanaiConfidence < 0.60: Low confidence — mandatory human review before action
Bias Audit Framework
Why It Is Required
Early Leja data will skew toward:- Lagos (first market)
- Higher income brackets (first users)
- Residential properties (vs. commercial)
- Agents and agencies (vs. solo landlords)
Cadence: Quarterly (Every 3 Months)
Scope of Each Quarterly Audit
Audit Process
What Happens When Bias Is Found
MONITOR: The bias is within acceptable range but trending toward the threshold. Flag for next quarter’s audit. No immediate action. ACTION_REQUIRED: The bias exceeds the threshold. Immediate action:- The affected intelligence behavior is paused for the specific use case showing bias
- Root cause is identified
- Correction is implemented and validated
- Feature is re-enabled after validation
- The finding and correction are documented permanently
Prompt Version Control
All AI prompts are version-controlled code inpackages/ai/prompts/.
Prompts are reviewed like any other code before merging.
Prompt changes require:
- A description of what changed and why
- Test results on at least 10 relevant inputs
- Review by at least one other team member
- No breaking changes to the Zod output schema without a data migration plan