Skip to main content

Module apply_links

Module apply_links 

Source
Expand description

Safe Markdown link application: pending normalize (Phase 0) + AC discover (Phase 1).

§Design

  • Closed world: only rewrite toward nodes that already exist in the brain.
  • Unique or skip: ambiguous resolutions never mutate files.
  • Atomic writes: temp file + rename per path; plan-then-apply with offset-safe edits.
  • Tiers: auto may write; suggest is dry-run / report only unless opted in later.
  • No invention: never create stub notes or free-form prose.

Phase 0 closes the pending_links ledger when targets now resolve uniquely. Phase 1 (discover) compiles a [LinkLexicon] and scans note bodies with Aho–Corasick for unmarked entity mentions.

Structs§

ApplyEdit
One planned or applied edit (or skip record).
ApplyOptions
Options for apply_links.
ApplyReport
Aggregate report from apply_links.

Enums§

ApplyKind
Kind of planned change.
ApplyStyle
How discover mentions are materialised in Markdown.
ApplyTier
Confidence / disposition of a planned edit.

Functions§

apply_links
Plan (and optionally apply) link normalizations and discoveries.