Companion to article-metadata.ts. Where that module's
extractArtifactHighlight is intentionally language-agnostic (the first
canonical editorial artefact wins, regardless of locale), this module
answers the per-language question:
"Given a run directory and a target language <lang>, is there a
sibling executive-brief_<lang>.md (or extended/โฆ variant) that
the article-metadata resolver should prefer over the English brief?"
translated extended/executive-brief_<lang>.md (also this module)
English executive-brief.md โ article-metadata.ts already
handles this via the canonical candidate list
The module is intentionally small and side-effect-free; it composes
the existing low-level helpers (extractFirstH1,
extractLedeAfterHeading, extractStrongProseLine, isGenericHeading,
stripArtifactCategoryAffix, truncateTitle) so the parsing rules
stay identical across the English and localized paths.
Description
Language-aware editorial brief lookup.
Companion to
article-metadata.ts. Where that module'sextractArtifactHighlightis intentionally language-agnostic (the first canonical editorial artefact wins, regardless of locale), this module answers the per-language question:"Given a run directory and a target language
<lang>, is there a siblingexecutive-brief_<lang>.md(orextended/โฆvariant) that the article-metadata resolver should prefer over the English brief?"The answer drives the localized-brief precedence rule documented in
.github/prompts/04-article-generation.mdยง 6.2:executive-brief_<lang>.md(this module's job)extended/executive-brief_<lang>.md(also this module)executive-brief.mdโarticle-metadata.tsalready handles this via the canonical candidate listThe module is intentionally small and side-effect-free; it composes the existing low-level helpers (
extractFirstH1,extractLedeAfterHeading,extractStrongProseLine,isGenericHeading,stripArtifactCategoryAffix,truncateTitle) so the parsing rules stay identical across the English and localized paths.