From d2d6816d8a14f6e59d7ac0c1b6dfe5efd096be74 Mon Sep 17 00:00:00 2001 From: ciregenz Date: Sat, 23 May 2026 10:28:13 -0700 Subject: [PATCH] [eric] deadcode: remove unused DISCOVERY_SCAFFOLDING --- backend/apps/agents/mcp_preflight.py | 26 -------------------------- linter/config/vulture_whitelist.py | 1 - 2 files changed, 27 deletions(-) diff --git a/backend/apps/agents/mcp_preflight.py b/backend/apps/agents/mcp_preflight.py index f63f835b..9de5ca70 100644 --- a/backend/apps/agents/mcp_preflight.py +++ b/backend/apps/agents/mcp_preflight.py @@ -16,32 +16,6 @@ from backend.apps.tools_lib.tools_lib import _load_all as load_all_tools logger = logging.getLogger(__name__) -# Tool-agnostic discovery scaffolding; appended only when preflight flags the prompt as vague/info-gathering. -DISCOVERY_SCAFFOLDING = ( - "# Discovery before action\n" - "When a request is vague or could be grounded in user context, do not " - "guess generic defaults. First silently enumerate what would change the " - "output; voice, tone, audience, prior context, recent precedent, facts " - "that only live in the user's data. Then look at your available tools and " - "pick the ones that could answer those unknowns. Read a few examples " - "(usually 3, 10 is enough), summarize what you found into a few bullets, " - "then act confidently.\n\n" - "Tool-selection hierarchy for information gathering:\n" - " 1. Direct local access (filesystem reads, code search, shell); " - "cheapest and fastest.\n" - " 2. Connected services / MCP tools; for user data that lives in a " - "linked account (email, calendar, notes, tickets, etc.).\n" - " 3. Web search / fetch; for public information that isn't in your " - "training cutoff.\n" - " 4. Browser automation; only when a real interactive session or " - "login is required.\n" - " 5. Sub-agents; only for parallelizable subtasks or to isolate heavy " - "context. Not for serial steps.\n\n" - "Asking the user is a fallback, not a first move. Never fabricate. If " - "no tool can ground a critical unknown, ask one concise question." -) - - # Curated shortlist; `id` MUST match ToolDefinition.name exactly or the enabled/dismissed filter no-ops and the modal renders nothing. CuratedEntry = dict[str, Any] diff --git a/linter/config/vulture_whitelist.py b/linter/config/vulture_whitelist.py index 06b557c8..3f74bfff 100644 --- a/linter/config/vulture_whitelist.py +++ b/linter/config/vulture_whitelist.py @@ -53,4 +53,3 @@ _resolve_model load_output submit_state get_provider_credentials -DISCOVERY_SCAFFOLDING