euparliamentmonitor 0.8.39 → 0.8.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/package.json +3 -3
  2. package/scripts/constants/language-ui.d.ts +24 -0
  3. package/scripts/constants/language-ui.js +205 -0
  4. package/scripts/constants/languages.d.ts +1 -1
  5. package/scripts/constants/languages.js +1 -1
  6. package/scripts/generators/builders/breaking-builders.d.ts +6 -2
  7. package/scripts/generators/builders/breaking-builders.js +8 -4
  8. package/scripts/generators/builders/committee-builders.d.ts +4 -1
  9. package/scripts/generators/builders/committee-builders.js +6 -3
  10. package/scripts/generators/builders/propositions-builders.d.ts +5 -2
  11. package/scripts/generators/builders/propositions-builders.js +8 -5
  12. package/scripts/generators/builders/prospective-builders.d.ts +5 -2
  13. package/scripts/generators/builders/prospective-builders.js +7 -4
  14. package/scripts/generators/builders/shared-builders.d.ts +53 -5
  15. package/scripts/generators/builders/shared-builders.js +59 -4
  16. package/scripts/generators/builders/voting-builders.d.ts +14 -2
  17. package/scripts/generators/builders/voting-builders.js +17 -5
  18. package/scripts/generators/dashboard-content.js +1 -0
  19. package/scripts/generators/news-indexes.js +6 -99
  20. package/scripts/generators/strategies/article-strategy.js +20 -1
  21. package/scripts/templates/article-template.js +17 -72
  22. package/scripts/templates/section-builders.d.ts +27 -0
  23. package/scripts/templates/section-builders.js +90 -1
  24. package/scripts/utils/intelligence-analysis.js +32 -25
  25. package/scripts/utils/migrate-legacy-articles.js +225 -0
  26. package/scripts/utils/validate-analysis-completeness.d.ts +79 -1
  27. package/scripts/utils/validate-analysis-completeness.js +231 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "euparliamentmonitor",
3
- "version": "0.8.39",
3
+ "version": "0.8.40",
4
4
  "type": "module",
5
5
  "description": "European Parliament Intelligence Platform - Monitor political activity with systematic transparency",
6
6
  "main": "scripts/index.js",
@@ -142,8 +142,8 @@
142
142
  "@types/d3": "7.4.3",
143
143
  "@types/node": "25.6.0",
144
144
  "@types/papaparse": "5.5.2",
145
- "@typescript-eslint/eslint-plugin": "8.58.2",
146
- "@typescript-eslint/parser": "8.58.2",
145
+ "@typescript-eslint/eslint-plugin": "8.59.0",
146
+ "@typescript-eslint/parser": "8.59.0",
147
147
  "@vitest/coverage-v8": "4.1.4",
148
148
  "@vitest/ui": "4.1.4",
149
149
  "chart.js": "4.5.1",
@@ -167,4 +167,28 @@ export declare const SYNTHESIS_SUMMARY_LABELS: LanguageMap;
167
167
  export declare const DOCUMENT_ANALYSIS_LABELS: LanguageMap;
168
168
  /** Localized "Significance Scoring" labels */
169
169
  export declare const SIGNIFICANCE_SCORING_LABELS: LanguageMap;
170
+ /** Localized "Home" link label used in footer Quick Links section */
171
+ export declare const FOOTER_HOME_LABELS: LanguageMap;
172
+ /** Localized "Sitemap" link label used in footer Quick Links section */
173
+ export declare const FOOTER_SITEMAP_LABELS: LanguageMap;
174
+ /** Localized "RSS Feed" link label used in footer Quick Links section */
175
+ export declare const FOOTER_RSS_LABELS: LanguageMap;
176
+ /** Localized "GitHub Repository" link label used in footer Quick Links section */
177
+ export declare const FOOTER_GITHUB_REPO_LABELS: LanguageMap;
178
+ /** Localized "Apache-2.0 License" link label used in footer Quick Links section */
179
+ export declare const FOOTER_LICENSE_LABELS: LanguageMap;
180
+ /** Localized "European Parliament" link label used in footer Quick Links section */
181
+ export declare const FOOTER_EUROPARL_LABELS: LanguageMap;
182
+ /** Localized "LinkedIn" link label used in footer Built by section */
183
+ export declare const FOOTER_LINKEDIN_LABELS: LanguageMap;
184
+ /** Localized "Security & Privacy Policy" link label used in footer Built by section */
185
+ export declare const FOOTER_SECURITY_POLICY_LABELS: LanguageMap;
186
+ /** Localized "Contact" link label used in footer Built by section */
187
+ export declare const FOOTER_CONTACT_LABELS: LanguageMap;
188
+ /** Localized platform disclaimer sentence used in the footer-bottom bar */
189
+ export declare const FOOTER_DISCLAIMER_LABELS: LanguageMap;
190
+ /** Localized "report any issues on GitHub" link text used in the footer disclaimer */
191
+ export declare const FOOTER_REPORT_ISSUES_LABELS: LanguageMap;
192
+ /** Localized "{count} articles available" stats text used in footer About section */
193
+ export declare const FOOTER_ARTICLES_AVAILABLE_LABELS: LanguageMap;
170
194
  //# sourceMappingURL=language-ui.d.ts.map
@@ -1644,4 +1644,209 @@ export const SIGNIFICANCE_SCORING_LABELS = {
1644
1644
  ko: '중요도 평가',
1645
1645
  zh: '重要性评分',
1646
1646
  };
