Keep data correct over time — write the invariants down, push each one to the lowest layer that can enforce it, cover the rest with reconciliation queries, and detect drift before a user reports it. Use when deciding where a rule should be enforced, auditing a schema whose rules live only in application code, building reconciliation or drift checks, or investigating data that looks wrong. Not for sequencing a schema change (migrations) or proving one migration's outcome…
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Data integrity
Application-level validation runs on the paths that call it. A backfill, an admin console, a second
service, a support script and a psql session all bypass it. Anything that must always be true has to
be enforced somewhere every writer goes through, or measured continuously — preferably both.
## When this fires
You are deciding where a rule is enforced, auditing a schema whose rules exist only as guard clauses
in code, building reconciliation or drift checks, or looking at data that is suspected to be wrong.
It does not fire for the sequencing of a specific schema change, or for verifying one migration.
## Procedure
1. **Write the invariants down as sentences about the data.** "An order has exactly one customer."
"A ledger's entries sum to its stored balance." "A subscription's end is never before its start."
Harvest them from the domain, from the guard clauses already in the code, and from the bug
history — past incidents are invariants that were discovered the expensive way. An unwritten
invariant is enforced inconsistently by definition.
2. **For each one, find where it is enforced today.** Database constraint, application code, a
…
The line at the top of this page pins the label git:20260919.a0d4f55, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_5qp56ym5yjamqded
GET https://markdownregistry.com/api/v1/resolve?ref=nahid-sparktales/agent-dispatcher/data-integrity
GET https://markdownregistry.com/api/v1/blob/77708e6e8e93cfb96b89a474a1a8e3d4d3cc9b41bef1097d88235e78baed6ef5
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
nahid-sparktales/agent-dispatcher · skills/agent-dispatcher/SKILL.md · Handle requested Agent Dispatcher work with direct execution or prepared specialist guidance. Includes named roles…
nahid-sparktales/agent-dispatcher · skills/ai/agent-design/SKILL.md · Scope an agent or subagent before it is built — the one job it owns, the smallest tool set that closes that job, what…
nahid-sparktales/agent-dispatcher · skills/ai/agent-evals/SKILL.md · Build an eval suite that can actually detect a regression — cases pulled from real traffic, graders that check…
nahid-sparktales/agent-dispatcher · skills/ai/context-engineering/SKILL.md · Decide what actually occupies the model's window — progressive disclosure through an index, retrieval versus inlining…
nahid-sparktales/agent-dispatcher · skills/ai/llm-observability/SKILL.md · See what an agent actually did — one trace per run with nested model, tool and retrieval spans, token and latency…
nahid-sparktales/agent-dispatcher · skills/ai/mcp-design/SKILL.md · Build an MCP server, or bring an existing one into a project — choosing the transport, deciding which tools, resources…
nahid-sparktales/agent-dispatcher · skills/ai/memory-design/SKILL.md · Decide what an agent should remember, which layer holds it, who it is scoped to, and how a stale or contradicted memory…
nahid-sparktales/agent-dispatcher · skills/ai/model-routing/SKILL.md · Pick a model per job and degrade sensibly when one fails — a quality bar per call site, candidates compared on the same…
nahid-sparktales/agent-dispatcher · skills/ai/prompt-engineering/SKILL.md · Write or revise a prompt so it holds up — output contract, instruction placement, examples that earn their place, an…
nahid-sparktales/agent-dispatcher · skills/ai/prompt-injection-defense/SKILL.md · Treat everything an agent reads but did not author as data rather than instructions — an explicit trust boundary, a…
nahid-sparktales/agent-dispatcher · skills/ai/retrieval-rag/SKILL.md · Build and fix retrieval that actually returns the right passage — structure-aware chunking, one pinned embedding model…
nahid-sparktales/agent-dispatcher · skills/ai/structured-output/SKILL.md · Get parseable, trustworthy structured results out of a model — schema design, the enforcement mechanism the provider…
globalmpc/backendskills · bench/results/2026-11-04/checkout-with-2-20261105081443-12446/skills/data-integrity/SKILL.md · Rules for code that writes to the database where two requests, retries or jobs can run at once. Use for anything that…
globalmpc/backendskills · bench/results/2026-11-04/checkout-with-1-20261104173809-28998/skills/data-integrity/SKILL.md · Rules for code that writes to the database where two requests, retries or jobs can run at once. Use for anything that…
globalmpc/backendskills · bench/results/2026-11-04/checkout-with-1-20261105081443-28376/skills/data-integrity/SKILL.md · Rules for code that writes to the database where two requests, retries or jobs can run at once. Use for anything that…
globalmpc/backendskills · bench/results/2026-11-04/checkout-with-3-20261104173809-29907/skills/data-integrity/SKILL.md · Rules for code that writes to the database where two requests, retries or jobs can run at once. Use for anything that…
globalmpc/backendskills · bench/results/2026-11-04/checkout-with-2-20261104173809-13068/skills/data-integrity/SKILL.md · Rules for code that writes to the database where two requests, retries or jobs can run at once. Use for anything that…
globalmpc/backendskills · bench/results/2026-11-04/checkout-with-3-20261104164959-7407/skills/data-integrity/SKILL.md · Rules for code that writes to the database where two requests, retries or jobs can run at once. Use for anything that…
globalmpc/backendskills · bench/results/2026-11-04/checkout-with-1-20261104164959-6498/skills/data-integrity/SKILL.md · Rules for code that writes to the database where two requests, retries or jobs can run at once. Use for anything that…
globalmpc/backendskills · bench/results/2026-11-04/checkout-with-2-20261104164959-23336/skills/data-integrity/SKILL.md · Rules for code that writes to the database where two requests, retries or jobs can run at once. Use for anything that…