An open API service indexing awesome lists of open source software.

https://github.com/hack23/riksdagsmonitor

Riksdagsmonitor is a comprehensive intelligence platform for monitoring political activity in Sweden's Riksdag (Parliament). Built on the Citizen Intelligence Agency (CIA) platform, we provide systematic transparency through real-time analysis and 50+ years of historical data.
https://github.com/hack23/riksdagsmonitor

ai intelligence intelligence-gathering osint riksdagen riksdagensoppnadata sweden

Last synced: 3 days ago
JSON representation

Riksdagsmonitor is a comprehensive intelligence platform for monitoring political activity in Sweden's Riksdag (Parliament). Built on the Citizen Intelligence Agency (CIA) platform, we provide systematic transparency through real-time analysis and 50+ years of historical data.

Awesome Lists containing this project

README

          

# ๐Ÿ—ณ๏ธ Riksdagsmonitor

> Swedish Parliament Intelligence Platform - Monitor political activity with systematic transparency

## ๐ŸŽฏ Mission

Riksdagsmonitor is a comprehensive intelligence platform for monitoring political activity in Sweden's Riksdag (Parliament). Built on the [Citizen Intelligence Agency (CIA)](https://github.com/Hack23/cia) platform, we provide systematic transparency through real-time analysis and 50+ years of historical data.



Riksdagsmonitor



Website Status




npm version




Swedish Parliament Intelligence Platform monitoring political activity in Sweden's Riksdag with systematic transparency through real-time analysis and 50+ years of historical data (1971-2024).




OpenSSF Scorecard


Quality Checks


OpenSSF Best Practices


License



๐ŸŒ Official Website โ€ข
๐Ÿ“‚ Repository โ€ข
โœจ Features โ€ข
๐Ÿ“š Documentation


