replace BLUF headings with journalistic lede wording
rename decision-support heading to plain-language wording
explain confidence code notation at first mention
contextualize the first HDxxxxx token as a Riksdag document id
Language scope. Every rewrite below injects English copy (Lede, Decisions and confidence context, โฆ confidence, corroborated by multiple sources, Riksdag document #โฆ). Source analysis artifacts are authored in English and only English bodies flow through the aggregator, so the rewrites are gated to lang === 'en'. For any other language the body is returned untouched to avoid injecting English strings into otherwise localized prose (e.g. a translated executive-brief_<lang>.md).
First-use scope.confidenceExplained / firstDocContextualized live on the caller-supplied NarrativeNormalizationState so the first-use annotations fire once per article, not once per artifact body.
Document-id scope. Only the HD prefix is contextualized because it is the sole bare Riksdag document-identifier token used in these artifacts (matching BILL_ID_RE in seo/brief-extractor.ts, e.g. HD03271). Other Riksdag references โ propositions, motions, interpellations, written questions, committee reports, public inquiries (prop. 2025/26:267, MOT 2023/24:1234, IP 2023/24:567) โ appear as session-scoped YYYY/NN:NNN references whose trailing number is not a global document id, so framing them as Riksdag document #โฆ would be incorrect.
Apply reader-facing narrative terminology normalization:
HDxxxxxtoken as a Riksdag document idLanguage scope. Every rewrite below injects English copy (
Lede,Decisions and confidence context,โฆ confidence, corroborated by multiple sources,Riksdag document #โฆ). Source analysis artifacts are authored in English and only English bodies flow through the aggregator, so the rewrites are gated tolang === 'en'. For any other language the body is returned untouched to avoid injecting English strings into otherwise localized prose (e.g. a translatedexecutive-brief_<lang>.md).First-use scope.
confidenceExplained/firstDocContextualizedlive on the caller-supplied NarrativeNormalizationState so the first-use annotations fire once per article, not once per artifact body.Document-id scope. Only the
HDprefix is contextualized because it is the sole bare Riksdag document-identifier token used in these artifacts (matchingBILL_ID_REinseo/brief-extractor.ts, e.g.HD03271). Other Riksdag references โ propositions, motions, interpellations, written questions, committee reports, public inquiries (prop. 2025/26:267,MOT 2023/24:1234,IP 2023/24:567) โ appear as session-scopedYYYY/NN:NNNreferences whose trailing number is not a global document id, so framing them asRiksdag document #โฆwould be incorrect.