1647
+ /* ─── Footer link labels ─────────────────────────────────────────── */
1648
+ /** Localized "Home" link label used in footer Quick Links section */
1649
+ export const FOOTER_HOME_LABELS = {
1650
+ en: 'Home',
1651
+ sv: 'Hem',
1652
+ da: 'Hjem',
1653
+ no: 'Hjem',
1654
+ fi: 'Etusivu',
1655
+ de: 'Startseite',
1656
+ fr: 'Accueil',
1657
+ es: 'Inicio',
1658
+ nl: 'Startpagina',
1659
+ ar: 'الرئيسية',
1660
+ he: 'דף הבית',
1661
+ ja: 'ホーム',
1662
+ ko: '홈',
1663
+ zh: '主页',
1664
+ };
1665
+ /** Localized "Sitemap" link label used in footer Quick Links section */
1666
+ export const FOOTER_SITEMAP_LABELS = {
1667
+ en: 'Sitemap',
1668
+ sv: 'Webbplatskarta',
1669
+ da: 'Sitemap',
1670
+ no: 'Nettstedskart',
1671
+ fi: 'Sivukartta',
1672
+ de: 'Sitemap',
1673
+ fr: 'Plan du site',
1674
+ es: 'Mapa del sitio',
1675
+ nl: 'Sitemap',
1676
+ ar: 'خريطة الموقع',
1677
+ he: 'מפת האתר',
1678
+ ja: 'サイトマップ',
1679
+ ko: '사이트맵',
1680
+ zh: '网站地图',
1681
+ };
1682
+ /** Localized "RSS Feed" link label used in footer Quick Links section */
1683
+ export const FOOTER_RSS_LABELS = {
1684
+ en: 'RSS Feed',
1685
+ sv: 'RSS-flöde',
1686
+ da: 'RSS-feed',
1687
+ no: 'RSS-feed',
1688
+ fi: 'RSS-syöte',
1689
+ de: 'RSS-Feed',
1690
+ fr: 'Flux RSS',
1691
+ es: 'Canal RSS',
1692
+ nl: 'RSS-feed',
1693
+ ar: 'خلاصة RSS',
1694
+ he: 'עדכון RSS',
1695
+ ja: 'RSSフィード',
1696
+ ko: 'RSS 피드',
1697
+ zh: 'RSS 订阅',
1698
+ };
1699
+ /** Localized "GitHub Repository" link label used in footer Quick Links section */
1700
+ export const FOOTER_GITHUB_REPO_LABELS = {
1701
+ en: 'GitHub Repository',
1702
+ sv: 'GitHub-förvar',
1703
+ da: 'GitHub-lager',
1704
+ no: 'GitHub-lager',
1705
+ fi: 'GitHub-varasto',
1706
+ de: 'GitHub-Repository',
1707
+ fr: 'Dépôt GitHub',
1708
+ es: 'Repositorio GitHub',
1709
+ nl: 'GitHub-repository',
1710
+ ar: 'مستودع GitHub',
1711
+ he: 'מאגר GitHub',
1712
+ ja: 'GitHubリポジトリ',
1713
+ ko: 'GitHub 저장소',
1714
+ zh: 'GitHub 仓库',
1715
+ };
1716
+ /** Localized "Apache-2.0 License" link label used in footer Quick Links section */
1717
+ export const FOOTER_LICENSE_LABELS = {
1718
+ en: 'Apache-2.0 License',
1719
+ sv: 'Apache-2.0-licens',
1720
+ da: 'Apache-2.0-licens',
1721
+ no: 'Apache-2.0-lisens',
1722
+ fi: 'Apache-2.0-lisenssi',
1723
+ de: 'Apache-2.0-Lizenz',
1724
+ fr: 'Licence Apache-2.0',
1725
+ es: 'Licencia Apache-2.0',
1726
+ nl: 'Apache-2.0-licentie',
1727
+ ar: 'ترخيص Apache-2.0',
1728
+ he: 'רישיון Apache-2.0',
1729
+ ja: 'Apache-2.0ライセンス',
1730
+ ko: 'Apache-2.0 라이선스',
1731
+ zh: 'Apache-2.0 许可证',
1732
+ };
1733
+ /** Localized "European Parliament" link label used in footer Quick Links section */
1734
+ export const FOOTER_EUROPARL_LABELS = {
1735
+ en: 'European Parliament',
1736
+ sv: 'Europaparlamentet',
1737
+ da: 'Europa-Parlamentet',
1738
+ no: 'Europaparlamentet',
1739
+ fi: 'Euroopan parlamentti',
1740
+ de: 'Europäisches Parlament',
1741
+ fr: 'Parlement européen',
1742
+ es: 'Parlamento Europeo',
1743
+ nl: 'Europees Parlement',
1744
+ ar: 'البرلمان الأوروبي',
1745
+ he: 'הפרלמנט האירופי',
1746
+ ja: '欧州議会',
1747
+ ko: '유럽 의회',
1748
+ zh: '欧洲议会',
1749
+ };
1750
+ /** Localized "LinkedIn" link label used in footer Built by section */
1751
+ export const FOOTER_LINKEDIN_LABELS = {
1752
+ en: 'LinkedIn',
1753
+ sv: 'LinkedIn',
1754
+ da: 'LinkedIn',
1755
+ no: 'LinkedIn',
1756
+ fi: 'LinkedIn',
1757
+ de: 'LinkedIn',
1758
+ fr: 'LinkedIn',
1759
+ es: 'LinkedIn',
1760
+ nl: 'LinkedIn',
1761
+ ar: 'لينكدإن',
1762
+ he: 'לינקדאין',
1763
+ ja: 'LinkedIn',
1764
+ ko: 'LinkedIn',
1765
+ zh: 'LinkedIn',
1766
+ };
1767
+ /** Localized "Security & Privacy Policy" link label used in footer Built by section */
1768
+ export const FOOTER_SECURITY_POLICY_LABELS = {
1769
+ en: 'Security & Privacy Policy',
1770
+ sv: 'Säkerhets- & sekretesspolicy',
1771
+ da: 'Sikkerheds- & privatlivspolitik',
1772
+ no: 'Sikkerhets- & personvernpolicy',
1773
+ fi: 'Tietoturva- & yksityisyyspolitiikka',
1774
+ de: 'Sicherheits- & Datenschutzrichtlinie',
1775
+ fr: 'Politique de sécurité & confidentialité',
1776
+ es: 'Política de seguridad & privacidad',
1777
+ nl: 'Beveiligings- & privacybeleid',
1778
+ ar: 'سياسة الأمان & الخصوصية',
1779
+ he: 'מדיניות אבטחה & פרטיות',
1780
+ ja: 'セキュリティ & プライバシーポリシー',
1781
+ ko: '보안 & 개인정보 정책',
1782
+ zh: '安全和隐私政策',
1783
+ };
1784
+ /** Localized "Contact" link label used in footer Built by section */
1785
+ export const FOOTER_CONTACT_LABELS = {
1786
+ en: 'Contact',
1787
+ sv: 'Kontakt',
1788
+ da: 'Kontakt',
1789
+ no: 'Kontakt',
1790
+ fi: 'Yhteystiedot',
1791
+ de: 'Kontakt',
1792
+ fr: 'Contact',
1793
+ es: 'Contacto',
1794
+ nl: 'Contact',
1795
+ ar: 'اتصل بنا',
1796
+ he: 'צור קשר',
1797
+ ja: 'お問い合わせ',
1798
+ ko: '문의',
1799
+ zh: '联系我们',
1800
+ };
1801
+ /** Localized platform disclaimer sentence used in the footer-bottom bar */
1802
+ export const FOOTER_DISCLAIMER_LABELS = {
1803
+ en: 'This platform is under ongoing improvement.',
1804
+ sv: 'Denna plattform förbättras löpande.',
1805
+ da: 'Denne platform forbedres løbende.',
1806
+ no: 'Denne plattformen forbedres løpende.',
1807
+ fi: 'Tätä alustaa kehitetään jatkuvasti.',
1808
+ de: 'Diese Plattform wird laufend verbessert.',
1809
+ fr: "Cette plateforme fait l'objet d'améliorations continues.",
1810
+ es: 'Esta plataforma está en mejora continua.',
1811
+ nl: 'Dit platform wordt voortdurend verbeterd.',
1812
+ ar: 'هذه المنصة في تحسين مستمر.',
1813
+ he: 'פלטפורמה זו נמצאת בשיפור מתמיד.',
1814
+ ja: 'このプラットフォームは継続的に改善されています。',
1815
+ ko: '이 플랫폼은 지속적으로 개선되고 있습니다.',
1816
+ zh: '此平台正在持续改进中。',
1817
+ };
1818
+ /** Localized "report any issues on GitHub" link text used in the footer disclaimer */
1819
+ export const FOOTER_REPORT_ISSUES_LABELS = {
1820
+ en: 'report any issues on GitHub',
1821
+ sv: 'rapportera problem på GitHub',
1822
+ da: 'rapporter problemer på GitHub',
1823
+ no: 'rapporter problemer på GitHub',
1824
+ fi: 'ilmoita ongelmista GitHubissa',
1825
+ de: 'Probleme auf GitHub melden',
1826
+ fr: 'signaler des problèmes sur GitHub',
1827
+ es: 'reportar problemas en GitHub',
1828
+ nl: 'problemen melden op GitHub',
1829
+ ar: 'الإبلاغ عن المشكلات على GitHub',
1830
+ he: 'דווח על בעיות ב-GitHub',
1831
+ ja: 'GitHubで問題を報告する',
1832
+ ko: 'GitHub에서 문제 보고',
1833
+ zh: '在GitHub上报告问题',
1834
+ };
1835
+ /** Localized "{count} articles available" stats text used in footer About section */
1836
+ export const FOOTER_ARTICLES_AVAILABLE_LABELS = {
1837
+ en: '{count} articles available',
1838
+ sv: '{count} artiklar tillgängliga',
1839
+ da: '{count} artikler tilgængelige',
1840
+ no: '{count} artikler tilgjengelige',
1841
+ fi: '{count} artikkelia saatavilla',
1842
+ de: '{count} Artikel verfügbar',
1843
+ fr: '{count} articles disponibles',
1844
+ es: '{count} artículos disponibles',
1845
+ nl: '{count} artikelen beschikbaar',
1846
+ ar: '{count} مقالة متاحة',
1847
+ he: '{count} מאמרים זמינים',
1848
+ ja: '{count}件の記事が利用可能',
1849
+ ko: '{count}개 기사 이용 가능',
1850
+ zh: '{count}篇文章可用',
1851
+ };
1647
1852
  //# sourceMappingURL=language-ui.js.map
