# pyrogrove/singhacks-2026-insurance-sept2026 architecture

> Architecture diagram of the GitHub repository pyrogrove/singhacks-2026-insurance-sept2026, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pyrogrove/singhacks-2026-insurance-sept2026
- Repository: https://github.com/pyrogrove/singhacks-2026-insurance-sept2026

## Overview

Priscilla is a single-page workbench for relationship managers: it first offers a deterministic scan of the client book, then lets an RM investigate an individual client using auditable evidence, with an optional, explicitly triggered AI briefing. The README also documents a validated Traditional Chinese translation capability, though its UI path is hidden in the public demo. The sampled source supports the main calls and data inputs; unsampled UI details limit certainty about the translation path.

Main entry points: [`priscilla/evidence.py`](https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/priscilla/evidence.py) (Client Evidence), [`priscilla/book_scan.py`](https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/priscilla/book_scan.py) (Book Scan), [`streamlit_app.py`](https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/streamlit_app.py) (Streamlit Workbench), [`priscilla/synthesis.py`](https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/priscilla/synthesis.py) (Briefing Synthesis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["RM Workbench"]
  node_app["Streamlit Workbench<br/>[streamlit_app.py]"]
end

subgraph group_analysis["Deterministic Analysis"]
  node_bookscan["Book Scan<br/>[book_scan.py]"]
  node_evidence["Client Evidence<br/>[evidence.py]"]
end

subgraph group_intelligence["AI Interpretation"]
  node_synthesis["Briefing Synthesis<br/>[synthesis.py]"]
  node_translation["Chinese Translation<br/>[translation.py]"]
end

subgraph group_sources["Static Data"]
  node_clientdata["Client Records<br/>[clients.csv]"]
  node_portfolios["Portfolio Data<br/>[portfolios.csv]"]
  node_holdings["Holdings Snapshots<br/>[holdings.csv]"]
  node_mandates["Mandate Ranges<br/>[mandates.csv]"]
  node_obligations["Needs and Commitments"]
  node_facilities["Credit Facilities"]
  node_context["Client and Market Context"]
end

node_rm(("Relationship Manager"))
node_provider{{"DeepSeek API"}}

node_rm -->|"uses"| node_app
node_app -->|"requests scan"| node_bookscan
node_bookscan -->|"reads"| node_clientdata
node_bookscan -->|"reads"| node_portfolios
node_bookscan -->|"reads"| node_holdings
node_bookscan -->|"reads"| node_mandates
node_bookscan -->|"reads"| node_obligations
node_bookscan -->|"reads"| node_facilities
node_app -->|"requests client evidence"| node_evidence
node_evidence -->|"reads"| node_clientdata
node_evidence -->|"reads"| node_portfolios
node_evidence -->|"reads"| node_holdings
node_evidence -->|"reads"| node_mandates
node_evidence -->|"reads"| node_obligations
node_evidence -->|"reads"| node_facilities
node_evidence -->|"reads"| node_context
node_app -->|"requests briefing"| node_synthesis
node_synthesis -->|"builds evidence"| node_evidence
node_synthesis -->|"sends bounded request"| node_provider
node_provider -->|"returns response"| node_synthesis
node_app -.->|"requests optional translation"| node_translation
node_translation -.->|"sends translation request"| node_provider
node_provider -.->|"returns translation"| node_translation

click node_app "https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/streamlit_app.py"
click node_bookscan "https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/priscilla/book_scan.py"
click node_evidence "https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/priscilla/evidence.py"
click node_synthesis "https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/priscilla/synthesis.py"
click node_translation "https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/priscilla/translation.py"
click node_clientdata "https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/data/clients.csv"
click node_portfolios "https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/data/portfolios.csv"
click node_holdings "https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/data/holdings.csv"
click node_mandates "https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/data/mandates.csv"
click node_obligations "https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/data/planned_cash_needs.csv"
click node_facilities "https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/data/credit_facilities.csv"
click node_context "https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/tree/main/data"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app toneBlue
class node_bookscan,node_evidence toneAmber
class node_synthesis,node_translation,node_provider toneMint
class node_clientdata,node_portfolios,node_holdings,node_mandates,node_obligations,node_facilities,node_context toneRose
class node_rm toneIndigo
```

## Components

### RM Workbench

- [Streamlit Workbench](https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/streamlit_app.py): `streamlit_app.py`

### Deterministic Analysis

- [Book Scan](https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/priscilla/book_scan.py): `priscilla/book_scan.py`
- [Client Evidence](https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/priscilla/evidence.py): `priscilla/evidence.py`

### AI Interpretation

- [Briefing Synthesis](https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/priscilla/synthesis.py): `priscilla/synthesis.py`
- [Chinese Translation](https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/priscilla/translation.py): `priscilla/translation.py`

### Static Data

- [Client Records](https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/data/clients.csv): `data/clients.csv`
- [Portfolio Data](https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/data/portfolios.csv): `data/portfolios.csv`
- [Holdings Snapshots](https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/data/holdings.csv): `data/holdings.csv`
- [Mandate Ranges](https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/data/mandates.csv): `data/mandates.csv`
- [Needs and Commitments](https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/data/planned_cash_needs.csv): `data/planned_cash_needs.csv`
- [Credit Facilities](https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/blob/main/data/credit_facilities.csv): `data/credit_facilities.csv`
- [Client and Market Context](https://github.com/pyrogrove/singhacks-2026-insurance-sept2026/tree/main/data): `data`

### Other components

- **Relationship Manager**
- **DeepSeek API**

## Connections

- Relationship Manager → Streamlit Workbench: uses
- Streamlit Workbench → Book Scan: requests scan
- Book Scan → Client Records: reads
- Book Scan → Portfolio Data: reads
- Book Scan → Holdings Snapshots: reads
- Book Scan → Mandate Ranges: reads
- Book Scan → Needs and Commitments: reads
- Book Scan → Credit Facilities: reads
- Streamlit Workbench → Client Evidence: requests client evidence
- Client Evidence → Client Records: reads
- Client Evidence → Portfolio Data: reads
- Client Evidence → Holdings Snapshots: reads
- Client Evidence → Mandate Ranges: reads
- Client Evidence → Needs and Commitments: reads
- Client Evidence → Credit Facilities: reads
- Client Evidence → Client and Market Context: reads
- Streamlit Workbench → Briefing Synthesis: requests briefing
- Briefing Synthesis → Client Evidence: builds evidence
- Briefing Synthesis → DeepSeek API: sends bounded request
- DeepSeek API → Briefing Synthesis: returns response
- Streamlit Workbench → Chinese Translation: requests optional translation
- Chinese Translation → DeepSeek API: sends translation request
- DeepSeek API → Chinese Translation: returns translation
