# Dev Diary #9

*Migrated 20+ agents from shared Postgres to per-agent Database, killed central state tables entirely.*

By [henrypye](https://paragraph.com/@henrypye) · 2026-04-20

per-agent databases, event-driven configuration, state migration, sqlite consolidation, refinement pipeline

---

The theme of the week: agents getting a voice.

For a long time, most of the agents in this system were quiet workers — they polled an API, wrote rows to a database, went back to sleep. The message bus existed, but it was mostly one-directional. Agents shouted into it; nothing shouted back.

That's changing. The two big promotions this week were agent-git and agent-weather, both of which graduated from passive background workers to full services with a proper conversational interface. They're now `service-git` and `service-weather`, and they both speak CONTEXT\_REQUEST/CONTEXT\_RESPONSE — meaning any other agent on the bus can tap them on the shoulder and ask a question. "Hey, what did I commit last week?" "What's the forecast for the next 24 hours?" The service hears it, queries its own data, and responds directly on the bus. No shared database. No direct coupling. Just agents talking.

Service-weather also now emits a `WEATHER_FORECAST_SYNCED` event after every home-location poll — so anything downstream that cares about weather doesn't have to ask. It just listens. The director still gets its `WEATHER_PLAN_CONTRIBUTION` for morning planning (that wire stays until PR2 lands), but now there's a richer stream running alongside it.

The RS3 agent got considerably smarter this week too. It's running an AI activity classifier now — looking at XP gains, skill patterns, timing, and inferring what was actually happening during a session: grinding, skilling, bossing. Those inferences are surfacing on the dashboard widget with live confidence scores rather than the hardcoded placeholder that's been sitting there. The pattern-learning layer underneath (ETA estimates, rest days, main session detection) has been running quietly for a while; it's now feeding into something visible.

News got a proper source adapter pattern — `rssSource()`, `redditJsonSource()`, `hnAlgoliaSource()` — and the roster expanded from 14 feeds to 37. AI/ML blogs, engineering journals, Vancouver-specific sources, finance, policy, HN via Algolia. Each source gets its own Prometheus counter so we can see fetch health per-source rather than a single aggregate.

The notification service learned some social awareness. It was perfectly willing to ping your phone at 2am before this week. Now there's a quiet-hours gate: web push is hard-blocked between `sleep_time` and `wake_time` (user-local time, with correct midnight wrap-around). Notifications still flow through the bus and get written — only the phone ping is suppressed. The gate refreshes on `CONFIG_UPDATED` without a restart, so changing your sleep time takes effect immediately.

Still mid-migration on the database side. The direction is clear — each service owns its own PostgreSQL instance, reads from its own tables, and the only cross-service communication happens on the message bus. The pieces that have moved are genuinely cleaner. The pieces that haven't are a daily reminder of why we're doing this.

The community is coming together. Slowly, noisily, one CONTEXT\_REQUEST at a time.

---

*Originally published on [henrypye](https://paragraph.com/@henrypye/dev-diary-9)*
