EU Parliament Monitor — API Documentation - v0.8.55
    Preparing search index...

    Module Aggregator/LeadExtractor

    Pure helper that extracts the strongest lead sentence from an Executive Brief artifact.

    The aggregator's Executive Brief section is rendered first; this module is consumed by buildArticleMeta (and by metadata fall-backs) to surface a single concise lead — the journalistic "nut graf" — that sharpens both the SEO description and the structured data emitted next to article.md.

    The rules are deterministic:

    1. Prefer the first non-empty paragraph under a ## BLUF / ## Bottom Line Up Front heading in executive-brief.md (or extended/executive-brief.md).
    2. Fall back to the first non-empty paragraph under ## Top Findings / ## Key Judgments in intelligence/synthesis-summary.md.
    3. Fall back to the first non-empty paragraph in any of the canonical sources.
    4. Return the first sentence (split on . / ! / ? ), capped at MAX_LEAD_CHARS characters with a trailing ellipsis.

    Functions

    extractLeadParagraph
    trimToLeadSentence
    extractExecutiveLead

    Variables

    MAX_LEAD_CHARS