Loop FIN-2 · Finance · reports to Shahbaz + Rajiv

Bank obligations, never missed — with an audit trail.

Keeps the calendar of obligations attached to our bank facilities — reporting deadlines, review dates, monthly self-checks — collects a signed-off confirmation each month, and escalates if one goes unanswered.

Built & tested — pilotWave 2🕐 Monthly, 1st business day⚙️ Hermes bizops (planned)
Part 1 — the plain-english view

Compliance by calendar, evidence by ledger.

What it watches
  • Date-driven obligations: audited-financials deadlines, half-yearly projections, facility review dates
  • The monthly self-check our facility terms require, confirmed by Finance with figures
  • Which customers' payments must route through which bank — new contracts among assigned customers get a routing reminder
When & how it speaks

A monthly checklist to Shahbaz on the 1st business day; every reply is logged into an attestation ledger — the audit trail banks like to see. If a month goes unanswered, it escalates to Rajiv.

Why it exists

Real money rides on facility covenants nobody was systematically checking. The turnover-measurement source isn't machine-readable to us, so v1 is deliberately a calendar + evidence collector, not a calculator — with quantitative routing checks unlocked later by the invoice data. Facility details are deliberately kept off this page.

Monthly
attestation rhythm — a checklist answered with figures, logged forever
2 banks
each with its own calendar of deadlines and routing rules
1 ledger
of every confirmation — the audit trail that didn't exist before

1st business day

Monthly rhythm

📅

Checks the calendar

What's due this month, what's approaching

💬

Checklist to Finance

“Confirm the self-checks — reply with figures”

📚

Logs the reply

Into the attestation ledger

⚠️

Escalates if silent

A missed month goes to Rajiv

What it will never doNever sees or touches bank accounts — it manages the calendar and the evidence; people manage the money. Facility details stay off this public page deliberately.
Where it stands today · July 2026Built and live-tested with the real covenant values in a config file that is never published. Per Nish's review, two long-horizon flags are muted (they still appear as a footer line); the fiscal-year-end confirmation and attestation workflow are with Rajiv by email. v2 (quantitative routing drift) unlocks now that invoice data flows.
Part 2 — under the hood

How it's wired: systems, models, and the path a number takes.

For implementers and the technically curious. The full build sheet — verified queries, thresholds, and build notes — lives on the specs page.

ReadsCovenant config
Real terms live in a private config file — never in code or on this site
Stepfin2_compliance.py
Date math: due, approaching, overdue, muted
DeliversMonthly checklist
To Shahbaz, reply-with-figures format
Human gateFinance attests
Replies with the month's figures
StateAttestation ledger
Every confirmation logged — audit-grade history
StepEscalation
Unanswered month → Rajiv
System we read Automated step State / memory Human decision
SystemRole in this loop
Private covenant configfin2_config.jsonThe real facility terms, in a file with restricted permissions on the server. The public site and the code repository never contain them.
NetSuite warehousePostgres on our serverOur nightly read-only copy of NetSuite (ERP) data — items, stock, transactions — refreshed by the ETL sync every morning. The loop queries this copy, never NetSuite itself.
Postgres “loops” schemareporting databaseA small dedicated schema where loops keep snapshots and history that need SQL (week-over-week diffs, mirrors for drill-down links). Scoped role; Metabase can read it for the clickable aggregate links.
Hermesagent runtime on our serverThe scheduler that wakes the loop up. Each loop is a cron job under a Hermes profile; the planned bizops profile will host the business digests (IT loops run under vpsops).
Healthcheckshealthchecks.huxapps.comThe dead-man's switch. The loop pings it only after a clean run — if the loop dies or errors, the ping stops and Healthchecks raises the alarm independently. This is how 'never silent' is enforced by machinery, not promises.
Email renderer + gwsrender_email.pyAll digests pass through one shared renderer: Huxberry-branded HTML, tables for repeated rows, a coral 'needs your response' box when the loop has questions, and an arrow link on every record. Sent from the loops mailbox via the Google Workspace CLI.
Loop chassisloop_common.pyShared plumbing every loop reuses instead of reinventing: state files, run-over-run diffing, Metabase drill-down link building, quiet-on-green notify logic.
Model / brainWhat it does here
None at run timedeterministic scriptA normal cycle is a plain Python script — no AI tokens are spent unless a diagnosis or judgment step is actually needed. AI wrote the script; the script does the rounds.
GPT-5.5 via Codexthe bulk-work modelWrote and maintains the mechanical parts — SQL, diffing, digest assembly. Effectively free on our existing subscription, so routine cycles cost almost nothing.
Claude Opusthe judgment modelReviews alert wording, thresholds, and anything a human will read and act on. Post-Fable, Opus owns everything that ships.
State & memory

The attestation ledger — month, checklist, reply, figures — plus mute flags per obligation.

Delivery

Monthly email checklist; escalation email on silence. Later: a finance feed card for retention/compliance headlines.

Safety rails

No bank credentials exist anywhere in this system. The loop knows dates and rules, not balances. Escalation is built in so silence can't become drift.

Before it can run for real
  • Rajiv's confirmation of the fiscal-year-end date and the attestation workflow (asked by email)
Full build sheet →