Connect Stage
Find related notes via semantic search (qmd) and weave forward/backward links.
See references/pipeline.md for stage definitions and status flow.
See references/connecting.md for the connection discovery algorithm.
Input
A routed note with status: routed.
Process
-
Check qmd availability:
which qmdIf not available, log "Skipped connections: qmd not available", set
status: connected, and return. -
Extract query terms from the note's title and body
-
Run semantic search:
qmd query "{terms}" -c {collection} -n 15 --json -
Filter and rank per
references/connecting.md:- Remove self
- Remove already-linked notes
- Remove daily notes
- Remove low-relevance results (below 30%)
-
If candidates found, present to human (when called by orchestrator):
- Show candidates with scores and snippets
- Let user multi-select which to connect
-
For selected connections:
- Add
## Relatedsection to the note with wiki-links - Offer backlink weaving for notes that have See Also/Related/TK sections
- Add
-
Update status to
connected
Output
- Note with
## Relatedsection added (if connections found) status: connected
Constraints
- Graceful skip if qmd unavailable (always log that it was skipped)
- The note being processed won't be in qmd's index yet. Search FROM its content, not for it.
- Don't add connections the user didn't approve
- Backlink weaving is optional (offer, don't force)