🛡️

Personal Fiduciary Harness

System Walkthrough & Operating Guide

🛡️ Autonomous UK Wealth Intelligence

The Complete System Walkthrough

This guide explains what this application does, how to use every feature, an honest evaluation of local vs cloud AI intelligence, and how we solved common nagging financial app issues (like hallucinated bills and privacy leaks).

01 • Core Philosophy

Why We Built This: The Fiduciary Standard

Almost every consumer financial app in the UK (Emma, Snoop, Plum, Money Dashboard) operates as a lead generator for affiliate financial products. When they notify you to "cut your bills" or "get a better rate", they receive £50–£150 commission from credit card companies, personal loan providers, or debt consolidators.

❌ Typical Retail FinTech Apps
  • Monetize by selling your financial data to advertisers.
  • Send push notifications for high-commission credit cards.
  • Hallucinate bills: past pub trips or groceries show up as upcoming subscriptions.
  • Send all your bank transactions to external third-party cloud servers.
✓ Personal Fiduciary Harness
  • 100% Fiduciary Duty: Zero commissions, zero kickbacks, zero affiliate fluff.
  • 100% On-Device Privacy: Inference runs locally on your Apple Silicon Mac via LM Studio.
  • Deterministic Watchdog: Zero fabricated bills. Strict 45-day recency and boundary checks.
  • Mathematical Loyalty: Pure unvarnished numbers based on UK tax rules and FSCS protections.
02 • AI Architecture & Privacy

Is the Local Model Intelligent Enough? (Honest Evaluation)

Yes, for 95% of wealth monitoring, runway planning, and spending questions.

On your 16GB Apple Silicon MacBook, running Ollama (qwen3.5:4b) with think: false and keep_alive: 0 on Apple Silicon Metal GPU offloading produces grounded responses in ~1.1 seconds with zero outbound network traffic and zero RAM leaks. Alternatively, Meta-Llama-3.1-8B via LM Studio is fully supported.

Why Local Models Work So Well Here: Grounded Architecture (RAG)

The AI does not have to guess your finances or perform complex mental math from scratch. Before querying the model, our Python backend computes exact deterministic metrics:

Liquid Balance: Exact
Daily Burn: Exact
Runway Days: Exact
Active Bills: Exact

Because these exact figures are injected directly into the system prompt, the local model acts as an articulate financial planner that presents and explains the verified figures without hallucinating.

🟢 Ollama Local (Default)

Primary on-device engine on port 11434. Uses think: false for sub-second answers and keep_alive: 0 so RAM drops to zero when idle.

🔵 LM Studio Local

Alternative local endpoint on port 1234. Supports Llama 3.1 8B or Mistral 7B with full Apple Silicon Metal acceleration.

🟣 Cloud Gemini (Dormant)

Zero data egress by default. Kept as an optional adapter for complex multi-year tax memorandums if explicitly enabled.

03 • Operational Guide

How to Use Every Module in the App

⏱️ Liquid Runway & Burn Rate
Core Metric

Measures how many days of living expenses you have on hand before your cash balance hits £0. Calculated by dividing your verified 30-day living spend into daily burn (£18.72/day).

How to use it:

If your runway drops below 7.0 days, the card turns red. Instead of reactive £100 manual top-ups, use the Smart Sweeper to set up an automated 1st-of-month operating float.

🚨 Financial Watchdog & Bills
Deterministic

Detects genuine recurring software and subscription contracts (like Anthropic Claude, Cheddar). Excludes one-off discretionary spend (pubs, Deliveroo, groceries) so you never get hallucinated bills.

What it flags:

• Stealth Price Hikes: Warns if a monthly charge silently jumped.
• Duplicate Charges: Warns if a card was double-billed within 48h.
• Upcoming (14d): Exact commitments due in the next fortnight.

💰 Whole Net Worth Architecture
Balance Sheet

Builds an institutional balance sheet uniting all your liquid cash, Cash ISAs, Stocks & Shares ISAs, Workplace Pensions, SIPPs, Property Equity, and Crypto.

