From 3c50fb4ccba568fa1e941da5d82ab160088e343d Mon Sep 17 00:00:00 2001 From: thulasiraman S Date: Wed, 2 Sep 2026 09:58:30 +0530 Subject: [PATCH] Guard analytics agent against claiming a connected data source is missing The free-tier chain (GMI MiniMax / OpenRouter) occasionally answered "Google Analytics isn't connected" from pattern-matching instead of calling crm_dashboard, even though the tool works correctly. Add an explicit rule forbidding that claim unless the tool was actually called and returned an error. Co-Authored-By: Claude Sonnet 5 --- src/agents/registry.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/agents/registry.js b/src/agents/registry.js index 8dab8da..44ce21d 100644 --- a/src/agents/registry.js +++ b/src/agents/registry.js @@ -63,6 +63,11 @@ export const AGENTS = [ + 'The Lead.enrolled flag is likewise unset on every record — never read it as a conversion signal. ' + 'Enrolments and revenue come from enrollment_report.\n' + 'For a broad question ("how are we doing"), start with crm_dashboard section=leads, then drill in.\n' + + 'NEVER claim a data source (Google Analytics, Meta, budget, courses) is "not connected", "not ' + + 'available" or "not integrated" without having called crm_dashboard for that section FIRST and gotten ' + + 'back an actual error or empty result. Every one of those sections is wired up and returns real data — ' + + 'guessing that a section is unavailable, instead of checking, is the single most common way you get ' + + 'this wrong. If the call genuinely fails, say what the tool error was, not a guess about integration.\n' + 'Always state the period you measured. When a figure looks surprising, say so and name the likely cause ' + 'rather than presenting it flatly.', },