knowledge_merge
Consolidates multiple knowledge pages into one canonical page, reparenting citations and deduplicating claims. Supports optional body appending and hard deletion of superseded pages.
Instructions
Consolidate 2+ knowledge pages into one canonical page. Re-parents all citations from source pages to the target, deduplicating by (claim, source_kind, source_locator, excerpt). Takes MAX(verified_at) across all pages. Losers are superseded: archived with a tombstone and a supersessions pointer to the target. Loser bodies are returned in the result for curator review; set append_loser_bodies=true to concatenate them. Use knowledge_write first if the target body needs updating before merging. Distinct from knowledge_supersede (1:1 pointer, no citation consolidation) — use merge when consolidating data from multiple pages into one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Optional note about this merge, stored in supersession tombstones on the losers | |
| target_slug | Yes | Slug of the canonical target page that survives the merge (must already exist) | |
| source_slugs | Yes | Slugs of the pages to merge into the target (all must exist) | |
| hard_delete_losers | No | Hard-delete losers after archiving them. Losers are archived (supersession pointer written) then DELETEd from the database, cascading their citations. | |
| append_loser_bodies | No | Append loser page bodies to the target body under section markers (default false). Off by default — curator normally hand-merges body content. |