How to use it:

Click "+ Add Custom Asset / Debt" on the Whole Net Worth tab. Enter the balance and asset class. It recalculates your net worth and renders an allocation chart.

🇬🇧 UK Tax Optimization Engine
HMRC Math

Audits personal allowance tapering, Personal Savings Allowance (PSA) cash drag, and SIPP relief math across all UK income tax bands.

The 60% Trap Audit:

Between £100,000 and £125,140, you lose £1 of tax-free personal allowance for every £2 of income (an effective 60% marginal tax rate). The tool calculates the exact pension sacrifice needed to restore your full allowance.

⚡ Smart Sweeper & 1-Click Cancel
Automation

Prevents cash drag from keeping excess money sitting in 0% accounts. Automatically calculates how much excess cash can be swept into an easy-access 4.87% Cash ISA.

Statutory Cancellation Generator:

Type the name of any subscription (e.g. Anthropic, Spotify, Gym) to generate a formal cancellation notice referencing the UK Consumer Rights Act 2015.

🌐 Live Market Scout
Market Yields

Continuously compares UK retail banking products: Flexible Cash ISAs (Trading 212 at 4.87%), Taxable Savings (effective yield after your tax rate), Chase UK 1% debit cashback, and bank switch bonuses.

Direct Application Links:

Every single product links directly to the official provider's application portal. Zero affiliate referral redirects.

🛠️ AI Observability & Tool Telemetry
Provenance Engine

Full data provenance tracking for every Copilot response. Whenever web scraping fetches the Bank of England rate (3.75%) or top Cash ISA yields (Trading 212 at 4.87%, First Direct at 7.00%), or SQLite queries itemized transactions, execution latency (ms), source URLs, and payload summaries are logged.

How to inspect:

Run ./f tools in your terminal to see active tools, or click 🔍 Traces in the web dashboard and open the 🛠️ Active Tools & Ingested Data panel.

🛡️ Self-Evaluating AI & Enterprise EVAL Suite
Pre-Flight Guardrail

The AI evaluates its own output before responding to the consumer. Pre-flight evaluation audits grounding, checks FCA Consumer Duty invariants, detects hallucination bait, and triggers autonomous self-correction if unverified claims arise (<2ms latency).

Forward Deployment EVAL Benchmark:

Run ./f eval to execute the 6-dimension production benchmark suite (100% pass rate, Grade A+). Deep LLM-as-a-judge audits remain available via ./f judge with keep_alive: 0 for 16GB memory protection.

📱 Mobile Banking & Biometric FaceID
Local LAN + PWA

Control your finances on your phone while your Mac handles heavy local AI and database storage. Connect UK banks (Lloyds, Revolut, Chase) with native biometric FaceID/TouchID directly from your phone.

1-Tap Clipboard Handoff:

When redirected after bank login, tap "📋 Paste from Clipboard & Connect" in the mobile header banner. It extracts the authorization code and completes the exchange instantly.

🔬 Financial Data Engineering & Audit
Double-Entry Invariant

Strict institutional reconciliation: every ingested PDF/CSV statement must verify: Opening + Inflows - Outflows ≡ Closing. Batches are marked RECONCILED only if discrepancy is exactly £0.00.

Real-World Parsing Resilience:

Handles same-day date propagation, multi-line narrative accumulation, running balance delta signing, and SHA-256 batch cryptographic fingerprinting for idempotent de-duplication.

💳 Credit Affordability Engine (FCA MCOB 11)
Underwriter Model

UK mortgage lenders evaluate Open Banking cash-flow affordability over CRA bureau scores alone. Computes Uncommitted Monthly Income (UMI), Contractual DTI, and 90-day risk radar for BNPL (Klarna/Clearpay) and bounced direct debits.

4.5x Mortgage Stress Testing:

Simulates borrowing capacity under Bank of England 7.5% stress testing, emergency £1,500 repair shocks, and comfortable vs survival runway.

🔌 Model Context Protocol (MCP) Gateway
MCP Standards

