# must-canary/sut-value-forensics architecture

> Architecture diagram of the GitHub repository must-canary/sut-value-forensics, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/must-canary/sut-value-forensics
- Repository: https://github.com/must-canary/sut-value-forensics

## Overview

SUT Value Forensics is a local React application and scheduled collector for investigating a frozen market-crash case, recording current market evidence, and supporting human-governed experiments. The main workflow is to collect and preserve observations, assess them against historical evidence and governance state, then present findings and required human actions. The graph also preserves the documented forensic, reporting, experiment, and six-dimension market-quality capabilities. Relationships for unsampled modules are included only where the README or SOURCE INDEX supports them; directory paths identify documented subsystems whose specific implementation was not sampled.

Main entry points: [`src/core/governance-store.ts`](https://github.com/must-canary/sut-value-forensics/blob/master/src/core/governance-store.ts) (Governance ledger), [`src/ui/screens.tsx`](https://github.com/must-canary/sut-value-forensics/blob/master/src/ui/screens.tsx) (Forensic screens), [`src/ui/App.tsx`](https://github.com/must-canary/sut-value-forensics/blob/master/src/ui/App.tsx) (Screen router), [`src/ui/live-market.tsx`](https://github.com/must-canary/sut-value-forensics/blob/master/src/ui/live-market.tsx) (Live market screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_forensics["Frozen investigation"]
  node_forensic_views["Forensic screens<br/>[screens.tsx]"]
  node_hypotheses["Hypotheses<br/>[hypotheses.ts]"]
  node_evidence["Frozen evidence<br/>[evidence.ts]"]
  node_timeline["Investigation timeline<br/>[timeline.ts]"]
end

subgraph group_market["Market observation"]
  node_daily_service["Daily sync service"]
  node_live_service["Live sync service"]
  node_daily_sync["Daily collection<br/>[daily-sync.ts]"]
  node_live_sync["Live collection"]
  node_daily_store[("Daily ledger<br/>[daily-store.ts]")]
  node_live_store[("Live evidence store")]
  node_daily_assessment["Daily assessment"]
  node_live_assessment["Live assessment<br/>[live-assessment.ts]"]
  node_market_sources["Market source data<br/>[market-sources.ts]"]
end

subgraph group_experiment["Experiment governance"]
  node_improvement["Improvement lab<br/>[improvement-lab.ts]"]
  node_thresholds["Threshold proposals"]
  node_registration["Pre-registration"]
  node_governance["Governance workflow<br/>[governance.ts]"]
  node_governance_store[("Governance ledger")]
  node_decision_store[("Business decisions<br/>[decision-store.ts]")]
  node_baseline["Baseline operations<br/>[baseline-ops.ts]"]
  node_measurements["Measurements<br/>[measurements.ts]"]
end

subgraph group_quality["Quality and analysis"]
  node_quality["Market quality checks"]
  node_reports["Reports and analysis<br/>[report.ts]"]
end

subgraph group_interface["Application interface"]
  node_app["Screen router<br/>[App.tsx]"]
  node_daily_ui["Daily sync screen<br/>[screens-daily.tsx]"]
  node_live_ui["Live market screen<br/>[live-market.tsx]"]
end

node_user(("Researcher"))
node_scheduled(("Cron scheduler"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_forensic_views
node_app -->|"routes to"| node_daily_ui
node_app -->|"routes to"| node_live_ui
node_forensic_views -->|"reads"| node_evidence
node_forensic_views -->|"reads"| node_hypotheses
node_forensic_views -->|"reads"| node_timeline
node_daily_ui -->|"runs sync"| node_daily_service
node_daily_service -->|"builds report"| node_daily_sync
node_daily_service -->|"loads and saves"| node_daily_store
node_daily_sync -->|"uses sources"| node_market_sources
node_daily_ui -->|"assesses state"| node_daily_assessment
node_live_ui -->|"runs sync"| node_live_service
node_live_ui -->|"displays observations"| node_live_sync
node_live_service -->|"collects data"| node_live_sync
node_live_service -->|"loads and saves"| node_live_store
node_live_sync -->|"reuses price helper"| node_daily_sync
node_live_ui -->|"assesses state"| node_live_assessment
node_live_assessment -->|"uses assessment"| node_daily_assessment
node_governance_store -->|"validates actions"| node_governance
node_governance_store -->|"records registration"| node_registration
node_governance_store -->|"uses baseline captures"| node_baseline
node_decision_store -.->|"supports persistence"| node_governance_store
node_improvement -.->|"proposes thresholds"| node_thresholds
node_scheduled -->|"triggers collection"| node_daily_service
node_daily_assessment -->|"uses governance state"| node_governance_store
node_quality -->|"checks market data"| node_live_sync
node_quality -->|"checks resilience"| node_live_store
node_reports -->|"reports measurements"| node_measurements
node_user -->|"advances by approval"| node_governance_store

click node_app "https://github.com/must-canary/sut-value-forensics/blob/master/src/ui/App.tsx"
click node_forensic_views "https://github.com/must-canary/sut-value-forensics/blob/master/src/ui/screens.tsx"
click node_hypotheses "https://github.com/must-canary/sut-value-forensics/blob/master/src/data/hypotheses.ts"
click node_evidence "https://github.com/must-canary/sut-value-forensics/blob/master/src/data/evidence.ts"
click node_timeline "https://github.com/must-canary/sut-value-forensics/blob/master/src/data/timeline.ts"
click node_daily_ui "https://github.com/must-canary/sut-value-forensics/blob/master/src/ui/screens-daily.tsx"
click node_live_ui "https://github.com/must-canary/sut-value-forensics/blob/master/src/ui/live-market.tsx"
click node_daily_service "https://github.com/must-canary/sut-value-forensics/blob/master/src/service/daily-market-sync-service.ts"
click node_live_service "https://github.com/must-canary/sut-value-forensics/blob/master/src/service/live-market-sync-service.ts"
click node_daily_sync "https://github.com/must-canary/sut-value-forensics/blob/master/src/core/daily-sync.ts"
click node_live_sync "https://github.com/must-canary/sut-value-forensics/blob/master/src/core/live-market-sync.ts"
click node_daily_store "https://github.com/must-canary/sut-value-forensics/blob/master/src/core/daily-store.ts"
click node_live_store "https://github.com/must-canary/sut-value-forensics/blob/master/src/core/live-market-store.ts"
click node_daily_assessment "https://github.com/must-canary/sut-value-forensics/blob/master/src/core/daily-assessment.ts"
click node_live_assessment "https://github.com/must-canary/sut-value-forensics/blob/master/src/core/live-assessment.ts"
click node_market_sources "https://github.com/must-canary/sut-value-forensics/blob/master/src/data/market-sources.ts"
click node_improvement "https://github.com/must-canary/sut-value-forensics/blob/master/src/core/improvement-lab.ts"
click node_thresholds "https://github.com/must-canary/sut-value-forensics/blob/master/src/core/proposed-thresholds.ts"
click node_registration "https://github.com/must-canary/sut-value-forensics/blob/master/src/core/pre-registration.ts"
click node_governance "https://github.com/must-canary/sut-value-forensics/blob/master/src/core/governance.ts"
click node_governance_store "https://github.com/must-canary/sut-value-forensics/blob/master/src/core/governance-store.ts"
click node_decision_store "https://github.com/must-canary/sut-value-forensics/blob/master/src/core/decision-store.ts"
click node_baseline "https://github.com/must-canary/sut-value-forensics/blob/master/src/core/baseline-ops.ts"
click node_measurements "https://github.com/must-canary/sut-value-forensics/blob/master/src/data/measurements.ts"
click node_quality "https://github.com/must-canary/sut-value-forensics/tree/master/src/core/market-quality"
click node_reports "https://github.com/must-canary/sut-value-forensics/blob/master/src/core/report.ts"

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_forensic_views,node_hypotheses,node_evidence,node_timeline toneBlue
class node_daily_service,node_live_service,node_daily_sync,node_live_sync,node_daily_store,node_live_store,node_daily_assessment,node_live_assessment,node_market_sources toneAmber
class node_improvement,node_thresholds,node_registration,node_governance,node_governance_store,node_decision_store,node_baseline,node_measurements toneMint
class node_quality,node_reports,node_scheduled toneRose
class node_app,node_daily_ui,node_live_ui,node_user toneIndigo
```

## Components

### Frozen investigation

- [Forensic screens](https://github.com/must-canary/sut-value-forensics/blob/master/src/ui/screens.tsx): `src/ui/screens.tsx`
- [Hypotheses](https://github.com/must-canary/sut-value-forensics/blob/master/src/data/hypotheses.ts): `src/data/hypotheses.ts`
- [Frozen evidence](https://github.com/must-canary/sut-value-forensics/blob/master/src/data/evidence.ts): `src/data/evidence.ts`
- [Investigation timeline](https://github.com/must-canary/sut-value-forensics/blob/master/src/data/timeline.ts): `src/data/timeline.ts`

### Market observation

- [Daily sync service](https://github.com/must-canary/sut-value-forensics/blob/master/src/service/daily-market-sync-service.ts): `src/service/daily-market-sync-service.ts`
- [Live sync service](https://github.com/must-canary/sut-value-forensics/blob/master/src/service/live-market-sync-service.ts): `src/service/live-market-sync-service.ts`
- [Daily collection](https://github.com/must-canary/sut-value-forensics/blob/master/src/core/daily-sync.ts): `src/core/daily-sync.ts`
- [Live collection](https://github.com/must-canary/sut-value-forensics/blob/master/src/core/live-market-sync.ts): `src/core/live-market-sync.ts`
- [Daily ledger](https://github.com/must-canary/sut-value-forensics/blob/master/src/core/daily-store.ts): `src/core/daily-store.ts`
- [Live evidence store](https://github.com/must-canary/sut-value-forensics/blob/master/src/core/live-market-store.ts): `src/core/live-market-store.ts`
- [Daily assessment](https://github.com/must-canary/sut-value-forensics/blob/master/src/core/daily-assessment.ts): `src/core/daily-assessment.ts`
- [Live assessment](https://github.com/must-canary/sut-value-forensics/blob/master/src/core/live-assessment.ts): `src/core/live-assessment.ts`
- [Market source data](https://github.com/must-canary/sut-value-forensics/blob/master/src/data/market-sources.ts): `src/data/market-sources.ts`

### Experiment governance

- [Improvement lab](https://github.com/must-canary/sut-value-forensics/blob/master/src/core/improvement-lab.ts): `src/core/improvement-lab.ts`
- [Threshold proposals](https://github.com/must-canary/sut-value-forensics/blob/master/src/core/proposed-thresholds.ts): `src/core/proposed-thresholds.ts`
- [Pre-registration](https://github.com/must-canary/sut-value-forensics/blob/master/src/core/pre-registration.ts): `src/core/pre-registration.ts`
- [Governance workflow](https://github.com/must-canary/sut-value-forensics/blob/master/src/core/governance.ts): `src/core/governance.ts`
- [Governance ledger](https://github.com/must-canary/sut-value-forensics/blob/master/src/core/governance-store.ts): `src/core/governance-store.ts`
- [Business decisions](https://github.com/must-canary/sut-value-forensics/blob/master/src/core/decision-store.ts): `src/core/decision-store.ts`
- [Baseline operations](https://github.com/must-canary/sut-value-forensics/blob/master/src/core/baseline-ops.ts): `src/core/baseline-ops.ts`
- [Measurements](https://github.com/must-canary/sut-value-forensics/blob/master/src/data/measurements.ts): `src/data/measurements.ts`

### Quality and analysis

- [Market quality checks](https://github.com/must-canary/sut-value-forensics/tree/master/src/core/market-quality): `src/core/market-quality`
- [Reports and analysis](https://github.com/must-canary/sut-value-forensics/blob/master/src/core/report.ts): `src/core/report.ts`

### Application interface

- [Screen router](https://github.com/must-canary/sut-value-forensics/blob/master/src/ui/App.tsx): `src/ui/App.tsx`
- [Daily sync screen](https://github.com/must-canary/sut-value-forensics/blob/master/src/ui/screens-daily.tsx): `src/ui/screens-daily.tsx`
- [Live market screen](https://github.com/must-canary/sut-value-forensics/blob/master/src/ui/live-market.tsx): `src/ui/live-market.tsx`

### Other components

- **Researcher**
- **Cron scheduler**

## Connections

- Researcher → Screen router: uses (evidence: `README.md`)
- Screen router → Forensic screens: routes to (evidence: `src/ui/App.tsx`)
- Screen router → Daily sync screen: routes to (evidence: `src/ui/App.tsx`)
- Screen router → Live market screen: routes to (evidence: `src/ui/App.tsx`)
- Forensic screens → Frozen evidence: reads (evidence: `src/ui/screens.tsx`)
- Forensic screens → Hypotheses: reads (evidence: `src/ui/screens.tsx`)
- Forensic screens → Investigation timeline: reads (evidence: `src/ui/screens.tsx`)
- Daily sync screen → Daily sync service: runs sync (evidence: `src/ui/screens-daily.tsx`)
- Daily sync service → Daily collection: builds report (evidence: `src/service/daily-market-sync-service.ts`)
- Daily sync service → Daily ledger: loads and saves (evidence: `src/service/daily-market-sync-service.ts`)
- Daily collection → Market source data: uses sources (evidence: `src/data/market-sources.ts`)
- Daily sync screen → Daily assessment: assesses state (evidence: `src/ui/screens-daily.tsx`)
- Live market screen → Live sync service: runs sync (evidence: `src/ui/live-market.tsx`)
- Live market screen → Live collection: displays observations (evidence: `src/ui/live-market.tsx`)
- Live sync service → Live collection: collects data (evidence: `src/service/live-market-sync-service.ts`)
- Live sync service → Live evidence store: loads and saves (evidence: `src/service/live-market-sync-service.ts`)
- Live collection → Daily collection: reuses price helper (evidence: `src/core/live-market-sync.ts`)
- Live market screen → Live assessment: assesses state (evidence: `src/ui/live-market.tsx`)
- Live assessment → Daily assessment: uses assessment (evidence: `src/core/live-assessment.ts`)
- Governance ledger → Governance workflow: validates actions (evidence: `src/core/governance-store.ts`)
- Governance ledger → Pre-registration: records registration (evidence: `src/core/governance-store.ts`)
- Governance ledger → Baseline operations: uses baseline captures (evidence: `src/core/governance-store.ts`)
- Business decisions → Governance ledger: supports persistence (evidence: `src/core/governance-store.ts`)
- Improvement lab → Threshold proposals: proposes thresholds
- Cron scheduler → Daily sync service: triggers collection (evidence: `src/service/daily-market-sync-service.ts`)
- Daily assessment → Governance ledger: uses governance state (evidence: `src/core/daily-assessment.ts`)
- Market quality checks → Live collection: checks market data (evidence: `src/core/market-quality/index.ts`)
- Market quality checks → Live evidence store: checks resilience (evidence: `src/core/market-quality/resilience.ts`)
- Reports and analysis → Measurements: reports measurements (evidence: `src/ui/screens.tsx`)
- Researcher → Governance ledger: advances by approval (evidence: `README.md`)