@@ -8,7 +8,7 @@
8
8
  * - **language-articles** — Article-type title generators and body-text strings
9
9
  */
10
10
  export { ALL_LANGUAGES, LANGUAGE_PRESETS, LANGUAGE_FLAGS, LANGUAGE_NAMES, getLocalizedString, isSupportedLanguage, getTextDirection, } from './language-core.js';
11
- export { PAGE_TITLES, PAGE_DESCRIPTIONS, SECTION_HEADINGS, NO_ARTICLES_MESSAGES, SKIP_LINK_TEXTS, ARTICLE_TYPE_LABELS, READ_TIME_LABELS, BACK_TO_NEWS_LABELS, ARTICLE_NAV_LABELS, RELATED_ARTICLES_NAV_LABELS, BREADCRUMB_HOME_LABELS, BREADCRUMB_NEWS_LABELS, TIMELINE_HEADINGS, COMPARISON_BEFORE_LABELS, COMPARISON_AFTER_LABELS, KEY_FIGURES_HEADINGS, AI_SECTION_CONTENT, FILTER_LABELS, SOURCES_HEADING_LABELS, HEADER_SUBTITLE_LABELS, THEME_TOGGLE_LABELS, FOOTER_ABOUT_HEADING_LABELS, FOOTER_ABOUT_TEXT_LABELS, FOOTER_QUICK_LINKS_LABELS, FOOTER_BUILT_BY_LABELS, FOOTER_LANGUAGES_LABELS, TOC_ARIA_LABELS, RELATED_ANALYSIS_LABELS, ANALYSIS_TRANSPARENCY_LABELS, ANALYSIS_SUMMARY_LABELS, METHODOLOGY_LABELS, TRANSPARENCY_DISCLOSURE_LABELS, CLASSIFICATION_ANALYSIS_LABELS, THREAT_ASSESSMENT_LABELS, RISK_SCORING_LABELS, DEEP_ANALYSIS_LABELS, VIEW_SOURCE_LABELS, OPEN_SOURCE_NOTE_LABELS, AI_ANALYSIS_GUIDE_LABELS, SWOT_FRAMEWORK_LABELS, RISK_METHODOLOGY_LABELS, THREAT_FRAMEWORK_LABELS, CLASSIFICATION_GUIDE_LABELS, STYLE_GUIDE_LABELS, SIGNIFICANCE_CLASSIFICATION_LABELS, ACTOR_MAPPING_LABELS, FORCES_ANALYSIS_LABELS, IMPACT_MATRIX_LABELS, POLITICAL_THREAT_LANDSCAPE_LABELS, ACTOR_THREAT_PROFILING_LABELS, CONSEQUENCE_TREES_LABELS, LEGISLATIVE_DISRUPTION_LABELS, RISK_MATRIX_LABELS, QUANTITATIVE_SWOT_LABELS, POLITICAL_CAPITAL_RISK_LABELS, LEGISLATIVE_VELOCITY_RISK_LABELS, AGENT_RISK_WORKFLOW_LABELS, STAKEHOLDER_IMPACT_LABELS, COALITION_DYNAMICS_LABELS, VOTING_PATTERNS_LABELS, CROSS_SESSION_INTELLIGENCE_LABELS, SYNTHESIS_SUMMARY_LABELS, DOCUMENT_ANALYSIS_LABELS, SIGNIFICANCE_SCORING_LABELS, } from './language-ui.js';
11
+ export { PAGE_TITLES, PAGE_DESCRIPTIONS, SECTION_HEADINGS, NO_ARTICLES_MESSAGES, SKIP_LINK_TEXTS, ARTICLE_TYPE_LABELS, READ_TIME_LABELS, BACK_TO_NEWS_LABELS, ARTICLE_NAV_LABELS, RELATED_ARTICLES_NAV_LABELS, BREADCRUMB_HOME_LABELS, BREADCRUMB_NEWS_LABELS, TIMELINE_HEADINGS, COMPARISON_BEFORE_LABELS, COMPARISON_AFTER_LABELS, KEY_FIGURES_HEADINGS, AI_SECTION_CONTENT, FILTER_LABELS, SOURCES_HEADING_LABELS, HEADER_SUBTITLE_LABELS, THEME_TOGGLE_LABELS, FOOTER_ABOUT_HEADING_LABELS, FOOTER_ABOUT_TEXT_LABELS, FOOTER_QUICK_LINKS_LABELS, FOOTER_BUILT_BY_LABELS, FOOTER_LANGUAGES_LABELS, FOOTER_HOME_LABELS, FOOTER_SITEMAP_LABELS, FOOTER_RSS_LABELS, FOOTER_GITHUB_REPO_LABELS, FOOTER_LICENSE_LABELS, FOOTER_EUROPARL_LABELS, FOOTER_LINKEDIN_LABELS, FOOTER_SECURITY_POLICY_LABELS, FOOTER_CONTACT_LABELS, FOOTER_DISCLAIMER_LABELS, FOOTER_REPORT_ISSUES_LABELS, FOOTER_ARTICLES_AVAILABLE_LABELS, TOC_ARIA_LABELS, RELATED_ANALYSIS_LABELS, ANALYSIS_TRANSPARENCY_LABELS, ANALYSIS_SUMMARY_LABELS, METHODOLOGY_LABELS, TRANSPARENCY_DISCLOSURE_LABELS, CLASSIFICATION_ANALYSIS_LABELS, THREAT_ASSESSMENT_LABELS, RISK_SCORING_LABELS, DEEP_ANALYSIS_LABELS, VIEW_SOURCE_LABELS, OPEN_SOURCE_NOTE_LABELS, AI_ANALYSIS_GUIDE_LABELS, SWOT_FRAMEWORK_LABELS, RISK_METHODOLOGY_LABELS, THREAT_FRAMEWORK_LABELS, CLASSIFICATION_GUIDE_LABELS, STYLE_GUIDE_LABELS, SIGNIFICANCE_CLASSIFICATION_LABELS, ACTOR_MAPPING_LABELS, FORCES_ANALYSIS_LABELS, IMPACT_MATRIX_LABELS, POLITICAL_THREAT_LANDSCAPE_LABELS, ACTOR_THREAT_PROFILING_LABELS, CONSEQUENCE_TREES_LABELS, LEGISLATIVE_DISRUPTION_LABELS, RISK_MATRIX_LABELS, QUANTITATIVE_SWOT_LABELS, POLITICAL_CAPITAL_RISK_LABELS, LEGISLATIVE_VELOCITY_RISK_LABELS, AGENT_RISK_WORKFLOW_LABELS, STAKEHOLDER_IMPACT_LABELS, COALITION_DYNAMICS_LABELS, VOTING_PATTERNS_LABELS, CROSS_SESSION_INTELLIGENCE_LABELS, SYNTHESIS_SUMMARY_LABELS, DOCUMENT_ANALYSIS_LABELS, SIGNIFICANCE_SCORING_LABELS, } from './language-ui.js';
12
12
  export type { AISection, RelationshipLabels, RelatedAnalysisStrings } from './language-ui.js';
