Core automated intelligence reporting workflow orchestrating real-time news generation from Swedish Parliament and Government data sources. This module implements advanced OSINT collection and automated content generation pipelines, transforming structured parliamentary data into multi-language intelligence reports for journalists and analysts.
The script provides a comprehensive three-stage intelligence pipeline:
Stage 1 - OSINT Data Collection: Leverages riksdag-regering-mcp server (32 specialized tools) to perform continuous monitoring of Swedish parliamentary activities. Collects calendar events, committee reports, legislative documents, voting records, and government announcements using structured API calls optimized for source validation and data integrity verification.
Stage 2 - Intelligent Data Transformation: Processes raw MCP responses through data transformation algorithms that:
- Extract semantic intelligence (legislative intent, party positions, policy proposals)
- Identify critical watch points and political risk indicators
- Cross-reference documents and voting patterns for narrative coherence
- Validate source authenticity against official parliamentary records
- Generate metadata including read time estimates and source attribution
Stage 3 - Automated Content Generation & Multi-Language Publication: Transforms processed intelligence into professional news articles with:
- Semantic HTML5 structure optimized for accessibility (WCAG 2.1 AA)
- Event grid visualization of parliamentary schedule
- Multi-language rendering across all 14 supported language pairs
- SEO optimization and proper journalistic source attribution
- Cyberpunk visual theme maintaining brand consistency
Article Generation Types:
- Week Ahead: Calendar-based preview of upcoming parliamentary events
- Committee Reports: Deep-dive analysis of committee activities and decisions
- Propositions: Government legislative proposals with impact analysis
- Motions: Parliamentary motions with cross-party analysis
- Breaking: Rapid-response analysis of critical developments
Multi-Language Intelligence Distribution: Generates articles in 14 languages across 5 geographic regions:
- Nordic: English, Swedish, Danish, Norwegian, Finnish
- Western EU: German, French, Spanish, Dutch
- Mediterranean: Italian (via Spanish pipeline)
- MENA: Arabic, Hebrew
- East Asia: Japanese, Korean, Simplified Chinese
- Version:
- 2.0.0
- License:
- Apache-2.0
- Source:
- See:
-
- https://github.com/Hack23/riksdagsmonitor Riksdagsmonitor repository
- https://github.com/Hack23/riksdag-regering-mcp riksdag-regering-mcp server
- ./mcp-client.js MCP Client for API communication
- ./data-transformers.js Data transformation pipeline
- ./article-template.js Article HTML generation
- ./editorial-pillars.js Editorial content strategy
- docs/INTELLIGENCE_OPERATIONS.md Intelligence operations methodology
- docs/OSINT_COLLECTION.md OSINT collection procedures
- docs/GDPR_COMPLIANCE.md GDPR compliance framework
Methods
(inner) formatDateForSlug()
Format date for article slug
(async, inner) generateCommitteeReports()
Generate Committee Reports article
(async, inner) generateMotions()
Generate Opposition Motions article
(async, inner) generateNews()
Main generation function
(async, inner) generatePropositions()
Generate Government Propositions article
(async, inner) generateWeekAhead()
Generate Week Ahead article in specified languages
(async, inner) getSharedClient() → {Promise.<MCPClient>}
Get or create the shared MCPClient instance. On first call, warms up the MCP server with a lightweight get_sync_status request using an extended timeout to handle Render.com cold starts (30-60s).
Returns:
Warmed-up shared client
- Type
- Promise.<MCPClient>
(inner) getWeekAheadDateRange()
Get date range for Week Ahead (next 7 days)
(async, inner) writeArticle()
Write article to file
(async, inner) writeArticlePair()
Write EN/SV article pair (legacy function for backward compatibility)
(async, inner) writeSingleArticle()
Write article in specified language