← ClaudeAtlas

messaging-queuelisted

Coordinate alert/event delivery to AI agents — single-queue rule, layered gates (dedup, batch, activity-defer, outage-hold), and the forbidden parallel-path pattern that causes spam
standardbeagle/agnt · ★ 22 · AI & Automation · score 79
Install: claude install-skill standardbeagle/agnt
# Messaging Queue Coordination Use this skill when touching any code that delivers events to an AI agent — PTY stdin injection, MCP `Log()` notifications, channel pings, overlay toasts, hold buffers, alert hubs, or auto-forward paths. Every "spamming the agent" bug we have shipped traces back to violating one of the rules below. ## The Single-Queue Rule There is exactly one ordered pipeline from "raw event" to "agent's input". Anything that writes to the agent surface MUST flow through it. Parallel writes are bugs, even when they "work" most of the time — they bypass dedup, activity-deferral, outage-holds, and ordering, and they are the canonical cause of repeated-message spam. Currently in this project the canonical queue is `internal/overlay/alerts.go::AlertScanner` (process-output side) plus the daemon-side gate chain in `internal/daemon/hub_helpers.go::wireProxyLogger` (proxy-side). **Resolved (PTY side):** the browser-error / auto-forward path `cmd/agnt/overlay.go::processAutoForwardEvent` no longer writes the PTY directly. It cascade-filters then calls `AlertScanner.Inject`, so browser-JS and HTTP errors now share the same dedup / batch / overload-throttle / activity-defer queue as process-output alerts. The old `lastForwardNs` global single-timestamp debounce has been removed. The remaining direct `typeText` in `processProxyEvent` is for non-error UI/automation events (panel messages, sketch, design) only — error sources all flow through the queue. **Still parall