# contextlift > GitHub-native Context CI for AI SQL agents, dbt semantic layers, and enterprise data warehouses. Pure Python stdlib core (zero core dependencies), Apache-2.0. contextlift measures whether written business context (Markdown rules, dbt MetricFlow YAML, Snowflake Semantic Views, Apache Ossie, LookML, or catalog docs) improves SQL execution accuracy on your real database. It runs fail-closed read-only SQL diffs (SQLite, DuckDB, BigQuery, plus beta Postgres, Snowflake, and Databricks connectors), paired McNemar tests with 95% Tango intervals on sealed holdouts, zero-LLM Cross-Layer Conflict Radar, AST rule blame attribution, offline Business Steward sign-off packs with SQL-hash-bound approvals, HMAC-SHA256 integrity seals, and a local stdio-only certified MCP runtime server. ## Quickstart - Zero-install offline demo: `uvx contextlift demo` - Install with local DuckDB + YAML: `pip install "contextlift[duckdb,yaml]"` - Optional cloud warehouse extras: `[postgres]`, `[snowflake]`, `[databricks]`, `[bigquery]`, `[lookml]` - Bootstrap a workspace + starter schemas: `contextlift init --db warehouse.duckdb --dbt .` - Run zero-LLM Cross-Layer Conflict Radar: `contextlift lint --spec spec/ --dbt . --db warehouse.duckdb` - Ingest production failures into a Steward sheet: `contextlift ingest-failures --input prod.jsonl --out review/review.csv` - Run a paired round with signed attestation: `contextlift round --runner openai:gpt-4.1 --budget 5 --out round.json --attestation-out .contextlift/attestation.json` - Serve certified context over MCP stdio: `contextlift serve-mcp --spec spec/ --attestation .contextlift/attestation.json --require-signature` - Compile to semantic layers: `contextlift compile --spec spec/ --target snowflake-yaml --attestation .contextlift/attestation.json` ## Documentation - [README](README.md): Overview, three-verdict forest plot, 3 progressive levels, and install matrix - [Quickstart](docs/quickstart.md): 10-minute copy-paste walkthrough from Level 0 demo to Level 3 MCP serving - [How it works](docs/how-it-works.md): Arm 0d vs Arm 1, sealed holdout firewall, McNemar/Tango stats, all 7 verdicts, safety badges, pre-flight gates, and empirical results (`#results`) - [CI setup](docs/guides/ci.md): End-to-end dbt + GitHub Actions workflow, reusable workflow, pre-commit hooks, merge policy gates, HMAC attestations, and OpenTelemetry export - [Warehouses, agents, semantic layers, and MCP](docs/guides/connect.md): DuckDB, SQLite, BigQuery, beta Postgres/Snowflake/Databricks, OpenAI/Anthropic/Gemini/Ollama/vLLM, custom CLI runners, CSV replay, Conflict Radar, `compile`, and Claude Code / Cursor MCP config - [Building a gold set](docs/guides/questions.md): `init --sql-dir`, `mine`, `ingest-failures`, offline Business Steward review packs, `gate`, `split`, and curate-only `suggest` - [Extending contextlift](docs/guides/extending.md): Structural Python protocols for custom `Executor` and `Runner` classes and `--runner MODULE:ATTR` - [CLI reference](docs/reference/cli.md): 8 core verbs, all 61 verbs grouped by stage, and refusal decoder - [File formats](docs/reference/formats.md): `spec/`, CSV schemas, `contextlift.yaml`, `attestation.json`, and `.contextlift/` layout - [Security](docs/security.md): Fail-closed read-only SQL rails, SSRF guard, config RCE guard, stdio-only MCP, PII redaction, and HMAC-SHA256 trust model ## Optional - [MCP Registry Manifest](server.json): Standard stdio MCP server definition for `contextlift serve-mcp` - [GitHub Action](action.yml): Composite PR gate action for GitHub Actions - [Pre-Commit Hooks](.pre-commit-hooks.yaml): Local `contextlift-lint`, `contextlift-gate`, and `contextlift-scan` hooks