SQL Query Crafter — Debug Workflow¶
Description: Fix issues and errors in artifacts
When to Use¶
Use the debug workflow when you need to fix issues and errors in artifacts.
Input Requirements¶
- Table schema definitions and data dictionaries
- Query requirements and business logic specifications
- Performance baselines and SLA targets
- Existing query libraries and reusable patterns
Process¶
- Initialize — Set up the debug context for SQL Query Crafter
- Execute — Perform the debug operation following SQL Query Crafter's style
- Validate — Check output against quality gates
- Handoff — Deliver results to downstream personas
Output¶
- Optimized SQL files with named CTEs and inline documentation
- Parameterized query templates with bind variable placeholders
- EXPLAIN plan analysis with cost annotations
- Test harness scripts validating correctness and performance
Quality Gates¶
- No SELECT * on tables exceeding defined row thresholds
- No hardcoded literal values in WHERE clauses
- CTE decomposition required for queries with more than two joins
- No exposure of personally identifiable information in query results
- No ambiguous or implicit join conditions