Skip to content
Cameron Mills

All projects

A company name in, a cited tear sheet out

Tearline

An open source AI origination engine for PE, credit and restructuring desks: a company name or deal tip goes in, and a cited tear sheet, capital structure and model come out in minutes. Its written prose may only reference cited facts, a check on the output rather than proof that extraction is right.

Code on GitHub

The product story

User
Analysts and lenders on PE, credit and restructuring desks who work on UK private companies.
Problem
They start from scanned accounts and build each tear sheet by hand, so the work is slow and the numbers are hard to trust.
Options
Let users bring their own vendor credentials for wider data, or hold only public-register data under the Open Government Licence, with page-level citations.
Decision
Public-register data with page-level citations, trading data breadth for legal safety. Where printed figures do not reconcile, such as a maturity split that does not add to total borrowings, the engine abstains and says why. A sales line that promised absolute accuracy was cut, because nothing supports it.
Outcome
Open source on GitHub, and deployed behind its sign-in wall since 30 September. The checks so far are engineering checks: 1,362 passing tests, and an extraction evaluation against a gold set of 10 real UK filings with hand-checked figures, where abstentions are reported apart from failures. No field-level error rate or analyst time saving is published yet, and page pinning on scanned accounts has not been checked by a person.
Next
Pin every figure on a scan to the exact words on the page, then publish an error rate on scanned filings, measured on figures a person has checked.

How it works

How a name or company number becomes a cited tear sheet. Select a layer to open it.

Problem

Lenders and analysts working on UK private companies start from scanned accounts and build each sheet by hand. The aim is for analysts to stop assembling sheets by hand, and for lenders to start from verified numbers rather than a scanned PDF.

Approach

Hold a cited record of UK private companies' accounts and turn it into finished work. The data comes from public registers under the Open Government Licence, and premium vendor data is never held or resold. Where a figure cannot be supported, the engine declines to give one rather than guessing, and that is treated as a feature.

Architecture

A company name or number goes in. The engine extracts the figures, adds to them from live sources, checks its own work, and then builds a one-page tear sheet, a capital structure summary, a supporting model and linked references. Scanned accounts are read twice and the two readings are reconciled with arithmetic, and where they do not agree the engine declines. Every figure is labelled as reported, derived, an estimate, or withheld, and each one is pinned to the document, page and passage it came from. Where a filing has machine-readable text, the model may only quote figures that can be found word for word in the source.

What I built

I designed the engine and its verification rules and directed the build with Claude Code. The model it produces is a real Excel workbook with every figure linked back to its source. The written parts of each sheet pass a prose check written in plain code, with no AI involved, that blocks rather than warns. It is hosted in London so UK data stays in the UK.

Results

The code is open source on GitHub. Its engineering checks are 1,362 passing tests and a gold set of 10 real UK filings with hand-checked figures, which measure extraction against those figures and not analyst time saved. It abstains wherever the printed figures do not reconcile. I chose public-register data with page-level citations over bring-your-own credentials, trading data breadth for legal safety.

At the launch check on 1 October, all but one of the packages on the path to launch were merged, and the one still open was the deploy package. The product has been deployed behind its sign-in wall since 30 September, with a domain still to pick, so the product runs while that package is still open. The cashflow-lab experiments show the same test of returned answers against coverage on three smaller tools. Part of the launch goal is that nothing claims more than the engine can back up. Pinning figures to the page on scanned accounts is new and has not yet been checked by a person.

Tearline: results against their thresholds
CheckExpected or thresholdActualResult
Launch critical pathEvery launch package mergedAll but one at the 1 Oct check. The open one is the deploy package, though the product has run behind its sign-in wall since 30 SepMissed
A ladder marks every figureBacked by code before it is claimedTrue in the claims registerPass
Evidence card per figureBacked by code before it is claimedTrue in the claims registerPass
Prose check with no model in the pathBacked by code before it is claimedTrue in the claims registerPass
Every figure points at its pixelsBacked by code before it is claimedRoadmap: needs a word-level OCR layerMissed
Sales claims checked against the code before they are used, from the claims register, and the launch critical path.

What didn't work

Early sales copy said more than the engine could prove, so every claim now goes through a register that marks it as true, on the roadmap, or forbidden, with the proof or the reason beside it. One line promised absolute accuracy and was cut, because nothing supports it. The part that can be checked stays: any figure is one click away from its source.

What I'd do next

Pin every figure on a scan to the exact words on the page, rather than to a page number and the text the model reported. Then publish an error rate on scanned filings, measured on figures a person has checked.

Stack

  • TypeScript
  • Next.js
  • React 19
  • Postgres
  • exceljs
  • Playwright
  • Vercel (London region)

How these figures are sourced

The outcome figure is agent-reported: it is taken from a test log or report written by the agents that built and ran the system. The status was read from the launch goal check. Every figure and claim on this page is tied to a source file or a CV line in the site's content.