{
  "markdown": "> **Moved.** This repo has moved into the [`benzsevern/goldenmatch`](https://github.com/benzsevern/goldenmatch) monorepo at `packages/python/goldencheck (and packages/typescript/goldencheck)/`. This repo is archived; new development happens in the monorepo.\n\n<!-- mcp-name: io.github.benzsevern/goldencheck -->\n# GoldenCheck\n\nData validation that discovers rules from your data so you don't have to write them.\nBuilt by [Ben Severn](https://bensevern.dev).\n\n[![PyPI](https://img.shields.io/pypi/v/goldencheck?logo=pypi&logoColor=white&label=PyPI&color=d4a017)](https://pypi.org/project/goldencheck/)\n[![npm](https://img.shields.io/npm/v/goldencheck?logo=npm&logoColor=white&label=npm&color=cb3837)](https://www.npmjs.com/package/goldencheck)\n[![CI](https://img.shields.io/github/actions/workflow/status/benzsevern/goldencheck/test.yml?logo=github&label=CI)](https://github.com/benzsevern/goldencheck/actions/workflows/test.yml)\n[![codecov](https://img.shields.io/codecov/c/gh/benzsevern/goldencheck?logo=codecov&logoColor=white)](https://codecov.io/gh/benzsevern/goldencheck)\n[![PyPI Downloads](https://img.shields.io/pypi/dm/goldencheck?logo=python&logoColor=white&label=PyPI%20downloads&color=3776ab)](https://pepy.tech/project/goldencheck)\n[![npm Downloads](https://img.shields.io/npm/dm/goldencheck?logo=npm&logoColor=white&label=npm%20downloads&color=cb3837)](https://www.npmjs.com/package/goldencheck)\n[![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-3776ab?logo=python&logoColor=white)](https://python.org)\n[![Node 20+](https://img.shields.io/badge/node-20%2B-5fa04e?logo=nodedotjs&logoColor=white)](https://nodejs.org)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.4%2B-3178c6?logo=typescript&logoColor=white)](https://typescriptlang.org)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green?logo=opensourceinitiative&logoColor=white)](LICENSE)\n[![DQBench](https://img.shields.io/badge/DQBench-88.40-gold?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHRleHQgeD0iMCIgeT0iMTQiIGZvbnQtc2l6ZT0iMTQiPuKtkTwvdGV4dD48L3N2Zz4=)](https://github.com/benzsevern/dqbench)\n[![Docs](https://img.shields.io/badge/docs-benzsevern.github.io-d4a017?logo=github&logoColor=white)](https://benzsevern.github.io/goldencheck/)\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/benzsevern/goldencheck/blob/main/scripts/goldencheck_demo.ipynb)\n\n> Every competitor makes you write rules first. GoldenCheck flips it: **validate first, keep the rules you care about.**\n\n## Why GoldenCheck?\n\n|  | GoldenCheck | Great Expectations | Pandera | Pointblank |\n|---|---|---|---|---|\n| Rules | **Discovered from data** | Written by hand | Written by hand | Written by hand |\n| Config | **Zero to start** | Heavy YAML/Python setup | Decorators/schemas | YAML/Python |\n| Interface | **CLI + interactive TUI** | HTML reports | Exceptions | HTML/notebook |\n| Learning curve | **One command** | Hours/days | Moderate | Moderate |\n| LLM enhancement | **Yes ($0.01/scan)** | No | No | No |\n| Fix suggestions | Yes, in TUI | No | No | No |\n| Confidence scoring | Yes (H/M/L per finding) | No | No | No |\n| DQBench Score | **88.40** | 21.68 (best-effort) | 32.51 (best-effort) | 6.94 (auto) |\n\n## Install\n\n```bash\npip install goldencheck\n```\n\nWith LLM boost support:\n\n```bash\npip install goldencheck[llm]\n```\n\nWith deep profiling & baseline support (scipy, numpy):\n\n```bash\npip install goldencheck[baseline]\n```\n\nWith semantic type inference for baseline (sentence-transformers):\n\n```bash\npip install goldencheck[baseline,semantic]\n```\n\n### JavaScript / TypeScript\n\n```bash\nnpm install goldencheck\n```\n\n**Edge-safe core** (browsers, Cloudflare Workers, Vercel Edge):\n```typescript\nimport { scanData, TabularData } from \"goldencheck/core\";\n```\n\n**Node.js** (file reading, CLI, MCP):\n```typescript\nimport { readFile, scanData } from \"goldencheck/node\";\n```\n\n## Quick Start\n\n```bash\n# Scan a file — discovers issues, launches interactive TUI\ngoldencheck data.csv\n\n# CLI-only output (no TUI)\ngoldencheck data.csv --no-tui\n\n# With LLM enhancement (requires API key)\ngoldencheck data.csv --llm-boost --no-tui\n\n# Validate against saved rules (for CI/pipelines)\ngoldencheck validate data.csv\n\n# JSON output for CI integration\ngoldencheck data.csv --no-tui --json\n\n# Learn baseline (one-time, deep analysis)\ngoldencheck baseline data.csv\n\n# Scan with drift detection (fast, uses saved baseline)\ngoldencheck scan new_data.csv\n```\n\n## TypeScript Quick Start\n\n```typescript\n// Scan an array of records (edge-safe — works anywhere)\nimport { scanData, TabularData, Severity } from \"goldencheck\";\n\nconst data = new TabularData([\n  { id: 1, email: \"alice@example.com\", age: 30, status: \"active\" },\n  { id: 2, email: \"bob@test.com\", age: -5, status: \"inactive\" },\n  { id: 3, email: \"not-an-email\", age: 25, status: \"active\" },\n]);\n\nconst { findings, profile } = scanData(data);\nfor (const f of findings) {\n  console.log(`[${f.severity === Severity.ERROR ? \"ERROR\" : \"WARNING\"}] ${f.column}: ${f.message}`);\n}\n```\n\n```typescript\n// Scan a CSV file (Node.js)\nimport { readFile, scanData, applyConfidenceDowngrade, healthScore } from \"goldencheck/node\";\n\nconst data = readFile(\"data.csv\");\nconst result = scanData(data, { domain: \"healthcare\" });\nconst findings = applyConfidenceDowngrade(result.findings, false);\n\n// Health score\nconst byCol = {};\nfor (const f of findings) {\n  if (f.severity >= 2) {\n    byCol[f.column] ??= { errors: 0, warnings: 0 };\n    byCol[f.column][f.severity === 3 ? \"errors\" : \"warnings\"]++;\n  }\n}\nconst { grade, points } = healthScore(byCol);\nconsole.log(`Health: ${grade} (${points}/100)`);\n```\n\n```typescript\n// Validate against pinned rules\nimport { readFile, scanData, validateConfig, validateData } from \"goldencheck/node\";\nimport { readFileSync } from \"node:fs\";\nimport YAML from \"yaml\";\n\nconst config = validateConfig(YAML.parse(readFileSync(\"goldencheck.yml\", \"utf-8\")));\nconst data = readFile(\"data.csv\");\nconst findings = validateData(data, config);\n```\n\n```typescript\n// Create baseline and detect drift\nimport { readFile, createBaseline, serializeBaseline, scanData } from \"goldencheck/node\";\nimport { runDriftChecks, deserializeBaseline } from \"goldencheck\";\nimport { writeFileSync, readFileSync } from \"node:fs\";\n\n// Learn baseline\nconst data = readFile(\"reference.csv\");\nconst baseline = createBaseline(data);\nwriteFileSync(\"baseline.json\", serializeBaseline(baseline));\n\n// Later: detect drift\nconst newData = readFile(\"production.csv\");\nconst saved = deserializeBaseline(readFileSync(\"baseline.json\", \"utf-8\"));\nconst driftFindings = runDriftChecks(newData, saved);\n```\n\n```typescript\n// LLM-enhanced scanning (edge-safe)\nimport { scanData, TabularData, callLlm, parseLlmResponse, mergeLlmFindings, buildSampleBlocks } from \"goldencheck\";\n\nconst data = new TabularData(records);\nconst result = scanData(data, { returnSample: true });\nconst blocks = buildSampleBlocks(result.sample, result.findings);\nconst { text } = await callLlm(\"anthropic\", JSON.stringify(blocks));\nconst llmResponse = parseLlmResponse(text);\nif (llmResponse) {\n  const enhanced = mergeLlmFindings(result.findings, llmResponse);\n}\n```\n\n## How It Works\n\n```\n1. SCAN     →  goldencheck data.csv\n                GoldenCheck profiles your data and discovers what \"healthy\" looks like\n\n2. REVIEW   →  Interactive TUI shows findings sorted by severity\n                Each finding has: description, affected rows, sample values\n\n3. PIN      →  Press Space to promote findings into permanent rules\n                Dismiss false positives — they won't come back\n\n4. EXPORT   →  Press F2 to save rules to goldencheck.yml\n                Human-readable YAML with your pinned rules\n\n5. VALIDATE →  goldencheck validate data.csv\n                Enforce rules in CI with exit codes (0 = pass, 1 = fail)\n```\n\n## What It Detects\n\n### Column-Level Profilers\n\n| Profiler | What It Catches | Example |\n|----------|----------------|---------|\n| **Type inference** | String columns that are actually numeric | \"Column `age` is string but 98% are integer\" |\n| **Nullability** | Required vs. optional columns | \"0 nulls across 50k rows — likely required\" |\n| **Uniqueness** | Primary key candidates, near-duplicates | \"100% unique — likely primary key\" |\n| **Format detection** | Emails, phones, URLs, dates | \"94% email format, 6% malformed\" |\n| **Range & distribution** | Outliers, min/max bounds | \"3 rows have values >10,000\" |\n| **Cardinality** | Low-cardinality enum suggestions | \"4 unique values — possible enum\" |\n| **Pattern consistency** | Mixed formats within a column | \"3 phone formats detected\" |\n\n### Cross-Column Profilers\n\n| Profiler | What It Catches |\n|----------|----------------|\n| **Temporal ordering** | start_date > end_date violations |\n| **Null correlation** | Columns that are null together (e.g., address + city + zip) |\n| **Numeric cross-column** | value > max violations (e.g., claim_amount > policy_max) |\n| **Age vs DOB** | Age column doesn't match calculated age from date_of_birth |\n\n### Baseline Deep Profiling & Drift Detection\n\nRun `goldencheck baseline` once to build a statistical profile of healthy data. On every subsequent scan, GoldenCheck compares the new data against the saved baseline and reports drift across 13 check types:\n\n| Check Type | What It Catches |\n|------------|----------------|\n| `distribution_drift` | Value distribution has shifted significantly |\n| `entropy_drift` | Entropy of column values has changed |\n| `bound_violation` | Values exceed historical min/max bounds |\n| `benford_drift` | Leading-digit distribution deviates from Benford's Law |\n| `fd_violation` | Functional dependency between columns is broken |\n| `key_uniqueness_loss` | Previously unique column now has duplicates |\n| `temporal_order_drift` | Historical column ordering constraint violated |\n| `type_drift` | Dominant semantic type of column has changed |\n| `correlation_break` | Previously correlated columns are no longer correlated |\n| `new_correlation` | New unexpected correlation appeared |\n| `pattern_drift` | Value format/pattern distribution has shifted |\n| `new_pattern` | New structural patterns appeared in a column |\n\nThe baseline is built using 6 techniques: statistical profiler (distributions, Benford's Law, entropy), constraint miner (functional dependencies, temporal orders), semantic type inferrer (embeddings + keywords), correlation analyzer (Pearson, Cramér's V), pattern grammar inducer, and confidence prior builder.\n\n## Domain Packs\n\nImprove detection accuracy with domain-specific type definitions:\n\n```bash\ngoldencheck scan data.csv --domain healthcare   # NPI, ICD, insurance, patient types\ngoldencheck scan data.csv --domain finance      # accounts, routing, CUSIP, transactions\ngoldencheck scan data.csv --domain ecommerce    # SKUs, orders, tracking, products\n```\n\nDomain packs add semantic types that reduce false positives and improve classification for industry-specific data.\n\n## Schema Diff\n\nCompare two versions of a data file:\n\n```bash\ngoldencheck diff data.csv                  # compare against git HEAD\ngoldencheck diff old.csv new.csv           # compare two files\ngoldencheck diff data.csv --ref main       # compare against a branch\n```\n\n## Auto-Fix\n\nApply automated fixes to clean your data:\n\n```bash\ngoldencheck fix data.csv                          # safe: trim, normalize, fix encoding\ngoldencheck fix data.csv --mode moderate          # + standardize case\ngoldencheck fix data.csv --mode aggressive --force # + coerce types\ngoldencheck fix data.csv --dry-run                # preview changes\n```\n\n## Watch Mode\n\nContinuously monitor a directory for data quality:\n\n```bash\ngoldencheck watch data/ --interval 30        # re-scan every 30s\ngoldencheck watch data/ --exit-on error      # CI mode: fail on first error\n```\n\n## REST API\n\nRun GoldenCheck as a microservice:\n\n```bash\ngoldencheck serve --port 8000\n\n# Scan via file upload\ncurl -X POST http://localhost:8000/scan --data-binary @data.csv\n\n# Scan via URL\ncurl -X POST http://localhost:8000/scan/url -d '{\"url\": \"https://example.com/data.csv\"}'\n```\n\n## Database Scanning\n\nScan tables directly — no CSV export needed:\n\n```bash\npip install goldencheck[db]\ngoldencheck scan-db \"postgresql://user:pass@host/db\" --table orders\ngoldencheck scan-db \"snowflake://...\" --query \"SELECT * FROM orders WHERE date > '2024-01-01'\"\n```\n\n## Scheduled Runs\n\nCron-like scheduling with webhook notifications:\n\n```bash\ngoldencheck schedule data/*.csv --interval hourly --webhook https://hooks.slack.com/...\ngoldencheck schedule data/*.csv --interval daily --notify-on grade-drop\n```\n\n## LLM Boost\n\nAdd `--llm-boost` to enhance profiler findings with LLM intelligence. The LLM receives a representative sample of your data and:\n\n1. **Finds issues profilers miss** — semantic understanding (e.g., \"12345\" in a name column)\n2. **Upgrades severity** — knows \"emails should be required\" even if the profiler only says \"INFO\"\n3. **Discovers relationships** — identifies temporal ordering between columns like `signup_date` and `last_login`\n4. **Downgrades false positives** — \"mixed phone formats are common, not an error\"\n\n```bash\n# Using OpenAI\nexport OPENAI_API_KEY=sk-...\ngoldencheck data.csv --llm-boost --llm-provider openai --no-tui\n\n# Using Anthropic\nexport ANTHROPIC_API_KEY=sk-ant-...\ngoldencheck data.csv --llm-boost --no-tui\n```\n\n**Cost:** ~$0.01 per scan (one API call with representative samples, not per-row).\n\n**Budget control:**\n```bash\nexport GOLDENCHECK_LLM_BUDGET=0.50  # max spend per scan in USD\n```\n\n## Configuration (goldencheck.yml)\n\n```yaml\nversion: 1\n\nsettings:\n  sample_size: 100000\n  fail_on: error\n\ncolumns:\n  email:\n    type: string\n    required: true\n    format: email\n    unique: true\n\n  age:\n    type: integer\n    range: [0, 120]\n\n  status:\n    type: string\n    enum: [active, inactive, pending, closed]\n\nrelations:\n  - type: temporal_order\n    columns: [start_date, end_date]\n\nignore:\n  - column: notes\n    check: nullability\n```\n\nOnly pinned rules appear in this file — not every finding. The `ignore` list prevents dismissed findings from reappearing.\n\n## CLI Reference\n\n| Command | Description |\n|---------|-------------|\n| `goldencheck <file>` | Scan and launch TUI |\n| `goldencheck scan <file>` | Explicit scan (supports `--smart`, `--guided`) |\n| `goldencheck validate <file>` | Validate against goldencheck.yml |\n| `goldencheck review <file>` | Scan + validate, launch TUI |\n| `goldencheck init <file>` | Interactive setup wizard (scan → config → CI) |\n| `goldencheck diff <file> [file2]` | Compare two files or against git HEAD |\n| `goldencheck watch <dir>` | Poll directory, re-scan on change |\n| `goldencheck fix <file>` | Auto-fix data quality issues |\n| `goldencheck baseline <file>` | Deep-profile data and save statistical baseline to YAML |\n| `goldencheck learn <file>` | Generate LLM validation rules |\n| `goldencheck history` | Show scan history and trends |\n| `goldencheck serve` | Start REST API server |\n| `goldencheck scan-db <conn>` | Scan a database table directly |\n| `goldencheck schedule <files>` | Run scans on a cron schedule |\n| `goldencheck mcp-serve` | Start MCP server (19 tools) |\n\n### Flags\n\n| Flag | Description |\n|------|-------------|\n| `--no-tui` | Print results to console |\n| `--json` | JSON output |\n| `--fail-on <level>` | Exit 1 on severity: `error` or `warning` |\n| `--domain <name>` | Domain pack: `healthcare`, `finance`, `ecommerce` |\n| `--llm-boost` | Enable LLM enhancement |\n| `--llm-provider <name>` | LLM provider: `anthropic` (default) or `openai` |\n| `--mode <level>` | Fix mode: `safe`, `moderate`, `aggressive` |\n| `--smart` | Auto-triage: pin high-confidence, dismiss low |\n| `--guided` | Walk through findings one-by-one |\n| `--webhook <url>` | POST findings to Slack/PagerDuty/any URL |\n| `--notify-on <trigger>` | Webhook trigger: `grade-drop`, `any-error`, `any-warning` |\n| `--baseline <path>` | Path to baseline YAML for drift detection |\n| `--no-baseline` | Skip auto-discovery of `goldencheck_baseline.yaml` |\n| `--skip <technique>` | Skip a baseline technique (can repeat) |\n| `--update` | Update existing baseline instead of overwriting |\n| `-o <path>` | Output path for baseline file (default: `goldencheck_baseline.yaml`) |\n| `--version` | Show version |\n\n## TypeScript CLI\n\n```bash\nnpx goldencheck-js scan data.csv --json\nnpx goldencheck-js scan data.csv --domain healthcare\nnpx goldencheck-js health-score data.csv\nnpx goldencheck-js profile data.csv\nnpx goldencheck-js validate data.csv --config goldencheck.yml\nnpx goldencheck-js baseline data.csv --output baseline.json\nnpx goldencheck-js fix data.csv --mode safe\nnpx goldencheck-js diff old.csv new.csv\nnpx goldencheck-js demo\n```\n\n## TypeScript Architecture\n\n```\ngoldencheck (npm)\n├── goldencheck/core    # Edge-safe: browsers, Workers, Edge Runtime\n│   ├── types           # Finding, Severity, DatasetProfile, Config types\n│   ├── data            # TabularData — zero-dep columnar abstraction\n│   ├── profilers       # 10 column profilers + 4 relation profilers\n│   ├── semantic        # Type classifier, suppression, 3 domain packs\n│   ├── engine          # Scanner, confidence, validator, triage, differ, fixer\n│   ├── baseline        # Statistical profiling, constraints, correlation, patterns\n│   ├── drift           # 13 drift checks against saved baseline\n│   ├── llm             # Anthropic + OpenAI via fetch(), merger, budget\n│   ├── agent           # Strategy, handoff, review queue\n│   └── reporters       # JSON, CI\n└── goldencheck/node    # Node.js >= 20\n    ├── reader          # CSV, Parquet (via nodejs-polars)\n    ├── mcp             # MCP server (7 tools)\n    ├── a2a             # Agent-to-Agent HTTP server\n    ├── tui             # ANSI terminal output\n    ├── db-scanner      # Postgres, MySQL, SQLite\n    └── watcher         # Directory polling\n```\n\n## Benchmarks\n\n### Speed\n\n| Dataset | Time | Throughput |\n|---------|------|------------|\n| 1K rows | 0.05s | 19K rows/sec |\n| 10K rows | 0.23s | 43K rows/sec |\n| 100K rows | 2.29s | 44K rows/sec |\n| **1M rows** | **2.07s** | **482K rows/sec** |\n\n### DQBench v1.0 — Head-to-Head\n\n| Tool | Mode | DQBench Score |\n|------|------|---------------|\n| **GoldenCheck** | **zero-config** | **88.40** |\n| Pandera | best-effort rules | 32.51 |\n| Soda Core | best-effort rules | 22.36 |\n| Great Expectations | best-effort rules | 21.68 |\n\n> GoldenCheck's zero-config discovery outperforms every competitor — even when they have hand-written rules.\n\nRun the benchmark yourself:\n```bash\npip install dqbench goldencheck\ndqbench run goldencheck\n```\n\n### Detection Accuracy\n\n| Mode | Column Recall | Cost |\n|------|--------------|------|\n| Profiler-only (v0.1.0) | 87% | $0 |\n| Profiler-only (v0.2.0 with confidence) | **100%** | $0 |\n| With LLM Boost | **100%** | ~$0.003-0.01 |\n\nTested on a custom benchmark with 341 planted data quality issues across 9 categories.\n\n> v0.2.0 improvements: minority wrong-type detection, range profiler chaining, broader temporal heuristics, and confidence scoring pushed profiler-only recall from 87% to 100%.\n\n### Raha Benchmark Datasets\n\n| Dataset | Column Recall |\n|---------|--------------|\n| Flights (2,376 rows) | **100%** (4/4 columns) |\n| Beers (2,410 rows) | **80%** (4/5 columns) |\n\n## Tech Stack\n\n| Dependency | Purpose |\n|-----------|---------|\n| [Polars](https://pola.rs/) | All data operations |\n| [Typer](https://typer.tiangolo.com/) | CLI framework |\n| [Textual](https://textual.textualize.io/) | Interactive TUI |\n| [Rich](https://rich.readthedocs.io/) | CLI output formatting |\n| [Pydantic 2](https://docs.pydantic.dev/) | Config validation |\n\n**Optional:** [Anthropic SDK](https://docs.anthropic.com/) / [OpenAI SDK](https://platform.openai.com/) for LLM Boost | [MCP SDK](https://modelcontextprotocol.io/) for MCP server | [scipy](https://scipy.org/) + [numpy](https://numpy.org/) for deep baseline profiling (`[baseline]`) | [sentence-transformers](https://www.sbert.net/) for semantic type inference in baseline (`[semantic]`)\n\n### TypeScript / Node.js\n\n| Dependency | Purpose |\n|-----------|---------|\n| Zero runtime deps | Core package has no dependencies (edge-safe) |\n| [nodejs-polars](https://github.com/pola-rs/nodejs-polars) | Parquet reading (optional, Node.js only) |\n| [csv-parse](https://csv.js.org/) | CSV reading (Node.js only) |\n| [@modelcontextprotocol/sdk](https://modelcontextprotocol.io/) | MCP server (Node.js only) |\n\n## MCP Server (Claude Desktop)\n\nGoldenCheck includes an MCP server for Claude Desktop integration:\n\n```bash\npip install goldencheck[mcp]\n```\n\nAdd to your Claude Desktop config (`claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"goldencheck\": {\n      \"command\": \"goldencheck\",\n      \"args\": [\"mcp-serve\"]\n    }\n  }\n}\n```\n\n**Available tools:**\n\n| Tool | Description |\n|------|-------------|\n| `scan` | Scan a file for data quality issues (with optional LLM boost) |\n| `validate` | Validate against pinned rules in goldencheck.yml |\n| `profile` | Get column-level statistics and health score |\n| `health_score` | Quick A-F grade for a data file |\n| `get_column_detail` | Deep-dive into a specific column |\n| `list_checks` | List all available profiler checks |\n\n## Remote MCP Server\n\nGoldenCheck is available as a hosted MCP server on [Smithery](https://smithery.ai/servers/benzsevern/goldencheck) — connect from any MCP client without installing anything.\n\n**Claude Desktop / Claude Code:**\n```json\n{\n  \"mcpServers\": {\n    \"goldencheck\": {\n      \"url\": \"https://goldencheck-mcp-production.up.railway.app/mcp/\"\n    }\n  }\n}\n```\n\n**Local server:**\n```bash\npip install goldencheck[mcp]\ngoldencheck mcp-serve\n```\n\n19 tools available: scan files, validate rules, profile columns, health-score datasets, auto-configure validation, explain findings, compare domains, suggest fixes.\n\n## Jupyter / Colab\n\nGoldenCheck renders rich HTML in Jupyter notebooks:\n\n```python\nfrom goldencheck.engine.scanner import scan_file\nfrom goldencheck.engine.confidence import apply_confidence_downgrade\nfrom goldencheck.notebook import ScanResult\n\nfindings, profile = scan_file(\"data.csv\")\nfindings = apply_confidence_downgrade(findings, llm_boost=False)\n\n# Rich HTML display in notebooks\nScanResult(findings=findings, profile=profile)\n```\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/benzsevern/goldencheck/blob/main/scripts/goldencheck_demo.ipynb)\n\n## API Quick Reference\n\n### Python\n\n```python\nimport goldencheck\n\n# Scan a CSV for quality issues\nfindings = goldencheck.scan_file(\"data.csv\")\nfor f in findings:\n    print(f\"[{f.severity}] {f.column}: {f.check} — {f.message}\")\n\n# Create baseline and detect drift\nfrom goldencheck import create_baseline, scan_file\nbaseline = create_baseline(\"data.csv\")\nbaseline.save(\"goldencheck_baseline.yaml\")\nfindings, profile = scan_file(\"data.csv\", baseline=\"goldencheck_baseline.yaml\")\n\n# Health score\nscore = goldencheck.health_score(\"data.csv\")\nprint(score)  # e.g. \"B (78/100)\"\n```\n\n### TypeScript\n\n```typescript\nimport { scanData, TabularData, Severity } from \"goldencheck\";\n\n// Scan records (edge-safe)\nconst data = new TabularData(records);\nconst { findings, profile } = scanData(data);\nfor (const f of findings) {\n  console.log(`[${f.severity === Severity.ERROR ? \"ERROR\" : \"WARNING\"}] ${f.column}: ${f.message}`);\n}\n```\n\n```typescript\nimport { readFile, scanData, applyConfidenceDowngrade, healthScore } from \"goldencheck/node\";\n\n// Scan a CSV file (Node.js)\nconst data = readFile(\"data.csv\");\nconst result = scanData(data, { domain: \"healthcare\" });\nconst findings = applyConfidenceDowngrade(result.findings, false);\n\n// Health score\nconst byCol = {};\nfor (const f of findings) {\n  if (f.severity >= 2) {\n    byCol[f.column] ??= { errors: 0, warnings: 0 };\n    byCol[f.column][f.severity === 3 ? \"errors\" : \"warnings\"]++;\n  }\n}\nconst { grade, points } = healthScore(byCol);\nconsole.log(`Health: ${grade} (${points}/100)`);\n```\n\n```typescript\nimport { readFile, createBaseline, serializeBaseline } from \"goldencheck/node\";\nimport { runDriftChecks, deserializeBaseline } from \"goldencheck\";\nimport { writeFileSync, readFileSync } from \"node:fs\";\n\n// Create baseline and detect drift\nconst data = readFile(\"reference.csv\");\nconst baseline = createBaseline(data);\nwriteFileSync(\"baseline.json\", serializeBaseline(baseline));\n\nconst newData = readFile(\"production.csv\");\nconst saved = deserializeBaseline(readFileSync(\"baseline.json\", \"utf-8\"));\nconst driftFindings = runDriftChecks(newData, saved);\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.\n\n## Author\n\n[Ben Severn](https://bensevern.dev)\n\n## License\n\nMIT — see [LICENSE](LICENSE)\n\n---\n\n## Part of the Golden Suite\n\n| Tool | Purpose | Install |\n|------|---------|---------|\n| [GoldenCheck](https://github.com/benzsevern/goldencheck) | Validate & profile data quality | `pip install goldencheck` / `npm install goldencheck` |\n| [GoldenFlow](https://github.com/benzsevern/goldenflow) | Transform & standardize data | `pip install goldenflow` |\n| [GoldenMatch](https://github.com/benzsevern/goldenmatch) | Deduplicate & match records | `pip install goldenmatch` |\n| [GoldenPipe](https://github.com/benzsevern/goldenpipe) | Orchestrate the full pipeline | `pip install goldenpipe` |\n\n**Companion projects:**\n- [dbt-goldencheck](https://github.com/benzsevern/dbt-goldencheck) — data validation as a dbt test.\n- [goldencheck-types](https://github.com/benzsevern/goldencheck-types) — community-contributed domain type packs.\n- [goldencheck-action](https://github.com/benzsevern/goldencheck-action) — GitHub Action for CI with PR comments.\n",
  "bytes": 25780,
  "sha": "775f2cf0b20855ccb76d83ff2bb1b392e0978d40f1cad5f5dd09086f985f8b75",
  "repo_slug": "benseverndev-oss/goldencheck",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_benseverndev_oss_goldencheck_5190d34b/readme"
}