EU Parliament Monitor โ€” API Documentation - v0.9.13
    Preparing search index...

    Module Aggregator/EditorialBriefResolver

    Language-aware editorial brief lookup.

    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?"

    The answer drives the localized-brief precedence rule documented in .github/prompts/04-article-generation.md ยง 6.2:

    1. translated executive-brief_<lang>.md (this module's job)
    2. translated extended/executive-brief_<lang>.md (also this module)
    3. 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.

    Functions

    localizedBriefCandidates
    resolveLocalizedBriefHighlight
    discoverLocalizedBriefs

    Interfaces

    LocalizedBriefHighlight