Enterprise AI SDLC toolkit for dbt projects, with spec-driven workflows, CI validation, and warehouse-specific presets.
Project description
dbt-spec-kit
AI SDLC for dbt teams: specs are contracts, agents do bounded implementation, and CI proves the work followed the plan.
dbt-spec-kit helps analytics engineering teams use AI coding agents safely inside real dbt projects. It adds a lightweight spec-driven workflow, warehouse-aware planning templates, agent prompts, and CI validation to an existing dbt repo.
It is modeled on GitHub Spec Kit, composes with dbt-labs/dbt-agent-skills, and works with any agent that reads markdown context, including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and Cline.
Why teams use it
AI agents are useful, but "build a customer mart" is too vague for enterprise dbt work. A safe dbt change needs grain, source contracts, tests, semantic-layer impact, downstream consumers, warehouse cost decisions, and human approval points.
dbt-spec-kit turns that into a repeatable loop:
Idea -> spec.md -> plan.md -> tasks.md -> dbt changes -> CI report -> review
The default is controlled autonomy. Agents can draft and implement, but humans approve the spec, the plan, and the final diff.
Enterprise adoption choices
Most teams should start with these defaults, then tighten or relax them as their governance needs become clear.
| Decision | Recommended default | Deep dive |
|---|---|---|
| Development workflow | Use the four-phase loop: specify, plan, tasks, implement. Keep human approval at the spec, plan, and final review gates. | Methodology |
| Repo retention | Use balanced retention: merge spec.md, plan.md, and review/report evidence; keep tasks.md for complex, regulated, or high-risk work. |
Spec retention and repo hygiene |
| Brownfield rollout | Add the methodology layer first, capture existing conventions, and prove the flow on one low-risk dbt change before broad rollout. | Brownfield onboarding, Team onboarding playbook |
| Agent knowledge | Use dbt Labs skills for dbt mechanics. Use dbt-spec-kit skills and sub-agent roles for business meaning, planning, governance, and review evidence. | Skills and sub-agents |
| Warehouse guidance | Pick the closest warehouse preset for cost, materialization, SQL dialect, and governance guardrails. The project still runs through your normal dbt adapter and database connection. | Warehouse guides |
| CI evidence | Start with local validate and report; promote dbt-specify ci when the team wants lifecycle checks to block PRs. |
Enterprise CI |
| Jira integration | Pull Jira issues into local specs, attach approved specs/plans back to Jira, and create Jira subtasks from tasks.md. |
Jira integration |
The key repo hygiene rule: keep approved decision records, not raw agent scratch work.
Try it with jaffle-shop
The fastest way to understand the workflow is to apply it to the upstream dbt-labs/jaffle-shop project.
git clone https://github.com/dbt-labs/jaffle-shop.git
cd jaffle-shop
uvx --from dbt-spec-kit dbt-specify init jaffle-shop --warehouse bigquery
uvx --from dbt-spec-kit dbt-specify doctor
Then use your AI agent:
/dbt.specify Add a customer segmentation field to the customers mart without breaking existing metrics.
/dbt.plan
/dbt.tasks
/dbt.implement
/dbt.review
See the full walkthrough: Jaffle-shop AI SDLC walkthrough.
Install
Requires Python 3.11+. Recommended via uv.
Use uvx for one-off commands. uvx does not install a permanent dbt-specify command, so keep
the uvx --from dbt-spec-kit prefix for each CLI call:
uvx --from dbt-spec-kit dbt-specify init my-project --warehouse snowflake
uvx --from dbt-spec-kit dbt-specify doctor
From GitHub source for development builds:
uvx --from git+https://github.com/duckcode-ai/dbt-spec-kit.git \
dbt-specify init my-project --warehouse snowflake
Persistent install:
uv tool install dbt-spec-kit
dbt-specify --version
dbt-specify doctor
Use the persistent install when you want to run dbt-specify directly from your shell.
Supported warehouse presets: snowflake, databricks, trino, bigquery, redshift,
postgres, sqlserver, azure-sql, mysql, duckdb, motherduck, and athena.
What init adds
Running dbt-specify init in an existing dbt project creates:
.dbt-specify/constitution.mdfor project principles and warehouse guardrails.dbt-specify/templates/for spec, plan, tasks, retro, and CI templates.dbt-specify/skills/for spec-writing guidance.dbt-specify/commands/for agent prompts.dbt-specify/agents/for sub-agent role and handoff templatesCLAUDE.mdorCLAUDE.md.dbt-specify-suggestedspecs/for feature-level SDLC artifacts
Spec folder structure
Use one direct child folder under specs/ for each meaningful dbt change:
specs/
001-core-customer-segmentation/
spec.md
plan.md
tasks.md
review.md
findings.md
The folder name should be <NNN>-<domain>-<slug> when the team is large enough to need domain
visibility. Keep domain names in the slug, not as nested folders. dbt-specify validate project
treats each direct specs/*/ child as a feature spec directory.
spec.md is required. plan.md is added after spec approval. tasks.md is added after plan
approval. Review, governance, findings, and retro files are optional decision records governed by
your team's spec retention policy.
Skills vs sub-agents
Skills are reusable knowledge. They teach an agent how to do a category of work better, such as writing mart specs with grain, checking PII access rules, or using dbt Labs guidance for unit tests.
Sub-agents are bounded workers. Their templates define the mission, required context, allowed edit paths, forbidden files, and output contract for a specific handoff.
Use dbt Labs skills for dbt framework mechanics. Use dbt-spec-kit skills and sub-agent roles for the enterprise delivery workflow around specs, plans, governance, warehouse guardrails, and CI evidence.
The agent commands are:
/dbt.specifydrafts the requirement./dbt.plancreates a file-by-file implementation contract./dbt.tasksdecomposes the approved plan into small tasks./dbt.implementexecutes one task at a time./dbt.implement-allexecutes approved pending tasks sequentially, stopping on validation or scope failures./dbt.analyzechecks traceability before implementation./dbt.reviewreviews the final diff against the approved plan.
CI trust boundary
Use these checks locally or in CI:
dbt-specify validate project
dbt parse
dbt-specify validate dbt --manifest target/manifest.json
dbt-specify report --format markdown
If you did not install the CLI persistently, run the dbt-specify commands above with
uvx --from dbt-spec-kit dbt-specify ....
Use dbt-specify ci when the lifecycle and dbt artifact checks should block a PR.
Jira bridge
For teams that use Jira as the intake system:
export JIRA_BASE_URL="https://your-company.atlassian.net"
export JIRA_EMAIL="you@company.com"
export JIRA_API_TOKEN="<atlassian-api-token>"
uvx --from dbt-spec-kit dbt-specify jira pull NBA-123
uvx --from dbt-spec-kit dbt-specify jira attach NBA-123 \
--spec specs/001-nba-123-player-journey/spec.md \
--plan specs/001-nba-123-player-journey/plan.md
uvx --from dbt-spec-kit dbt-specify jira create-tasks NBA-123 \
--from specs/001-nba-123-player-journey/tasks.md
Jira remains intake and tracking. spec.md and plan.md remain the approved engineering contract.
See Jira integration.
Who this is for
- Analytics engineers who want AI help without losing dbt conventions.
- Data platform leads standardizing AI-assisted delivery across teams.
- dbt consultants who need a repeatable client onboarding method.
- OSS contributors building warehouse presets, validators, examples, and skills.
Docs
- Getting started
- Tutorials
- Jaffle-shop AI SDLC walkthrough
- Team onboarding playbook
- Methodology
- Spec retention and repo hygiene
- Skills and sub-agents
- Enterprise CI
- Jira integration
- Brownfield onboarding
- EARS cheatsheet
- Releasing to PyPI
- Snowflake guide
- Databricks guide
- Trino guide
- BigQuery guide
- Redshift guide
- Postgres guide
- SQL Server guide
- Azure SQL guide
- MySQL guide
- DuckDB guide
- MotherDuck guide
- Athena guide
OSS project
What this is not
- Not a replacement for dbt or dbt Cloud.
- Not a replacement for
dbt-labs/dbt-agent-skills. - Not an IDE or hosted service.
- Not full autonomy or auto-merge.
License
MIT.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dbt_spec_kit-1.3.0.tar.gz.
File metadata
- Download URL: dbt_spec_kit-1.3.0.tar.gz
- Upload date:
- Size: 144.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6337e3892f4751855c024be77d5c78802686cf36b5c6dac2c3cb2c7351f63662
|
|
| MD5 |
70bbe003696853fd30d6fc0db50600a8
|
|
| BLAKE2b-256 |
1ebf12e7d31e4733e22ba1949fac2fed348076da523200161c2509fd5c623ff6
|
Provenance
The following attestation bundles were made for dbt_spec_kit-1.3.0.tar.gz:
Publisher:
release.yml on duckcode-ai/dbt-spec-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbt_spec_kit-1.3.0.tar.gz -
Subject digest:
6337e3892f4751855c024be77d5c78802686cf36b5c6dac2c3cb2c7351f63662 - Sigstore transparency entry: 1569071867
- Sigstore integration time:
-
Permalink:
duckcode-ai/dbt-spec-kit@fb5d33cf3b68237c67c201f6af7a09a6bec6a2c5 -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/duckcode-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fb5d33cf3b68237c67c201f6af7a09a6bec6a2c5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file dbt_spec_kit-1.3.0-py3-none-any.whl.
File metadata
- Download URL: dbt_spec_kit-1.3.0-py3-none-any.whl
- Upload date:
- Size: 89.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
259d3e67cf8b4df6f9611136d693416d5b5ad9ba785126e87edaa33389542064
|
|
| MD5 |
e885393b55f09718f84eaeb142be5b3c
|
|
| BLAKE2b-256 |
3c1bb0eef19b626360475190c646e3867d0054ef331c9b0debd1e46671f350a0
|
Provenance
The following attestation bundles were made for dbt_spec_kit-1.3.0-py3-none-any.whl:
Publisher:
release.yml on duckcode-ai/dbt-spec-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbt_spec_kit-1.3.0-py3-none-any.whl -
Subject digest:
259d3e67cf8b4df6f9611136d693416d5b5ad9ba785126e87edaa33389542064 - Sigstore transparency entry: 1569071911
- Sigstore integration time:
-
Permalink:
duckcode-ai/dbt-spec-kit@fb5d33cf3b68237c67c201f6af7a09a6bec6a2c5 -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/duckcode-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fb5d33cf3b68237c67c201f6af7a09a6bec6a2c5 -
Trigger Event:
release
-
Statement type: