e0ipso / e0ipso/kenkeep

feat(prompts): "one canonical home" dedup guardrail in curate-dedup

Open Beginner friendly
#94 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
26
Forks
2
PR merge metrics
No merged PRs in 30d

Description

## Motivation (learned from OpenWiki)

OpenWiki's prompt (`src/agent/prompt.ts`, documentation goals): "Avoid repeating the same concept across pages; **give each concept one canonical home** and link to it from other pages when needed." Its update mode adds: "If the same detail appears in multiple pages, keep the detailed explanation in the canonical page and make other mentions brief or link-only."

kenkeep already has a deterministic `curate-dedup` primitive, but the *prompt-side* bias when the curator faces an overlapping candidate is not explicit: nothing steers it toward "merge into the existing node + add `kk_relates_to` edges" over "create a near-duplicate sibling."

## Proposal

Make the canonical-home rule explicit in the kk-curate skill / curator prompt at the dedup step:

- When a candidate substantially overlaps an existing node, prefer **updating the existing node** (canonical home) and expressing the relationship via edges, over creating a new node.
- When two existing nodes are discovered to overlap during a run, propose a merge (one survives, the other's unique facts fold in; ids/edges preserved via the usual redirect-resolved mechanics) rather than leaving both.

Prompt `Version:` bump + changelog note per convention.

## Constitution check

Prompt-only; merges still land as ordinary reviewable diffs; deterministic dedup primitive unchanged. ✅

*Spawned from a comparative review of langchain-ai/openwiki.*

Contributor guide

Open the contributing guide

Research direction

Start in src/agent/prompt.ts and locate the kk-curate skill or curator prompt and its Version field. Follow the existing prompt and changelog conventions, then confirm the dedup guidance covers canonical-home updates, relationship edges, and proposing merges for overlapping nodes. Done means the prompt text, version, and changelog note reflect the proposal without changing the deterministic dedup primitive.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
ai
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.