Skip to content
This repository was archived by the owner on Jul 15, 2026. It is now read-only.

ADR-0022 + contact-merge spec: contact merging & address-book abstraction - #22

Merged
joestump-agent merged 2 commits into
mainfrom
feature/13-adr-contact-merging
Jul 11, 2026
Merged

ADR-0022 + contact-merge spec: contact merging & address-book abstraction#22
joestump-agent merged 2 commits into
mainfrom
feature/13-adr-contact-merging

Conversation

@joestump-agent

Copy link
Copy Markdown
Owner

Part of #8. Closes #13.

Documentation only — no Go code.

What

  • docs/adr/0022-contact-merging-and-address-book-abstraction.md (MADR format, consistent with ADRs 0001–0021). Documents the ContactResolver / address-book abstraction and its Set… injection seam (mirroring SetDetector/SetEnabler/SetPairingSource), the platform split (macOS Contacts provider behind a build tag vs Linux no-op, following the devicesync build-tag precedent from Providers redesign, LLM API-key field, and gate device sync out of the binary #20), the identifier-matching + manual merge/split model, and how overrides persist across re-ingest on contacts/contact_identifiers.
  • docs/openspec/specs/contact-merge/spec.md + design.md (paired SDD artifacts, modeled on contact-facts).
  • Cross-links ADR ↔ spec ↔ epic Epic: Cross-provider contact merging & de-duplication (with settings) #8, references ADR-0011 as prior art.

Cross-review reconciliation

The resolver contract in this ADR was written in parallel with the #9 implementation (the two teams couldn't see each other). Cross-review caught the drift and the fix stage reconciled both to the same tri-state Availability enum (Available / NeedsPermission / Absent) with Availability(ctx), Resolve(ctx, id), and People(ctx) — so the ADR now matches the interface that ships in #9.

🤖 Generated with Claude Code


Generated by Claude Code

claude added 2 commits July 11, 2026 08:35
…tion

Add ADR-0022 (MADR) deciding the ContactResolver seam (mirroring the
SetDetector/SetEnabler/SetPairingSource injection contract), the platform
split (macOS Contacts provider behind a darwin+macontacts build tag with a
no-op default, per the devicesync gating precedent from #20), the
suggest-by-default matching posture (ADR-0003's manual-confirmation rule),
and identifier-keyed merge/split persistence (contact_links +
contact_merge_rules, migration v11) that survives re-ingest via an
idempotent reconcile pass -- the same stable-identity keying embeddings,
facts, and reactions use against rowid churn.

Add the paired SPEC-0015 (spec.md REQ-0015-001..010 with scenarios, plus
design.md rationale/schema/testing) under docs/openspec/specs/contact-merge/,
cross-linked to ADR-0022, epic #8, and children #9-#12, with ADR-0011 as
prior art. Bump ARCHITECTURE.md's ADR range to 0022.

Part of #8; closes #13.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- ARCHITECTURE.md: list ADR-0022 in the curated ADR bullets (consistency
  with 0020/0021).
- SPEC-0015 spec.md: pin the resolver's Go identifier as contacts.Resolver
  (wired via SetContactResolver) to remove a downstream contract-mismatch
  hazard between #9/#11/#12.
- ADR-0022 / spec.md / design.md: restate the deterministic merge-winner
  rule as an explicit ordered rule (user-meaningful display_name wins;
  both/neither user-meaningful falls through to lower id).
- ADR-0022 / design.md: drop the misleading /contacts/{id} URL example
  (no contact-by-id route exists; routes are /c/{id}), reframe as a
  hypothetical future reference.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@joestump-agent
joestump-agent merged commit a173d70 into main Jul 11, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ADR: contact-merging architecture & platform abstraction

2 participants