13
13
  export { WEEK_AHEAD_TITLES, MONTH_AHEAD_TITLES, WEEKLY_REVIEW_TITLES, MONTHLY_REVIEW_TITLES, MOTIONS_TITLES, BREAKING_NEWS_TITLES, COMMITTEE_REPORTS_TITLES, PROPOSITIONS_TITLES, PROPOSITIONS_STRINGS, EDITORIAL_STRINGS, MOTIONS_STRINGS, WEEK_AHEAD_STRINGS, WEEK_AHEAD_STAKEHOLDER_STRINGS, BREAKING_STRINGS, DEEP_ANALYSIS_STRINGS, COMMITTEE_ANALYSIS_CONTENT_STRINGS, SWOT_STRINGS, DASHBOARD_STRINGS, SWOT_BUILDER_STRINGS, DASHBOARD_BUILDER_STRINGS, LOCALIZED_KEYWORDS, MONTH_IN_REVIEW_STRINGS, ANALYSIS_QUALITY_LABELS, ANALYSIS_INSIGHTS_HEADING, } from './language-articles.js';
14
14
  //# sourceMappingURL=languages.d.ts.map
@@ -10,6 +10,6 @@
10
10
  * - **language-articles** — Article-type title generators and body-text strings
11
11
  */
12
12
  export { ALL_LANGUAGES, LANGUAGE_PRESETS, LANGUAGE_FLAGS, LANGUAGE_NAMES, getLocalizedString, isSupportedLanguage, getTextDirection, } from './language-core.js';
