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.
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).
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.
Monday
Projects, retention %, milestone dates
T-90/T-30/T-0 windows per project
Claimable amounts, plus missing-date requests
The loop makes sure we never forget to
For implementers and the technically curious. The full build sheet — verified queries, thresholds, and build notes — lives on the specs page.
| System | Role in this loop |
|---|---|
| Joinery Billing appSQLite on our server | The construction billing system. The loop reads a snapshot copy of its database — never the live file. |
| Project registerops1_registry.json | The loop's own small source of truth: projects, retention percentages, milestone dates — each entry human-confirmed before it's trusted. |
| Hermesagent runtime on our server | The 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.com | The 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.py | All 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.py | Shared plumbing every loop reuses instead of reinventing: state files, run-over-run diffing, Metabase drill-down link building, quiet-on-green notify logic. |
| Model / brain | What it does here |
|---|---|
| None at run timedeterministic script | A 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 model | Wrote and maintains the mechanical parts — SQL, diffing, digest assembly. Effectively free on our existing subscription, so routine cycles cost almost nothing. |
The register itself plus what's been asked/answered in the date-collection campaign — five projects a week until coverage is complete.
Weekly email; later a finance feed card (“retention receivable due in the next 90 days”).
Reads a snapshot copy of the billing database, never the live file. Register entries require human confirmation before the loop treats them as fact.