[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/Hack23/riksdagsmonitor/badge)](https://scorecard.dev/viewer/?uri=github.com/Hack23/riksdagsmonitor)
[![Quality Checks](https://github.com/Hack23/riksdagsmonitor/actions/workflows/quality-checks.yml/badge.svg)](https://github.com/Hack23/riksdagsmonitor/actions/workflows/quality-checks.yml)
[![Dependency Review](https://github.com/Hack23/riksdagsmonitor/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/Hack23/riksdagsmonitor/actions/workflows/dependency-review.yml)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/12069/badge)](https://www.bestpractices.dev/projects/12069)
[![License](https://img.shields.io/github/license/Hack23/riksdagsmonitor)](https://github.com/Hack23/riksdagsmonitor/blob/main/LICENSE)
[![ISMS](https://img.shields.io/badge/Hack23-ISMS-blue)](https://github.com/Hack23/ISMS-PUBLIC)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/Hack23/riksdagsmonitor)

## ๐Ÿ“Š Quality Metrics

### CI/CD & Security
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/Hack23/riksdagsmonitor/badge)](https://scorecard.dev/viewer/?uri=github.com/Hack23/riksdagsmonitor)
[![Quality Checks](https://github.com/Hack23/riksdagsmonitor/actions/workflows/quality-checks.yml/badge.svg)](https://github.com/Hack23/riksdagsmonitor/actions/workflows/quality-checks.yml)
[![Dependency Review](https://github.com/Hack23/riksdagsmonitor/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/Hack23/riksdagsmonitor/actions/workflows/dependency-review.yml)
[![CodeQL](https://github.com/Hack23/riksdagsmonitor/actions/workflows/codeql.yml/badge.svg)](https://github.com/Hack23/riksdagsmonitor/actions/workflows/codeql.yml)

### Testing
[![JavaScript Testing](https://github.com/Hack23/riksdagsmonitor/actions/workflows/javascript-testing.yml/badge.svg)](https://github.com/Hack23/riksdagsmonitor/actions/workflows/javascript-testing.yml)
[![JSDoc Validation](https://github.com/Hack23/riksdagsmonitor/actions/workflows/jsdoc-validation.yml/badge.svg)](https://github.com/Hack23/riksdagsmonitor/actions/workflows/jsdoc-validation.yml)
[![Translation Validation](https://github.com/Hack23/riksdagsmonitor/actions/workflows/translation-validation.yml/badge.svg)](https://github.com/Hack23/riksdagsmonitor/actions/workflows/translation-validation.yml)

### Documentation & Release
[![Release](https://github.com/Hack23/riksdagsmonitor/actions/workflows/release.yml/badge.svg)](https://github.com/Hack23/riksdagsmonitor/actions/workflows/release.yml)
[![API Docs](https://img.shields.io/badge/API-Documentation-blue?logo=javascript)](https://riksdagsmonitor.com/docs/api/)
[![Test Coverage](https://img.shields.io/badge/Coverage-Reports-green?logo=vitest)](https://riksdagsmonitor.com/docs/coverage/)
[![E2E Reports](https://img.shields.io/badge/E2E-Cypress_Reports-green?logo=cypress)](https://riksdagsmonitor.com/docs/cypress/)

### Compliance & Standards
[![License](https://img.shields.io/github/license/Hack23/riksdagsmonitor)](LICENSE)
[![ISMS](https://img.shields.io/badge/Hack23-ISMS-blue?logo=shield)](https://github.com/Hack23/ISMS-PUBLIC)
[![ISO 27001](https://img.shields.io/badge/ISO-27001:2022-purple?logo=iso)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md)
[![NIST CSF](https://img.shields.io/badge/NIST-CSF_2.0-orange?logo=nist)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md)
[![CIS Controls](https://img.shields.io/badge/CIS-Controls_v8.1-red?logo=cisecurity)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/Hack23/riksdagsmonitor)

**Security Policy:** Per [Secure Development Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md), we maintain defense-in-depth architecture with comprehensive security controls and documentation. See [WORKFLOWS.md](WORKFLOWS.md) for complete CI/CD pipeline documentation and [SECURITY_ARCHITECTURE.md](SECURITY_ARCHITECTURE.md) for security controls.

## ๐Ÿ“Š Project Classification

Riksdagsmonitor follows Hack23 AB's comprehensive [Classification Framework](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md) for security, business continuity, and impact analysis:

### ๐ŸŽฏ Project Classification
[![Project Type](https://img.shields.io/badge/Type-Frontend_Apps-yellow?style=for-the-badge&logo=window-maximize&logoColor=black)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#project-type-classifications)
[![Process Type](https://img.shields.io/badge/Process-Development-cyan?style=for-the-badge&logo=code&logoColor=white)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#project-type-classifications)

### ๐Ÿ”’ Security Classification (CIA Triad)
[![Confidentiality](https://img.shields.io/badge/Confidentiality-Public-lightgrey?style=for-the-badge&logo=shield&logoColor=black)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#confidentiality-levels)
[![Integrity](https://img.shields.io/badge/Integrity-High-orange?style=for-the-badge&logo=check-circle&logoColor=white)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#integrity-levels)
[![Availability](https://img.shields.io/badge/Availability-High-orange?style=for-the-badge&logo=server&logoColor=white)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#availability-levels)

**Confidentiality:** Public - All information intentionally disclosed (Swedish Riksdag open data, website content)
**Integrity:** High - Automated validation, digital signatures (Git commits), accurate political data required
**Availability:** High - 99.998% design availability target (underpinned by AWS CloudFront 99.9% SLA), automated failover (AWS multi-region, GitHub Pages DR)

### ๐Ÿท๏ธ Privacy Classification
[![Privacy](https://img.shields.io/badge/Privacy-Personal-orange?style=for-the-badge&logo=user-shield&logoColor=white)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#privacy-levels)

**Personal Data (Public Officials):** This project processes personal data about public officials (e.g., names, roles, voting records, person identifiers) sourced from Swedish Riksdag open data and the Citizen Intelligence Agency (CIA) datasets. Data relates only to MPs and other public figures acting in their official capacity; no special-category data or data about private individuals is processed. GDPR applies, with processing based on public-interest and legitimate-interest grounds for transparency and democratic accountability.

### โฑ๏ธ Business Continuity Classification
[![RTO](https://img.shields.io/badge/RTO-High_%281--4hrs%29-yellow?style=for-the-badge&logo=clock&logoColor=white)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#rto-classifications)
[![RPO](https://img.shields.io/badge/RPO-Daily_%284--24hrs%29-lightblue?style=for-the-badge&logo=database&logoColor=white)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#rpo-classifications)

**RTO (Recovery Time Objective):** 1-4 hours - Automated multi-region failover (AWS CloudFront + S3 us-east-1 primary, eu-west-1 replica, GitHub Pages DR)
**RPO (Recovery Point Objective):** 4-24 hours - Daily data pipeline updates, Git version control, S3 versioning

### ๐Ÿ’ฐ Business Impact Analysis

| Impact Category | Level | Description |
|-----------------|-------|-------------|
| **Financial** | [![Low](https://img.shields.io/badge/Low-lightgreen?style=flat-square)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#financial-impact-levels) | Minimal financial impact (<$500 daily) - Open-source project, no revenue dependency |
| **Operational** | [![Moderate](https://img.shields.io/badge/Moderate-yellow?style=flat-square)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#operational-impact-levels) | Partial service impact - Swedish political transparency temporarily unavailable |
| **Reputational** | [![Moderate](https://img.shields.io/badge/Moderate-yellow?style=flat-square)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#reputational-impact-levels) | Industry attention - Transparency advocates may notice outage |
| **Regulatory** | [![Low](https://img.shields.io/badge/Low-lightgreen?style=flat-square)](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#regulatory-impact-levels) | No regulatory impact - Public information dissemination only |

### ๐Ÿ“‹ Data Classification Levels

For operational data handling, we use a simplified 4-level scheme:

| Classification | Description | Examples | Handling Requirements |
|----------------|-------------|----------|----------------------|
| ๐ŸŸข **Public** | Information intended for public disclosure | Website content, Swedish Riksdag open data, documentation | No restrictions, published on GitHub Pages |
| ๐ŸŸก **Internal** | Information for internal use only | GitHub Actions secrets, deployment credentials | GitHub organization access only, MFA required |
| ๐ŸŸ  **Confidential** | Sensitive business information | Not applicable to this project | N/A |
| ๐Ÿ”ด **Restricted** | Highly sensitive information | Not applicable to this project | N/A |

### ๐Ÿ“ฆ Data Inventory

**Public Data (๐ŸŸข):**
- All website HTML/CSS content (14 languages)
- Swedish Parliament data (MPs, votes, documents, committees)
- Election results and statistics
- Government budget and spending data
- All source code and documentation

**Internal Data (๐ŸŸก):**
- GitHub Actions secrets (tokens if used; no long-lived PATs)
- AWS IAM credentials (ephemeral via OIDC)
- Deployment pipeline configurations

**No User or Confidential Data:**
- โŒ No user accounts or authentication
- โŒ No non-public or end-user personally identifiable information (PII)
- โœ… Only public-figure data from official Swedish Parliament records (MP names, roles, votes)
- โŒ No financial transactions or payment data
- โŒ No confidential government information

### ๐Ÿ” Data Handling Controls

**Public Data:**
- Published via GitHub Pages and AWS CloudFront
- TLS 1.3 encryption in transit
- No access controls required (intentionally public)
- Version controlled via Git

**Internal Data:**
- Stored in GitHub Secrets (encrypted at rest)
- AWS credentials via OIDC (no long-lived keys)
- Accessed only via secure GitHub Actions workflows
- Least privilege principle enforced
- Regular rotation and audit

### ๐Ÿ“‹ Compliance Alignment

- **ISO 27001:2022 A.8** - Asset Management
- **NIST CSF 2.0 PR.DS** - Data Security
- **CIS Controls v8.1 Control 3** - Data Protection
- **GDPR** - Applicable for public-official data processing (public interest and legitimate interest grounds)
- **Hack23 Classification Framework** - [Full framework documentation](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md)

See [SECURITY_ARCHITECTURE.md](SECURITY_ARCHITECTURE.md) for detailed security controls.

## โœจ Features

- **349 Current MPs** - Individual MP tracking and performance metrics
- **2,494 Historical Politicians** - Complete database from 1971-2024 (50+ years)
- **8 Political Parties** - Party performance, coalition dynamics, voting patterns
- **45 Risk Rules** - Systematic transparency through behavioral analysis
- **3.5+ Million Votes** - Comprehensive voting record analysis
- **109,000+ Documents** - Parliamentary documents processed and analyzed

## ๐Ÿ“ฆ npm Package

Install the shared TypeScript library for Swedish Parliament data visualization:

```bash
npm install riksdagsmonitor
```

### What's Included

- **Theme System** โ€” Dark/light cyberpunk themes with WCAG AA contrast compliance
- **Chart Factory** โ€” Pre-configured Chart.js creation with responsive breakpoints and keyboard navigation
- **Data Loader** โ€” Resilient data fetching with retry logic, caching, and CSV/JSON parsing
- **DOM Utilities** โ€” Loading states, error boundaries, screen reader announcements, locale-aware formatting
- **Type Definitions** โ€” Full TypeScript interfaces for political data structures
- **Dashboard Modules** โ€” 12 specialized intelligence dashboard components
- **CIA Intelligence Modules** โ€” Data loaders, visualizations, and election prediction engine

### Usage

```typescript
// Core utilities (no dependencies required)
import { getActiveThemeColors, BREAKPOINTS, getPartyColor } from 'riksdagsmonitor';
import { loadJSON, loadCSV, createDataSource } from 'riksdagsmonitor';
import { showLoadingState, showErrorState, formatNumber, debounce } from 'riksdagsmonitor';

// Chart utilities (requires chart.js peer dependency)
import { createChart, getResponsiveOptions, initDashboardSection } from 'riksdagsmonitor/shared/chart-factory';

// Register Chart.js, D3.js, PapaParse as globals (requires peer dependencies)
import 'riksdagsmonitor/shared/register-globals';

// Individual dashboard modules
import { init as initPartyDashboard } from 'riksdagsmonitor/dashboards/party-dashboard';
import { init as initRiskDashboard } from 'riksdagsmonitor/dashboards/risk-dashboard';

// CIA intelligence modules
import { CIADataLoader } from 'riksdagsmonitor/cia/data-loader';
import { CIADashboardRenderer } from 'riksdagsmonitor/cia/visualizations';
```

### Peer Dependencies

The core shared utilities work without any dependencies. For visualization dashboards, install the optional peer dependencies:

```bash
npm install chart.js d3 papaparse # Required for dashboard support
npm install chartjs-plugin-annotation # Optional โ€” for chart annotations
```

> **Note:** `chartjs-plugin-annotation` is loaded conditionally at runtime โ€” dashboards work without it, but chart annotations will be unavailable.

## ๐ŸŒ Live Platform

**Website:** [riksdagsmonitor.com](https://riksdagsmonitor.com)

**Available in 14 Languages:**
- English, Swedish, Danish, Norwegian, Finnish
- German, French, Spanish, Dutch
- Arabic, Hebrew, Japanese, Korean, Chinese

## ๐Ÿ“Š CIA Data Products Integration

Riksdagsmonitor integrates with the CIA platform through automated data pipelines, schema validation, and daily statistics updates.

### Production Database Statistics

**Live Statistics** (Updated Daily at 03:00 CET):
- **2,494 Politicians** - Complete historical database (1971-2024)
- **349 Current MPs** - Active Members of Parliament
- **3.5+ Million Votes** - Comprehensive voting records
- **109,000+ Documents** - Parliamentary documents processed
- **8,740 Committee Documents** - Committee work tracked
- **2,308 Rule Violations** - Transparency issues identified

**Data Source**: [extraction_summary_report.csv](https://github.com/Hack23/cia/blob/master/service.data.impl/sample-data/extraction_summary_report.csv)
**Update Schedule**: Daily automated fetch via GitHub Actions
**Last Extraction**: See `cia-data/production-stats.json` โ†’ `metadata.last_updated` (updated daily)

**Implementation**:
- `scripts/load-cia-stats.js` - Fetches and parses production statistics
- `scripts/update-stats-from-cia.js` - Updates website files
- `.github/workflows/update-cia-stats.yml` - Automated daily workflow
- `cia-data/production-stats.json` - Cached statistics (24-hour freshness)

### Schema Integration
- **Automated Validation** - All CIA exports validated against JSON schemas
- **Type Safety** - TypeScript type definitions for development
- **CI/CD Integration** - Daily validation checks in GitHub Actions
- **Update Detection** - Weekly checks for schema updates

See [CIA Schema Integration Documentation](docs/CIA_SCHEMA_INTEGRATION.md) for details.

### Data Products

Riksdagsmonitor leverages 19 comprehensive visualization products from the CIA platform:

### Intelligence Dashboards
- **Overview Dashboard** - Complete Riksdag intelligence snapshot
- **Party Performance** - Longitudinal party analysis and effectiveness metrics
- **Government Cabinet** - Ministry-level performance scorecards
- **Election Cycle Analysis** - Historical patterns and trend forecasting

### Top 10 Rankings
- Most Influential MPs (network analysis)
- Most Productive MPs (legislative output)
- Most Controversial MPs (voting patterns)
- Most Absent MPs (attendance tracking)
- Party Rebels (cross-party voting)
- Coalition Brokers (collaboration patterns)
- Rising Stars (emerging political figures)
- Electoral Risk (MPs at risk)
- Ethics Concerns (transparency issues)
- Media Presence (public visibility)

### Advanced Analytics
- **Committee Network Analysis** - Influence mapping and assignments
- **Politician Career Analysis** - Career trajectories and milestones
- **Party Longitudinal Analysis** - 50+ years of party evolution

## ๐Ÿ“ˆ Implemented Dashboards

Riksdagsmonitor currently features 4 interactive intelligence dashboards built with Chart.js and D3.js:

### 1. ๐ŸŒก๏ธ Seasonal Activity Patterns Dashboard
- **Coverage**: 2002-2025 (quarterly data, 23+ years)
- **Visualizations**: Heat maps, time series, Z-score analysis
- **Purpose**: Track quarterly parliamentary activity patterns and detect seasonal trends
- **Data Source**: `cia-data/seasonal/view_riksdagen_seasonal_activity_patterns_sample.csv`

### 2. ๐Ÿ‘ค Politician Dashboard
- **Coverage**: 349 MPs with comprehensive risk and performance metrics
- **Visualizations**: Top 10 rankings, risk profiles, influence metrics
- **Purpose**: Individual MP tracking and transparency assessment
- **Data Source**: `cia-data/politician/*.csv`

### 3. ๐Ÿ—ณ๏ธ Pre-Election Monitoring Dashboard
- **Coverage**: Q4 2023-2025 (12-15 months before 2026 election)
- **Visualizations**: Historical comparisons, election-year patterns
- **Purpose**: Track pre-election parliamentary activity and behavior changes
- **Data Source**: `cia-data/pre-election/*.csv`

### 4. ๐Ÿ—ณ๏ธ Party Performance & Effectiveness Dashboard

**Coverage:** 1990-2026 (37 years)
**Analysis:** Comprehensive party analytics across 8 Swedish political parties

**Key Features:**
- **Effectiveness Trends:** Historical legislative productivity and voting consistency
- **Comparative Analysis:** Party-by-party benchmarking
- **Coalition Patterns:** Party alignment visualization
- **Momentum Indicators:** Electoral trajectory with percentile benchmarks

### 5. ๐Ÿšจ Anomaly Detection & Early Warning System
- **Coverage**: 2002-2026 (41 quarters analyzed)
- **Visualizations**: 6 interactive charts including timeline, Z-score distribution, heat map
- **Features**:
- Real-time alert system for critical anomalies
- Statistical Z-score analysis (|Z| โ‰ฅ 2.0 for anomalies)
- Severity classification: CRITICAL (โ‰ฅ2.5), HIGH (โ‰ฅ2.0), MODERATE (โ‰ฅ1.5), LOW (<1.5)
- Anomaly types: Ballot, Document, Attendance
- Direction indicators: UNUSUALLY_HIGH, UNUSUALLY_LOW
- **Data Source**: `cia-data/seasonal/view_riksdagen_seasonal_anomaly_detection_sample.csv`

**Dashboard Features**:
- Local-first data loading (1-hour caching)
- WCAG 2.1 AA accessible
- 14-language support
- Responsive design (320px-1440px+)
- CSP-compliant (SRI hashes on all CDN resources)
## ๐Ÿ”— Data Sources

Riksdagsmonitor integrates multiple authoritative Swedish open data sources:

- **[Swedish Parliament (Riksdagen)](http://data.riksdagen.se/)** - Votes, documents, committee work, MP information
- **[Swedish Election Authority](http://www.val.se/)** - Election results, voter turnout, electoral statistics
- **[Swedish Financial Management Authority](https://www.esv.se/psidata/)** - Government budget and spending data
- **[World Bank Open Data](http://data.worldbank.org/)** - Governance (WGI), environment, and long-horizon social/education indicators
- **[IMF Public Data](https://data.imf.org/)** - Macro, fiscal, monetary, and external-sector indicators (WEO, Fiscal Monitor, IFS) with T+5 projections โ€” primary source for fresh macro/fiscal figures and forward-looking commentary (see `analysis/imf/README.md` and `docs/adr/0001-adopt-imf-data-alongside-world-bank.md`)

## ๐Ÿ—๏ธ Technical Architecture

### Stack
- **Frontend:** Static HTML/CSS with JavaScript dashboards
- **Build System:** Vite 8 (ES modules, code splitting)
- **Visualization:** Chart.js 4 + D3.js 7 hosted locally on CloudFront
- **Testing:** Vitest (unit), Cypress (E2E) - 2890 tests passing
- **Styling:** Custom CSS with cyberpunk theme, responsive design
- **Hosting:** GitHub Pages with CloudFront CDN
- **CI/CD:** GitHub Actions for automated testing and deployment
- **Data Platform:** CIA OSINT platform (Java/Spring Boot backend)
- **Runtime:** Node.js 25.x

### JavaScript Architecture
- **8 Dashboard Modules:**
- party-dashboard.js (effectiveness analytics)
- anomaly-detection-dashboard.js (statistical outliers)
- seasonal-patterns-dashboard.js (temporal trends)
- pre-election-dashboard.js (election monitoring)
- politician-dashboard.js (MP tracking)
- ministry-dashboard.js (cabinet analysis)
- election-cycle-dashboard.js (cycle patterns)
- back-to-top.js (navigation)

- **Data Loading:** Local-first with GitHub fallback
- **Caching:** LocalStorage with freshness checks (1-7 days)
- **Performance:** Code splitting, lazy loading, asset optimization
- **Security:** SRI hashes (sha384), CSP-compliant script loading

### Security
- **HTTPS-Only:** TLS 1.3 encryption enforced
- **Security Headers:** CSP, HSTS, X-Frame-Options, X-Content-Type-Options
- **Access Control:** GitHub MFA, SSH keys, GPG commit signing
- **Monitoring:** Dependabot, CodeQL, Secret Scanning
- **Documentation:** [SECURITY_ARCHITECTURE.md](SECURITY_ARCHITECTURE.md), [THREAT_MODEL.md](THREAT_MODEL.md)

## ๐Ÿ” Commitment to Transparency and Security

At Hack23 AB, we believe that true security comes through transparency and demonstrable practices. Our Information Security Management System (ISMS) is publicly available, showcasing our commitment to security excellence and organizational transparency.




๐Ÿ“‹ ISMS Compliance


ISO 27001:2022 Aligned







๐Ÿ›ก๏ธ Security Documentation


Defense-in-Depth Architecture





### Compliance Frameworks
- **ISO 27001:2022** - Information security management controls (7 controls implemented)
- **NIST CSF 2.0** - Cybersecurity framework (6 functions aligned)
- **CIS Controls v8.1** - Security best practices (6 controls implemented)

### Security Metrics

| Metric | Status | Details |
|--------|--------|---------|
| **Risk Level** | ๐ŸŸข LOW | 5.52/10.0 (99.7% risk reduction) |
| **HTML Validation** | โœ… PASSED | 0 errors (HTMLHint) |
| **Dependencies** | โœ… CLEAN | Dependabot monitoring |
| **Secrets** | โœ… SECURE | Secret scanning enabled |
| **Code Scanning** | โœ… ACTIVE | CodeQL analysis |

## ๐Ÿš€ Development

### Prerequisites
- **Node.js**: 25.x or higher
- **npm**: 10.x or higher (comes with Node.js)
- Git with GPG signing configured
- GitHub account with MFA enabled
- SSH keys for GitHub authentication

### Local Development

```bash
# Clone repository
git clone git@github.com:Hack23/riksdagsmonitor.git
cd riksdagsmonitor

# Install dependencies
npm install

# Development server with Vite (hot reload)
npm run dev
# Opens http://localhost:8080

# OR serve statically
python3 -m http.server 8080
# or
npx http-server -p 8080

# Open in browser
open http://localhost:8080
```

### Testing

```bash
# Install dependencies (if not already done)
npm install

# Run unit tests (Vitest)
npm test

# Run tests in watch mode
npm run test:watch

# Run tests with coverage
npm run test:coverage

# Run tests with UI
npm run test:ui

# Run E2E tests (Cypress)
npm run cypress:open # Interactive GUI
npm run cypress:run # Headless

# Full E2E test suite
npm run e2e # Builds, previews, and runs Cypress
```

### Building for Production

```bash
# Build with Vite
npm run build

# Preview production build
npm run preview
# Opens http://localhost:4173

# Build output in dist/
ls dist/
```

### Quality Checks

```bash
# HTML validation
npm run htmlhint

# Link checking
python3 -m http.server 8080 &
npm run linkcheck

# Run all quality checks
npm run htmlhint && npm test && npm run build
```

### CI/CD Pipeline

**Automated Checks:**
- HTML validation (HTMLHint)
- Link checking (linkinator)
- JavaScript testing (Vitest unit tests - 2890 tests)
- E2E testing (Cypress)
- Build validation (Vite)
- Dependency review (Dependabot)
- Security scanning (CodeQL, Secret Scanning)

**Workflows:**
- `.github/workflows/quality-checks.yml` - HTML/link validation
- `.github/workflows/javascript-testing.yml` - Vite build, Vitest, Cypress E2E
- `.github/workflows/dependency-review.yml` - Dependency security
- `.github/workflows/copilot-setup-steps.yml` - Copilot agent setup
- `.github/workflows/release.yml` - Release with attestations and documentation-as-code

**Test Results**:
- โœ… 2890/2890 unit tests passing (Vitest)
- โœ… 100% test pass rate
- โœ… Coverage: 70% lines, 70% functions, 60% branches

## ๐Ÿš€ Release Process

Riksdagsmonitor follows a comprehensive release process with full supply chain security:

### Release Workflow

- **Trigger**: Manual (workflow_dispatch) or tag push (v*.*.*)
- **Duration**: ~20-30 minutes
- **Jobs**: Prepare โ†’ Build โ†’ Release

### Release Artifacts

Each release includes:
- โœ… Production build (`riksdagsmonitor-vX.Y.Z.zip`)
- โœ… SHA-256 checksum for verification
- โœ… SBOM in SPDX format (Software Bill of Materials)
- โœ… SLSA Build Provenance attestations (signed)

### Documentation as Code

Every release automatically generates and publishes:
- ๐Ÿ“š API Documentation (JSDoc)
- ๐Ÿ“Š Test Coverage Report (Vitest)
- ๐Ÿงช E2E Test Reports (Cypress)
- ๐Ÿ“ฆ Dependency Tree (npm)

**Documentation Hub**: [riksdagsmonitor.com/docs/](https://riksdagsmonitor.com/docs/)

### Dual Deployment

- **Primary**: AWS S3/CloudFront (https://riksdagsmonitor.com)
- **Backup**: GitHub Pages (disaster recovery)

### Security & Verification

Verify attestations using GitHub CLI:
```bash
gh attestation verify riksdagsmonitor-v1.0.0.zip -R Hack23/riksdagsmonitor
```

**Full Release Guide**: See [RELEASE_PROCESS.md](RELEASE_PROCESS.md)

## ๐Ÿ“– Documentation

### Project Documentation
- [README.md](README.md) - This file
- [RELEASE_PROCESS.md](RELEASE_PROCESS.md) - Comprehensive release guide with attestations โœจ **NEW**
- [TRANSLATION_GUIDE.md](TRANSLATION_GUIDE.md) - Multi-language translation standards and glossary
- [SECURITY.md](SECURITY.md) - Security policy and vulnerability reporting โœจ **NEW**
- [CONTRIBUTING.md](CONTRIBUTING.md) - Contribution guidelines โœจ **NEW**
- [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) - Community standards โœจ **NEW**
- [LICENSE](LICENSE) - Apache License 2.0

### Architecture Documentation Portfolio
| Current State | Future State |
|--------------|-------------|
| [๐Ÿ—๏ธ Architecture](ARCHITECTURE.md) | [๐Ÿš€ Future Architecture](FUTURE_ARCHITECTURE.md) |
| [๐Ÿ“Š Data Model](DATA_MODEL.md) | [๐Ÿ“Š Future Data Model](FUTURE_DATA_MODEL.md) |
| [๐Ÿ”„ Flowcharts](FLOWCHART.md) | [๐Ÿ”„ Future Flowcharts](FUTURE_FLOWCHART.md) |
| [๐Ÿ”„ State Diagrams](STATEDIAGRAM.md) | [๐Ÿ”„ Future State Diagrams](FUTURE_STATEDIAGRAM.md) |
| [๐Ÿ—บ๏ธ Mindmap](MINDMAP.md) | [๐Ÿ—บ๏ธ Future Mindmap](FUTURE_MINDMAP.md) |
| [๐Ÿ’ผ SWOT](SWOT.md) | [๐Ÿ’ผ Future SWOT](FUTURE_SWOT.md) |

### Security Documentation
- [๐Ÿ›ก๏ธ Security Architecture](SECURITY_ARCHITECTURE.md) - Defense-in-depth security controls
- [๐Ÿ”ฎ Future Security Architecture](FUTURE_SECURITY_ARCHITECTURE.md) - Security roadmap
- [๐ŸŽฏ Threat Model](THREAT_MODEL.md) - STRIDE threat analysis and risk assessment
- [๐Ÿ›ก๏ธ CRA Assessment](CRA-ASSESSMENT.md) - EU Cyber Resilience Act conformity
- [๐Ÿ”ง Workflows](WORKFLOWS.md) - CI/CD workflows and automation
- [๐Ÿ” Security Policy](SECURITY.md) - Vulnerability reporting and disclosure

### ISMS Policy Alignment
- [๐Ÿ›ก๏ธ Secure Development Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md) โ€” Architecture documentation requirements
- [๐Ÿ”“ Open Source Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md) โ€” OSS governance, license compliance, security posture evidence
- [๐Ÿ›ก๏ธ CRA Conformity Assessment Process](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CRA_Conformity_Assessment_Process.md) โ€” CRA self-assessment template and methodology
- [๐ŸŽฏ Threat Modeling Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Threat_Modeling.md) โ€” STRIDE/MITRE ATT&CK methodology
- [๐Ÿท๏ธ Classification Framework](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md) โ€” CIA triad, RTO/RPO, business impact

### GitHub Copilot Integration

Riksdagsmonitor uses **GitHub Copilot personas, skills, and agentic workflows** as first-class automation. The directory READMEs are the single source of truth; [`AGENTS.md`](AGENTS.md) and [`SKILLS.md`](SKILLS.md) are the long-form reference catalogs.

- [`.github/agents/README.md`](.github/agents/README.md) โ€” **24 agent files** (14 persona agents + 9 workflow-specialist `.agent.md` + shared `developer.instructions.md`)
- [`.github/skills/README.md`](.github/skills/README.md) โ€” **91 skills** grouped by 12 functional categories
- [`.github/prompts/README.md`](.github/prompts/README.md) โ€” 8 bounded-context prompt modules + Tier-C extension, imported by every agentic news workflow
- [`.github/workflows/README.md`](.github/workflows/README.md) โ€” 45 workflow files (standard + agentic)
- [AGENTS.md](AGENTS.md) โ€” canonical persona catalog with skill-mapping tables and invocation examples
- [SKILLS.md](SKILLS.md) โ€” canonical skill catalog with agent-skill mappings

**14 Persona Agents** (assignable via `assign_copilot_to_issue`):

- **security-architect** ยท **documentation-architect** ยท **quality-engineer** ยท **frontend-specialist** ยท **isms-compliance-manager** ยท **deployment-specialist** ยท **devops-engineer** ยท **intelligence-operative** ยท **news-journalist** ยท **content-generator** ยท **data-pipeline-specialist** ยท **data-visualization-specialist** ยท **task-agent** ยท **ui-enhancement-specialist**

**9 Workflow-Specialist Agents** (`.agent.md`, invoked by name from workflows): `agentic-workflows` ยท `ci-cleaner` ยท `contribution-checker` ยท `create-safe-output-type` ยท `custom-engine-implementation` ยท `grumpy-reviewer` ยท `interactive-agent-designer` ยท `technical-doc-writer` ยท `w3c-specification-writer`

**Available Skills (91)** โ€” see [`.github/skills/README.md`](.github/skills/README.md) for the complete catalog across:

- ๐Ÿ›ก๏ธ Core Infrastructure & Governance (9) ยท ๐Ÿ•ต๏ธ Political Intelligence (11) ยท ๐Ÿ” ISMS & Security (14)
- โš™๏ธ Development & Operations (14) ยท ๐Ÿงช Testing & QA (2) ยท ๐ŸŽจ UI/UX & Design (8)
- ๐Ÿ“ก Data Integration (6) ยท ๐Ÿ“ฐ Journalism & Media (5) ยท ๐Ÿ›๏ธ Government, Regulatory & Economics (7)
- ๐Ÿ—ฃ๏ธ Language & Localization (1) ยท ๐Ÿค– GitHub Agentic Workflows (13) ยท ๐Ÿ“‹ Copilot Patterns (1)

*Economic-Data Integrations (three primary sources, parity-treated):*
- **scb-mcp** (`@jarib/pxweb-mcp@2.0.0`) โ€” official Swedish statistics via PxWebAPI 2.0 (1,200+ tables)
- **world-bank-mcp** (`worldbank-mcp@1.0.1`) + `scripts/world-bank-client.ts` โ€” WGI governance, environment, long-horizon social/education
- **IMF TypeScript client** (`scripts/imf-client.ts`) โ€” WEO, Fiscal Monitor, IFS, GFS_COFOG via Datamapper JSON + SDMX 3.0; macro/fiscal freshness + T+5 projections. **Intentionally not an MCP server** โ€” pure-TS, fully covered by the npm SBOM (ADR 0001).

### External Documentation
- [CIA Platform Documentation](https://hack23.github.io/cia/)
- [CIA JSON Export Specifications](https://github.com/Hack23/cia/tree/master/json-export-specs/visualizations)
- [Hack23 ISMS](https://github.com/Hack23/ISMS)
- [Hack23 Public ISMS](https://github.com/Hack23/ISMS-PUBLIC)
- [Hack23 Secure Development Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md)
- [Hack23 Blog](https://hack23.com/blog.html)

## ๐Ÿ”ฌ Political Intelligence Analysis & News Creation

Riksdagsmonitor is built around two tightly-coupled product lines: **deep political intelligence analysis** and **autonomous news article creation**. Every news article is backed by a reproducible analysis artifact trail on disk.

### End-to-end pipeline

```mermaid
flowchart LR
A[๐Ÿ“ฅ MCP + CIA + SCB + IMF
data download] --> B[๐Ÿ“ Apply methodology
analysis/methodologies]
B --> C[๐Ÿ“‹ Populate templates
analysis/templates]
C --> D[๐Ÿ“‚ Write 9 or 14 artifacts
analysis/daily/$DATE/$SUBFOLDER]
D --> E{๐Ÿšฆ Analysis Gate
prompts/05}
E -- pass --> F[๐Ÿ“ฐ Generate article
prompts/06]
E -- fail --> C
F --> G[๐ŸŒ Translate into
remaining 12 languages]
G --> H[๐Ÿ”€ One PR per article type
prompts/07]
style A fill:#0a0e27,stroke:#00d9ff,color:#e0e0e0
style E fill:#dc3545,stroke:#b02a37,color:#fff
style H fill:#1a1e3d,stroke:#ffbe0b,color:#e0e0e0
```

### Vital documents

| Area | Document | What you'll find |
|------|----------|------------------|
| **Analysis framework** | [`analysis/README.md`](analysis/README.md) | Artifact taxonomy, 9-artifact / 14-artifact contract, daily-output layout |
| **Methodology library** | [`analysis/methodologies/README.md`](analysis/methodologies/README.md) | 11 methodology documents (AI-driven guide, per-document protocol, risk/SWOT/threat frameworks, synthesis, electoral, classification, style) |
| **Template library** | [`analysis/templates/README.md`](analysis/templates/README.md) | 23 templates โ€” 8 core single-type (T1โ€“T8) + 15 extended/Tier-C (scenario, executive-brief, coalition-mathematics, election-2026, historical-parallels, comparative-international, devil's advocate, etc.) |
| **News-generation contract** | [`.github/prompts/README.md`](.github/prompts/README.md) | 8 bounded-context prompt modules + Tier-C extension; single blocking analysis gate |
| **Workflow orchestration** | [`.github/workflows/README.md`](.github/workflows/README.md) + [`WORKFLOWS.md`](WORKFLOWS.md) ยงStage 6.1 | How each `news-*.md` source compiles to a hardened `.lock.yml` with SHA-pinned actions, egress firewall, and five-layer safe-outputs |
| **Specialist personas** | [`.github/agents/README.md`](.github/agents/README.md) | `intelligence-operative`, `news-journalist`, `content-generator` โ€” and 11 more |
| **Rules that guide the agents** | [`.github/skills/README.md`](.github/skills/README.md) | 11 political-intelligence skills + 5 journalism skills + 14 ISMS/security skills |

### Data sources used during analysis

- **Riksdagen & Regeringen** via `riksdag-regering-mcp` (32 tools): MPs, votes, documents, speeches, committees, government docs
- **Statistics Sweden (SCB)** via `@jarib/pxweb-mcp@2.0.0` (1 200+ PxWeb tables)
- **World Bank Open Data** via `worldbank-mcp@1.0.1` + `scripts/world-bank-client.ts` (WGI governance, environment, education)
- **IMF** via `scripts/imf-client.ts` (pure-TS, WEO + Fiscal Monitor + IFS + GFS_COFOG, T+5 projections)
- **CIA platform** (Hack23) โ€” 19 visualisation products consumed nightly via `update-cia-csv-data.yml`

---

## ๐Ÿค– AI-Disrupted News Generation

> *"While traditional newsrooms debate whether AI will replace journalists, Riksdagsmonitor already runs a fully autonomous political intelligence newsroom โ€” 12 agentic workflows, 14 languages, zero human editors, and a publication schedule that would bankrupt any legacy outlet trying to keep up."*

Riksdagsmonitor's **agentic news generation pipeline** is the world's first fully AI-driven political intelligence newsroom for parliamentary monitoring. Powered by Claude Opus (currently 4.7) via GitHub Copilot Coding Agent, our **12 specialized workflows** (11 scheduled + 1 on-demand, plus 1 dedicated translation workflow) autonomously produce deep political analysis โ€” not shallow summaries, but structured intelligence products with source verification, multi-party balance, and GDPR-compliant OSINT methodology.

> ๐Ÿ“š **Directory-level catalogs** (single sources of truth):
> - [`.github/workflows/README.md`](.github/workflows/README.md) โ€” 45 workflow files (21 standard `.yml` + 12 agentic `.md` sources + 12 compiled `.lock.yml`)
> - [`.github/prompts/README.md`](.github/prompts/README.md) โ€” 8 bounded-context prompt modules + `ext/tier-c-aggregation.md`, imported by every news workflow
> - [`.github/agents/README.md`](.github/agents/README.md) โ€” 24 Copilot agent files (14 personas + 9 workflow-specialists + 1 shared developer-instructions)
> - [`.github/skills/README.md`](.github/skills/README.md) โ€” 91 skills grouped by 12 functional categories
> - [`analysis/README.md`](analysis/README.md) โ€” on-disk artifact layout (`analysis/daily/$ARTICLE_DATE/$SUBFOLDER/`) with 9-artifact / 14-artifact contracts
> - [`analysis/methodologies/README.md`](analysis/methodologies/README.md) โ€” 11 methodology documents
> - [`analysis/templates/README.md`](analysis/templates/README.md) โ€” 23 canonical output templates (8 core single-type + 15 extended / Tier-C)
> - [`WORKFLOWS.md`](WORKFLOWS.md) โ€” canonical end-to-end reference (v7.2, includes Stage 6.1 *Agentic Workflow Structure & Prompt Imports*)

### Autonomous Publication Schedule

Every day, the platform's AI operatives awaken on cron schedules, query the Swedish Parliament's open data via **32 MCP tools**, cross-reference government sources, and generate publication-ready intelligence articles in **14 languages** โ€” including RTL support for Arabic and Hebrew.

| Time (UTC) | Workflow | Coverage | Frequency |
|:-----------:|:---------|:---------|:----------|
| ๐ŸŒ… 04:00 | **Committee Reports** | Utskottsbetรคnkanden analysis, voting breakdowns | Monโ€“Fri |
| ๐ŸŒ… 05:00 | **Propositions** | Government bills, legislative impact assessment | Monโ€“Fri |
| โ˜€๏ธ 06:00 | **Motions** | Opposition proposals, party strategy decoding | Monโ€“Fri |
| โ“ 07:00 | **Interpellations** | Ministerial accountability, evasion detection | Monโ€“Fri |
| ๐Ÿ”ฎ 07:00 | **Week Ahead** | Parliamentary calendar preview, agenda intelligence | Friday |
| ๐Ÿ“… 08:00 | **Month Ahead** | Strategic outlook, coalition forecasting | 1st of month |
| ๐Ÿ” 10:00 & 14:00 (Monโ€“Fri); 12:00 (Sat/Sun) | **Realtime Monitor** | Breaking political developments, flash analysis | Monโ€“Fri (ร—2) + weekends |
| ๐ŸŒ 11:00 & 17:00 (Monโ€“Fri); 14:00 (Sat/Sun) | **Translate** | 12 additional languages from EN/SV cores | Daily |
| ๐ŸŒ† 18:00 (16:00 Sat) | **Evening Analysis** | Deep-dive intelligence synthesis | Monโ€“Sat |
| ๐Ÿ“Š 09:00 | **Weekly Review** | Week-in-review scorecard, party performance | Saturday |
| ๐Ÿ“ˆ 10:00 | **Monthly Review** | Comprehensive monthly intelligence assessment | 28th of month |
| ๐Ÿ”ง Manual | **Article Generator** | On-demand article generation / backfill | On-demand |

> _All times are **UTC** (GitHub Actions cron). For local time, convert to CET/CEST. Authoritative schedules defined in `.github/workflows/news-*.lock.yml` workflows โ€” see [`.github/workflows/README.md`](.github/workflows/README.md) for the complete inventory._

> **Result**: Dozens of articles per week across 14 languages โ€” delivering **hundreds of localized intelligence products each month**, generated autonomously with zero editorial intervention.

### ๐Ÿง  Why This Is Different

Traditional AI-generated news is shallow โ€” it rewrites press releases. Riksdagsmonitor's agentic pipeline performs **deep political intelligence analysis**:

- ๐Ÿ”Ž **Source verification**: Every claim traced to official Riksdag/Regering data via MCP
- โš–๏ธ **Multi-party balance**: Algorithmic fairness across all 8 parliamentary parties
- ๐Ÿ“Š **Quantitative rigor**: Voting cohesion metrics, attendance scoring, legislative productivity indices
- ๐ŸŒ **14-language reach**: Native-quality political analysis โ€” not machine translation, but culturally adapted intelligence
- ๐Ÿ›ก๏ธ **GDPR-compliant OSINT**: Only public parliamentary data, with privacy-by-design architecture
- ๐Ÿงช **Quality gates**: HTMLHint validation, link checking, accessibility compliance (WCAG 2.1 AA) โ€” every article passes CI before publication

---

## ๐Ÿ”ฎ Future Roadmap: 2026โ€“2037

> *From agentic news generation to AGI-powered democratic intelligence โ€” the 11-year evolution of Riksdagsmonitor.*
>
> ๐Ÿ“‹ **Detailed planning**: [Future Workflows](FUTURE_WORKFLOWS.md) ยท [Future Mindmap](FUTURE_MINDMAP.md)

### Evolution Overview

```mermaid
%%{init: {"theme": "dark", "themeVariables": {"primaryColor": "#00d9ff", "primaryTextColor": "#e0e0e0", "primaryBorderColor": "#ff006e", "lineColor": "#ffbe0b", "secondaryColor": "#1a1e3d", "tertiaryColor": "#0a0e27", "background": "#0a0e27"}}}%%
timeline
title Riksdagsmonitor Evolution โ€” 2026 to 2037
section Phase 3 โ€” Foundation (2026)
Q1-Q2 : TypeScript migration โœ…
: 12 agentic news workflows โœ…
: 34 GitHub Actions workflows + 10 agent prompt files
: Dual deployment (S3 + GitHub Pages)
Q3-Q4 : CIA data pipeline integration
: Predictive dashboards
: 14-language expansion
: 40 GitHub Actions workflows + 10 agent prompt files
section Phase 4 โ€” Intelligence (2027-2029)
2027 : Real-time data streams
: ML prediction models
: Multi-source OSINT
: Nordic parliament expansion
2028 : Multi-modal content (audio/video)
: Self-healing pipelines
: AI editorial board
: 65 automation assets
2029 : Fully autonomous pipeline
: Expert-level analysis
: API platform launch
: 75 automation assets
section Phase 5 โ€” Scale (2030-2033)
2030-2031 : EU-wide coverage
: 85+ automation assets
: Near-expert analysis
: Sovereign AI evaluation
2032-2033 : Global parliamentary monitoring
: 100 automation assets
: Pre-AGI capabilities
: Every UN language
section Phase 6 โ€” AGI Era (2034-2037)
2034-2035 : AGI-enhanced intelligence
: 195 parliaments monitored
: Predictive governance
: 110+ automation assets
2036-2037 : Transformative democracy platform
: 120+ automation assets
: Post-AGI capabilities
: Democratic safeguards architecture
```

### Phase 3: Agentic Intelligence Foundation (2026)

*Current phase โ€” AI-disrupted news generation operational*

```mermaid
%%{init: {"theme": "dark", "themeVariables": {"primaryColor": "#00d9ff", "primaryTextColor": "#e0e0e0", "primaryBorderColor": "#ff006e", "lineColor": "#ffbe0b", "secondaryColor": "#1a1e3d", "tertiaryColor": "#0a0e27"}}}%%
graph LR
subgraph SGCompleted["โœ… Completed"]
style SGCompleted fill:#006400,stroke:#00d9ff,color:#e0e0e0
A[TypeScript Migration
31 modules] --> B[Agentic News Gen
12 workflows]
B --> C[14 Languages
RTL support]
C --> D[Dual Deploy
S3 + GitHub Pages]
end
subgraph SGProgress["๐Ÿ”„ In Progress"]
style SGProgress fill:#1a1e3d,stroke:#ffbe0b,color:#e0e0e0
E[CIA Data Pipeline
19 products] --> F[Predictive Dashboards
Chart.js/D3.js]
F --> G[Content Expansion
Hundreds of articles/month]
end
subgraph SGPlanned["๐Ÿ“‹ Planned"]
style SGPlanned fill:#0a0e27,stroke:#ff006e,color:#e0e0e0
H[API Platform
GraphQL] --> I[Nordic Expansion
Denmark, Norway, Finland]
end
D --> E
G --> H
```

| Capability | Status | Details |
|:-----------|:------:|:--------|
| TypeScript migration | โœ… Done | 31 modules, 2890 Vitest tests |
| Agentic news generation | โœ… Live | 12 workflows (11 scheduled + 1 on-demand), 14 languages |
| 14-language support | โœ… Live | Including Arabic/Hebrew RTL |
| CIA data integration | ๐Ÿ”„ Active | 19 visualization products |
| Predictive dashboards | ๐Ÿ“‹ Planned | Chart.js/D3.js interactive displays |

### Phase 4: Predictive Intelligence & Nordic Expansion (2027โ€“2029)

```mermaid
%%{init: {"theme": "dark", "themeVariables": {"primaryColor": "#00d9ff", "primaryTextColor": "#e0e0e0", "primaryBorderColor": "#ff006e", "lineColor": "#ffbe0b", "secondaryColor": "#1a1e3d", "tertiaryColor": "#0a0e27"}}}%%
graph TB
subgraph SG2027["2027 โ€” Predictive Analytics"]
style SG2027 fill:#1a1e3d,stroke:#00d9ff,color:#e0e0e0
PA1[๐Ÿ”ฎ ML Election Models
Coalition probability scoring]
PA2[๐Ÿ“ก Real-Time Streams
Live parliamentary feeds]
PA3[๐ŸŒ Nordic Expansion
DK ยท NO ยท FI parliaments]
PA4[๐Ÿ” Multi-Source OSINT
Media + social + official]
end
subgraph SG2028["2028 โ€” Multi-Modal Intelligence"]
style SG2028 fill:#1a1e3d,stroke:#ffbe0b,color:#e0e0e0
MM1[๐ŸŽ™๏ธ Audio/Video Analysis
Debate tone detection]
MM2[๐Ÿค– AI Editorial Board
Autonomous quality control]
MM3[๐Ÿ”ง Self-Healing Pipelines
Auto-recovery workflows]
MM4[๐Ÿ“Š 65 Automation Assets]
end
subgraph SG2029["2029 โ€” Autonomous Platform"]
style SG2029 fill:#1a1e3d,stroke:#ff006e,color:#e0e0e0
AP1[๐Ÿš€ Fully Autonomous Pipeline
Zero human intervention]
AP2[๐Ÿง  Expert-Level Analysis
PhD-equivalent insight]
AP3[๐Ÿ”Œ API Platform Launch
GraphQL + REST]
AP4[๐Ÿ“Š 75 Automation Assets]
end
PA1 --> MM1
PA2 --> MM2
PA3 --> MM3
PA4 --> MM4
MM1 --> AP1
MM2 --> AP2
MM3 --> AP3
MM4 --> AP4
```

### Phase 5: EU-Wide Coverage & Pre-AGI (2030โ€“2033)

```mermaid
%%{init: {"theme": "dark", "themeVariables": {"primaryColor": "#00d9ff", "primaryTextColor": "#e0e0e0", "primaryBorderColor": "#ff006e", "lineColor": "#ffbe0b", "secondaryColor": "#1a1e3d", "tertiaryColor": "#0a0e27"}}}%%
graph LR
subgraph SGEU["2030-2031 โ€” EU Scale"]
style SGEU fill:#1a1e3d,stroke:#00d9ff,color:#e0e0e0
EU1[๐Ÿ‡ช๐Ÿ‡บ 27 EU Parliaments
+ European Parliament]
EU2[๐Ÿง  Near-Expert Analysis
Opus 8.x capabilities]
EU3[๐Ÿ“Š 85+ Automation Assets
Continent-wide coverage]
EU4[๐Ÿ›๏ธ Sovereign AI Evaluation
EU AI Act compliance]
end
subgraph SGGL["2032-2033 โ€” Global Reach"]
style SGGL fill:#1a1e3d,stroke:#ff006e,color:#e0e0e0
GL1[๐ŸŒ Global Parliamentary Watch
100+ democracies]
GL2[๐Ÿ—ฃ๏ธ Every UN Language
Native-quality output]
GL3[๐Ÿ“Š 100 Automation Assets
Pre-AGI capabilities]
GL4[๐Ÿ”’ Zero-Trust Architecture
Quantum-safe cryptography]
end
EU1 --> GL1
EU2 --> GL2
EU3 --> GL3
EU4 --> GL4
```

### Phase 6: AGI Era & Transformative Democracy (2034โ€“2037)

> *When AGI or near-AGI systems emerge, Riksdagsmonitor's modular architecture is designed with flexibility to adapt to future AI paradigm shifts โ€” including potential AGI capabilities โ€” while maintaining democratic safeguards.*

```mermaid
%%{init: {"theme": "dark", "themeVariables": {"primaryColor": "#ff006e", "primaryTextColor": "#e0e0e0", "primaryBorderColor": "#00d9ff", "lineColor": "#ffbe0b", "secondaryColor": "#1a1e3d", "tertiaryColor": "#0a0e27"}}}%%
graph TB
subgraph SGAGI["๐Ÿค– 6.1 AGI-Enhanced Intelligence"]
style SGAGI fill:#1a1e3d,stroke:#ff006e,color:#e0e0e0
AGI1["๐Ÿค– Autonomous Analysis
Real-time intelligence across
all 195 parliamentary systems"]
AGI2["๐ŸŒ Universal Language
Every UN language
supported natively"]
AGI3["๐Ÿ“Š Predictive Governance
Policy impact prediction
before legislation proposed"]
end
subgraph SGSAFE["โš–๏ธ 6.2 Democratic Safeguards"]
style SGSAFE fill:#0a0e27,stroke:#00d9ff,color:#e0e0e0
SAFE1["โš–๏ธ Ethical AI Governance
Human oversight maintained
regardless of AI capability"]
SAFE2["๐Ÿ›ก๏ธ Anti-Weaponization
Architecture prevents
manipulation or misuse"]
SAFE3["๐Ÿ”’ Constitutional Alignment
Democratic values encoded
in platform architecture"]
end
subgraph SGPARA["๐Ÿงฌ 6.3 Paradigm Readiness"]
style SGPARA fill:#0a0e27,stroke:#ffbe0b,color:#e0e0e0
PARA1["โš›๏ธ Quantum AI Ready
Post-quantum cryptography
Quantum ML integration"]
PARA2["๐Ÿง  Neuromorphic Computing
Brain-inspired architectures
Edge intelligence deployment"]
PARA3["๐ŸŒ Transformative Platform
120+ automation assets ยท 195 parliaments
Global democratic intelligence"]
end
AGI1 --> SAFE1
AGI2 --> SAFE2
AGI3 --> SAFE3
SAFE1 --> PARA1
SAFE2 --> PARA2
SAFE3 --> PARA3
```

**Strategic Considerations for Phase 6:**
- ๐Ÿค– **Autonomous analysis**: AGI-powered real-time political intelligence across all 195 parliamentary systems
- ๐ŸŒ **Universal language support**: Every UN language supported natively
- ๐Ÿ“Š **Predictive governance**: Policy impact prediction *before* legislation is proposed
- โš–๏ธ **Ethical AI governance**: Human oversight maintained regardless of AI capability level
- ๐Ÿ›ก๏ธ **Democratic safeguards**: Platform architecture prevents weaponization or manipulation

### ๐Ÿ“ˆ AI Model Evolution Strategy

**Illustrative assumptions** *(high uncertainty โ€” AI landscape evolves rapidly)*:
- Model updates assumed roughly quarterly; actual cadence will vary by vendor and paradigm
- Version numbers (Opus 5.xโ€“12.x) are illustrative โ€” actual products may differ significantly
- Competitors (OpenAI, Google, Meta, EU sovereign AI) evaluated at each major release cycle
- Architecture must accommodate potential paradigm shifts (quantum AI, neuromorphic computing, or entirely new approaches)

**Workflow Count Projection:**

| Year | Automation Assets | AI Model | Key Capability |
|:----:|:---------------:|:---------|:---------------|
| **2026** | 44โ†’50 | Opus 4.7โ€“4.9 | ๐Ÿค– Agentic news generation (current) |
| **2027** | 50โ€“55 | Opus 5.x | ๐Ÿ”ฎ Predictive analytics & Nordic expansion |
| **2028** | 55โ€“65 | Opus 6.x | ๐ŸŽ™๏ธ Multi-modal content (audio/video) |
| **2029** | 65โ€“75 | Opus 7.x | ๐Ÿš€ Fully autonomous pipeline |
| **2030** | 75โ€“85 | Opus 8.x | ๐Ÿง  Near-expert analysis |
| **2031โ€“2033** | 85โ€“100 | Opus 9โ€“10.x / Pre-AGI | ๐ŸŒ Global parliamentary coverage |
| **2034โ€“2037** | 100โ€“120+ | AGI / Post-AGI | โšก Transformative democracy platform |

```mermaid
%%{init: {"theme": "dark", "themeVariables": {"primaryColor": "#00d9ff", "primaryTextColor": "#e0e0e0", "primaryBorderColor": "#ff006e", "lineColor": "#ffbe0b", "secondaryColor": "#1a1e3d", "tertiaryColor": "#0a0e27"}}}%%
xychart-beta
title "Riksdagsmonitor Workflow Growth Projection (2026โ€“2037)"
x-axis ["2026", "2027", "2028", "2029", "2030", "2031", "2032", "2033", "2034", "2035", "2036", "2037"]
y-axis "Automation Assets (Workflows + Prompt Files)" 0 --> 130
bar [47, 53, 60, 70, 80, 88, 95, 100, 105, 110, 115, 120]
line [47, 53, 60, 70, 80, 88, 95, 100, 105, 110, 115, 120]
```

> Note: The chart values are midpoint estimates within the projected ranges in the table above and are illustrative, not exact counts.

### ๐Ÿ“‹ Detailed Future Planning

| Document | Description |
|:---------|:------------|
| ๐Ÿ“‹ [**Future Workflows**](FUTURE_WORKFLOWS.md) | Complete 11-year workflow evolution roadmap with architecture diagrams |
| ๐Ÿ—บ๏ธ [**Future Mindmap**](FUTURE_MINDMAP.md) | Capability expansion map from Swedish monitoring to global democratic intelligence |
| ๐Ÿš€ [Future Architecture](FUTURE_ARCHITECTURE.md) | Architectural evolution from static site to AI-native platform |
| ๐Ÿ”’ [Future Security Architecture](FUTURE_SECURITY_ARCHITECTURE.md) | Security roadmap including post-quantum cryptography |
| ๐Ÿ’ผ [Future SWOT](FUTURE_SWOT.md) | Strategic opportunities in democratic technology |

---

## ๐Ÿข About Hack23

**Hack23 AB (Org.nr 5595347807)** - Swedish cybersecurity and open-source intelligence consultancy

- ๐ŸŒ **Website**: [www.hack23.com](https://www.hack23.com)
- ๐Ÿ’ผ **LinkedIn**: [Company Profile](https://www.linkedin.com/company/hack23/)
- ๐Ÿ‘จโ€๐Ÿ’ป **Founder**: [James Pether Sรถrling, CISSP, CISM](https://www.linkedin.com/in/jamessorling/)
- ๐Ÿ”’ **ISMS**: [Public ISMS Repository](https://github.com/Hack23/ISMS-PUBLIC)

## ๐Ÿค Contributing

Contributions welcome! Please follow Hack23's secure development standards:

1. **Fork** the repository
2. **Create** a feature branch with descriptive name
3. **Sign** commits with GPG key
4. **Test** changes locally (HTML validation, link checking)
5. **Submit** pull request with comprehensive description
6. **Address** code review feedback

**Requirements:**
- GitHub account with MFA enabled
- GPG-signed commits
- HTML validation passing
- No security vulnerabilities introduced

## ๐Ÿ“œ License

Copyright ยฉ 2008-2026 Hack23 AB (Org.nr 5595347807)

Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) file for details.

## ๐Ÿ”— Links

- **Website:** [riksdagsmonitor.com](https://riksdagsmonitor.com)
- **CIA Platform:** [www.hack23.com/cia](https://www.hack23.com/cia)
- **GitHub:** [github.com/Hack23/riksdagsmonitor](https://github.com/Hack23/riksdagsmonitor)
- **Hack23:** [www.hack23.com](https://www.hack23.com)
- **ISMS:** [github.com/Hack23/ISMS](https://github.com/Hack23/ISMS)
- **LinkedIn:** [James Pether Sรถrling](https://www.linkedin.com/in/jamessorling/)

## ๐Ÿ‘จโ€๐Ÿ’ป Maintainer

**James Pether Sรถrling**
CISSP, CISM
CEO, Hack23 AB
[LinkedIn](https://www.linkedin.com/in/jamessorling/) | [GitHub](https://github.com/pethers)

---

*Monitor political activity in Sweden with systematic transparency*