Architecture: How should 6 WhatsApp UX issues + anticipatory improvements ...

Documentation for Sessions

🏗️ Architecture: How should 6 WhatsApp UX issues + anticipatory improvements ...

Date: 2026-03-13
Time: 14:52:20 UTC
Session: gspace1-211.5
Agent: angular
Confidence: 91%
Status: ✅ Documented


📋 Decision Context

Question:

How should 6 WhatsApp UX issues + anticipatory improvements be structured as a fix plan?

Task: S211.4: Vitto Conversational Intelligence fixes


🎯 Decision Made

Chosen:

Three-layer fix: (1) Message flow consolidation — ACK and WhatsAppProgressEmitter share a budget of max 2 pre-response messages via ackWasSent flag; webhook dedup via MessageSid; (2) Tool gap closure — new query_system_status tool wrapping ProactiveMonitorService.getAlerts/getAlertStats/getStatus, added to channelSafeTools; (3) Response intelligence — skip agent loop for greetings (0 tokens), suppress quick replies for short responses, language boundary in persona, contextual button labels, digest memory persistence for follow-up context.

Options Considered:

  1. Option A (chosen): Three-layer fix addressing message flow, tool gap, and response intelligence independently
  2. Option B: Rewrite WhatsApp response pipeline as a single orchestrated pipeline class — rejected: too much refactoring risk for a working system, would touch 5+ files with coupled changes
  3. Option C: Fix only the critical tool gap (#3) and defer UX polish — rejected: the message spam (#1, #2, #4) is actively annoying users and compounds with every conversation

💭 Reasoning

Root cause analysis showed 3 independent failure modes: (1) Message spam stems from 3 uncoordinated fire-and-forget code paths (ACK at line 246, progress emitter at line 238, enricher at line 323) — they need a shared budget, not independent counters. (2) Vitto 'amnesia' about its own alerts is a tool gap — the daily digest queries ProactiveMonitorService directly as a service, but the agent loop has no equivalent tool, so the LLM can only search conversation memory which doesn't contain alert data. (3) Persona/greeting issues are behavioral — the classifier correctly routes greetings as 'fast' tier but still runs through the full agent loop (wasteful), and the Friendly persona's casual+humor settings produce culturally inappropriate expressions. Each layer is independently testable and deployable.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation