Coding agents
SelectJoin suits coding agents for the same reasons it suits code review: a project is plain Python, every command runs offline, and the result of a change can be checked without a database.
Why it works
Section titled “Why it works”- Nothing to connect. SelectJoin generates SQL and never runs it. An agent needs no warehouse credentials, and no command can change data.
- A check it can run itself.
selectjoin checkvalidates every source and model in the project. An agent can edit, check, and repeat until the project compiles. - Structured answers. The commands an agent uses to find its way around print JSON.
- Located errors. A failed check names the file, the line when it is known, and a suggested fix when there is one.
Give the agent its instructions
Section titled “Give the agent its instructions”selectjoin agents --writeThis saves an AGENTS.md in the project root with the working loop, the commands that print JSON, and the project rules. Coding agents that read AGENTS.md pick it up on their own. Without --write the guide prints to the terminal, so you can paste it into another instructions file. --force replaces an existing AGENTS.md.
Install the skills
Section titled “Install the skills”Skills are short, step-by-step instructions for one task each. An agent that supports them loads a skill only when the task matches its description.
selectjoin skills --writeThis saves four skills into .claude/skills/ in the project:
| Skill | What the agent does |
|---|---|
selectjoin-add-model |
Scaffolds a model in the right layer, looks for components to reuse before writing logic, and checks the result. |
selectjoin-change-model |
Finds what depends on a model, makes the change, and reports every breaking change even when the check passes. |
selectjoin-reuse-logic |
Moves repeated logic into one component, then compares the project before and after to prove no model changed shape. |
selectjoin-trace-column |
Explains where a value comes from, step by step, back to the raw table. |
selectjoin skills lists them without writing anything, and --json prints the list as JSON. --dir chooses another folder inside the project, and --force replaces skill files that already exist.
Each skill is a SKILL.md file with a name and a description of when to use it, so you can read, edit, or delete any of them.
The loop
Section titled “The loop”selectjoin list --jsonlists every source and model with its layer, grain, and direct dependencies.selectjoin inspect NAME --jsonreturns one unit’s columns and types, grain, upstream and downstream units, and its SQL.- The agent edits Python, or scaffolds a model with
selectjoin new. selectjoin check --jsonvalidates the project.selectjoin compile NAMEprints the final SQL for review.
Check results as JSON
Section titled “Check results as JSON”A passing check exits with code 0:
{ "ok": true, "dialect": "duckdb", "units": 11, "checks": 2}A failing check exits with code 1 and still prints JSON to standard output:
{ "ok": false, "error": { "message": "models/marts/mart_completed_orders.py:13 (mart_completed_orders): Unknown column: statuss Did you mean 'status'?", "file": "models/marts/mart_completed_orders.py", "line": 13, "suggestion": "status" }, "errors": [ { "message": "models/marts/mart_completed_orders.py:13 (mart_completed_orders): Unknown column: statuss Did you mean 'status'?", "file": "models/marts/mart_completed_orders.py", "line": 13, "suggestion": "status" } ]}errors lists every problem found in the run, and error is the first of them. One run reports all independent problems: two broken models in different branches of the graph both appear.
A model downstream of a broken one cannot be analyzed until the upstream model is fixed, so its own mistakes show up on the next run.
line and suggestion are null when they are not known. The line is known when the mistake is a column reference written through the query API; a column named in a string, such as .where("is_completedd"), is reported with its file only.
Commands that print JSON
Section titled “Commands that print JSON”| Command | Returns |
|---|---|
list [--layer LAYER] --json |
Units with kind, layer, grain, and dependencies |
layers --json |
Layers with folder, prefix, and model count |
inspect NAME --json |
Columns, types, grain, neighbors, and SQL |
deps NAME [--upstream] [--downstream] [--direct] --json |
Dependency names |
lineage [NAME] [--column COLUMN] |
Model and column lineage (always JSON) |
checks [--layer LAYER] --json |
Data checks defined in checks.py |
check --json |
The validation result or a located error |
diff --against REF --json |
Changes to model shapes since a git ref, with breaking ones flagged |
Without --json, errors go to standard error as a single Error: ... line. Output is styled only in an interactive terminal, so an agent that captures output always gets plain text. Exit codes are 0 for success, 1 for a project or usage error, and 130 when interrupted.
Documentation for agents
Section titled “Documentation for agents”This site publishes its documentation as plain text for language models:
/llms.txtis an index of every page with a one-line summary./llms-full.txtis the full documentation in one file.
Limits
Section titled “Limits”selectjoin check validates definitions: names, columns, grains, and types. It does not test data, and nothing in SelectJoin can tell an agent how a query behaves in the warehouse. Review compiled SQL before running it, as you would for any change.