Shared editorial-artefact discovery helpers: candidate-list
walker, file-existence guards, lede + H1 helper composition. Extracted
from artifact-highlight.ts to keep individual file sizes under 400 LOC.
Exported surface: EDITORIAL_ARTEFACT_CANDIDATES (ordered candidate list),
readArtefactBody (SPDX-aware file reader), safeReaddir (fault-tolerant
directory listing), and scanCandidatesForHighlight (composed walker).
Internal helper probeCandidateForHighlight is not exported so that
editorial-highlight.ts can call the walker without depending on the
lower-level per-file probe logic.
Description
Shared editorial-artefact discovery helpers: candidate-list walker, file-existence guards, lede + H1 helper composition. Extracted from
artifact-highlight.tsto keep individual file sizes under 400 LOC.Exported surface:
EDITORIAL_ARTEFACT_CANDIDATES(ordered candidate list),readArtefactBody(SPDX-aware file reader),safeReaddir(fault-tolerant directory listing), andscanCandidatesForHighlight(composed walker). Internal helperprobeCandidateForHighlightis not exported so thateditorial-highlight.tscan call the walker without depending on the lower-level per-file probe logic.