Repository navigation
Closed
Labels
Description
Outcome
Polylogue should help users inspect likely neighboring or near-duplicate conversations when exact confirmation is difficult.
Examples:
- same provider, same period, similar title
- same title but different body
- nearby conversation around a known hit
- conversations that are semantically similar enough to be plausible candidates
Problem or opportunity
The archive currently has strong canonical identity and archival dedupe primitives, but weaker user-facing support for "show me the other likely candidates around this one".
That matters in exactly the cases where title/date/message-count summaries are not enough to confirm identity. Similar vault-analysis or verification chats can cluster closely in time and topic, leaving the user with several plausible hits and little help exploring the local neighborhood.
Expected scope
- retrieval/query planning under
polylogue/lib/ - storage/query helpers for nearby/similar candidate selection
- CLI and MCP surfaces for neighboring/duplicate-like exploration
- tests for similarity/neighborhood candidate behavior
Constraints and invariants
- Do not conflate neighboring conversations with archival dedupe or automatic merge candidates.
- Preserve exact-id retrieval as the primary canonical lookup path.
- Any duplicate-like classification should explain its basis clearly enough for users to judge it.
Acceptance criteria
- Polylogue exposes a way to retrieve nearby or near-duplicate candidate conversations for a known conversation or fuzzy query.
- Candidate results explain why they are being suggested, such as same title, nearby time window, shared attachment identity, or content similarity.
- CLI and/or MCP coverage exists for this exploration flow.
- Tests cover at least one same-title-different-body case and one nearby-similar-content case.
Verification plan
- add retrieval tests for candidate selection heuristics
- add CLI/MCP surface tests for neighboring-conversation output
- run
devtools verify
Context and evidence
Relevant code and observations:
- content-hash and duplicate-health checks already exist, but they are archival/health oriented rather than user-facing exploration
- summary-only result lists make local candidate comparison harder than it should be
Non-goals or explicitly deferred work
- Automatic duplicate deletion or merging.
- Global relevance/ranking rewrite in one step.
- Full absence diagnosis, which is tracked separately.
Activity
Sinity commentedon Apr 22, 2026
Starting #220 on
feature/feat/neighbor-candidates.Working scope:
devtools verifybefore PR.Scratch log:
.agent/scratch/220-neighbor-candidates.md.Sinity commentedon Apr 22, 2026
Implementation log for this slice:
polylogue/lib/neighbor_candidates.pywith typed requests, ranked candidates, and evidence reasons.same_title,nearby_time,shared_attachment_identity,content_search,query_match, andcontent_similarity.polylogue neighbors, the MCP toolneighbor_candidates, shared CLI/MCP payloads, generated help, and proof catalog surfaces.Verification run locally:
devtools verifyfinished withverify: all checks passed.test: add neighbor command showcase baseline
Sinity commentedon Apr 22, 2026
PR #364 follow-up after remote verification:
showcase-verifyfailed on the first push because adding the rootneighborscommand changed the committed tier-0 help baseline and introduced a newhelp-neighborsshowcase exercise output.devtools lab-scenario verify-baselines --update.3ac3237d(test: add neighbor command showcase baseline) with onlytests/baselines/showcase/help-main.txtandtests/baselines/showcase/help-neighbors.txt.devtools verify-showcase-> all baselines match.pytest -q --ignore=tests/integration->5108 passed in 173.83s.devtools verify --quick->verify: all checks passed.Remaining action: wait for the refreshed PR checks to settle enough to confirm there are no real failures, then squash-merge #364.
feat: add neighbor candidate discovery (#364)
feat: add neighbor candidate discovery (#364)