- Documentation
- /
- Rilr
- /
- System Diagram
System Diagram
The Regulatory Investigation / Legal Response data model, mapped — 16 models, 24 relationships
🔍 Open the Interactive Diagram Viewer — pan, mouse-wheel zoom, fit-to-screen, full-screen, per-area tabs, the full ERD, and a focus mode that draws one model and its neighbours at a chosen depth. Investigation and Regulator are hub tables (almost everything carries
investigation_id), so their links can be hidden to declutter the overview.
Architecture overview
Everything hangs off the Investigation. A regulator issues requests under it; each request breaks into requirements; evidence is collected and reviewed against those requirements; responses are drafted, decided and bundled into submissions that produce (or withhold) the evidence.
flowchart LR
subgraph INVESTIGATIONS["🏛️ Investigations & parties"]
Investigation
InvestigationParty
Regulator
end
subgraph REQUESTS["📥 Requests & requirements"]
RegulatoryRequest
Requirement
RequirementAssignment
ExtensionRequest
end
subgraph EVIDENCE["🔎 Evidence & review"]
EvidenceItem
EvidenceReview
end
subgraph RESPONSE["📤 Response & submissions"]
ResponseDraft
ReviewDecision
Submission
SubmissionRequirement
ProductionItem
end
subgraph EXCEPTIONS["⚠️ Comms & exceptions"]
Communication
IssueException
end
Regulator --> Investigation
Investigation --> InvestigationParty
Investigation --> RegulatoryRequest
RegulatoryRequest --> Requirement
Requirement --> RequirementAssignment
RegulatoryRequest --> ExtensionRequest
Investigation --> EvidenceItem
Requirement --> EvidenceItem
EvidenceItem --> EvidenceReview
Requirement --> ResponseDraft
Requirement --> ReviewDecision
ResponseDraft --> ReviewDecision
Investigation --> Submission
Submission --> SubmissionRequirement
Requirement --> SubmissionRequirement
Submission --> ProductionItem
EvidenceItem --> ProductionItem
Investigation --> Communication
Investigation --> IssueException
Investigations & parties
Regulator is the authority. Investigation is the matter — status, risk,
confidentiality, legal-hold and response-due — and InvestigationParty records
each participant (respondent, external counsel, …).
Requests & requirements
RegulatoryRequest is a notice with its statutory basis, due date and extension
tracking; ExtensionRequest records a time extension and the regulator's
response. Each request decomposes into Requirement rows (response type, owner,
reviewer, approver, privilege expectation), staffed via RequirementAssignment.
Evidence & review
EvidenceItem carries custody, source, hash, confidentiality and privilege
status, linked to both its investigation and the requirement it answers.
EvidenceReview is the legal/relevance review that decides responsive / privileged
/ redaction-required.
Response & submissions
ResponseDraft holds versioned drafts (with legal-review/approval status and
self-supersession); ReviewDecision records the decisions. Submission is a
package issued to the regulator (with receipt), and its contents are enumerated by
SubmissionRequirement (requirements covered) and ProductionItem (evidence
produced / redacted / withheld and on what basis).
Comms & exceptions
Communication logs correspondence in any direction; IssueException tracks
privilege, deadline and completeness risks raised on the matter.
Regenerating this diagram
The interactive viewer is generated — after any DSL, menu_config.yaml or
schema/diagram_config.yaml change, re-run:
python scripts/build_diagram_viewer.py rilr