13
- export { PAGE_TITLES, PAGE_DESCRIPTIONS, SECTION_HEADINGS, NO_ARTICLES_MESSAGES, SKIP_LINK_TEXTS, ARTICLE_TYPE_LABELS, READ_TIME_LABELS, BACK_TO_NEWS_LABELS, ARTICLE_NAV_LABELS, RELATED_ARTICLES_NAV_LABELS, BREADCRUMB_HOME_LABELS, BREADCRUMB_NEWS_LABELS, TIMELINE_HEADINGS, COMPARISON_BEFORE_LABELS, COMPARISON_AFTER_LABELS, KEY_FIGURES_HEADINGS, AI_SECTION_CONTENT, FILTER_LABELS, SOURCES_HEADING_LABELS, HEADER_SUBTITLE_LABELS, THEME_TOGGLE_LABELS, FOOTER_ABOUT_HEADING_LABELS, FOOTER_ABOUT_TEXT_LABELS, FOOTER_QUICK_LINKS_LABELS, FOOTER_BUILT_BY_LABELS, FOOTER_LANGUAGES_LABELS, TOC_ARIA_LABELS, RELATED_ANALYSIS_LABELS, ANALYSIS_TRANSPARENCY_LABELS, ANALYSIS_SUMMARY_LABELS, METHODOLOGY_LABELS, TRANSPARENCY_DISCLOSURE_LABELS, CLASSIFICATION_ANALYSIS_LABELS, THREAT_ASSESSMENT_LABELS, RISK_SCORING_LABELS, DEEP_ANALYSIS_LABELS, VIEW_SOURCE_LABELS, OPEN_SOURCE_NOTE_LABELS, AI_ANALYSIS_GUIDE_LABELS, SWOT_FRAMEWORK_LABELS, RISK_METHODOLOGY_LABELS, THREAT_FRAMEWORK_LABELS, CLASSIFICATION_GUIDE_LABELS, STYLE_GUIDE_LABELS, SIGNIFICANCE_CLASSIFICATION_LABELS, ACTOR_MAPPING_LABELS, FORCES_ANALYSIS_LABELS, IMPACT_MATRIX_LABELS, POLITICAL_THREAT_LANDSCAPE_LABELS, ACTOR_THREAT_PROFILING_LABELS, CONSEQUENCE_TREES_LABELS, LEGISLATIVE_DISRUPTION_LABELS, RISK_MATRIX_LABELS, QUANTITATIVE_SWOT_LABELS, POLITICAL_CAPITAL_RISK_LABELS, LEGISLATIVE_VELOCITY_RISK_LABELS, AGENT_RISK_WORKFLOW_LABELS, STAKEHOLDER_IMPACT_LABELS, COALITION_DYNAMICS_LABELS, VOTING_PATTERNS_LABELS, CROSS_SESSION_INTELLIGENCE_LABELS, SYNTHESIS_SUMMARY_LABELS, DOCUMENT_ANALYSIS_LABELS, SIGNIFICANCE_SCORING_LABELS, } from './language-ui.js';
13
+ export { PAGE_TITLES, PAGE_DESCRIPTIONS, SECTION_HEADINGS, NO_ARTICLES_MESSAGES, SKIP_LINK_TEXTS, ARTICLE_TYPE_LABELS, READ_TIME_LABELS, BACK_TO_NEWS_LABELS, ARTICLE_NAV_LABELS, RELATED_ARTICLES_NAV_LABELS, BREADCRUMB_HOME_LABELS, BREADCRUMB_NEWS_LABELS, TIMELINE_HEADINGS, COMPARISON_BEFORE_LABELS, COMPARISON_AFTER_LABELS, KEY_FIGURES_HEADINGS, AI_SECTION_CONTENT, FILTER_LABELS, SOURCES_HEADING_LABELS, HEADER_SUBTITLE_LABELS, THEME_TOGGLE_LABELS, FOOTER_ABOUT_HEADING_LABELS, FOOTER_ABOUT_TEXT_LABELS, FOOTER_QUICK_LINKS_LABELS, FOOTER_BUILT_BY_LABELS, FOOTER_LANGUAGES_LABELS, FOOTER_HOME_LABELS, FOOTER_SITEMAP_LABELS, FOOTER_RSS_LABELS, FOOTER_GITHUB_REPO_LABELS, FOOTER_LICENSE_LABELS, FOOTER_EUROPARL_LABELS, FOOTER_LINKEDIN_LABELS, FOOTER_SECURITY_POLICY_LABELS, FOOTER_CONTACT_LABELS, FOOTER_DISCLAIMER_LABELS, FOOTER_REPORT_ISSUES_LABELS, FOOTER_ARTICLES_AVAILABLE_LABELS, TOC_ARIA_LABELS, RELATED_ANALYSIS_LABELS, ANALYSIS_TRANSPARENCY_LABELS, ANALYSIS_SUMMARY_LABELS, METHODOLOGY_LABELS, TRANSPARENCY_DISCLOSURE_LABELS, CLASSIFICATION_ANALYSIS_LABELS, THREAT_ASSESSMENT_LABELS, RISK_SCORING_LABELS, DEEP_ANALYSIS_LABELS, VIEW_SOURCE_LABELS, OPEN_SOURCE_NOTE_LABELS, AI_ANALYSIS_GUIDE_LABELS, SWOT_FRAMEWORK_LABELS, RISK_METHODOLOGY_LABELS, THREAT_FRAMEWORK_LABELS, CLASSIFICATION_GUIDE_LABELS, STYLE_GUIDE_LABELS, SIGNIFICANCE_CLASSIFICATION_LABELS, ACTOR_MAPPING_LABELS, FORCES_ANALYSIS_LABELS, IMPACT_MATRIX_LABELS, POLITICAL_THREAT_LANDSCAPE_LABELS, ACTOR_THREAT_PROFILING_LABELS, CONSEQUENCE_TREES_LABELS, LEGISLATIVE_DISRUPTION_LABELS, RISK_MATRIX_LABELS, QUANTITATIVE_SWOT_LABELS, POLITICAL_CAPITAL_RISK_LABELS, LEGISLATIVE_VELOCITY_RISK_LABELS, AGENT_RISK_WORKFLOW_LABELS, STAKEHOLDER_IMPACT_LABELS, COALITION_DYNAMICS_LABELS, VOTING_PATTERNS_LABELS, CROSS_SESSION_INTELLIGENCE_LABELS, SYNTHESIS_SUMMARY_LABELS, DOCUMENT_ANALYSIS_LABELS, SIGNIFICANCE_SCORING_LABELS, } from './language-ui.js';
14
14
  export { WEEK_AHEAD_TITLES, MONTH_AHEAD_TITLES, WEEKLY_REVIEW_TITLES, MONTHLY_REVIEW_TITLES, MOTIONS_TITLES, BREAKING_NEWS_TITLES, COMMITTEE_REPORTS_TITLES, PROPOSITIONS_TITLES, PROPOSITIONS_STRINGS, EDITORIAL_STRINGS, MOTIONS_STRINGS, WEEK_AHEAD_STRINGS, WEEK_AHEAD_STAKEHOLDER_STRINGS, BREAKING_STRINGS, DEEP_ANALYSIS_STRINGS, COMMITTEE_ANALYSIS_CONTENT_STRINGS, SWOT_STRINGS, DASHBOARD_STRINGS, SWOT_BUILDER_STRINGS, DASHBOARD_BUILDER_STRINGS, LOCALIZED_KEYWORDS, MONTH_IN_REVIEW_STRINGS, ANALYSIS_QUALITY_LABELS, ANALYSIS_INSIGHTS_HEADING, } from './language-articles.js';
15
15
  //# sourceMappingURL=languages.js.map
@@ -4,6 +4,7 @@
4
4
  * builders for breaking news articles.
5
5
  */
6
6
  import type { DeepAnalysis, BreakingNewsFeedData, LanguageCode, SwotAnalysis, DashboardConfig, IntelligenceMindmap } from '../../types/index.js';
7
+ import { type AnalysisOverrides } from './shared-builders.js';
7
8
  /**
8
9
  * Build deep analysis for breaking news articles.
9
10
  *
@@ -12,9 +13,12 @@ import type { DeepAnalysis, BreakingNewsFeedData, LanguageCode, SwotAnalysis, Da
12
13
  * @param anomalyRaw - Raw anomaly text
13
14
  * @param coalitionRaw - Raw coalition text
14
15
  * @param lang - Target display language (default: 'en')
15
- * @returns Deep analysis object
16
+ * @param overrides - Optional AI-authored overrides sourced from the run's
17
+ * `stakeholder-map.md` / `stakeholder-impact.md` / `synthesis-summary.md`
18
+ * via {@link module:Utils/ParseAnalysisStakeholders}.
19
+ * @returns Deep analysis object, with overrides applied when present.
16
20
  */
