data-identity-resolution
Skill1 starsChanged 3 months agoMITView on GitHub
Portable workflow for attaching messy records to canonical entities — evidence ladder, fail-closed assignment, quarantine on strong-vs-weak conflict, unresolved-null accumulation as measured debt, remap/restamp that cannot undo a stronger fence, backfill of unresolved keys. Use when resolving titles, IDs, or marketplace text to an entity key, debugging growing NULL identity columns, or restamping historical links. Don't use for quality flags or outlier fences (data-semantic-quality), estimate scoring (data-product-eval), schema/publish mechanics (data-apache-lakehouse), or product-specific match thresholds (product repo). Prefer the data hub when the specialist isn't obvious.
In this repository47 other files it gives its agents.
- data-apache-lakehouseSkill
- data-apiSkill
- dataSkill
- data-duckdbSkill
- data-pipeline-operationsSkill
- data-pokemon-tcg-foundationsSkill
- data-product-evalSkill
- data-reelsSkill
- data-semantic-qualitySkill
- data-table-lifecycleSkill
- html-designSkill
- ebay-listingSkill
- flutter-pro-ux-reviewSkill
- flutterSkill
- browser-testing-with-devtoolsSkill
- browser-verifySkill
- design-systemSkill
- frontend-designSkill
- mobile-app-echarts-visualSkill
- mobile-blog-chart-visualSkill
- mobile-chart-visualSkill
- mobile-product-uxSkill
- mockup-implementSkill
- product-designSkill
- product-ui-craftSkill
- prototypeSkill
- react-performanceSkill
- ui-exploreSkill
- visual-verifySkill
- web-qualitySkill
- high-retention-insight-reels-instagramSkill
- instagramSkill
- instagram-virality-insightsSkill
- marketing-cashvertisingSkill
- marketing-contagiousSkill
- marketing-going-viralSkill
- marketingSkill
- marketing-offersSkill
- marketing-storybrandSkill
- quality-checkSkill
- elements-of-styleSkill
- style-clarity-graceSkill
- writer-styleSkill
- writing-docsSkill
- writing-proseSkill
- writingSkill
- writing-technicalSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
No product match thresholds, no catalog taxonomies.
- Very specific: line 45
Ladder rules live in
data-semantic-quality: Do not fork a second ladder here. - Distinctive: line 103
Test: run restamp on a fixture that has a strong key *and* a tempting weak hint the other way.
- Distinctive: line 127
When someone asks “how much data do we have,” unresolved rate is part of the answer — row count alone lies.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Data identity resolution — attach, don't guess
data-semantic-quality owns the rules: trust ladder, confidence as a gate,
cohort fences. This skill owns the procedure for linking a messy incoming
record to a canonical entity key without inventing a second identity system.
No product match thresholds, no catalog taxonomies. Those stay in the product repo.
When to invoke
- Parsing free text / third-party ids onto a canonical entity key.
- NULL or unresolved identity keys growing day over day.
- Remapping / restamping historical links after a resolver change.
- Strong structured evidence disagrees with a weak title/heuristic.
Don't use
| Task | Go here instead |
| Quality flags, outliers, golden entity packs | data-semantic-quality |
| Scoring published estimates vs later facts | data-product-eval |
| Schema, watermarks, publish/OCC | data-apache-lakehouse / data hub |
| Serving honors stored keys; does not re-resolve | data-api |
| “Should this table exist?” | data-table-lifecycle |
| Concrete matcher constants / synonym lists | product-repo skill |
Non-negotiables
- No domain product nouns or concrete match thresholds in advice from this skill.
- Ladder rules live in
data-semantic-quality. Do not fork a second ladder here. - Unresolved is a first-class state, not a blank to be filled by the next weak hint.
- Collision / twin is a first-class state, not another matcher branch.
- Remap cannot undo a stronger fence. Restamp is ordered and is not the incremental timer.
- Low confidence never enters identity-assuming aggregates.
Principles
Each has a falsifiable Test:. Ladder mechanics live in data-semantic-quality
(trust ladder + confidence gates). Workflow detail:
references/attach-workflow.md.
1. Evidence before assignment
Collect ordered evidence (strong structured → catalog default → weak text) then
decide assign / quarantine / leave unresolved. Do not assign inside the first
matching if.
Test: invent a row where weak text and a strong structured field disagree. Does the weak path still win if you reorder branches?
2. Fail closed
Below the product’s confidence threshold the key stays null/unresolved and the row is excluded from identity-assuming rollups. “Average it in at a discount” is not fail-closed.
Test: can a below-threshold row appear in the primary aggregate without an explicit override flag?
3. Conflict quarantines
Strong-vs-weak mismatch is a quarantine (or a conflict label), not a coin flip. Record which evidence class produced the decision.
Test: is there a durable conflict/quarantine state a later job can count, or does the row silently pick a side?
4. Collision is a state, not a second pass of identify()
Two assigned keys for one physical event (or one key stamped on two events that must stay distinct) is collision. Persist it. Count it. An ordered restamp may pick a survivor; the incremental matcher must not "fold" the twin away to make the rollup look unique.
Test: inject a duplicate physical event with two structured ids. Does a collision row (or pair) survive publish, or does the next identify() pick a winner with no audit?
5. Unresolved accumulation is a metric
NULL / unresolved keys are measured debt: count per source per day, with a rate (unresolved / landed). A resolver that “works” while the null pile grows is losing.
Test: can you plot unresolved-landed per source for the last N days from published tables, without reading code? If the rate is up and no one is paging, the metric is missing.
6. Remap is ordered and one-way through stronger fences
A restamp / re-resolve pass applies weaker evidence only where stronger evidence is absent. It must not clear a strong assignment or a quarantine to please a new heuristic.
Test: run restamp on a fixture that has a strong key and a tempting weak hint the other way. Does the strong key survive?
Restamp is a separate resumable lane from incremental attach (principle 7). It does not ride the hourly identify timer. Residual rows after a restamp are a keyset for the next catchup start, not a reason to widen the incremental window to lifetime.
7. Backfill is a bounded, resumable lane
Unresolved backfill is not the incremental attach path. It has its own watermark or keyset, chunk size, and idempotent write. Hub principle 2 (watermark, not full recompute) applies — a crash must not restart the whole historical pile.
Test: kill a backfill at 40%. Does retry resume, or re-scan from record one and rewrite already-good keys?
8. One writer for the link
The attach job (or documented reconcile) is the only writer of the canonical key + confidence + evidence class. APIs, UIs, and rollups consume. A serving path that “fixes” identity at request time is a second resolver.
Test: change the attach threshold in one place. Do all consumers move on the next publish, or does one surface still re-parse text?
9. Coverage audit names identity rate
When someone asks “how much data do we have,” unresolved rate is part of the answer — row count alone lies. The data hub coverage-audit playbook includes this slice; this skill defines what “resolved” means (key present and above gate).
Test: a source with 1M rows and 85% null keys — does the audit report “1M rows” or “150k resolved”?
Workflow: attach or remap
Identity attach / remap:
- [ ] 1. Name the canonical key + what “unresolved” looks like on the row
- [ ] 2. List evidence classes in ladder order (product repo supplies the actual signals)
- [ ] 3. Assign only from the strongest available non-conflicting class
- [ ] 4. Conflict → quarantine; collision → collision state; below threshold → unresolved (not a guess)
- [ ] 5. Persist key, confidence, evidence class, policy version
- [ ] 6. Incremental path is watermarked; historical remap / restamp is a separate resumable lane
- [ ] 7. Restamp fixture: strong assignment survives a contradictory weak hint; twins are not folded on the timer
- [ ] 8. Publish unresolved-rate *and* collision-rate per source
- [ ] 9. Serving / rollups honor stored keys — no request-time re-parse
- [ ] 10. No domain thresholds committed into this packCommon mistakes
- First matching heuristic writes the key.
- Weak title/lane stamp overrides a structured identifier because it ran first.
- NULL keys treated as “not a problem until someone searches that row.”
- Restamp job that reapplies the full matcher and clears quarantines.
- Restamp / residual chase on the incremental timer (O(history), no collision state).
- Historical remap on the incremental timer (O(history), no resume).
- Folding twins in identify() so the rollup looks unique.
- API re-parses free text because “the lake key looks wrong.”
- Quoting source volume without the resolved rate.
References
- Attach / remap / backfill procedure:
references/attach-workflow.md - Trust ladder + confidence-as-gate → data-semantic-quality (
references/rule-scoping.md) - Estimate vs later truth → data-product-eval
- Coverage audit (query prod, include identity rate) → data hub
- Serving consumes stored keys → data-api
- Incremental vs rebuild lanes → data hub principle 2
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

