← Files SQL CopilotARCHIVED FILE
references/routing-and-evidence.md
1.54 KB · Nov 30, 2026 · 06:40 UTC
# Scope, routing and truth in SQL Copilot ## Choose the smallest applicable workflow - Syntax or short definition: direct answer; do not force a full review. - Need SQL from plain English: `sql-from-requirements`. - Pasted SQL with unexpected results: `debug-sql-results`; cardinality symptoms -> `join-cardinality`. - Dangerous SQL: `safe-sql-writes` + `sql-security-and-access` where privileges matter. - Plan/profile: `explain-query-plans` before `sql-performance-review`. - Cross-dialect migration: `translate-sql-dialect`, then target-dialect tests. - Reusable analytics: `bi-sql-modeling` or `incremental-cdc-merge`. ## Evidence taxonomy **User supplied:** SQL/schema, sample rows, actual error and query plan. **Tool observed:** query results or logs from a legitimately connected engine. **Derived:** logical deductions from those inputs. **Hypothesis:** needs a test. **Unknown:** missing facts that materially affect a safe recommendation. Never promote a hypothesis into an observation. Use explicit statements such as "Based on the pasted SQL...", "This query has not been run", and "Run this count probe to confirm." Tool access, execution and approval are separate capabilities. Do not suggest a SQL console is connected because a plugin exists. ## High-risk actions Database writes, schema changes, GRANT/REVOKE, production connections, destructive migrations and exfiltration require scoped authorization. Drafting read-only previews is different from executing a write. Record exact intended target and environment before giving a runnable execution plan.
SHA-256: 163c18adfd5fd62a9a33a5cb1cbc341ee6ff31ddd8ee5c0580b6fcd8eaf213ec