Detect and resolve orphaned notes in the vault. Use during heartbeat maintenance or when vault status shows orphans...
Resolve orphaned notes in ~/.rho/vault/ -- notes that exist but have no inbound [[wikilinks]] from any other note.
Run the detection script to get the current orphan list:
TMPDIR="$PREFIX/tmp"
# All note slugs
find ~/.rho/vault -name "*.md" -not -name "_inbox.md" | while read f; do
basename "$f" .md
done | sort -u > "$TMPDIR/vault-slugs.txt"
# All wikilink targets
rg -oN '\[\[([^\]]+)\]\]' ~/.rho/vault --no-filename -r '$1' | sort -u > "$TMPDIR/vault-links.txt"
# Orphans: notes with zero inbound links
comm -23 "$TMPDIR/vault-slugs.txt" "$TMPDIR/vault-links.txt" | grep -v "^_index$"
For each orphaned note, read it with vault read and classify it:
The note has value but nobody links to it. Fix by:
_index, project notes, topic MOCs)[[slug]] wikilink from the parent to the orphan## Connections section is missing links, add those tooThe note duplicates content already in another note. Fix by:
rm ~/.rho/vault/<type>/<slug>.mdThe note is important enough to be a new section in _index.md. Fix by:
_index.md (Projects, References, Concepts, Patterns, Logs)## Connections section linking backThe note is stale, empty, or no longer relevant. Fix by:
rm ~/.rho/vault/<type>/<slug>.mdAfter processing, rerun the detection script. Orphan count should decrease. Report: how many connected, merged, promoted, deleted.
When running during heartbeat, process max 5 orphans per cycle to stay lightweight. Prioritize by:
_index.md that don't exist yet (broken links) -- create stubs2026-02-05-email-rollback): Usually operational runbooks. Connect to the relevant project note.reddit-localllama-draft, x-drafts): Connect to a drafts MOC or the project they support.BACKLOG, TODO, ENGINEERING): Often subdirectory artifacts from project imports. Usually merge into the project note or delete if redundant._index.md or the relevant MOC._index.md when promotingvault read