Loop OPS-1 · Operations & construction · reports to Yasar + Shahbaz

Money we've already earned, waiting on a date in someone's head.

Construction clients hold back retention money; the final half becomes claimable exactly one year after handover. This loop tracks those dates and amounts so none quietly lapses.

Built & tested — pilotWave 2🕐 Weekly⚙️ Hermes bizops (planned)
Part 1 — the plain-english view

Retention release dates, out of heads and into a watchdog.

What it watches
  • Every tracked project's retention % and milestone dates
  • Money becoming claimable at T-90 / T-30 / T-0, with amounts
  • Handover-stage retention not yet invoiced
When & how it speaks

Weekly to Yasar and Shahbaz: what's claimable soon, what's claimable now, and what's still missing a handover date (asked for politely, five projects at a time).

Why it exists

The billing system turned out to have no handover-date field at all, and only three projects on record — so the loop was honestly rebuilt in registry mode: a small, human-confirmed register of projects and dates that it tracks relentlessly, while a feature request adds the missing field to the app.

50%
of retention releases at handover — the other 50% exactly one year later, the date nobody was tracking
3
projects currently on the register, with retention terms confirmed
T-90/30/0
the warning ladder — a quarter's notice, a month's notice, and the day itself

Weekly

Monday

👀

Reads the register

Projects, retention %, milestone dates

📅

Date math

T-90/T-30/T-0 windows per project

💬

Digest + gap list

Claimable amounts, plus missing-date requests

People invoice

The loop makes sure we never forget to

What it will never doNever invoices anyone — it makes sure we never forget to.
Where it stands today · July 2026Built in registry/campaign mode and tested. The step-zero investigation (a schema dump of the billing database) is what changed the design honestly: no handover-date field exists yet, so the loop runs from a confirmed register while the billing app grows the field (feature request filed). Handover dates for the three registered projects are an open question with Yasar's team.
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.

ReadsProject register
Human-confirmed projects, retention terms, dates
ReadsBilling app snapshot
Read-only schema checks — watching for the day milestone dates exist
Stepops1_retention.py
Date-window math + missing-data campaign
DeliversWeekly digest
Claimable money + the polite gap list
Human gateYasar's team
Confirms dates; Finance invoices releases
System we read Automated step State / memory Human decision
SystemRole in this loop
Joinery Billing appSQLite on our serverThe construction billing system. The loop reads a snapshot copy of its database — never the live file.
Project registerops1_registry.jsonThe loop's own small source of truth: projects, retention percentages, milestone dates — each entry human-confirmed before it's trusted.
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.
State & memory

The register itself plus what's been asked/answered in the date-collection campaign — five projects a week until coverage is complete.

Delivery

Weekly email; later a finance feed card (“retention receivable due in the next 90 days”).

Safety rails

Reads a snapshot copy of the billing database, never the live file. Register entries require human confirmation before the loop treats them as fact.

Before it can run for real
  • Handover dates for the registered projects (with Yasar's team)
  • Billing-app feature request: a handover-date field, so registry mode can retire
Full build sheet →