Repository navigation
0.3.0
AST-Digger v0.3.0 Release Notes
AST-Digger v0.3.0 introduces Snowflake SQL (.sql) data-flow and CTE (Common Table Expression) analysis via tree-sitter! 🎉
AI agents can now navigate massive Snowflake SQL transformation scripts, trace upstream CTE dependencies, extract unnamed subqueries, and detect redundant table scans with pinpoint precision and minimal token overhead.
✨ What's New
- ❄️ Snowflake SQL AST Parsing & Data-flow DAG:
- Added tree-sitter based SQL parser (
internal/parser/sql.go) resilient to Snowflake syntax (QUALIFY,LATERAL FLATTEN,MERGE INTO,CONVERT_TIMEZONE, etc.). - CTE & View Extraction:
- Extracted
WITH cte AS (...),CREATE [SECURE | MATERIALIZED] VIEW, andCREATE DYNAMIC TABLEas distinct symbols. - Suppressed duplicate dialect syntax warnings per file.
- Extracted
- Unnamed Subquery Indexing & Aliasing:
- Supported subquery indexing (
cte/subquery[0],subquery#0) and alias targeting (cte/alias) for pin-point extraction (assisting CTE refactoring).
- Supported subquery indexing (
- Data-flow Dependency Tracking (
depends_on) & Skeleton Generation:- Analyzed table and upstream CTE dependencies per block (
depends_on: [t1, t2]). - Generated lightweight skeletons (
-- CTE Outline) collapsing thousands of lines of query logic while preserving structural signatures.
- Analyzed table and upstream CTE dependencies per block (
- Upstream Dependency Tracking (
--follow-imports) & Duplicate Table Scan Search:- Supported topological upstream CTE extraction via
--follow-imports. - Implemented
referencesfor SQL files to search table/CTE references and detect duplicate table scans (optimized for integration with tools likeicepick).
- Supported topological upstream CTE extraction via
- Added tree-sitter based SQL parser (
🌐 CLI & Agent-Context Integration
- Registered SQL (
.sql) inagent-context(now supporting 8 languages and 11 file extensions). - Added comprehensive integration tests covering all CLI subcommands (
outline,symbol,locate,references,resolve-import,agent-context) with SQL fixtures.
🧪 Quality & Verification
- All core packages maintain >90% statement test coverage with Detroit-school unit and end-to-end integration tests.