Exposes 7 standardized tools with JSON schemas, live web grounding (official Bank of England base rate scraping, DuckDuckGo Knowledge API), and deterministic SQLite financial aggregations with sub-millisecond execution telemetry.

HTTP Endpoints:

Inspect tool schemas via GET /api/mcp/tools or execute tools dynamically via POST /api/mcp/execute. Fully compatible with external agents and IDEs.

🛡️ Prompt Guard & Zero-Refusal Copilot
Defense & Precision

Pre-inference security engine detecting system overrides, jailbreaks (DAN mode), delimiter escapes, and data exfiltration in 0ms. Context is wrapped in <verified_financial_context>, and anti-refusal system directives eliminate RLHF disclaimers on emergency buffers and net worth.

Deterministic Safety:

Answers tricky emergency fund questions with exact £8,263.80 target, £7,462.12 liquid capital, £801.68 shortfall, and 81.3-day runway down to the penny.

04 • Quality & Reliability

Nagging Features Fixed & Polished

Nagging Issue / Friction Root Cause Diagnosed Our Architectural Solution
"Mobile banking app redirected to localhost and failed" UK Open Banking OAuth requires strict pre-registered redirect URIs (http://localhost:8080/truelayer/callback), unroutable on mobile phones. Built multi-candidate URI matching and 1-tap clipboard regex parser (📋 Paste from Clipboard & Connect) and terminal ASCII QR code pairing.
"NatWest PDF statements missing transactions or amounts" NatWest omits repeated dates on same-day rows, wraps narratives across 3 lines, and omits explicit debit minus signs. Stateful date propagation, multi-line narrative buffering, and running balance delta calculation ($\Delta = B_i - B_{i-1}$) achieving exact £0.00 closed-loop balance reconciliation.
"Duplicate transactions when re-importing statements" Downloading overlapping monthly statements (e.g. May-Jun and Jun-Jul) caused duplicate database rows. Deterministic SHA-256 batch provenance and cryptographic content key upsert (tx_<sha256>), ensuring 100% idempotent deduplication.
"Is it making things up like bills due?" Previous logic rolled historical transactions forward forever and lacked word boundaries (e.g. matching "ee" inside "queens"). Enforced strict 45-day recency window and regex boundaries. Separated active subscriptions from archived dormant records.
"Confidential finances sent to outside model API" Cloud LLMs require streaming transaction history and account numbers over public internet endpoints. Unified LLMClient with local LM Studio endpoint running Meta-Llama-3.1-8B on Apple Silicon Metal GPU. Zero data egress.
"I don't see Fiduciary app on Mac" App bundle was symlinked in ~/Applications, which macOS Spotlight and Finder sidebar completely ignore. Installed real native bundle in /Applications/Fiduciary.app with retina shield AppIcon.icns, registered with lsregister and mdimport.
No way to switch AI engines on the fly Provider was locked in .env configuration file, requiring terminal commands to change. Added interactive AI Privacy & Model Selector directly on the dashboard header with 1-click toggling.
"Only have PDF statements, app expects CSV" UK bank portals frequently provide downloadable statements exclusively as official PDF documents rather than CSVs. Engineered a 100% on-device PDF parser detecting UK bank layouts (Barclays, HSBC, NatWest, Lloyds, Santander, etc.), sort codes, closing balances, and running balance delta reconciliation.
"Can't get my last 5 Revolut transactions" Copilot only received category totals, the dashboard had no transaction view, and the CLI had no bank/count filters. Copilot injects numbered newest-first rows for the bank and count you ask about. New Live Transactions tab and ./f tx -a revolut -n 5 -s keyword.
"How do I know the AI's answer is good?" The regex Grounding Auditor checks numbers but cannot judge ordering, omissions or advice quality. On-demand LLM-as-a-Judge (./f judge) using a different local model (Gemma 7B on Ollama). Verdict shown in ./f traces.
"Local inference was slow (20–40s on M3 Mac)" Reasoning models (like Qwen 3.5) generate 800+ hidden chain-of-thought tokens; prompt prefill had ~1,800 tokens of redundant tables. Disabled thinking loops (think: false in Ollama payload) and implemented dynamic intent-based prompt pruning (~300 tokens). Latency dropped by 70x (from 22s to 0.3–1.5s).
"Live web market data without overheating 16GB Mac" Spinning up Chromium or Playwright headless browsers uses 1.5 GB RAM and causes thermal throttling on Apple Silicon. Lightweight zero-overhead Python tools fetch live Bank of England base rates and market benchmarks via HTTP in <200ms with zero extra RAM.
"Mac froze while running AI" Llama 8B (LM Studio) and Gemma 7B (Ollama) were both loaded at once: ~12 GB of models on a 16 GB Mac caused swapping. Judge refuses to run while LM Studio holds a model, unloads models immediately (keep_alive 0) and caps context. One model in RAM at a time.
"How did it get 7% First Direct or BoE rate? Is it making up web facts?" User had no visibility into whether financial figures originated from live market tools or LLM hallucinations. Engineered a Tool Execution & Provenance Tracker logging exact tool calls, latencies, and sources into llm_traces. Inspectable via ./f tools and the UI Traces modal.
"Copilot refused with 'I cannot provide financial advice' on emergency buffer" Small SLM RLHF safety heads triggered canned disclaimers when asked about emergency funds under 'Financial Planner' framing. Reframed system prompt as private analytical engine with strict anti-refusal directive. Pre-injected exact £8,263.80 target, £7,462.12 liquid capital, £801.68 shortfall, and 81.3-day runway.
"Risk of prompt injection, DAN jailbreaks, or exfiltration" Natural language input could attempt delimiter breakouts (<|im_start|>), instruction overrides, or SQL injection. Implemented pre-inference PromptGuard blocking injections in 0ms, neutralizing boundary tokens, and enclosing context in <verified_financial_context>.
"Compound queries requiring multi-step investigation" Single-pass prompt assembly could not handle compound queries like "Check pub spend and find the best cash isa". Implemented ReActFiduciaryAgent with autonomous Thought → Action → Observation loop, safety turn ceilings, and full step trace observability (./f react).
"Enterprise privacy & cloud credential leakage" If external gateways or cloud fallback models are invoked, raw sort codes and account numbers could be transmitted. Engineered PIIAnonymizer with reversible salt-hashed tokens ([SORT_CODE_1], [ACCOUNT_NUM_1]), guaranteeing zero raw PII egress and lossless roundtrip restoration.
"Unstructured statutory tax rules & policy notes" Keyword SQL search cannot perform semantic matching across complex HMRC tax schedules or underwriting standards. Engineered LocalVectorRAG with embedded TF-IDF cosine similarity running 100% on-device with 0 MB background daemon overhead (./f rag).
05 • Quickstart

Everyday Usage Cheatsheet

🚀 Launch Desktop App (macOS)

Press Cmd + Space, type Fiduciary, and press Enter. Or click the green shield icon in your Dock/Applications.

💬 Ask Fiduciary Copilot

Click the purple 🤖 Copilot button in the top right, or click any quick prompt chip (e.g. "What bills are due in 14 days?" or "Can I afford a £1,500 holiday?").

💻 Terminal CLI Commands
./f react "<q>"    # Autonomous ReAct multi-step agent
./f rag "<q>"      # Local semantic Vector RAG search
./f eval          # Run 6-Dimension AI Benchmark Suite
./f copilot "<q>"  # Query on-device AI Copilot
./f watchdog      # Active Bills & Price Hikes
./f tx -a revolut  # Itemised Bank Transactions
./f tools         # Inspect Active Tools & Sources
./f judge         # Run Independent LLM-as-a-Judge
./f traces        # Observability & Tool Telemetry
📥 Import Bank Statements (PDF or CSV)

Drag & drop native PDF bank statements or CSV files from Barclays, HSBC, NatWest, Lloyds, Santander, Nationwide, Chase, Monzo, Revolut directly into the upload card. Parses 100% locally with zero internet data transmission.

← View System Architecture & Topology