# Exmergo dex

> Analytics engineering for Claude Code and any agent: data warehouse exploration, dbt transformation and semantic modeling, and schema-drift maintenance on dbt.

Exmergo dex is the agent-native analytics engineering toolkit. Point it at your warehouse (or a local DuckDB file) and your dbt project; it learns the landscape, writes and refactors your dbt transformations and semantic models, and tells you what to fix when anything drifts. The dbt project is the source of truth, every change is a reviewable diff, and it is read-only against your data. dex is open source under Apache 2.0.

## The loop: Explore, Transform, Maintain (ETM)

- **Explore** an unfamiliar warehouse. dex ranks what matters, profiles columns, infers and verifies joins, and answers ad-hoc questions with guarded SQL probes behind a PII-aware query firewall, then persists a draft map to `.dex/`. Fully read-only. PII is automatically flagged and never surfaced.
- **Transform** the dbt project. dex authors dbt models from staging to marts with tests and docs, and the semantic layer on top (entities, dimensions, measures, metrics) as dbt semantic models (MetricFlow YAML), with a free Viz preview. Every change is a reviewable diff, validated against a dev target and cost-guarded.
- **Maintain** the project as it drifts. dex diffs the warehouse and dbt against the last snapshot and surfaces schema, volume, grain, and semantic drift ranked by blast radius, then proposes the reconciling edits.

## Install

In Claude Code, run each command one at a time:

```
/plugin marketplace add exmergo/exmergo-agent-plugins
/plugin install dex@exmergo
```

The skills appear as `/dex:explore`, `/dex:transform`, and `/dex:maintain` and auto-trigger on matching intent.

For any other coding agent (Codex, Gemini CLI, Cursor, and others), the same engine is driven through the command contract documented in `AGENTS.md`:

```
npx skills add exmergo/dex
```

## Technical guardrails

- **dbt is the source of truth.** dex does not invent parallel semantic models. Human edits to your dbt project are authoritative by construction. dex proposes; you merge.
- **Connector-aware cost guard.** Nothing runs without a ceiling. Whether capping bytes-scanned in BigQuery or compute-time in Snowflake, dex pre-flights and estimates cost before any spend.
- **Profile, don't exfiltrate.** Understanding is built from SQL aggregates, not raw rows in context. Credentials and raw data never enter the LLM model context.

## Connectors

Built for the production stack, with a cost guard per connector.

| Connector | Cost guard |
| --- | --- |
| BigQuery | Bytes scanned |
| Snowflake | Compute time |
| Databricks | DBUs |
| PostgreSQL | Load limit |
| DuckDB | Zero-credential on-ramp |

## Open-core and Enterprise

**dex (Open, Free, Apache 2.0)** gives you the full ETM loop (explore, transform, maintain), manual on-demand drift detection, and a one-shot Viz preview of your semantic model.

**The Exmergo Enterprise Platform** adds everything in free, plus continuous scheduled drift detection with automated PRs, a live governed author-to-serve loop uniting dex and Exmergo Viz, and cross-team governance, PII policy, and access audit.
