Repository navigation
v1.2.0 — Convention Engine & Semantic Tags
What's New
Convention Engine
Automatically infers project patterns from your SQL graph — naming conventions, layer references, required columns, column naming style, and semantic tags. Runs after every reindex.
- Layer detection — identifies staging, intermediate, marts, etc. from directory structure (#62)
- Naming patterns — infers conventions like
stg_{source}_{entity}per layer (#62) - Reference rules — learns which layers reference which (staging → raw, marts → intermediate) (#63)
- Required columns — detects columns appearing in >70% of models per layer (#63)
- Column style — identifies snake_case, camelCase, etc. (#63)
- Semantic tags — structural clustering groups related models by shared references, no ML required (#68)
- YAML overrides —
sqlprism conventions initgenerates a conventions file you can edit; overrides are preserved across re-inference (#66)
5 New MCP Tools (19 → 24 total)
| Tool | Description |
|---|---|
get_conventions |
Naming rules, reference rules, required columns per layer (#65) |
find_similar_models |
Find existing models similar to what you're building (#70) |
suggest_placement |
Recommend where to place a new model based on references (#71) |
search_by_tag |
Find models by semantic tag (#69) |
list_tags |
List all semantic tags with model counts and confidence (#69) |
New CLI Commands
| Command | Description |
|---|---|
sqlprism conventions init |
Generate sqlprism.conventions.yml from inferred conventions (#67) |
sqlprism conventions refresh |
Re-run inference, preserving overrides (#67) |
sqlprism conventions diff |
Show what changed since last init (#67) |
Performance
- sqlglot upgraded to v30 with C-accelerated tokenizer (
sqlglotc) — ~5x faster parsing (#87)
Schema Changes
3 new tables added to the DuckDB schema:
conventions— stores inferred/overridden conventions per layersemantic_tags— stores tag assignments per modelcolumns— stores column definitions from DDL/schema files
All Issues
| # | Title | Type |
|---|---|---|
| #61 | Add conventions and semantic_tags tables schema migration | chore |
| #62 | Add convention inference — layer detection and naming patterns | enhancement |
| #63 | Add convention inference — reference rules, common columns, column style | enhancement |
| #64 | Add convention storage and post-reindex hook | enhancement |
| #65 | Add get_conventions MCP tool | enhancement |
| #66 | Add YAML override loading for conventions | enhancement |
| #67 | Add bootstrap CLI — conventions --init, --refresh, --diff | enhancement |
| #68 | Add semantic tags — structural clustering and auto-labeling | enhancement |
| #69 | Add search_by_tag and list_tags MCP tools | enhancement |
| #70 | Add find_similar_models MCP tool | enhancement |
| #71 | Add suggest_placement MCP tool | enhancement |
| #72 | Bump version to 1.2.0 and update docs | chore |
| #87 | Upgrade sqlglot to v30+ with optional sqlglotc C extension | chore |
Full Changelog: v1.1.0...v1.2.0