Skip to main content

Module links

Module links 

Source
Expand description

Cross-reference auto-sync: keep every doc’s references map bidirectional and title-fresh, and rewrite bare FEAT-XXXX/WI-XXXX mentions in body prose into readable markdown links. Run by sync after every mutating command.

Functions§

build_index
Map of every present doc’s ID to (title, file path), for linkifying bodies.
linkify
Rewrite bare FEAT-XXXX/WI-XXXX mentions (and refresh existing opys links) in body prose into [ID — Title](relpath). Idempotent; references inside fenced code blocks, inline code spans, or existing markdown link syntax (label or destination) are left untouched, and a mention whose target is absent from index is left as-is.
nested_links
Scan a body for nested markdown links — a complete […](…) inside another link’s label. That is invalid markdown and, in an opys inventory, the footprint of linkify corruption; verify flags each occurrence. Fenced code blocks and inline code spans are skipped, like in linkify. Returns one truncated snippet per offending link.
reconcile
Reconcile every doc’s references map: make links bidirectional between present docs and refresh each value to the referenced doc’s current title. A reference whose target is absent (a closed work item’s struck tombstone, or a dangling id) keeps its existing value untouched.
reconcile_blockers
Reconcile the directional blocker relation: blocked_by on one doc and blocks on the other are kept as inverses, with titles refreshed from the referenced doc. An edge is asserted if either endpoint records it (union semantics, like reconcile); removal is therefore done on both sides by the unblock command. Edges whose other endpoint is absent (a struck tombstone or a dangling id) keep their existing value untouched.
ref_re
Build the bare-ID matcher whose prefix alternation comes from the live configured type prefixes, so new types are linkified automatically.