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.
- 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
- Strategy and product direction
- Prompt architecture
- Policy rules, and the MoSCoW scope calls
- 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)
- 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.
What I scoped into MVP v1
What I scoped into MVP v1, and what I explicitly didn't
✓ shipped · ○ open · — decided against
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.
✓ shipped · ○ open · — decided against
What it does
Six capabilities, one governance model
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.
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.
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.
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.
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.
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.
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.
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.
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
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
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
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
- 01Underwriterdrafts the CAM narrative
- 02Ground-truth checkfigures within 0.5% of raw financials
- 03Risk Revieweraudits cold, can only downgrade
The model narrates. Code computes.
Where each figure is produced, in the order the pipeline runs.
- 01Underwriter drafts the narrativeProbabilistic
- 02Ratios computed from raw financialsDeterministic
- 03Every figure checked against ground-truth financials, 0.5% toleranceDeterministic
- 04Covenants: PASS / FAIL / UNRESOLVABLE, never silently defaultedDeterministic
- 05Risk Reviewer audits cold, can only downgradeProbabilistic
- 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
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.
Every task is a story with acceptance criteria, a scope, files that are off limits, and a point where the agent stops and asks.
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.
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.
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.
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

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 ↗
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 ↗
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 ↗
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 ↗
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 ↗
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 ↗
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 ↗
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
- OpenCAM source repository · the code, tests and merged pull requests
- Agent log (issue #245) · 741 comments from 12 to 30 October 2026: every agent's claim, status and outcome, in public
- OpenCAM wiki · 26 pages of documentation, including the reconstructed MVP v1 requirements document
