Loop CRM-1 · Sales & CRM · reports to Rajiv + team leads

Deals don't die from a “no” — they die from silence.

Watches every open deal in the CRM and catches the ones quietly going cold: no next step scheduled, untouched for months, lost without a reason, or duplicated.

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

The CRM's early-warning system for neglect.

What it watches
  • Open deals with no scheduled next step — 88% of them, at first count
  • Untouched deals: no edit and no planned activity — tiered cooling (30–90d), cold (90–180d), frozen (180d+)
  • Top deals closing this or next quarter, grouped by team, each flagged “next step set / missing”
  • Deals lost without a reason, duplicates, and contacts missing both email and phone
When & how it speaks

One full weekly digest per team — with a trend line, so improvement is visible (“no-next-step: 88% → …”). Every number is a door: click it and the exact list opens in the CRM or BI tool.

Why it exists

Verified live: of 635 open deals, 559 had no next step, 240 were frozen (untouched 180+ days) — including some of the largest deals in the company sitting unassigned in “New”. Nothing was even scheduled: overdue activities = 0. B2B cycles are long by nature, so the loop measures neglect, not slowness.

88%
of open deals had no scheduled next step at first run (559 of 635)
240
deals frozen — untouched for 180+ days, sorted by value so the biggest get attention first
173
open deals with no expected closing date at all — invisible to any forecast

Weekly, early morning

Before the sales week starts

👀

Reads every open deal

Stages, activities, teams, values, edit dates

📋

Applies the hygiene rules

No-next-step, untouched tiers, lost-no-reason, duplicates

💬

Digest per team

Counts, deltas vs last week, worst offenders by value — every number clickable

Offers batch fixes

“Schedule follow-ups on these 12?” — applied only after Approve

What it will never doNever contacts a customer, never edits a deal without approval, and never blames — team figures go to that team's own lead, not broadcast.
Where it stands today · July 2026Built (v2) and running weekly, supervised. Thresholds were reviewed and reset by Nish: stage-age rules dropped in favour of untouched-tiers, all-weekly cadence, top-deals-by-closing-window added. The CRM snapshot also mirrors into the reporting database so every aggregate number in the email links to a live filtered list. Two to three more supervised runs, then it registers as an always-on job.
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.

ReadsOdoo CRM (read-only)
All open + lost deals, activities, teams
Stepcrm1_hygiene.py
Fault-isolated checks — one failing check degrades to a note, never kills the digest
StateSnapshot mirror
Leads mirrored to the loops schema → clickable aggregate links + history
StepEmail renderer
Tables per team, trend lines, coral questions box
DeliversWeekly email
To Rajiv + per-team digests to the four team leads
Human gateBatch fix approval
Proposed follow-up batches applied via the write-gate only after an Approve
System we read Automated step State / memory Human decision
SystemRole in this loop
Odoo 19 CRMread-only connectionThe live CRM. The loop reads deals, activities and teams through a read-only connection — writes are technically impossible on this credential.
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.
Metabasebi.huxapps.comThe BI layer over the warehouse. The loop runs its SQL through Metabase's API, and every number in the digest links to a live, clickable Metabase list so you can drill into the exact records.
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.
odoo-write gatethe only write pathApproved fix batches go through a separate, scoped write skill — per-batch approval, never silently. The read credential physically cannot write.
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.
Claude Fablethe designer (retired)Designed this loop's spec and encoded the judgment as thresholds and checklists before its retirement on 8 July 2026 — so cheaper models can run it without Fable-level reasoning.
State & memory

Weekly snapshot of every lead in the loops schema (1,380 at last run) — powers week-over-week deltas, the trend line, and the drill-down links.

Delivery

Weekly branded email per team; open questions consolidate into one coral “needs your response” box, numbered so a one-line reply answers everything.

Safety rails

Read-only CRM credential. Batch fixes are proposals until a named person approves; each batch is approved separately. Duplicate-rate gate (<5%) guards downstream marketing loops.

Before it can run for real
  • Two–three more supervised weekly runs matching Rajiv's read of the pipeline
  • Then: registration on the bizops profile + Healthchecks, per the standing checklist
Full build sheet →