17
- export declare function buildBreakingAnalysis(date: string, feedData: BreakingNewsFeedData | undefined, anomalyRaw: string, coalitionRaw: string, lang?: LanguageCode): DeepAnalysis;
21
+ export declare function buildBreakingAnalysis(date: string, feedData: BreakingNewsFeedData | undefined, anomalyRaw: string, coalitionRaw: string, lang?: LanguageCode, overrides?: AnalysisOverrides): DeepAnalysis;
18
22
  /**
19
23
  * Build SWOT analysis for breaking news articles.
20
24
  *
@@ -3,7 +3,7 @@
3
3
  import { getLocalizedString, BREAKING_STRINGS, SWOT_BUILDER_STRINGS, DASHBOARD_BUILDER_STRINGS, } from '../../constants/languages.js';
4
4
  import { buildDefaultStakeholderPerspectives } from '../../utils/intelligence-analysis.js';
5
5
  import { AI_MARKER } from '../../constants/analysis-constants.js';
6
- import { buildOutcomeMatrix, buildCategoryDistributionPanel } from './shared-builders.js';
6
+ import { buildOutcomeMatrix, buildCategoryDistributionPanel, applyAnalysisOverrides, } from './shared-builders.js';
7
7
  // ─── Constant ─────────────────────────────────────────────────────────────────
8
8
  /**
9
9
  * Build multi-stakeholder perspectives for a breaking news analysis.
@@ -30,15 +30,18 @@ function buildBreakingStakeholderPerspectives(adoptedCount, topic) {
30
30
  * @param anomalyRaw - Raw anomaly text
31
31
  * @param coalitionRaw - Raw coalition text
32
32
  * @param lang - Target display language (default: 'en')
33
- * @returns Deep analysis object
33
+ * @param overrides - Optional AI-authored overrides sourced from the run's
34
+ * `stakeholder-map.md` / `stakeholder-impact.md` / `synthesis-summary.md`
35
+ * via {@link module:Utils/ParseAnalysisStakeholders}.
36
+ * @returns Deep analysis object, with overrides applied when present.
34
37
  */
