Score and certify dbt Semantic Layer models — trust bands, gates, and dbt-parse certification.
Project description
semantic-trust
Score and certify dbt Semantic Layer models. The trust/quality layer on top of authoring.
Why
dbt-labs' agent skills author semantic models — they scaffold YAML, wire measures, and generate metric definitions. semantic-trust picks up where authoring stops: it scores and certifies those models before they reach production.
Scoring runs five deterministic gates:
- Structural — required fields present, types correct, no dangling references.
- Uniqueness — no duplicate metric or dimension names across the project.
- Joinability — join paths resolve; foreign-key references match declared entities.
- Ownership — every model has an approved owner email (optionally domain-restricted).
- Completeness — descriptions, labels, and metric intent fields are populated.
On top of the gate results, an LLM-judgment pass evaluates description quality, naming clarity, and metric intent. The combined score maps to an A–F trust band. A model that clears all gates and passes LLM review earns an A; structural failures floor the score at F.
Certification adds a final compile check via dbt parse. A model that scores B or above and compiles cleanly is marked certified and safe to promote.
semantic-trust works on top of any dbt project — it reads the compiled semantic_manifest.json that dbt parse emits and requires no changes to your dbt project structure.
Install
Claude Code plugin
Add the marketplace and install the plugin:
claude plugin marketplace add rj1224/semantic-trust
claude plugin install semantic-trust@semantic-trust
The second command uses the format <plugin-name>@<marketplace-name> (here both are semantic-trust). You can also install via the /plugin menu inside a Claude Code session.
Once installed, the MCP server starts automatically — the plugin's .mcp.json launches it via uvx --from semantic-trust semantic-trust-mcp. No manual server step is needed.
MCP server (standalone)
If you need to run the MCP server outside of the plugin:
uvx --from semantic-trust semantic-trust-mcp
This starts the semantic-trust-mcp stdio server, exposing three tools: scaffold_semantic_model, score_semantic_model, and validate_semantic_model.
Quickstart
With the plugin installed, open a Claude Code session in your dbt project directory, then:
Natural language:
validate my semantic model
Claude routes this to the validate-semantics skill, which compiles your project, runs all five gates, applies LLM judgment, and returns a trust report with gate results, score, trust band, and any blocking issues.
Slash commands:
/semantic-trust:validate <model> # full trust report for a specific model
/semantic-trust:document # generate or improve semantic model descriptions
/semantic-trust:build # scaffold a new semantic model from a dbt model
The trust report shows gate-by-gate pass/fail, the A–F band, and a recommendation (promote / fix-and-retry / escalate).
dbt version support
semantic-trust supports both the legacy and the current dbt Semantic Layer spec:
| dbt Core version | Spec form | Notes |
|---|---|---|
| 1.6 – 1.11 | Legacy — top-level semantic_models: block + standalone measures: in schema.yml |
mf validate-configs available as an additional validation pass |
| 1.12+ / Fusion | Latest — model-annotation form: semantic metadata lives inside models: blocks |
mf validate-configs not supported (skipped automatically) |
dbt parse is the universal compile gate for both versions — semantic-trust always runs it first. mf validate-configs is a legacy-only bonus pass and is skipped automatically on 1.12+ projects.
The spec version is detected from target/semantic_manifest.json at runtime (the compiled output of dbt parse); no configuration is required.
Not affiliated with dbt Labs
semantic-trust references the dbt ecosystem and is designed to work alongside dbt projects. It is not an official dbt product and is not affiliated with, endorsed by, or supported by dbt Labs, Inc.
The vendored content under vendor/dbt-agent-skills/ consists of dbt-labs' public Semantic Layer spec guides, included under their Apache-2.0 license. See vendor/dbt-agent-skills/NOTICE for attribution and license terms. That content remains Apache-2.0; the rest of this project is MIT.
Configuration
semantic-trust works with zero configuration. To enable the ownership gate's domain check, add a .semantic-trust.json file at your dbt project root:
{
"approved_email_domains": ["example.com"]
}
With approved_email_domains set, the ownership gate fails any model whose owner.email does not match one of the listed domains. Without this config key, the ownership gate only checks that an email is present.
No other configuration keys are required or supported.
License
This project is licensed under the MIT License — see the LICENSE file.
Vendored content under vendor/dbt-agent-skills/ is licensed under the Apache-2.0 License — see vendor/dbt-agent-skills/NOTICE and vendor/dbt-agent-skills/LICENSE.
Project details
Release history Release notifications | RSS feed
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 semantic_trust-0.1.1.tar.gz.
File metadata
- Download URL: semantic_trust-0.1.1.tar.gz
- Upload date:
- Size: 41.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5012328e2818d76b0d854eb68fb11e5a745e938628e0689f89d1574a90f9c7a0
|
|
| MD5 |
b9b170f4ebb19e94268913bca538404c
|
|
| BLAKE2b-256 |
e0323975b4b742c0ed428026d56964518fc741e3529eea9e8fbb7234c8f39bfb
|
Provenance
The following attestation bundles were made for semantic_trust-0.1.1.tar.gz:
Publisher:
release.yml on rj1224/semantic-trust
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
semantic_trust-0.1.1.tar.gz -
Subject digest:
5012328e2818d76b0d854eb68fb11e5a745e938628e0689f89d1574a90f9c7a0 - Sigstore transparency entry: 2151275734
- Sigstore integration time:
-
Permalink:
rj1224/semantic-trust@e2e9ee22b824fd8435f584cbaaab2f2b7f5307fb -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/rj1224
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e2e9ee22b824fd8435f584cbaaab2f2b7f5307fb -
Trigger Event:
push
-
Statement type:
File details
Details for the file semantic_trust-0.1.1-py3-none-any.whl.
File metadata
- Download URL: semantic_trust-0.1.1-py3-none-any.whl
- Upload date:
- Size: 28.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b36a8e1c506828106d5f807632c77836ba89722139799647396137bfb17321c
|
|
| MD5 |
5dd0199ef1f8c3c104e4673d15a5cc2f
|
|
| BLAKE2b-256 |
b6de17147f55f60af54d1f61800147cb5ec3132f2c6bc733e4fecab3aae45f5e
|
Provenance
The following attestation bundles were made for semantic_trust-0.1.1-py3-none-any.whl:
Publisher:
release.yml on rj1224/semantic-trust
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
semantic_trust-0.1.1-py3-none-any.whl -
Subject digest:
3b36a8e1c506828106d5f807632c77836ba89722139799647396137bfb17321c - Sigstore transparency entry: 2151275819
- Sigstore integration time:
-
Permalink:
rj1224/semantic-trust@e2e9ee22b824fd8435f584cbaaab2f2b7f5307fb -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/rj1224
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e2e9ee22b824fd8435f584cbaaab2f2b7f5307fb -
Trigger Event:
push
-
Statement type: