Skip to main content

sqb kata

Compiles the project and applies its configured Kata architecture policy to compiled models. Built-in checks run offline and never connect to the warehouse or rewrite SQL. Kata reports coded, error-only faults with source locations and remediations. Repository-defined custom rules run in a bounded Python subprocess.

Usage

Evaluation flags

Rule policy comes from [kata].select in sqlbuild_project.toml; CLI --select and --exclude scope models within that policy. Model selectors support names, tag:, path:, graph +, and path-between syntax.
--exclude is applied only when --select is also provided. To evaluate all models except one, start with an explicit broad selector such as --select path:models.

Text output

A clean policy prints its model and cache counts:
Faults include a source location, rule code, message, and remediation. Model-level checks use line 1, column 1:

JSON output

Faults are ordered deterministically by path, position, code, and content.

Inspect a rule

rule prints metadata for any exact built-in or configured custom code. The rule does not need to be active:
Custom rules also show their source and declared option defaults.

Generate policy skills

Generate agent guidance from the active rules, options, thresholds, naming vocabulary, and scoped deviations:
Kata writes the same policy-specific guidance to:
  • .agents/skills/sqlbuild-kata/SKILL.md
  • .claude/skills/sqlbuild-kata/SKILL.md
  • .opencode/skills/sqlbuild-kata/SKILL.md
Check committed guidance in CI without rewriting it:
Install mode refuses to overwrite divergent, malformed, or unowned files. See SQLBuild skills for the separate general framework guidance command.

Exit codes

Examples