Evidence03 of 04

Multi-agent AI · credit risk

OpenCAM: Autonomous Maker-Checker Framework

Engineered a dual-agent LLM pipeline with deterministic policy gating, targeting a cut in CAM drafting time from a business day to 15–30 minutes.

Controlled Delivery →Sep 2026 · ongoing
15–30 min
target time to first draft, from about a business day
a target, validated with one analyst
6087+
passing tests
DSCR
computed as 0 instead of undefined, caught before committee
role
Product Manager — strategy, prompt architecture, policy rules; Claude Code directed and executed implementation throughout, with ChatGPT and Perplexity recently added for code review, PRs and design analysis
timeline
Sep 2026 · ongoing
status
Early-stage · validated with one analyst to date

My scope

What I owned, what was shared, what I did not touch

● OWNED
  • Strategy and product direction
  • Prompt architecture
  • Policy rules, and the MoSCoW scope calls
○ AI-EXECUTED
  • Implementation, directed and executed through Claude Code, with ChatGPT and Perplexity on free tiers raising and reviewing PRs, all logged on one public issue (#245)
— OUT OF SCOPE
  • AML, sanctions and PEP screening: a separate AML team's system supplies it
  • Multi-currency and FX: today's desk is GBP-only
  • Full covenant step-down and cure-period modelling: deferred

Execution graph · click a stage

From the problem to the outcome

A model can narrate a figure. It isn't the source of one.

  • Every covenant is evaluated against a ratio computed from raw financials, not drafted by the model.
  • The model writes the narrative around figures that code has already computed.

What was broken

Why the framework exists

I watched my wife, a corporate credit analyst, prepare Credit Assessment Memorandums every day against hard credit-committee deadlines — manual financial spreading, then drafting a narrative under time pressure with real reputational risk if a number was wrong. She's running several deals at once, and borrower financials arrive as PDFs or spreadsheets from relationship directors, often before the accounts are even filed with Companies House.

Early attempts at using an LLM to draft the memo directly were faster but untrustworthy: grounding was only ever a "cite your source" prompt instruction, not an enforced rule, so an unsupported claim could reach committee undetected — and a codebase audit later caught a debt-free company's DSCR being silently computed as 0 instead of undefined, which would have wrongly flagged a healthy borrower as a covenant breach.

One rigid spreading schema couldn't handle real deal variety — a borrower embedding Depreciation inside Cost of Goods Sold, a real house convention, broke the single schema the MVP shipped with.
The pipeline assumed every deal wanted the full automation stack — there was no way to ask for just the qualitative research while spreading a non-standard deal by hand.

What I scoped into MVP v1

What I scoped into MVP v1, and what I explicitly didn't

Must have
MVP — shipped in PRs #1–20
CAM template system
Spreading engine with formula validation
.docx export
The Maker-Checker governance loop itself
Deterministic policy engine layered on LLM narrative
Critical correctness/security fixes before wider use
Should have
Fast-follow — shipped in PR #24
Wiring policy checks into the primary slash-command interface, not just the headless script
Could have
Post-MVP depth — see legend for what's shipped, open, or since decided against
Forward-year projections & stress testing
Conditions Subsequent tracking, Net Debt/EBITDA & FCF ratios
Source-citation hyperlinking
AML/sanctions/PEP screening & ESG scoring — since decided against (see round 2's #35 below)
Won't have
Explicitly deferred
Multi-currency/FX support — today's desk is GBP-only
Full covenant step-down/cure-period modeling — scoped down to just Conditions Subsequent tracking

✓ shipped · ○ open · — decided against

Open the retrospective MVP v1 PRD - problem, scope, requirements and acceptance criteria, reconstructed from delivery evidence ↗

Round 2

What I'm scoping for round 2 ("Hardening Cycle 2")

MVP v1 shipped and is already in real use. This pass follows it, in the same priority order as round 1, and keeps absorbing what later audits and real use turn up.

Must have
Foundational correctness/architecture gaps — ✓ all closed
Fix the dangling Parent/UBO Guideline cross-reference — the template already pointed to guidance that was never written (#96)
Wire the primary interface through to the tested financial-formula code, not around it (#98)
Extend the ground-truth figures schema to cover metrics the framework already requires citing — Working Capital Days, collateral exposure (#99)
Should have
Fast-follow depth
Systematic Parent/UBO research guidance — full ownership chain, percentages, and recent changes (#96)
Analyst-supplied mode for /project's forward-year projections, mirroring /spread's existing one (#124)
Read-back confirmation and cross-footing for screenshot-sourced spreading (#132)
Treat fetched web pages, PDFs, and analyst notes as untrusted data in both agent prompts (#150)
Local live-model evaluation harness — synthetic fixtures, repeated runs, versioned baseline (#151)
CI guard failing the build if a confidential-data path is ever tracked in git (#149)
Give /collateral the same deterministic ground-truthing every other figure already has (#266)
Resolve a mistyped deal name instead of silently starting a second deal under it (#268)
Require a /research brief to end with a populated Sources section before export (#318, from real /research use)
Read primary source documents for a group borrower, not only registry summaries (#322, from real /research use)
Stop the interactive review loop and ask the analyst after three REJECTED passes (#323, from real /research use)
Make Checker independence from earlier verdicts structural, not just instructional (#324, from real /research use)
Could have
Post-round-2 depth, if capacity allows
HoldCo/OpCo group/subsidiary financial consolidation (#48)
Render Group/Parent/UBO structure as a tree diagram instead of prose (#113)
Charts/graphs in CAMs — sector trends, SWOT, positioning, stock price (#114)
Jurisdiction-agnostic PII heuristics — today's redaction patterns are UK-specific in a framework designed to be forked by any institution (#111)
Won't have
Deferred for this round
Full covenant step-down/cure-period modeling (#33) — same bundled-scope call as MVP v1; may be worth revisiting if I ever open this up for wider adoption beyond my own use
FX/multi-currency support (#49) — today's desk is still GBP-only; the kind of gap that would gate wider adoption if this were ever forked for a multi-currency desk
AML/sanctions/PEP screening & ESG scoring (#35) — my wife's desk has a separately-owned AML team whose system already supplies this as an input; building it into OpenCAM would duplicate, not fill, a gap

✓ shipped · ○ open · — decided against

What it does

Six capabilities, one governance model

A
Maker-Checker Governance Loop

Two independent agents — an Underwriter drafts, a Risk Reviewer audits — with no shared reasoning context, and the power to only downgrade a verdict, never upgrade one. Maker and Checker can run on different underlying models, so drafting and audit don't share the same blind spots.

B
Deterministic Policy & Compliance Engine

Every covenant is evaluated PASS / FAIL / UNRESOLVABLE against a ratio computed from raw financials — never silently defaulted. Every reported figure is checked against ground-truth financials within a 0.5% tolerance before the Checker even sees it.

C
Institutional Credit Policy Referencing

A one-time /calibrate-policy command derives a fork-local credit policy from an institution's own policy documents. The Underwriter treats it as advisory drafting guidance; the Risk Reviewer treats it as a mandatory, independently-verified audit obligation — any violation is REJECTED-worthy regardless of what the Underwriter declared, the same asymmetric-weight pattern used everywhere else in the governance model.

D
Financial Spreading & Auditable Excel Export

Every ratio (TNW, EBITDA, DSCR, Gross Leverage, Net Debt/EBITDA, FCF Conversion %) is computed straight from the same raw line items shown in the workbook, with formulas generated from a label-based row layout so a reorder can't silently break a reference. An analyst can also supply figures already spread against their own institution's template instead: the CAM then carries an explicit caveat disclosing the spreading wasn't independently recomputed, a real reduction in audit guarantee.

E
Confidentiality-by-Design

Every artifact derived from a user's real business — calibration samples, templates, deal state, output — writes only to git-ignored paths, enforced as a build rule, not audited in after the fact.

F
Standalone Research Workflow (/research)

A separate command for an analyst who just needs the qualitative picture — company and sector research, Go/No-Go screening — without running the full CAM pipeline. It writes the same state.json keys the full pipeline would, so a deal that later needs a full CAM can continue straight in without redoing anything, and exports its own standalone Research Brief through a script kept deliberately separate from the full CAM exporter.

How the pipeline actually connects

Two entry points, one shared spine

Two entry points, one shared spine. Every deal starts at /triage for a full CAM or /research for a standalone qualitative brief. Both write the same state, so a deal can continue into the full pipeline later without redoing work. A deal continuing from /research rejoins directly at /spread and skips /commercial, since /research already produced that output itself.

/calibrate and /calibrate-policy (above the divider) are one-time, org-level setup: /calibrate derives house writing style and a CAM template; /calibrate-policy derives an institution's own credit policy. Every deal afterward just reads whichever is already in place.

Validation & strategic context

Early-stage, validated with one analyst

This framework is early-stage, built and validated with one target user — my wife, a corporate credit analyst. I'd rather show the reasoning openly than present these as more settled than they are.

Built to augment, not replace

My wife never had access to a platform like nCino or Moody's CreditLens at her workplace, so this isn't a competitive swap-out — it fills a gap that simply existed for her. It's also deliberately scoped to speed up a first draft with an inspectable audit trail, not replace her judgment the way larger, better-resourced platforms are attempting.

Unit economics

Slash commands shell out to the same local policy-check modules as the headless script — no separate metered API bill per step beyond the analyst's existing Claude Code access, against a target of multiple hours of analyst time per deal if the 15–30 minute goal holds at scale.

Enterprise adoption

Because it runs locally and writes nothing but git-ignored files, no deal data sits on a platform I operate. The model still sees whatever you give it, so check your own policy before using real deal data.

How I worked it

Four steps, each risk-sequenced

  1. 1

    Started from watching a real workflow break down

    Modeled the primary persona directly on my wife's own day as a credit analyst — the actual friction was manual spreading and narrative drafting under deadline pressure, not a problem I picked because it sounded interesting.

  2. 2

    Shipped the Maker-Checker loop in one weekend

    Scoped the MVP tightly — 20 merged PRs over one weekend — around one correct, end-to-end loop before going deep on any single feature: template system, spreading engine, .docx export, and the governance loop itself.

  3. 3

    Ran a dedicated gap-analysis audit, sequenced by risk

    Once the MVP worked, I audited the live codebase for 19 further issues and merged fixes in risk-weighted severity order — correctness and security bugs first, cosmetic issues after, feature work last.

  4. 4

    Reprioritized around real feedback from a live deal

    Two items came directly from my wife hitting the pipeline's limits on a real deal — a rigid spreading schema and an all-or-nothing automation model — and I pulled both to the top of the queue and shipped them the same week.

Decision records

Calls I made, and why

DECISION 01

No shared context between maker and checker

Maker and checker can run on different underlying models, so drafting and audit don't share the same blind spots.

Problem
A single agent auditing its own draft agrees with itself.
Decision
The Underwriter and Risk Reviewer share no reasoning context, and the Reviewer can only downgrade a verdict.
Why
The Reviewer's value comes from auditing cold.
Result
Maker and checker can run on different underlying models, so drafting and audit don't share the same blind spots.
Full account from the case study

A single agent auditing its own draft agrees with itself. The Underwriter and Risk Reviewer share no reasoning context, and the Reviewer can only downgrade a verdict — its value comes from auditing cold.

DECISION 02

The model narrates; code computes

The debt-free DSCR bug is fixed for good, along with the near-identical liabilities bug.

Problem
An LLM drafting the memo could state a figure that no check had ever computed. A debt-free DSCR was silently defaulted, and a second bug dropped liabilities from the total.
Decision
Every covenant is evaluated PASS / FAIL / UNRESOLVABLE against a ratio computed deterministically, never silently defaulted.
Why
The model can narrate a number, but it isn't the source of one.
Result
The debt-free DSCR bug is fixed for good, along with the near-identical liabilities bug.
Full account from the case study

Every covenant is evaluated PASS / FAIL / UNRESOLVABLE against a ratio computed deterministically, never silently defaulted. That's what fixes the debt-free-DSCR bug for good, plus a second, near-identical bug where Provisions and Other Long-Term Liabilities silently never reached total_liabilities. The model can narrate a number, but it isn't the source of one.

DECISION 03

Shipped the bounded piece, flagged the rest

The three deferred asks were disclosed, not quietly dropped.

Problem
One issue bundled four separable asks together.
Decision
Shipped the well-bounded piece and explicitly disclosed the other three as deferred.
Result
The three deferred asks were disclosed, not quietly dropped.
Full account from the case study

One issue bundled four separable asks together. Rather than push all four through unreviewed, I shipped just the well-bounded piece and explicitly disclosed the other three as deferred, not quietly dropped.

DECISION 04

Reopened an issue I had already closed

Re-closed once it was verified working end to end.

Problem
Issue #31 was marked resolved once Maker and Checker could run on different models in code.
Decision
Reopened it after a later review found the setting was never switched on in production, and re-closed it only after verifying it end to end.
Why
The first closure had verified the code, not the production behaviour.
Result
Re-closed once it was verified working end to end.
Full account from the case study

I'd marked Issue #31 resolved once Maker/Checker could run on different models in code. A later review caught that the setting was never actually switched on in production — the audit wasn't independent. I reopened it and only re-closed once I'd verified it working end to end.

DECISION 05

Fixed what tests couldn't catch, the same day

The same class of gap can't recur silently.

Problem
The first live production run leaked markdown artifacts and raw internal JSON into the exported Word document.
Decision
Fixed both within the day (PR #40) and codified durable prompt guidance alongside the fix.
Result
The same class of gap can't recur silently.
Full account from the case study

My first live production run leaked markdown formatting artifacts and raw internal JSON into the exported Word document. I fixed both within the day (PR #40) and codified durable prompt guidance alongside the fix, so the same class of gap couldn't recur.

DECISION 06

Severity order beats arrival order

Credit-decision fixes shipped before cosmetic ones.

Problem
A 19-issue gap-analysis backlog, with fixes that could change a credit decision mixed in with cosmetic ones.
Decision
Shipped the correctness and security fixes first (PR #41), then the display bugs (PR #42), then feature work.
Why
Any fix that could change a credit decision landed before anything cosmetic did.
Result
Credit-decision fixes shipped before cosmetic ones.
Full account from the case study

Working the 19-issue gap-analysis backlog, I shipped the highest-criticality correctness and security fixes first (PR #41: date-resume logic, a race condition, a hardcoded model), then lower-severity display bugs (PR #42), then feature work — any fix that could change a credit decision landed before anything cosmetic did.

DECISION 07

Caught Claude Code skipping my own instruction, mid-deal

The sources folder had to be backfilled by hand. The citation check is now enforced in code.

Problem
Claude Code declared 20+ source citations on a live deal but never called the script that saves the underlying material.
Decision
Caught it by asking directly where the material was, then code-enforced that a declared citation has something saved behind it.
Why
The same gap could otherwise go unnoticed in my oversight of the AI doing the drafting.
Result
The sources folder had to be backfilled by hand. The citation check is now enforced in code.
Full account from the case study

Running a real deal, Claude Code declared 20+ source citations across triage and commercial research but never once called the script that actually saves the underlying material, despite the instruction being right there in the command files I'd written myself. I caught it by asking directly where the material was; the sources folder didn't exist until I had it backfilled by hand. Fixed by code-enforcing that a declared citation has something saved behind it, so the same gap can't happen again unnoticed, this time in my own oversight of the AI doing the drafting.

DECISION 08

A "lightweight" path had zero independent audit

Surfaced a second bug, where the compliance checker would silently return "compliant: true" with zero reasons on a research brief. Caught by a manual smoke test before the fix shipped.

Problem
/research, the standalone qualitative-brief command, never ran the Risk Reviewer, so a Go/No-Go legal screen carried decision weight with no independent check.
Decision
Gave it a Checker pass.
Why
A screen with real decision weight should not run without an independent check.
Result
Surfaced a second bug, where the compliance checker would silently return "compliant: true" with zero reasons on a research brief. Caught by a manual smoke test before the fix shipped.
Full account from the case study

/research, the standalone qualitative-brief command, never ran the Risk Reviewer: a Go/No-Go legal screen carried real decision weight with no independent check. Giving it a Checker pass surfaced a second, sharper bug: the existing compliance checker assumes a full CAM's shape, so pointed at a research-only brief it would have silently returned "compliant: true" with zero reasons, regardless of whether the brief was actually sound. Nothing matched what the checks look for. Caught by a manual smoke test before the fix shipped.

technical evidence · pipeline

Two agents, no shared context

The governance loop, from the case's own description. The checker can only downgrade a verdict, never upgrade one.

  1. 01
    Underwriter
    drafts the CAM narrative
  2. 02
    Ground-truth check
    figures within 0.5% of raw financials
  3. 03
    Risk Reviewer
    audits cold, can only downgrade
■ my scope■ integrated against, owned by others

The model narrates. Code computes.

Where each figure is produced, in the order the pipeline runs.

  1. 01Underwriter drafts the narrativeProbabilistic
  2. 02Ratios computed from raw financialsDeterministic
  3. 03Every figure checked against ground-truth financials, 0.5% toleranceDeterministic
  4. 04Covenants: PASS / FAIL / UNRESOLVABLE, never silently defaultedDeterministic
  5. 05Risk Reviewer audits cold, can only downgradeProbabilistic
! CORRECTNESS EVENT
DSCR computed
0
expected
undefined
company
debt-free
caught
before committee

A debt-free company, scored as a covenant breach it does not have. Found in a codebase audit, not by an analyst.

What changed

What it delivered

  • Trust turned out to be a product feature: the debt-free-DSCR catch is concrete evidence that code-level verification, not model judgment, is what makes the loop actually trustworthy.
  • Real usage surfaced the two highest-value roadmap items faster than the original audit backlog did — ship it, use it, let real friction drive the backlog.

proof

The claim, traced to the outcome

claimcasedecisionimplementationtestoutcome
6087+
passing tests, up from 188 at MVP — spanning unit, policy-engine and prompt-regression tests
Code
computes the ratios and covenant results. Collateral exposure is the exception (#266)
0 → undefined
the DSCR error, caught before committee
1
analyst validated to date: early-stage, not yet at scale

How it is built

Three AI tools, one repo, one human

By mid-October the backlog was growing faster than one paid Claude plan could clear it. ChatGPT and Perplexity both have free tiers, so I treated them as spare capacity. The catch was trust: if I could not tell who did what, I could not rely on any of it. Figures are as of 30 October 2026.

The ticket is the spec

Every task is a story with acceptance criteria, a scope, files that are off limits, and a point where the agent stops and asks.

Claim, status, outcome

Each agent posts a CLAIM before it starts, a STATUS as it goes and an OUTCOME at the end, with its product named in the header. All three post from one GitHub account, so that header is the only way to tell them apart.

Say what you can run

Each agent states what it can actually execute and marks every claim verified or not. ChatGPT could read the repo through GitHub but could not clone it or run the tests, and said so in over a hundred log entries. The automated tests were its only proof.

Build and review stay separate

The free tools raised PRs and a one-off Claude credit paid for reviewing them. A builder may review its own PR in a fresh session, but that is labelled lower independence. Of the 170 PRs discussed in the log, 148 have merged.

Learned, not designed up front

In the first six days (12 to 17 October), 102 of 104 log entries did not name the tool that wrote them and none carried a [V] verified marker. In the last six (25 to 30 October), all 245 named it and 190 had one.

Inside the build

Artefacts from the build and the launch

ARTEFACT 01
Merged pull requests on the open-cam-framework GitHub repository

Merged pull requests on GitHub, from earlier in the build — since the first week, every change has gone through a pull request. The live count above has grown since this snapshot; the discipline it shows hasn't.

Why it matters It shows the change discipline: since the first week, every change has gone through a pull request.

Source: open-cam-framework repository ↗
ARTEFACT 02
Closed GitHub issues from the 19-issue gap-analysis audit

The original 19-issue gap-analysis audit, tracked and closed on GitHub as real issues, not a private todo list — the first of what's now a recurring practice.

Why it matters The 19-issue audit tracked as real issues, the record behind the risk-sequenced fixes.

Source: open-cam-framework repository ↗
ARTEFACT 03
GitHub issues tracked with the enhancement label — feature requests from real usage

A snapshot of feature requests tracked under GitHub's enhancement label, from earlier in the build — the spreading-schema and automation-model fixes that came from real usage, not a backlog guess. Some have since been reclassified as tech debt as the labeling taxonomy matured; the live backlog board above reflects the current split.

Why it matters Feature requests that came from real usage, not a backlog guess.

Source: open-cam-framework repository ↗
ARTEFACT 04
Financial spreading output showing revenue, EBITDA, and DSCR computed per year from raw line items — synthetic demo data

The financial spreading output — every ratio traceable to a raw line item, DSCR shown per year rather than as a single number. Synthetic demo data, generated for this writeup.

Why it matters Every ratio traceable to a raw line item. This is the reviewer's check on a figure.

Source: open-cam-framework repository ↗
ARTEFACT 05
CAM Facility Conditions section with a grounding note disclosing unverified inputs — synthetic demo data

The CAM's Facility Conditions section, with a grounding note disclosing exactly which inputs came from the relationship team, unverified against a live feed. Synthetic demo data.

Why it matters The grounding note says which inputs came from the relationship team and were not verified.

Source: open-cam-framework repository ↗
ARTEFACT 06
CAM Collateral section showing LGD and coverage calculations — synthetic demo data

The Collateral section's LGD/coverage workout — average vs. max LGD, cover %, all computed from the same disclosed inputs. Synthetic demo data.

Why it matters LGD and coverage computed from disclosed inputs, not typed in by hand.

Source: open-cam-framework repository ↗
ARTEFACT 07
GitHub Projects kanban board for the OpenCAM Framework backlog, with columns for Backlog, Blocked or on hold, In progress, In review and Done

The backlog as a GitHub Projects board, as of 26 October 2026: 155 delivered, 13 not started, 9 blocked or on hold waiting on a decision or review, 2 in progress. The board itself is private; the issues it tracks are public on the repository.

Why it matters Work is triaged by status, not just listed: items waiting on a decision or review are held visibly apart from work that is simply not started.

Source: open-cam-framework repository ↗
ARTEFACT 08
Home page of the OpenCAM Framework wiki, listing the documentation pages

The repository's wiki: 26 pages published from the docs folder, covering architecture, the financial model and policy engine, AI assurance, testing and CI, security and confidentiality, and the reconstructed MVP v1 requirements document.

Why it matters The reasoning is written down where a reader can check it: design decisions, the financial model, how far a generated memo can be trusted, and what must never be committed.

Source: open-cam-framework repository ↗

Sources

Where each claim can be checked