Skip to content

/wbBroadcast — Exhaustive Simulation () ​

/wbBroadcast is the event dispatcher. It fires notifications across external systems (Slack, Discord, webhooks) and internal micro-frontends (PubSub events). The central constraint: asynchronous, non-blocking. Broadcasting never halts the CI/CD pipeline or the active development loop. It fires and reports, but a failed broadcast doesn't cascade into a build failure.

Read this if you want to know how channel targeting works, what the -d (data) flag carries versus the -m (message) flag, and why /wbBroadcast is the only command that makes external HTTP requests.


1. Role & target ​

AspectBehavior
RoleThe Event Dispatcher. Sends messages to external and internal systems.
TargetWebhook URLs, Slack/Discord channels, or internal PubSub event bus.
Cell scopeNone. /wbBroadcast doesn't interact with plans or code.
Side effects allowedHTTP POST requests to external services. Internal event dispatch.
Side effects forbiddenModifying code, editing plans, altering local state.

The "fire-and-forget" principle is deliberate. A Slack notification failing shouldn't break a release pipeline. /wbBroadcast reports the HTTP status (200, 401, 429) but never blocks on failure. The caller decides whether to retry.


2. Argument resolution ​

FormExampleWhat /wbBroadcast does
Natural language stringCommand: /wbBroadcast "Deployment Successful"Sends text to the default notification channel.
Channel targetCommand: /wbBroadcast "#engineering"Routes the message to a specific Slack/Discord channel.
Comma-separatedCommand: /wbBroadcast #ops,#devMulticasts to multiple destinations simultaneously.
Event typeCommand: /wbBroadcast event:cache_invalidationFires an internal architectural event across the micro-frontend bus.

The event: prefix is the mode switch. Without it, /wbBroadcast sends a human-readable message to a chat channel. With it, it dispatches a machine-readable event to the internal PubSub system — consumed by window.addEventListener('wb:cache_invalidation', ...) in the micro-frontends.


3. Flag matrix ​

FlagShortcutPurpose
--dry-run-DFormats the payload and lists targets without firing the request.

4. Pipelines (the agent-native scenarios) ​

📋/wbBroadcast Exhaustive Simulation
Post-release notification to all teams/wbBroadcast #dev,#ops,#product -m="Release v4.6.0 is Live" -d='{"version": "4.6.0", "packages": ["wb-core", "wb-dataviewer"], "status": "success"}'
> /wbBroadcast #dev,#ops,#product -m="Release v4.6.0 is Live" -d='{"version": "4.6.0", "packages": ["wb-core", "wb-dataviewer"], "status": "success"}'
[SYSTEM] Multicasting to 3 channels...
[PAYLOAD] Message: "Release v4.6.0 is Live"
Data: {"version": "4.6.0", "packages": [...], "status": "success"}
[DISPATCH] #dev → 200 OK (0.3s)
[DISPATCH] #ops → 200 OK (0.4s)
[DISPATCH] #product → 200 OK (0.2s)
[OK] 3/3 channels notified successfully.
⚠️ Note: After a successful `/wbRelease`, notify engineering, ops, and product:

💠 Pipeline Post-release notification to all teams ​

After a successful /wbRelease, notify engineering, ops, and product:

💠 Pipeline Internal cache purge event (dry-run first) ​

The core library updated. All micro-frontends need to drop their local caches. Test the event payload first:

💠 Pipeline Silent CI notification ​

In a CI pipeline, broadcast the build status without cluttering logs:


5. Edge cases & refusals ​

TriggerWhat /wbBroadcast does
No message and no data (/wbBroadcast #dev)❌ Empty payload. Use -m for text or -d for structured data.
Dead webhook (HTTP 404)⚠️ Broadcast to #dev failed (HTTP 404). Check webhook URL. Pipeline continues.
Malformed JSON in -d❌ Cannot parse JSON payload. Check escaping at position N.
Network timeout (5s)⚠️ Broadcast timed out. Fire-and-forget — pipeline continues.
Event type without event: prefixTreated as a channel name. /wbBroadcast cache_invalidation → sends to #cache_invalidation channel, not the PubSub bus.

The unifying principle: /wbBroadcast is the only command that reaches outside the workspace. Every other /wb* command operates on local files and local state. Broadcasting is the exit point — it tells the world what happened. That external scope is why it defaults to fire-and-forget: the workspace shouldn't depend on Slack being up.