feat: proactive thoughts — auto-ping salient ones + daily digest

She was passive (thoughts piled up 'open'; Brian had to mine the feed). Now she
brings them to him:

- Live: a thought >= PING_AUTO_SALIENCE (0.8) auto-pings — _compose_reachout writes
  a short personal text in her voice (not a thought-dump), on a cooldown
  (PING_COOLDOWN_MIN=60, AUTO only; explicit reach-outs bypass), quiet hours respected.
- Daily: maybe_daily_digest() texts a once-per-local-day summary of what she's been
  turning over (after DIGEST_HOUR=18), run from the dream cycle.
- maybe_ping gains bypass_cooldown (her deliberate reach-outs always go through).

8 new/updated tests (auto-ping above/below bar, digest once-per-day, floor/cooldown
isolation). Suite 80 green, ruff clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-22 20:25:14 +00:00
parent cf4238911e
commit 149e9a6dd5
5 changed files with 133 additions and 9 deletions
+5
View File
@@ -87,6 +87,11 @@ def dream_cycle(backend: Backend | None = None, force: bool = False) -> dict:
feeds.refresh()
except Exception as exc:
logbus.log("error", "feed refresh failed", error=str(exc)[:160])
# Her daily "what I've been turning over" digest (sends at most once/local-day).
try:
thoughts.maybe_daily_digest()
except Exception as exc:
logbus.log("error", "daily digest failed", error=str(exc)[:160])
actions: list[str] = []