Localize executive-brief lead in news HTML + sharpen brief headline tradecraft#2834
Draft
Copilot wants to merge 2 commits into
Draft
Localize executive-brief lead in news HTML + sharpen brief headline tradecraft#2834Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pethers
May 29, 2026 23:26
View session
Contributor
🏷️ Automatic Labeling SummaryThis PR has been automatically labeled based on the files changed and PR metadata. Applied Labels: documentation,testing,refactor,size-l Label Categories
For more information, see |
Contributor
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Non-English news pages opened with the English executive brief even when a localized
executive-brief_<lang>.mdexisted, and every page embedded all 13 localized briefs inline as## Executive Brief Sv/De/…carrier sections (a representative proposition page was ~428 KB). The localized brief was only feeding the SEO<title>/<meta description>cascade — never the on-page body lead.This brings the on-page lead into lock-step with that SEO cascade (localized if it exists, English otherwise) and strips the inline carrier bloat.
Changes
scripts/render-lib/article-brief-lead.ts— pure (no-I/O) markdown transform applied byrenderArticleHtmlper language:stripEmbeddedLocalizedBriefSections()removes every## Executive Brief <Lang>carrier for all languages.<h2>lead-section body (## What Happened) is swapped to the cleanedexecutive-brief_<lang>.md— reusing the aggregator'scleanArtifactBody+rewriteRelativeLinkspipeline, deliberately skippingnormalizeNarrativeTerminologyso English first-use glosses never leak into localized prose. Lead heading stays the language-stable English## What Happened(TOC localizes its label separately); provenance comment repoints toexecutive-brief_<lang>.md.scripts/render-lib/article.tsrenderArticleHtml.resolveArtifactList(render-articles.ts) andisReaderGuideEligible(aggregator/reader-guide.ts) now skipexecutive-brief_<lang>.md, so they no longer surface as Reader Intelligence Guide rows (which would dangle once the body carriers are stripped), Article Sources cards, or JSON-LDisBasedOn. They are translations ofexecutive-brief.md, not independent analytical artifacts.analysis/methodologies/ai-driven-analysis-guide.md— added a 🪝 Headline-tradecraft block (named actor + active verb + concrete stake, SERP-safe ≤70 chars, no date-stuffing, localize the angle not the words) and made Step 2B / Step 7 explicit that the brief H1/BLUF is now the on-page lead in every language, not just metadata.Article-Generation.md— documents the on-page lead localization step alongside the existing metadata cascade.tests/article-brief-lead.test.ts— 12 cases: carrier strip across all langs incl. EN, localized swap, EN passthrough, missing/empty fallback, provenance repoint, front-matter/H1 cleaning +##→###demotion, legacy## Executive BriefH2, single-H2 lead.Analysis findings (requested)
article.mdcompleteness: all 22 root analytical artifacts on disk are aggregated (each carries asource:comment) — no valuable content is missing. The sole redundancy was the 13 translation carriers, which are functionally dead weight in HTML (SEO readsexecutive-brief_<lang>.mdfrom disk, not the embedded copies) and are now stripped at render.Notes
sv/ja/ar/en(2026-05-20/propositions): localized lead present, no English leak, zero carriers, ~428 KB → ~307 KB. Sample page renders were reverted — bulk HTML regeneration lands as its own dedicated commit per repo convention, so this PR is code + tests + docs only.