TCHG-0007 Evidence-Aware Crosslinking

Established a deterministic crosslink/navigation layer derived from structured relationships, so navigation stops being hand-maintained.

  • Added scripts/crosslinks.py: a derived-navigation layer that consumes the same structured sources the site already publishes — frontmatter semantic relations (Boris relations:), the cultivar identity claim registry (metadata/cultivar-claims.jsonl), and durable COA records (metadata/coa-records.jsonl) — and emits labeled, bounded, deterministic navigation. It does not replace the Boris graph engine; it only adds presentation edges on top of validated data.
  • Every generated link carries one of five edge classes (direct, source, measurement, identity_claim, derived) plus an evidence trace, so a derived link can never masquerade as a primary factual assertion. Cultivar → compound links render as “Observed in associated reports” with the supporting report IDs, never as “this cultivar contains this compound”.
  • Reverse navigation is generated automatically (a report → laboratory edge becomes a “Reports issued” section on the laboratory page), so the bidirectional-pair convention no longer needs duplicate manual edges.
  • Rendering is bounded: sections cap at 8 items with the honest full count, pages cap at 48 generated links, and counts are reproducible from graph data. 313 entity pages now carry derived navigation on the live build.
  • Added scripts/validate_crosslinks.py (checks CXL-01 through CXL-10: broken generated links, nonexistent IDs, wrong relation types, duplicate edges/navigation, unbounded expansion, and derived-as-direct), wired into bin/validate_graph.sh and scripts/ted-build.sh, with 28 unit tests including the Definition-of-Done scenario: one new lab report (cultivar claim + laboratory + batch + THCA + Δ9-THC + β-myrcene + limonene) automatically improves navigation from the report, batch, product, laboratory, cultivar, and all four compounds without editing nine pages.
  • Added the first neutral-cannabinoid record, cannabinoids/TCBN-0009 (Δ9-THC), closing the gap the COA model documented; the durable COA intake file metadata/coa-records.jsonl is the single place a new report lands.

Architecture: docs/crosslinking-architecture.md. Results: reports/crosslinking-implementation.md.