/loop cadence: daily. Using the PostHog MCP and Stripe (read), check my key metrics [LIST] against their normal bands. Append daily readings to state-file kpi-watch.md. On a normal day, do nothing but log. When a metric breaks its band, pre-investigate (segment, correlate, likely cause) and draft an alert with the diagnosis. Never change data or send customer-facing messages. Stop after the check; log errors and stop. Budget: cap $[X]/run. Hard cap: stop after 1 iteration per run.
/loop cadence: daily or weekly. Using the Stripe API (read), maintain an aging ledger of unpaid/overdue invoices. Append (customer, invoice, days overdue, threshold hit) to state-file invoice-aging.md. When an invoice crosses a threshold [7/14/30d], draft the appropriate reminder in the right tone — DRAFT ONLY. Never send outbound, never touch charges or refunds. Stop after drafting due nudges; log errors and stop. Budget: cap $[X]/run. Hard cap: stop after 1 iteration per run.
A second, read-only loop that babysits a first one. Every ten minutes it reads the run's state file and latest log, runs the test suite so its evidence is an exit code rather than a self-report, and applies four explicit escalation triggers (no progress across two checks, repeated identical stack trace, budget exceeded, merge-queue conflict). On any trigger it prints ESCALATE and stops so a human looks; it never restarts, edits, merges, or pushes. Exits when the state file reports PASS or DONE, and after twelve checks regardless. Adapted from ECC's loop-operator agent (affaan-m/ECC, MIT), which lists the same triggers but has no cadence, cap, check command, or exit.
/loop every 10 minutes act as the loop operator for the autonomous run in this repo: run `cat state/loops/*.md`, `tail -100 logs/latest.log`, and `npm test` each pass, then report the active loop pattern, current phase, last successful checkpoint, the npm test exit code, failing checks, and cost drift against the budget in the state file. Print ESCALATE and stop this loop if any of these is true: no progress across two consecutive checks, the same stack trace repeats, cost exceeds the budget, or a merge conflict is blocking the queue — escalate to me, never fix it yourself. Otherwise print CONTINUE with one line of evidence. Report-only: never edit code, never restart or kill processes, never merge or push — any PR the run opens waits for me. Exit when the state file says Status: PASS or DONE. Stop after 12 checks regardless.