DataSentry

Evidence-driven, local-first AI copilot for data quality. Detect · Explain · Validate · Repair — with statistical evidence, AI assistance, and human approval. Your data never leaves your machine.

version 0.1.0 python 3.12 license Apache-2.0 tests 522 passed coverage 95% detectors 39 ADR 46

What it does

One scan produces a six-dimension quality score; every issue carries a statistical evidence chain — samples, ratios, confidence. AI proposes; humans approve.

39 evidence-driven detectors

Missingness, dates, encodings, cross-field rules, cross-table foreign keys, exact + fuzzy duplicates, Isolation Forest / LOF outliers.

Six-dimension scoring

Completeness, validity, uniqueness, consistency, integrity, timeliness — explainable weights, per-dimension contributions.

Human-in-the-loop repair

Propose → preview (rules re-run) → apply (fingerprinted copy) → rollback. AI suggests; you decide.

Drift engine

Compare historical scans: schema, row-count, score and issue-distribution drift between versions.

CI quality gates

scan --fail-on blocks releases; reports as JSON / Markdown / HTML / JUnit / SARIF.

Safe LLM assistance

PII redacted before every prompt, calls audited, rules approved after preflight simulation. Runs on local Ollama.

Four interfaces

CLI, REST API, server-rendered Web UI with cross-scan trends, and an MCP stdio server for LLM agents.

Local-first & fast

DuckDB execution engine, 1e6 rows in ~10s. No cloud, no telemetry, no vendor lock-in.

Open & extensible

Detector plugin API (plugins/ auto-load), contract exports to Pandera / Great Expectations, 46 ADRs of design rationale.

Live demo report

200 rows of order data with 15 injected quality issues — scanned and reported in one command. This is the actual report export --as html output, no custom rendering.

Quick start

Install from PyPI and scan your first file in under a minute.

# install
$ pip install datasentry

# scan → fuse → score → persist, one step
$ datasentry scan orders.csv
{
  "scan_run_id": "scan_3426008c0380",
  "status": "completed",
  "row_count": 200,
  "issues_count": { ... }
}

# issues, score, repair, drift
$ datasentry issues list
$ datasentry score scan_3426008c0380
$ datasentry repair propose <issue_id> --file orders.csv
$ datasentry drift latest orders

# Web UI + REST API
$ datasentry-server
→ http://localhost:8000/ui/  (scans, issues, repair workbench, trends)
  • scan — 39 detectors, fusion, six-dimension score
  • issues — filter by severity / dimension
  • score — 0–100 with explainable weights
  • repair — propose → preview → apply → rollback
  • drift — compare historical scans
  • rules — natural language → rule candidates + approval
  • mcp — 7 tools for LLM agents over stdio
  • detectors — registry incl. plugins

Documentation

README

Full feature tour, architecture diagram, development guide.

Open on GitHub →

Development notes

Per-step implementation notes, conventions, testing practices.

docs/DEVELOPMENT.md →

ADR journal

46 architecture decision records explaining every design choice.

docs/00-ADR.md →