recon-driven sql composer; pick → compose → execute; llm out of structural sql

This commit is contained in:
2026-06-03 11:01:02 -03:00
parent 61494362a3
commit 29c620b2c2
27 changed files with 1516 additions and 249 deletions

26
api/composer/__init__.py Normal file
View File

@@ -0,0 +1,26 @@
"""Recon-driven SQL composer.
The LLM picks a *shape* (which metric, which dimensions, which filters);
the composer walks recon and emits the SQL deterministically. Columntable
binding, joins, and quoting are graph traversals, not LLM guesses.
See `def/schema-as-constraint.md` for the architectural argument.
"""
from api.composer.types import (
ComposeResult,
Filter,
OrderBy,
Pick,
PickValidationError,
)
from api.composer.compose import compose
__all__ = [
"compose",
"ComposeResult",
"Filter",
"OrderBy",
"Pick",
"PickValidationError",
]