Initial Commit
This commit is contained in:
36
openspec/archive/2026-04-19-enterprise-dedup/proposal.md
Normal file
36
openspec/archive/2026-04-19-enterprise-dedup/proposal.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# OpenSpec Change: enterprise-dedup
|
||||
|
||||
- **Change ID**: enterprise-dedup
|
||||
- **Package**: `@suaveplan/dedup`
|
||||
- **Category**: universal
|
||||
- **Target path**: `universal/data/dedup`
|
||||
- **Status**: PROPOSED
|
||||
- **Date**: 2026-04-19
|
||||
- **Reference spec**: `/mnt/s/web/suaveplan/enterprise/dedup.md`
|
||||
|
||||
## Summary
|
||||
Greenfield rebuild of `@suaveplan/dedup` — an entity deduplication engine with pluggable match keys, scoring rules, and merge strategies (latest-wins, manual, scored-merge). Computes similarity via Jaro-Winkler and Levenshtein.
|
||||
|
||||
## Current-state audit (genesis)
|
||||
Package does not exist yet — fresh build.
|
||||
|
||||
## Dependencies
|
||||
- Workspace: none (leaf)
|
||||
- External (via catalog): `zod`, `tslib`, `@opentelemetry/api`
|
||||
- Dev (via catalog): `vitest`, `@vitest/coverage-istanbul`, `fast-check`, `mitata`
|
||||
|
||||
## Preserved public surface
|
||||
- `DedupEngine` — `detect(entities, config)`, `merge(group, strategy)`.
|
||||
- Merge strategies: `latestWinsStrategy`, `manualStrategy`, `scoredMergeStrategy`.
|
||||
- Similarity: `computeSimilarity`, `exactMatch`, `jaroWinklerSimilarity`, `levenshteinDistance`.
|
||||
- Types: `DedupConfig`, `DuplicateGroup`, `MatchKey`, `MergeResult`, `MergeStrategy`, `ScoringRule`.
|
||||
|
||||
## New genesis additions
|
||||
- Codes: `DEDUP.INVALID_CONFIG`, `DEDUP.STRATEGY_ERROR`.
|
||||
- Zod schemas for `DedupConfig`, `ScoringRule`, `MatchKey`.
|
||||
- OTel counter `dedup.groups.total`, histogram `dedup.detect.duration_ms`.
|
||||
- Property tests: grouping is reflexive (`detect([x]).length === 0 duplicates`), symmetric, and scoring-rule weights in `[0, 1]`.
|
||||
|
||||
## Impact
|
||||
- Adds one new package: `universal/data/dedup`
|
||||
- Adds one new spec capability: `dedup`
|
||||
Reference in New Issue
Block a user