Skip to content

benjsmith/curiosity-merge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

curiosity-merge

Sharing/federation layer for curiosity-engine wikis.

Five verbs:

  • subgraph-export — extract a self-contained mini-wiki (project, page neighborhood, or origin) for sharing. Defaults to bytes-free vault export (--include-vault=none); receivers re-hydrate with their own access. See docs/licensing.md.
  • discover-bridges + accept-bridges — surface high-similarity page pairs that aren't yet wikilinked; apply user-checked candidates and update merge manifests so unmerge can unwind.
  • merge — combine someone else's wiki into your own with full provenance, collision handling, untrusted-content framing, and vault_missing: true tagging for sources whose bytes weren't shipped.
  • unmerge — surgically undo a previous merge using the manifest + receiving wiki state. Three-bucket classification preserves user curation.
  • hydrate-vault — re-acquire missing sources tagged vault_missing: true. AlphaXiv-preferred for arXiv; per-category dispatch for preprints, open access, paywalled (manual), unknown.

This is a separate skill (not part of curiosity-engine) because it ingests external data and has a different trust model and release cadence. Most curiosity-engine users don't need it; install when you want to share or absorb wikis.

Install

Requires curiosity-engine to be installed in the same workspace.

npx skills add -g -y benjsmith/curiosity-merge
bash <skill_path>/scripts/setup.sh

setup.sh checks for curiosity-engine and refuses to proceed without it.

Usage

See SKILL.md for the full reference. Quick examples:

# Share a project as a self-contained mini-wiki
uv run python3 <skill_path>/scripts/subgraph_export.py \
    --project ai-safety --to /tmp/ai-safety-wiki

# Find unwritten cross-page links in your wiki
uv run python3 <skill_path>/scripts/discover_bridges.py --limit 50

# Absorb someone else's wiki
git clone https://github.com/someone/their-wiki /tmp/their-wiki
uv run python3 <skill_path>/scripts/merge.py /tmp/their-wiki --as-origin someone
# review .curator/merge-<timestamp>.md, then approve the staged swap

# Rejoin a U4 shard on its seam IRIs (identity-keyed, not slug-keyed)
uv run python3 <skill_path>/scripts/merge.py \
    --import-shard /tmp/shard-export.json /tmp/shard-wiki --as-origin shard1

Merge reconciles entities by stable IRI (curiosity-engine U1) when pages carry one — same-IRI or overlapping-same_as pages collapse into one canonical page regardless of slug. Wikis with no minted IRIs merge by filename stem exactly as before.

Publishing a sub-wiki

After subgraph-export:

  1. cd <export-path> && git init && git add . && git commit -m "Initial export"
  2. Create a public GitHub repo and push
  3. Settings → Topics → add curiosity-wiki so others can discover it via github.com/topics/curiosity-wiki

See docs/publishing.md for the full recipe.

Layout

curiosity-merge/
├── SKILL.md                     # canonical reference
├── README.md                    # this file
├── PLAN.md                      # implementation plan
├── CHANGELOG.md
├── docs/
│   ├── architecture.md
│   ├── trust-model.md
│   ├── licensing.md
│   └── publishing.md
├── scripts/
│   ├── setup.sh
│   ├── subgraph_export.py
│   ├── discover_bridges.py
│   ├── accept_bridges.py
│   ├── merge.py
│   ├── unmerge.py
│   ├── hydrate_vault.py
│   ├── reconcile.py            # vault sha256 + page-stem collision (stem fallback)
│   ├── identity.py            # IRI-keyed entity reconciliation (U1) + shard seam joins (U4)
│   ├── preflight.py            # detectors (chain-merge, quote-density, license, GPL, regex PII)
│   ├── presidio_gate.py        # optional Presidio NER+ML PII detector (v0.3.0)
│   └── merge_evolve_guard.sh   # hash-guard (named distinctly from curiosity-engine's)
└── template/
    └── prompts.md

License

MIT — see LICENSE.

About

Allows merging/unmerging of curiosity-wikis. Combine someone else's curiosity-engine knowledge base with your own.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors