Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Basit-Ali0/Yggdrasil/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Theviolations table stores detected compliance violations with evidence, deterministic explanations, and review status for Bayesian feedback.
Schema
| Column | Type | Description |
|---|---|---|
id | UUID, PK | Unique violation identifier |
scan_id | UUID, FK | Parent scan |
rule_id | text | Violated rule ID (e.g., 'aml_rule_1') |
rule_name | text | Rule name |
severity | text | 'CRITICAL', 'HIGH', 'MEDIUM' |
record_id | text | Row ID from source data |
account | text | Account/entity identifier |
amount | numeric | Transaction amount |
transaction_type | text | Transaction type |
evidence | jsonb | Matched field values from the record |
threshold | numeric | Rule threshold breached |
actual_value | numeric | Actual value that triggered violation |
policy_excerpt | text | Policy clause violated |
policy_section | text | Policy section reference (e.g., “Article 5(1)(a)“) |
explanation | text | Deterministic explanation (template-generated) |
status | text | 'pending', 'approved', 'false_positive' |
review_note | text | Reviewer comments |
reviewed_by | UUID | Reviewer user ID |
reviewed_at | timestamptz | Timestamp when reviewed |
created_at | timestamptz | Timestamp when violation was detected |
Evidence JSONB
Theevidence field stores the matched field values from the source data record that triggered the violation.
Example Evidence
- The transaction amount was $15,000
- The transaction type was “WIRE”
- The country was “US”
- The timestamp was February 22, 2026 at 10:00 AM
- The account was “ACC-12345”
The evidence grid is displayed in the UI alongside the policy excerpt and explanation, providing full audit-ready documentation for each violation.
Review Status Values
Thestatus field tracks the review state of each violation:
| Status | Description | Impact on Compliance Score |
|---|---|---|
pending | Awaiting review | Counts as active violation |
approved | Confirmed true positive | Counts as active violation |
false_positive | Dismissed as incorrect | Removed from violation count, score increases |
Bayesian Feedback Flow
When a user reviews a violation:- Approve → Sets
status = 'approved', incrementsrules.approved_count - Dismiss → Sets
status = 'false_positive', incrementsrules.false_positive_count - Score Update → Recalculates compliance score and appends to
scans.score_history
Deterministic Explanations
Example Explanation
Relationships
- Foreign Key to
scans— Each violation belongs to a scan - References
rules.rule_id— Each violation is triggered by a specific rule - Foreign Key to
auth.users(viareviewed_by) — Tracks who reviewed the violation