TrueCase — Data Flow Diagram
AI Business Case Builder  ·  Next.js + Claude Sonnet  ·  Knowledge-Grounded Output
Layer 1
User Input
Q1 — Decision type
Decisions affecting individuals
Decisions affecting organisations
Internal analysis only
Process automation, no prior decision
Q2 — Data type
Personal data (identifiable individuals)
Aggregated / anonymised data
Operational or sensor data
Publicly available data only
Q3 — Scale
<100 decisions / month
Hundreds–thousands / month
Tens of thousands+ / month
Unknown — still in development
Q4 — Sector
Financial services · Healthcare
Media · Retail · Real estate
Recruitment · Public sector
Tech platform · Other
Financial inputs
Current annual cost £
Expected efficiency gain %
Expected error / risk reduction %
Regulatory fine exposure £
AI system annual cost £
Optional context field (textarea)
Layers 2 + 3
Local Processing
Governance Gate
Output Limit Control
Human Review
Decision Audit Trail
Regulatory Map
AI Performance Docs
Data Use Boundary
Each missing element deducts points
(−10 to −25 per gap)
Reliability Score
Starts at 100%
Element status: Confirmed / Partial / Missing
Score bands: 80–100% green, 50–79% amber, <50% red
Reliability-adjusted projection = gain × score
calculations.ts
projectedGain = cost × efficiency + (fine × errorRed × 0.3)
adjustedGain = projectedGain × (score / 100)
netGain / ROI
breakEven (months)
All local — zero API cost
Layer 4
Knowledge Lookup
governance-kb.json
6 elements with regulatory anchors
Consequence text (missing / partial)
Reliability penalties per element
Applicable sectors + use case tags
sdg-kb.json
15 verified Q1 + Q4 → SDG mappings
Primary + Secondary SDG per use case
UN target text for each SDG
Governance dependencies
negative_condition flags
Micro / meso / macro impact level
benchmarks.json
Sector fine exposure ranges
Efficiency gain benchmarks
Error reduction benchmarks
AI system cost benchmarks
All local — zero API cost
Layer 5
Claude API
Model: claude-sonnet
max_tokens: 1,500
Server-side only (API route)
One call per Generate click — no auto-loading
Receives:
Financial outputs (all calculated values)
Governance statuses (all 6 elements)
Reliability score + full breakdown
Full knowledge base (relevant entries)
Resolved SDG mapping + UN target text
Benchmark refs for sector
Q1–Q4 answers + optional context field
Strict rules:
No added regulatory claims beyond kb
No recalculation of financial figures
No inference beyond provided sources
Omit if uncertain — do not substitute
Returns JSON:
section1 — Business Case Summary
section2 — Governance Assessment
section3 — Social Return Signal
Layer 5 →
Output
Section 1
Business Case Summary
CFO-readable · 200–250 words
Both headline + reliability-adjusted figures
Plain English — no jargon
Section 2
Governance Assessment
Each element status stated explicitly
Specific consequence per missing / partial
Named regulations — no generic "compliance"
Reliability score + adjusted projection
Section 3
Social Return Signal
Primary + secondary SDG
UN target text · impact level
Full SROI caveat (never abbreviated)
Export:
PDF download (3-page · @react-pdf/renderer)
HTML export
Processed server-side — immediately discarded
No user data stored