# ADR 6: @all-bots via Content-Based Detection **Date**: 2026-06-21 (supersedes 2026-04-28 dedicated bot user approach) ### Decision `@all-bots` is detected via **content-based mention matching** on messages in the `#agent-hub` stream. Each bot subscribes to `#agent-hub` and uses regex to detect `@**all-bots**` or `@**All Bots**` in message content. A dedicated "All Bots" Zulip bot user is **not required**. ### Context The original design required a 7th Zulip bot user (`all-bots@chat.sysloggh.net`) with display name `All Bots`. This user was never created during initial bot provisioning. Additionally: - Bot users cannot reliably detect @mentions of other bot users in Zulip 12.0 (ADR-005 archived) - Content-based regex matching (`@**all-bots**`) works on any Zulip message regardless of SDK version - Under the DM-first architecture (ADR-001), bot-event stream subscription to `#agent-hub` is the **only** stream-level listener needed — all other communication uses DMs ### Behavior ``` User posts in #agent-hub > topic: "@**all-bots** status report please" → Each bot receives event via #agent-hub subscription → Each bot checks: /@\*\*(?:all-bots|All Bots)\*\*/i.test(content) → If match: bot forwards message to its agent → 6 independent responses appear in the topic ``` ### Active Stream Subscription Under DM-first architecture, each agent's plugin maintains **one** stream subscription: - **Stream:** `#agent-hub` - **Purpose:** Only for detecting `@all-bots` broadcasts - **Filter:** Ignore all non-`@all-bots` messages in the stream - **Primary channel:** DMs for all agent-owner communication ### Consequences - **Positive:** No need to create/manage a 7th dedicated bot user - **Positive:** Content-based detection works reliably across Zulip versions (no SDK dependency) - **Positive:** Same regex works for case-insensitive matching (`all-bots` / `All Bots`) - **Negative:** Slightly more processing per message (regex check) - **Negative:** If `@all-bots` syntax changes in Zulip, regex must update - **Neutral:** All 6 bots still independently detect and respond — same multi-response pattern