35
- export function buildBreakingAnalysis(date, feedData, anomalyRaw, coalitionRaw, lang = 'en') {
38
+ export function buildBreakingAnalysis(date, feedData, anomalyRaw, coalitionRaw, lang = 'en', overrides) {
36
39
  const adoptedCount = feedData?.adoptedTexts.length ?? 0;
37
40
  const eventCount = feedData?.events.length ?? 0;
38
41
  const procCount = feedData?.procedures.length ?? 0;
39
42
  const mepCount = feedData?.mepUpdates.length ?? 0;
40
43
  const s = getLocalizedString(BREAKING_STRINGS, lang);
41
- return {
44
+ const base = {
42
45
  what: s.breakingWhatFn(date, adoptedCount, eventCount, procCount, mepCount),
43
46
  who: [
44
47
  ...(feedData?.adoptedTexts
@@ -119,6 +122,7 @@ export function buildBreakingAnalysis(date, feedData, anomalyRaw, coalitionRaw,
119
122
  },
120
123
  ]),
121
124
  };
125
+ return applyAnalysisOverrides(base, overrides);
122
126
  }
123
127
  /**
124
128
  * Build SWOT analysis for breaking news articles.
@@ -4,15 +4,18 @@
4
4
  * builders for committee report articles.
5
5
  */
6
6
  import type { DeepAnalysis, CommitteeData, LanguageCode, SwotAnalysis, DashboardConfig, IntelligenceMindmap } from '../../types/index.js';
7
+ import { type AnalysisOverrides } from './shared-builders.js';
7
8
  /**
8
9
  * Build deep analysis for committee reports articles.
9
10
  *
10
11
  * @param committees - Committee data list
11
12
  * @param date - Publication date
12
13
  * @param lang - Target language code for localized content
14
+ * @param overrides - Optional AI-authored overrides (see Analysis-to-Article
15
+ * Data Contract in `.github/prompts/SHARED_PROMPT_PATTERNS.md`).
13
16
  * @returns Deep analysis object, or `null` when all committee data is placeholder
14
17
  */
15
- export declare function buildCommitteeAnalysis(committees: readonly CommitteeData[], date: string, lang?: LanguageCode): DeepAnalysis | null;
18
+ export declare function buildCommitteeAnalysis(committees: readonly CommitteeData[], date: string, lang?: LanguageCode, overrides?: AnalysisOverrides): DeepAnalysis | null;
16
19
  /**
17
20
  * Build SWOT analysis for committee reports articles.
18
21
  *
@@ -4,7 +4,7 @@ import { getLocalizedString, COMMITTEE_ANALYSIS_CONTENT_STRINGS, SWOT_BUILDER_ST
4
4
  import { isPlaceholderCommitteeData } from '../committee-helpers.js';
5
5
  import { buildDefaultStakeholderPerspectives } from '../../utils/intelligence-analysis.js';
6
6
  import { AI_MARKER } from '../../constants/analysis-constants.js';
7
- import { buildOutcomeMatrix, buildCategoryDistributionPanel } from './shared-builders.js';
7
+ import { buildOutcomeMatrix, buildCategoryDistributionPanel, applyAnalysisOverrides, } from './shared-builders.js';
8
8
  // ─── Constant ─────────────────────────────────────────────────────────────────
9
9
  /**
10
10
  * Build multi-stakeholder perspectives for a committee reports analysis.
@@ -30,16 +30,18 @@ function buildCommitteeStakeholderPerspectives(activePct, totalDocs, topic) {
30
30
  * @param committees - Committee data list
31
31
  * @param date - Publication date
32
32
  * @param lang - Target language code for localized content
33
+ * @param overrides - Optional AI-authored overrides (see Analysis-to-Article
34
+ * Data Contract in `.github/prompts/SHARED_PROMPT_PATTERNS.md`).
33
35
  * @returns Deep analysis object, or `null` when all committee data is placeholder
34
36
  */
35
- export function buildCommitteeAnalysis(committees, date, lang = 'en') {
37
+ export function buildCommitteeAnalysis(committees, date, lang = 'en', overrides) {
36
38
  if (isPlaceholderCommitteeData(committees))
37
39
  return null;
38
40
  const totalDocs = committees.reduce((sum, c) => sum + c.documents.length, 0);
39
41
  const activeCommittees = committees.filter((c) => c.documents.length > 0);
40
42
  const s = getLocalizedString(COMMITTEE_ANALYSIS_CONTENT_STRINGS, lang);
41
43
  const activePct = (activeCommittees.length / Math.max(committees.length, 1)) * 100;
42
- return {
44
+ const base = {
43
45
  what: totalDocs === 0
44
46
  ? s.whatNoData.replace('{date}', date).replace('{total}', String(committees.length))
45
47
  : s.what
@@ -105,6 +107,7 @@ export function buildCommitteeAnalysis(committees, date, lang = 'en') {
105
107
  },
106
108
  ]),
107
109
  };
110
+ return applyAnalysisOverrides(base, overrides);
108
111
  }
109
112
  /**
110
113
  * Build SWOT analysis for committee reports articles.
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import type { DeepAnalysis, LanguageCode, SwotAnalysis, DashboardConfig, IntelligenceMindmap } from '../../types/index.js';
7
7
  import type { PipelineData } from '../propositions-content.js';
8
+ import { type AnalysisOverrides } from './shared-builders.js';
8
9
  /**
9
10
  * Build deep analysis for propositions articles.
10
11
  *
@@ -13,9 +14,11 @@ import type { PipelineData } from '../propositions-content.js';
13
14
  * @param date - Publication date
14
15
  * @param lang - Target display language (default: 'en')
15
16
  * @param adoptedTextsHtml - Adopted texts HTML (also used to detect content presence)
16
- * @returns Deep analysis object
17
+ * @param overrides - Optional AI-authored overrides (see Analysis-to-Article
18
+ * Data Contract in `.github/prompts/SHARED_PROMPT_PATTERNS.md`).
19
+ * @returns Deep analysis object, with overrides applied when present.
17
20
  */
18
- export declare function buildPropositionsAnalysis(proposalsHtml: string, pipelineData: PipelineData | null, date: string, lang?: LanguageCode, adoptedTextsHtml?: string): DeepAnalysis;
21
+ export declare function buildPropositionsAnalysis(proposalsHtml: string, pipelineData: PipelineData | null, date: string, lang?: LanguageCode, adoptedTextsHtml?: string, overrides?: AnalysisOverrides): DeepAnalysis;
19
22
  /**
20
23
  * Build SWOT analysis for propositions articles.
21
24
  *
@@ -3,7 +3,7 @@
3
3
  import { getLocalizedString, SWOT_BUILDER_STRINGS, DASHBOARD_BUILDER_STRINGS, } from '../../constants/languages.js';
4
4
  import { buildDefaultStakeholderPerspectives } from '../../utils/intelligence-analysis.js';
5
5
  import { AI_MARKER } from '../../constants/analysis-constants.js';
6
- import { buildOutcomeMatrix, buildAiMarkerImpactAssessment, buildStakeholderMetricsFromPipeline, buildStakeholderPanel, CIVIL_SOCIETY, } from './shared-builders.js';
6
+ import { buildOutcomeMatrix, buildFallbackImpactAssessment, buildStakeholderMetricsFromPipeline, buildStakeholderPanel, applyAnalysisOverrides, CIVIL_SOCIETY, } from './shared-builders.js';
7
7
  const CONFERENCE_OF_PRESIDENTS_EN = 'Conference of Presidents';
8
8
  const CONFERENCE_OF_PRESIDENTS = {
9
9
  en: CONFERENCE_OF_PRESIDENTS_EN,
@@ -196,14 +196,16 @@ function buildPipelineFromPipelineData(pipelineData) {
196
196
  * @param date - Publication date
197
197
  * @param lang - Target display language (default: 'en')
198
198
  * @param adoptedTextsHtml - Adopted texts HTML (also used to detect content presence)
199
- * @returns Deep analysis object
199
+ * @param overrides - Optional AI-authored overrides (see Analysis-to-Article
200
+ * Data Contract in `.github/prompts/SHARED_PROMPT_PATTERNS.md`).
201
+ * @returns Deep analysis object, with overrides applied when present.
200
202
  */
201
- export function buildPropositionsAnalysis(proposalsHtml, pipelineData, date, lang = 'en', adoptedTextsHtml = '') {
203
+ export function buildPropositionsAnalysis(proposalsHtml, pipelineData, date, lang = 'en', adoptedTextsHtml = '', overrides) {
202
204
  const hasProposals = proposalsHtml.length > 0 || adoptedTextsHtml.length > 0;
203
205
  const healthScore = pipelineData?.healthScore ?? 0;
204
206
  const throughput = pipelineData?.throughput ?? 0;
205
207
  const pct = (healthScore * 100).toFixed(0);
206
- return {
208
+ const base = {
207
209
  what: hasProposals
208
210
  ? `Legislative pipeline assessment as of ${date}: Active proposals under consideration.`
209
211
  : `Legislative pipeline assessment as of ${date}: No new proposals detected in this period.`,
@@ -216,7 +218,7 @@ export function buildPropositionsAnalysis(proposalsHtml, pipelineData, date, lan
216
218
  when: [`Assessment date: ${date}`, 'Pipeline health reflects cumulative legislative progress'],
217
219
  why: buildPropositionsWhy(),
218
220
  stakeholderOutcomes: [buildPropositionsStakeholderOutcome(healthScore, pct)],
219
- impactAssessment: buildAiMarkerImpactAssessment(),
221
+ impactAssessment: buildFallbackImpactAssessment(),
220
222
  actionConsequences: buildPropositionsConsequences(pct, healthScore, throughput),
221
223
  mistakes: healthScore < 0.5
222
224
  ? [
@@ -244,6 +246,7 @@ export function buildPropositionsAnalysis(proposalsHtml, pipelineData, date, lan
244
246
  },
245
247
  ]),
246
248
  };
249
+ return applyAnalysisOverrides(base, overrides);
247
250
  }
248
251
  /**
249
252
  * Build SWOT analysis for propositions articles.
@@ -4,15 +4,18 @@
4
4
  * builders for prospective articles (week-ahead, month-ahead).
5
5
  */
6
6
  import type { DeepAnalysis, WeekAheadData, DateRange, LanguageCode, SwotAnalysis, DashboardConfig, IntelligenceMindmap } from '../../types/index.js';
7
+ import { type AnalysisOverrides } from './shared-builders.js';
7
8
  /**
8
9
  * Build deep analysis for week-ahead/month-ahead articles.
9
10
  *
10
11
  * @param weekData - Aggregated week/month data
11
12
  * @param dateRange - Date range for the preview period
12
13
  * @param label - "week" or "month"
13
- * @returns Deep analysis object
14
+ * @param overrides - Optional AI-authored overrides (see Analysis-to-Article
15
+ * Data Contract in `.github/prompts/SHARED_PROMPT_PATTERNS.md`).
16
+ * @returns Deep analysis object, with overrides applied when present.
14
17
  */
15
- export declare function buildProspectiveAnalysis(weekData: WeekAheadData, dateRange: DateRange, label: 'week' | 'month'): DeepAnalysis;
18
+ export declare function buildProspectiveAnalysis(weekData: WeekAheadData, dateRange: DateRange, label: 'week' | 'month', overrides?: AnalysisOverrides): DeepAnalysis;
16
19
  /**
17
20
  * Build SWOT analysis for week-ahead / month-ahead articles.
18
21
  *
@@ -3,7 +3,7 @@
3
3
  import { getLocalizedString, SWOT_BUILDER_STRINGS, DASHBOARD_BUILDER_STRINGS, } from '../../constants/languages.js';
4
4
  import { buildDefaultStakeholderPerspectives } from '../../utils/intelligence-analysis.js';
5
5
  import { AI_MARKER } from '../../constants/analysis-constants.js';
6
- import { buildOutcomeMatrix, buildPipelineFromWeekData, buildCategoryDistributionPanel, CIVIL_SOCIETY, } from './shared-builders.js';
6
+ import { buildOutcomeMatrix, buildPipelineFromWeekData, buildCategoryDistributionPanel, applyAnalysisOverrides, CIVIL_SOCIETY, } from './shared-builders.js';
7
7
  /**
8
8
  * Build multi-stakeholder perspectives for a prospective (week/month-ahead) analysis.
9
9
  *
@@ -28,16 +28,18 @@ function buildProspectiveStakeholderPerspectives(eventCount, bottleneckCount, to
28
28
  * @param weekData - Aggregated week/month data
29
29
  * @param dateRange - Date range for the preview period
30
30
  * @param label - "week" or "month"
31
- * @returns Deep analysis object
31
+ * @param overrides - Optional AI-authored overrides (see Analysis-to-Article
32
+ * Data Contract in `.github/prompts/SHARED_PROMPT_PATTERNS.md`).
33
+ * @returns Deep analysis object, with overrides applied when present.
32
34
  */
33
- export function buildProspectiveAnalysis(weekData, dateRange, label) {
35
+ export function buildProspectiveAnalysis(weekData, dateRange, label, overrides) {
34
36
  const eventCount = weekData.events.length;
35
37
  const committeeCount = weekData.committees.length;
36
38
  const docCount = weekData.documents.length;
37
39
  const pipelineCount = weekData.pipeline.length;
38
40
  const questionCount = weekData.questions.length;
39
41
  const bottleneckProcedures = weekData.pipeline.filter((p) => p.bottleneck === true);
40
- return {
42
+ const base = {
41
43
  what: `European Parliament ${label} ahead (${dateRange.start} to ${dateRange.end}): ${eventCount} plenary events, ${committeeCount} committee meetings, ${docCount} legislative documents, ${pipelineCount} pipeline procedures, ${questionCount} parliamentary questions scheduled.`,
42
44
  who: [
43
45
  ...weekData.events.slice(0, 3).map((e) => `${e.type}: ${e.title}`),
@@ -111,6 +113,7 @@ export function buildProspectiveAnalysis(weekData, dateRange, label) {
111
113
  },
112
114
  ]),
113
115
  };
116
+ return applyAnalysisOverrides(base, overrides);
114
117
  }
115
118
  /**
116
119
  * Build SWOT analysis for week-ahead / month-ahead articles.
@@ -4,7 +4,39 @@
4
4
  * domains. Includes outcome matrix construction, AI marker impact assessments,
5
5
  * coalition metrics, pipeline builders, and trend analytics.
6
6
  */
7
- import type { DeepAnalysis, StakeholderOutcomeMatrix, AnalysisStakeholderType, CoalitionMetrics, LegislativePipeline, TrendAnalytics, DashboardPanel, DashboardBuilderStrings, WeekAheadData, VotingPattern, StakeholderMetric } from '../../types/index.js';
7
+ import type { DeepAnalysis, StakeholderOutcomeMatrix, AnalysisStakeholderType, CoalitionMetrics, LegislativePipeline, TrendAnalytics, DashboardPanel, DashboardBuilderStrings, WeekAheadData, VotingPattern, StakeholderMetric, StakeholderPerspective } from '../../types/index.js';
8
+ /**
9
+ * Optional AI-authored overrides that callers may supply to the five
10
+ * `build*Analysis()` functions. When a field is present and non-empty, it
11
+ * replaces the corresponding section of the default template-derived
12
+ * {@link DeepAnalysis} object.
13
+ *
14
+ * These overrides are typically sourced from loaded analysis markdown via
15
+ * {@link module:Utils/ParseAnalysisStakeholders} and close the
16
+ * Analysis-to-Article Data Contract gap documented in
17
+ * `.github/prompts/SHARED_PROMPT_PATTERNS.md`.
18
+ */
19
+ export interface AnalysisOverrides {
20
+ /** Replace the default six-bucket stakeholder perspective array */
21
+ readonly stakeholderPerspectives?: readonly StakeholderPerspective[] | null | undefined;
22
+ /** Replace the default stakeholder outcome matrix */
23
+ readonly stakeholderOutcomeMatrix?: readonly StakeholderOutcomeMatrix[] | null | undefined;
24
+ /** Replace the `AI_MARKER` placeholders in every impact-assessment dimension */
25
+ readonly impactAssessment?: DeepAnalysis['impactAssessment'] | null | undefined;
26
+ }
27
+ /**
28
+ * Merge a caller-supplied {@link AnalysisOverrides} set into the default
29
+ * `DeepAnalysis` produced by a builder.
30
+ *
31
+ * Undefined, null, and empty array/record overrides are ignored, so callers
32
+ * can pass a single unified overrides object across the five builders without
33
+ * null-guarding every field.
34
+ *
35
+ * @param base - The builder's default `DeepAnalysis` object.
36
+ * @param overrides - Optional AI-authored overrides (see {@link AnalysisOverrides}).
37
+ * @returns The merged `DeepAnalysis`.
38
+ */
39
+ export declare function applyAnalysisOverrides(base: DeepAnalysis, overrides?: AnalysisOverrides): DeepAnalysis;
8
40
  export declare const EP_BLUE_TRANSPARENT = "rgba(0,51,153,0.1)";
9
41
  export declare const EP_BLUE_BORDER = "#003399";
10
42
  export declare const CIVIL_SOCIETY = "Civil Society";
@@ -21,12 +53,28 @@ export declare function buildOutcomeMatrix(actions: readonly {
21
53
  readonly confidence: 'high' | 'medium' | 'low';
22
54
  }[]): StakeholderOutcomeMatrix[];
23
55
  /**
24
- * Build an AI_MARKER impact assessment placeholder.
25
- * All five dimensions are marked for AI completion.
56
+ * Build a placeholder impact assessment with every dimension marked `AI_MARKER`.
57
+ *
58
+ * This is the **last-resort fallback** used only when no AI-authored
59
+ * `## Impact Assessment` block was parseable from the run's
60
+ * `synthesis-summary.md` or `deep-analysis.md`. Agentic workflows should
61
+ * satisfy the Analysis-to-Article Data Contract (see
62
+ * `.github/prompts/SHARED_PROMPT_PATTERNS.md#-analysis-to-article-data-contract`)
63
+ * so this fallback is never rendered. When it is rendered, the downstream
64
+ * `article-rewriter` step replaces the `AI_MARKER` strings with real analysis
65
+ * content before publication.
26
66
  *
27
- * @returns Impact assessment with AI_MARKER placeholders
67
+ * @returns Impact assessment with `AI_MARKER` placeholders in every dimension.
68
+ */
69
+ export declare function buildFallbackImpactAssessment(): DeepAnalysis['impactAssessment'];
70
+ /**
71
+ * @deprecated Use {@link buildFallbackImpactAssessment} — the name was changed
72
+ * to reflect that this is a last-resort path rather than the AI-integration
73
+ * path. The alias is retained for backward compatibility with internal
74
+ * callers and will be removed after all builders route through
75
+ * `buildFallbackImpactAssessment`.
28
76
  */
29
- export declare function buildAiMarkerImpactAssessment(): DeepAnalysis['impactAssessment'];
77
+ export declare const buildAiMarkerImpactAssessment: typeof buildFallbackImpactAssessment;
30
78
  /**
31
79
  * Build coalition metrics from voting patterns data.
32
80
  * Derives alignment scores and shift indicators for the coalition radar chart.