Home

boring / v2

publicBoring-Software-Inc/v2
Overview Code History Branches Pull requestsIssuesInsights Campfire Docs
main
HomeOverview Code PRsIssues

TRP-83 feat(economics): plain-language digest, alerts, and monthly report

3 months ago

b08860e
Authored
grim7/25/2026, 11:45:27 PM
The daily digest read like a telemetry dump ("runs 14 (8 AI) · metered
$0.0256 · drift 26.6% OK") and, worse, hardcoded "OK" on the drift line
even on days the drift alert fired. Rewrote all three pure formatters into
plain sentences that say what the numbers mean, honoring the file's copy
rules (no em dashes, short declarative lines, sentence case).

- formatDigest: full sentences; "metered" -> "we billed", "pulled/OR" ->
  "OpenRouter charged", "drift" -> the gap with an under/over direction.
  Drops the hardcoded "OK" — the digest states the gap, [ALERT] lines judge.
- buildAlerts: each alert explains what tripped and what to check, keeping
  the [ALERT] prefix for filtering.
- formatMonthlyReport: middot-separated fragments become sentences; figures
  unchanged.
- tests updated to the new copy; a new case locks the honest over/under
  wording so "OK" can never reappear on a breaching day.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Parent3ed703e

2 files changed
  • apps/worker/src/jobs/economics-digest.test.ts+31−15
  • apps/worker/src/jobs/economics-digest.ts+56−39