riksdagsmonitor 0.8.62 → 0.8.65
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.
- package/README.md +366 -972
- package/SECURITY.md +57 -4
- package/dist/lib/cia/csv-utils.d.ts.map +1 -1
- package/dist/lib/cia/csv-utils.js +15 -34
- package/dist/lib/cia/csv-utils.js.map +1 -1
- package/dist/lib/cia/dashboard-init.d.ts +1 -1
- package/dist/lib/cia/dashboard-init.d.ts.map +1 -1
- package/dist/lib/cia/dashboard-init.js +7 -6
- package/dist/lib/cia/dashboard-init.js.map +1 -1
- package/dist/lib/shared/register-globals.d.ts +1 -1
- package/dist/lib/shared/register-globals.d.ts.map +1 -1
- package/dist/lib/shared/register-globals.js +6 -4
- package/dist/lib/shared/register-globals.js.map +1 -1
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
# 🗳️ Riksdagsmonitor
|
|
2
2
|
|
|
3
|
-
> Swedish
|
|
4
|
-
|
|
5
|
-
## 🎯 Mission
|
|
6
|
-
|
|
7
|
-
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.
|
|
3
|
+
> **Swedish Political Intelligence Platform** — democratic transparency, evidence-based analysis and AI-generated political news, powered by official open data and a fully autonomous agentic newsroom.
|
|
8
4
|
|
|
9
5
|
<table>
|
|
10
6
|
<tr>
|
|
@@ -22,7 +18,9 @@ Riksdagsmonitor is a comprehensive intelligence platform for monitoring politica
|
|
|
22
18
|
</div>
|
|
23
19
|
</td>
|
|
24
20
|
<td>
|
|
25
|
-
<p><strong
|
|
21
|
+
<p><strong>🕵️ Political intelligence · 🔍 Democratic transparency · 🤖 AI-generated news · 📊 50+ years of evidence</strong></p>
|
|
22
|
+
<p>Riksdagsmonitor monitors Sweden's Riksdag (Parliament), the Government (Regeringskansliet) and public agencies (Myndigheter) with structured intelligence techniques — ACH, SWOT, PESTLE, STRIDE, political-risk scoring and OSINT/INTOP tradecraft — applied to <strong>349 current MPs</strong>, <strong>2,494 historical politicians (1971–2024)</strong>, <strong>3.5M+ votes</strong> and <strong>109,000+ parliamentary documents</strong>.</p>
|
|
23
|
+
<p>An autonomous AI newsroom — 11 agentic workflows, Claude Opus, zero human editors — turns this evidence into <strong>publication-ready intelligence articles in 14 languages, every day</strong>.</p>
|
|
26
24
|
<div>
|
|
27
25
|
<a href="https://scorecard.dev/viewer/?uri=github.com/Hack23/riksdagsmonitor">
|
|
28
26
|
<img src="https://api.securityscorecards.dev/projects/github.com/Hack23/riksdagsmonitor/badge" alt="OpenSSF Scorecard">
|
|
@@ -38,1118 +36,514 @@ Riksdagsmonitor is a comprehensive intelligence platform for monitoring politica
|
|
|
38
36
|
</a>
|
|
39
37
|
</div>
|
|
40
38
|
<div>
|
|
41
|
-
<a href="https://riksdagsmonitor.com"><strong>🌐
|
|
39
|
+
<a href="https://riksdagsmonitor.com"><strong>🌐 Live Platform</strong></a> •
|
|
42
40
|
<a href="https://riksdagsmonitor.com/political-intelligence.html"><strong>🕵️ Political Intelligence</strong></a> •
|
|
43
|
-
<a href="https://riksdagsmonitor.com/
|
|
44
|
-
<a href="https://
|
|
45
|
-
<a href="https://
|
|
46
|
-
<a href="https://hack23.com/riksdagsmonitor-docs.html"><strong>📚 Documentation</strong></a>
|
|
41
|
+
<a href="https://riksdagsmonitor.com/news/index.html"><strong>📰 AI Newsroom</strong></a> •
|
|
42
|
+
<a href="https://riksdagsmonitor.com/dashboard/index.html"><strong>📊 Intelligence Dashboard</strong></a> •
|
|
43
|
+
<a href="https://riksdagsmonitor.com/sitemap.html"><strong>🗺️ Sitemap</strong></a>
|
|
47
44
|
</div>
|
|
48
45
|
</td>
|
|
49
46
|
</tr>
|
|
50
47
|
</table>
|
|
51
48
|
|
|
52
|
-
[](https://scorecard.dev/viewer/?uri=github.com/Hack23/riksdagsmonitor)
|
|
53
|
-
[](https://github.com/Hack23/riksdagsmonitor/actions/workflows/quality-checks.yml)
|
|
54
|
-
[](https://github.com/Hack23/riksdagsmonitor/actions/workflows/dependency-review.yml)
|
|
55
|
-
[](https://www.bestpractices.dev/projects/12069)
|
|
56
|
-
[](https://github.com/Hack23/riksdagsmonitor/blob/main/LICENSE)
|
|
57
|
-
[](https://github.com/Hack23/ISMS-PUBLIC)
|
|
58
|
-
[](https://deepwiki.com/Hack23/riksdagsmonitor)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
## 📊 Quality Metrics
|
|
63
|
-
|
|
64
|
-
### CI/CD & Security
|
|
65
49
|
[](https://scorecard.dev/viewer/?uri=github.com/Hack23/riksdagsmonitor)
|
|
66
50
|
[](https://github.com/Hack23/riksdagsmonitor/actions/workflows/quality-checks.yml)
|
|
67
51
|
[](https://github.com/Hack23/riksdagsmonitor/actions/workflows/dependency-review.yml)
|
|
68
52
|
[](https://github.com/Hack23/riksdagsmonitor/actions/workflows/codeql.yml)
|
|
69
|
-
|
|
70
|
-
### Testing
|
|
71
53
|
[](https://github.com/Hack23/riksdagsmonitor/actions/workflows/javascript-testing.yml)
|
|
72
|
-
[](https://github.com/Hack23/riksdagsmonitor/actions/workflows/jsdoc-validation.yml)
|
|
73
54
|
[](https://github.com/Hack23/riksdagsmonitor/actions/workflows/translation-validation.yml)
|
|
74
|
-
|
|
75
|
-
### Documentation & Release
|
|
76
55
|
[](https://github.com/Hack23/riksdagsmonitor/actions/workflows/release.yml)
|
|
77
|
-
[](https://riksdagsmonitor.com/docs/cypress/)
|
|
80
|
-
|
|
81
|
-
### Compliance & Standards
|
|
82
|
-
[](LICENSE)
|
|
56
|
+
[](https://www.bestpractices.dev/projects/12069)
|
|
57
|
+
[](https://github.com/Hack23/riksdagsmonitor/blob/main/LICENSE)
|
|
83
58
|
[](https://github.com/Hack23/ISMS-PUBLIC)
|
|
84
59
|
[](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md)
|
|
85
60
|
[](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md)
|
|
86
61
|
[](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md)
|
|
87
62
|
[](https://deepwiki.com/Hack23/riksdagsmonitor)
|
|
88
63
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
## 📊 Project Classification
|
|
92
|
-
|
|
93
|
-
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:
|
|
94
|
-
|
|
95
|
-
### 🎯 Project Classification
|
|
96
|
-
[](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#project-type-classifications)
|
|
97
|
-
[](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#project-type-classifications)
|
|
98
|
-
|
|
99
|
-
### 🔒 Security Classification (CIA Triad)
|
|
100
|
-
[](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#confidentiality-levels)
|
|
101
|
-
[](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#integrity-levels)
|
|
102
|
-
[](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#availability-levels)
|
|
64
|
+
---
|
|
103
65
|
|
|
104
|
-
|
|
105
|
-
**Integrity:** High - Automated validation, digital signatures (Git commits), accurate political data required
|
|
106
|
-
**Availability:** High - 99.998% design availability target (underpinned by AWS CloudFront 99.9% SLA), automated failover (AWS multi-region, GitHub Pages DR)
|
|
66
|
+
## 🎯 Mission
|
|
107
67
|
|
|
108
|
-
|
|
109
|
-
[](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#privacy-levels)
|
|
68
|
+
> **Strengthen Swedish democracy through systematic transparency.**
|
|
110
69
|
|
|
111
|
-
|
|
70
|
+
Riksdagsmonitor exists to put **rigorous, evidence-based political intelligence** in the hands of every citizen, journalist, researcher and policymaker. We combine:
|
|
112
71
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
72
|
+
- 🕵️ **Structured intelligence tradecraft** — ACH, SWOT, PESTLE, STRIDE, political-risk scoring, OSINT/INTOP methodology, ICD-203 Key Judgments
|
|
73
|
+
- 🔍 **Democratic transparency** — every claim traceable to a primary source (`dok_id`, vote count, named MP, government document) or it does not get published
|
|
74
|
+
- 🤖 **AI-generated political news** — a fully autonomous newsroom turning open data into 14-language analysis articles, daily
|
|
75
|
+
- 📊 **50+ years of historical evidence** — 1971–2024 voting records, document corpus, and party-evolution analytics from the [Citizen Intelligence Agency (CIA)](https://github.com/Hack23/cia) platform
|
|
76
|
+
- ⚖️ **Neutrality & GDPR by design** — equal treatment of all 8 parliamentary parties, public-data only, privacy-by-design architecture, explicit democratic safeguards
|
|
116
77
|
|
|
117
|
-
**
|
|
118
|
-
**RPO (Recovery Point Objective):** 4-24 hours - Daily data pipeline updates, Git version control, S3 versioning
|
|
78
|
+
The platform is **non-partisan, open-source (Apache-2.0), and operated under the [Hack23 ISMS](https://github.com/Hack23/ISMS-PUBLIC)** with full ISO 27001:2022 / NIST CSF 2.0 / CIS Controls v8.1 alignment. It does not collect user data, does not run ads, does not push narratives, and is architecturally designed so it cannot be weaponised for partisan influence.
|
|
119
79
|
|
|
120
|
-
|
|
80
|
+
---
|
|
121
81
|
|
|
122
|
-
|
|
123
|
-
|-----------------|-------|-------------|
|
|
124
|
-
| **Financial** | [](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#financial-impact-levels) | Minimal financial impact (<$500 daily) - Open-source project, no revenue dependency |
|
|
125
|
-
| **Operational** | [](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#operational-impact-levels) | Partial service impact - Swedish political transparency temporarily unavailable |
|
|
126
|
-
| **Reputational** | [](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#reputational-impact-levels) | Industry attention - Transparency advocates may notice outage |
|
|
127
|
-
| **Regulatory** | [](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md#regulatory-impact-levels) | No regulatory impact - Public information dissemination only |
|
|
82
|
+
## 🌐 Explore the Platform
|
|
128
83
|
|
|
129
|
-
|
|
84
|
+
Five flagship pages anchor the public site. Each is **multilingual (14 languages)**, **WCAG 2.1 AA accessible**, **SEO-optimised** with JSON-LD structured data and `hreflang` alternates, and **CSP-hardened** with Subresource Integrity (SRI) on every CDN asset.
|
|
130
85
|
|
|
131
|
-
|
|
86
|
+
<table>
|
|
87
|
+
<thead>
|
|
88
|
+
<tr><th width="80" align="center">Icon</th><th>Page</th><th>What it does</th></tr>
|
|
89
|
+
</thead>
|
|
90
|
+
<tbody>
|
|
91
|
+
<tr>
|
|
92
|
+
<td align="center">🌐</td>
|
|
93
|
+
<td><a href="https://riksdagsmonitor.com/"><strong>Live Platform — riksdagsmonitor.com</strong></a></td>
|
|
94
|
+
<td>
|
|
95
|
+
The public homepage and primary entry point. Front-loads the <strong>current coalition status</strong> (e.g. <em>Tidö Agreement</em> — 176/349 seats, fragility indicators, CIA risk alerts), then deep-dives into the full intelligence stack:
|
|
96
|
+
<ul>
|
|
97
|
+
<li>🗳️ <strong>Election-cycle intelligence</strong> — 40 years (1994–2034)</li>
|
|
98
|
+
<li>🏛️ <strong>Party performance & effectiveness</strong> — 1990–2026, 8 parties</li>
|
|
99
|
+
<li>🤝 <strong>Committee networks & productivity</strong> — 15 committees</li>
|
|
100
|
+
<li>📊 <strong>Coalition & voting-pattern analysis</strong></li>
|
|
101
|
+
<li>🌡️ <strong>Seasonal activity with Z-score anomaly detection</strong> — 2002–2025</li>
|
|
102
|
+
<li>🔮 <strong>Pre-election monitoring</strong></li>
|
|
103
|
+
<li>🎖️ <strong>Ministry risk & influence</strong></li>
|
|
104
|
+
<li>🚨 <strong>45-rule × 349-MP risk heat map</strong> (live)</li>
|
|
105
|
+
</ul>
|
|
106
|
+
Updated daily at 03:00 CET.
|
|
107
|
+
</td>
|
|
108
|
+
</tr>
|
|
109
|
+
<tr>
|
|
110
|
+
<td align="center">🕵️</td>
|
|
111
|
+
<td><a href="https://riksdagsmonitor.com/political-intelligence.html"><strong>Political Intelligence Index</strong></a></td>
|
|
112
|
+
<td>
|
|
113
|
+
The single canonical entry point for OSINT/INTOP researchers. Catalogues every <strong>methodology</strong> that governs analysis on the platform:
|
|
114
|
+
<ul>
|
|
115
|
+
<li>📐 AI-Driven Analysis Guide</li>
|
|
116
|
+
<li>🔍 OSINT Tradecraft Standards</li>
|
|
117
|
+
<li>⚠️ Political Risk Methodology</li>
|
|
118
|
+
<li>💼 Political SWOT Framework</li>
|
|
119
|
+
<li>🎯 Political Threat Framework</li>
|
|
120
|
+
<li>🏷️ Political Classification Guide</li>
|
|
121
|
+
<li>🗳️ Electoral Domain Methodology</li>
|
|
122
|
+
<li>🧬 Synthesis Methodology</li>
|
|
123
|
+
<li>📈 IMF & 🌍 World Bank Indicator Mappings</li>
|
|
124
|
+
<li>📏 Reference-Quality Thresholds · ✍️ Political Style Guide</li>
|
|
125
|
+
</ul>
|
|
126
|
+
Plus the full daily artifact catalogue (Family A baseline · Family B · Family C synthesis · Family D extension). Each item links straight to the source-of-truth on GitHub. Available in 14 languages (append <code>_sv</code>, <code>_de</code>, <code>_ar</code>, …).
|
|
127
|
+
</td>
|
|
128
|
+
</tr>
|
|
129
|
+
<tr>
|
|
130
|
+
<td align="center">📰</td>
|
|
131
|
+
<td><a href="https://riksdagsmonitor.com/news/index.html"><strong>AI-Generated News & Analysis</strong></a></td>
|
|
132
|
+
<td>
|
|
133
|
+
The world's first fully AI-driven political-intelligence newsroom for parliamentary monitoring. <strong>11 specialised agentic workflows</strong> (10 scheduled + 1 on-demand, powered by Claude Opus via GitHub Copilot Coding Agent) autonomously produce daily intelligence articles:
|
|
134
|
+
<ul>
|
|
135
|
+
<li>🌅 Committee reports · 🏛️ propositions · ✊ motions · ❓ interpellations</li>
|
|
136
|
+
<li>🔮 Week-ahead · 📅 month-ahead · 🔍 real-time monitor</li>
|
|
137
|
+
<li>🌆 Evening analysis · 📊 weekly review · 📈 monthly review</li>
|
|
138
|
+
</ul>
|
|
139
|
+
Source verification, multi-party balance and GDPR-compliant OSINT methodology baked in. Every article carries machine-readable provenance through JSON-LD <code>NewsArticle.isBasedOn</code>, links back to the analysis artifacts that produced it, and is published in 14 languages.
|
|
140
|
+
</td>
|
|
141
|
+
</tr>
|
|
142
|
+
<tr>
|
|
143
|
+
<td align="center">📊</td>
|
|
144
|
+
<td><a href="https://riksdagsmonitor.com/dashboard/index.html"><strong>CIA Intelligence Dashboard</strong></a></td>
|
|
145
|
+
<td>
|
|
146
|
+
Interactive Chart.js / D3.js intelligence dashboard powered by the <a href="https://github.com/Hack23/cia">Citizen Intelligence Agency (CIA)</a> data products:
|
|
147
|
+
<ul>
|
|
148
|
+
<li>📋 Overview metrics — MPs, parties, risk rules, coalition seats</li>
|
|
149
|
+
<li>🚨 Risk alerts — Critical / Major / Minor (last 90 days)</li>
|
|
150
|
+
<li>🏛️ Party performance analysis</li>
|
|
151
|
+
<li>🗳️ Swedish Election 2026 predictions — coalition scenarios & key factors</li>
|
|
152
|
+
<li>👥 Top-10 most influential MPs — network analysis</li>
|
|
153
|
+
<li>🔥 Voting-patterns heat map</li>
|
|
154
|
+
<li>🤝 Committee network analysis</li>
|
|
155
|
+
<li>🎖️ Ministry performance</li>
|
|
156
|
+
<li>📊 Parliamentary demographics · 📄 document activity · 📉 risk-score evolution</li>
|
|
157
|
+
</ul>
|
|
158
|
+
Local-first data loading with 1-hour cache, keyboard navigable, CSP-compliant.
|
|
159
|
+
</td>
|
|
160
|
+
</tr>
|
|
161
|
+
<tr>
|
|
162
|
+
<td align="center">🗺️</td>
|
|
163
|
+
<td><a href="https://riksdagsmonitor.com/sitemap.html"><strong>Sitemap (Human + Machine)</strong></a></td>
|
|
164
|
+
<td>Human-readable navigation of every page on the platform plus the machine-readable <a href="https://riksdagsmonitor.com/sitemap.xml"><code>sitemap.xml</code></a> and <a href="https://riksdagsmonitor.com/rss.xml"><code>rss.xml</code></a> feeds. Daily refreshed; honours <code>robots.txt</code> and search-engine indexing best practices.</td>
|
|
165
|
+
</tr>
|
|
166
|
+
</tbody>
|
|
167
|
+
</table>
|
|
132
168
|
|
|
133
|
-
|
|
134
|
-
|----------------|-------------|----------|----------------------|
|
|
135
|
-
| 🟢 **Public** | Information intended for public disclosure | Website content, Swedish Riksdag open data, documentation | No restrictions, published on GitHub Pages |
|
|
136
|
-
| 🟡 **Internal** | Information for internal use only | GitHub Actions secrets, deployment credentials | GitHub organization access only, MFA required |
|
|
137
|
-
| 🟠 **Confidential** | Sensitive business information | Not applicable to this project | N/A |
|
|
138
|
-
| 🔴 **Restricted** | Highly sensitive information | Not applicable to this project | N/A |
|
|
169
|
+
**🌍 14 supported languages:** English · Swedish · Danish · Norwegian · Finnish · German · French · Spanish · Dutch · Arabic (RTL) · Hebrew (RTL) · Japanese · Korean · Chinese.
|
|
139
170
|
|
|
140
|
-
|
|
171
|
+
---
|
|
141
172
|
|
|
142
|
-
|
|
143
|
-
- All website HTML/CSS content (14 languages)
|
|
144
|
-
- Swedish Parliament data (MPs, votes, documents, committees)
|
|
145
|
-
- Election results and statistics
|
|
146
|
-
- Government budget and spending data
|
|
147
|
-
- All source code and documentation
|
|
173
|
+
## 🤖 AI-Generated Political Intelligence News
|
|
148
174
|
|
|
149
|
-
|
|
150
|
-
- GitHub Actions secrets (tokens if used; no long-lived PATs)
|
|
151
|
-
- AWS IAM credentials (ephemeral via OIDC)
|
|
152
|
-
- Deployment pipeline configurations
|
|
175
|
+
> *"While traditional newsrooms debate whether AI will replace journalists, Riksdagsmonitor already runs a fully autonomous political-intelligence newsroom — 11 agentic workflows, 14 languages, zero human editors, and a publication schedule that would bankrupt any legacy outlet trying to keep up."*
|
|
153
176
|
|
|
154
|
-
|
|
155
|
-
- ❌ No user accounts or authentication
|
|
156
|
-
- ❌ No non-public or end-user personally identifiable information (PII)
|
|
157
|
-
- ✅ Only public-figure data from official Swedish Parliament records (MP names, roles, votes)
|
|
158
|
-
- ❌ No financial transactions or payment data
|
|
159
|
-
- ❌ No confidential government information
|
|
177
|
+
### What makes it different
|
|
160
178
|
|
|
161
|
-
|
|
179
|
+
Traditional AI-generated news is shallow — it rewrites press releases. Riksdagsmonitor's pipeline performs **deep political-intelligence analysis** before a single sentence of an article is written:
|
|
162
180
|
|
|
163
|
-
**
|
|
164
|
-
-
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
181
|
+
- 🔎 **Source verification** — every claim traced to official Riksdag/Regering data via the `riksdag-regering` MCP server (32+ tools)
|
|
182
|
+
- ⚖️ **Multi-party balance** — algorithmic fairness across all 8 parliamentary parties, no editorial bias possible
|
|
183
|
+
- 📊 **Quantitative rigor** — voting cohesion metrics, attendance scoring, legislative productivity indices, ICD-203 Key Judgments, 45-rule transparency scoring
|
|
184
|
+
- 🌐 **14-language reach** — culturally adapted political analysis with RTL support (Arabic / Hebrew), not machine translation
|
|
185
|
+
- 🛡️ **GDPR-compliant OSINT** — only public parliamentary data; political opinions are processed under GDPR Art. 9(2)(e) (manifestly made public) / 9(2)(g) (substantial public interest)
|
|
186
|
+
- 🚦 **Hard analysis gate** — every news workflow MUST produce 9 (single-type) or 14 (Tier-C) analysis artifacts on disk before article generation; the gate at [`.github/prompts/05-analysis-gate.md`](.github/prompts/05-analysis-gate.md) is non-negotiable
|
|
187
|
+
- 🧪 **Quality gates** — HTMLHint validation, link checking, accessibility (WCAG 2.1 AA) and translation parity in CI before publication
|
|
168
188
|
|
|
169
|
-
|
|
170
|
-
- Stored in GitHub Secrets (encrypted at rest)
|
|
171
|
-
- AWS credentials via OIDC (no long-lived keys)
|
|
172
|
-
- Accessed only via secure GitHub Actions workflows
|
|
173
|
-
- Least privilege principle enforced
|
|
174
|
-
- Regular rotation and audit
|
|
189
|
+
### End-to-end pipeline
|
|
175
190
|
|
|
176
|
-
|
|
191
|
+
```mermaid
|
|
192
|
+
flowchart LR
|
|
193
|
+
A[📥 MCP + CIA + SCB + IMF<br/>data download] --> B[📐 Apply methodology<br/>analysis/methodologies]
|
|
194
|
+
B --> C[📋 Populate templates<br/>analysis/templates]
|
|
195
|
+
C --> D[📂 Write 9 or 14 artifacts<br/>analysis/daily/$DATE/$SUBFOLDER]
|
|
196
|
+
D --> E{🚦 Analysis Gate<br/>prompts/05}
|
|
197
|
+
E -- pass --> F[📰 Aggregate → article.md<br/>scripts/aggregate-analysis.ts]
|
|
198
|
+
E -- fail --> C
|
|
199
|
+
F --> G[🌐 Sanitised HTML<br/>scripts/render-articles.ts]
|
|
200
|
+
G --> H[🌍 Translate into<br/>12 other languages]
|
|
201
|
+
H --> I[🔀 One PR per article type<br/>S3 + CloudFront deploy]
|
|
202
|
+
style A fill:#0a0e27,stroke:#00d9ff,color:#e0e0e0
|
|
203
|
+
style E fill:#dc3545,stroke:#b02a37,color:#fff
|
|
204
|
+
style I fill:#1a1e3d,stroke:#ffbe0b,color:#e0e0e0
|
|
205
|
+
```
|
|
177
206
|
|
|
178
|
-
-
|
|
179
|
-
- **NIST CSF 2.0 PR.DS** - Data Security
|
|
180
|
-
- **CIS Controls v8.1 Control 3** - Data Protection
|
|
181
|
-
- **GDPR** - Applicable for public-official data processing (public interest and legitimate interest grounds)
|
|
182
|
-
- **Hack23 Classification Framework** - [Full framework documentation](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md)
|
|
207
|
+
A new `.md` artifact written anywhere under `analysis/daily/$DATE/$SUB/` is enough to publish an English + Swedish HTML article on the next CI build — there is no manual scaffolding, no template fill-in, and no per-type generator class. The dedicated `news-translate` workflow then propagates to the remaining 12 languages out-of-band. See **[`Article-Generation.md`](Article-Generation.md)** for the full agentic-workflow contract.
|
|
183
208
|
|
|
184
|
-
|
|
209
|
+
### Autonomous publication schedule
|
|
185
210
|
|
|
186
|
-
|
|
211
|
+
| Time (UTC) | Workflow | Coverage | Frequency |
|
|
212
|
+
|:-----------|:---------|:---------|:----------|
|
|
213
|
+
| 🌅 04:00 | **Committee Reports** | Utskottsbetänkanden analysis, voting breakdowns | Mon–Fri |
|
|
214
|
+
| 🌅 05:00 | **Propositions** | Government bills, legislative impact assessment | Mon–Fri |
|
|
215
|
+
| ☀️ 06:00 | **Motions** | Opposition proposals, party-strategy decoding | Mon–Fri |
|
|
216
|
+
| ❓ 07:00 | **Interpellations** | Ministerial accountability, evasion detection | Mon–Fri |
|
|
217
|
+
| 🔮 07:00 | **Week Ahead** | Parliamentary calendar preview, agenda intelligence | Friday |
|
|
218
|
+
| 📅 08:00 | **Month Ahead** | Strategic outlook, coalition forecasting | 1st of month |
|
|
219
|
+
| 🔍 10:00 & 14:00 (Mon–Fri); 12:00 (Sat/Sun) | **Real-Time Monitor** | Breaking political developments, flash analysis | Mon–Fri (×2) + weekends |
|
|
220
|
+
| 🌍 11:00 & 17:00 (Mon–Fri); 14:00 (Sat/Sun) | **Translate** | 12 additional languages from EN/SV cores | Daily |
|
|
221
|
+
| 🌆 18:00 (16:00 Sat) | **Evening Analysis** | Deep-dive intelligence synthesis | Mon–Sat |
|
|
222
|
+
| 📊 09:00 | **Weekly Review** | Week-in-review scorecard, party performance | Saturday |
|
|
223
|
+
| 📈 10:00 | **Monthly Review** | Comprehensive monthly intelligence assessment | 28th of month |
|
|
187
224
|
|
|
188
|
-
|
|
189
|
-
- **2,494 Historical Politicians** - Complete database from 1971-2024 (50+ years)
|
|
190
|
-
- **8 Political Parties** - Party performance, coalition dynamics, voting patterns
|
|
191
|
-
- **45 Risk Rules** - Systematic transparency through behavioral analysis
|
|
192
|
-
- **3.5+ Million Votes** - Comprehensive voting record analysis
|
|
193
|
-
- **109,000+ Documents** - Parliamentary documents processed and analyzed
|
|
225
|
+
> _Authoritative schedules defined in `.github/workflows/news-*.lock.yml` — see [`.github/workflows/README.md`](.github/workflows/README.md) for the complete inventory._
|
|
194
226
|
|
|
195
|
-
|
|
227
|
+
**Result:** dozens of articles per week across 14 languages — **hundreds of localised intelligence products each month**, generated autonomously with zero editorial intervention, every one of them auditable down to its source `dok_id`.
|
|
196
228
|
|
|
197
|
-
|
|
229
|
+
---
|
|
198
230
|
|
|
199
|
-
|
|
200
|
-
npm install riksdagsmonitor
|
|
201
|
-
```
|
|
231
|
+
## 🕵️ Political Intelligence Methodology
|
|
202
232
|
|
|
203
|
-
|
|
233
|
+
Every analysis on the platform is governed by an explicit, version-controlled methodology. The full library is browseable at <https://riksdagsmonitor.com/political-intelligence.html>; the canonical sources live in [`analysis/`](analysis/).
|
|
204
234
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
- **
|
|
211
|
-
|
|
235
|
+
| Layer | Document | What you'll find |
|
|
236
|
+
|:------|:---------|:-----------------|
|
|
237
|
+
| **🧭 Framework** | [`analysis/README.md`](analysis/README.md) | Artifact taxonomy, 9-artifact / 14-artifact contract, on-disk daily layout |
|
|
238
|
+
| **📐 Methodology library** | [`analysis/methodologies/README.md`](analysis/methodologies/README.md) | <strong>11 methodology documents</strong> — AI-Driven Analysis Guide · OSINT Tradecraft Standards · Political Risk Methodology · Political SWOT Framework · Political Threat Framework · Political Classification Guide · Electoral Domain Methodology · Synthesis Methodology · Per-Document & Per-Artifact Methodologies · Strategic Extensions (scenario / wildcard / long-horizon) · Structural Metadata · Political Style Guide |
|
|
239
|
+
| **📋 Template library** | [`analysis/templates/README.md`](analysis/templates/README.md) | <strong>23 templates</strong> — 8 core single-type (T1–T8) plus 15 extended / Tier-C (executive-brief, scenario-analysis, coalition-mathematics, election-2026, historical-parallels, comparative-international, devil's-advocate, intel-assessment / ICD-203 Key Judgments, …) |
|
|
240
|
+
| **🚦 News-generation contract** | [`.github/prompts/README.md`](.github/prompts/README.md) | 8 bounded-context prompt modules + Tier-C extension; the single blocking analysis gate |
|
|
241
|
+
| **⚙️ Workflow orchestration** | [`.github/workflows/README.md`](.github/workflows/README.md) + [`WORKFLOWS.md`](WORKFLOWS.md) | How each `news-*.md` source compiles to a hardened `.lock.yml` with SHA-pinned actions, egress firewall (Squid + iptables) and five-layer safe-outputs |
|
|
242
|
+
| **🔍 IMF integration** | [`analysis/imf/README.md`](analysis/imf/README.md) + [`.github/aw/ECONOMIC_DATA_CONTRACT.md`](.github/aw/ECONOMIC_DATA_CONTRACT.md) | Macro/fiscal/monetary/external context with T+5 projections; canonical pattern for every economic claim |
|
|
243
|
+
| **🏛️ Statskontoret integration** | [`analysis/statskontoret/README.md`](analysis/statskontoret/README.md) | Swedish agency structure and central-government budget execution (årsutfall / månadsutfall / tidsserier) |
|
|
244
|
+
| **🤖 Specialist personas** | [`.github/agents/README.md`](.github/agents/README.md) | 14 persona agents incl. `intelligence-operative`, `news-journalist`, `content-generator` + 9 workflow-specialist agents + shared `developer.instructions.md` |
|
|
245
|
+
| **🧠 Skills library** | [`.github/skills/README.md`](.github/skills/README.md) | <strong>91 skills</strong> across 12 functional categories — 11 political-intelligence, 5 journalism, 14 ISMS/security, 13 GitHub Agentic Workflows, … |
|
|
212
246
|
|
|
213
|
-
###
|
|
247
|
+
### Evidence standard
|
|
214
248
|
|
|
215
|
-
|
|
216
|
-
// Core utilities (no dependencies required)
|
|
217
|
-
import { getActiveThemeColors, BREAKPOINTS, getPartyColor } from 'riksdagsmonitor';
|
|
218
|
-
import { loadJSON, loadCSV, createDataSource } from 'riksdagsmonitor';
|
|
219
|
-
import { showLoadingState, showErrorState, formatNumber, debounce } from 'riksdagsmonitor';
|
|
249
|
+
Every claim must tie to: **a `dok_id` citation, a named actor, a vote count, or a primary-source URL**. Generic statements without evidence are rejected by the analysis gate. AI is an accelerator — never an excuse for shallow output.
|
|
220
250
|
|
|
221
|
-
|
|
222
|
-
import { createChart, getResponsiveOptions, initDashboardSection } from 'riksdagsmonitor/shared/chart-factory';
|
|
251
|
+
### AI-FIRST quality principle
|
|
223
252
|
|
|
224
|
-
|
|
225
|
-
import 'riksdagsmonitor/shared/register-globals';
|
|
253
|
+
Minimum **2 complete iterations** for every analysis. Pass 1 produces the artifact; Pass 2 reads everything back and improves every section (stronger evidence, deeper analytic rigor, broader stakeholder coverage, quantified risk). Workflows that complete in under 75 % of their allocated time are treated as failed. See [`AGENTS.md`](AGENTS.md) §AI-FIRST.
|
|
226
254
|
|
|
227
|
-
|
|
228
|
-
import { init as initPartyDashboard } from 'riksdagsmonitor/dashboards/party-dashboard';
|
|
229
|
-
import { init as initRiskDashboard } from 'riksdagsmonitor/dashboards/risk-dashboard';
|
|
255
|
+
---
|
|
230
256
|
|
|
231
|
-
|
|
232
|
-
import { CIADataLoader } from 'riksdagsmonitor/cia/data-loader';
|
|
233
|
-
import { CIADashboardRenderer } from 'riksdagsmonitor/cia/visualizations';
|
|
234
|
-
```
|
|
257
|
+
## 📊 Interactive Intelligence Dashboards
|
|
235
258
|
|
|
236
|
-
|
|
259
|
+
Five flagship Chart.js / D3.js dashboards on <https://riksdagsmonitor.com/> (and the consolidated [CIA Intelligence Dashboard](https://riksdagsmonitor.com/dashboard/index.html)):
|
|
237
260
|
|
|
238
|
-
|
|
261
|
+
| # | Dashboard | Coverage | Visualisations | Data |
|
|
262
|
+
|:-:|:----------|:---------|:---------------|:-----|
|
|
263
|
+
| 1 | 🌡️ **Seasonal Activity Patterns** | 2002–2025 quarterly (23+ years) | Heat maps, time series, Z-score anomaly detection (\|Z\| ≥ 2.0) | `cia-data/seasonal/` |
|
|
264
|
+
| 2 | 👤 **Politician Dashboard** | 349 current MPs | Top-10 rankings, 45-rule risk profiles, influence metrics | `cia-data/politician/` |
|
|
265
|
+
| 3 | 🗳️ **Pre-Election Monitoring** | Q4 2023 → 2025 | Historical comparisons, election-year vs non-election Q4 patterns, early-warning indicator matrix | `cia-data/pre-election/` |
|
|
266
|
+
| 4 | 🏛️ **Party Performance & Effectiveness** | 1990–2026 (37 years, 8 parties) | Effectiveness trends, comparative bars, coalition-alignment, momentum with P50/P90 percentiles | `cia-data/party/` |
|
|
267
|
+
| 5 | 🚨 **Anomaly Detection & Early Warning** | 2002–2026 (41 quarters) | Timeline · Z-score distribution · type breakdown · severity heat map · recent-anomaly feed | `cia-data/seasonal/` |
|
|
239
268
|
|
|
240
|
-
|
|
241
|
-
npm install chart.js d3 papaparse # Required for dashboard support
|
|
242
|
-
npm install chartjs-plugin-annotation # Optional — for chart annotations
|
|
243
|
-
```
|
|
269
|
+
**Dashboard properties** — local-first data loading with 1-hour cache; WCAG 2.1 AA accessible (keyboard, screen reader, 4.5:1 contrast); 14-language; responsive 320 px → 1440 px+; CSP-compliant with SRI hashes (`sha384`) on all CDN resources.
|
|
244
270
|
|
|
245
|
-
|
|
271
|
+
---
|
|
246
272
|
|
|
247
|
-
##
|
|
273
|
+
## 🗳️ Transparency Statistics
|
|
248
274
|
|
|
249
|
-
|
|
275
|
+
Live numbers (updated daily at 03:00 CET via [`update-cia-csv-data.yml`](.github/workflows/update-cia-csv-data.yml)):
|
|
250
276
|
|
|
251
|
-
|
|
277
|
+
| Metric | Value | Note |
|
|
278
|
+
|:-------|:------|:-----|
|
|
279
|
+
| 👥 **Current MPs** | **349** | All active Members of Parliament |
|
|
280
|
+
| 📜 **Historical politicians** | **2,494** | 1971–2024 (50+ years) |
|
|
281
|
+
| 🗳️ **Votes analysed** | **3.5+ million** | Comprehensive voting-record corpus |
|
|
282
|
+
| 📄 **Documents processed** | **109,000+** | Parliamentary documents (motions, propositions, interpellations, …) |
|
|
283
|
+
| 🏛️ **Committee documents** | **8,740** | Committee work tracked |
|
|
284
|
+
| ⚠️ **Rule violations identified** | **2,308** | Across 45 transparency rules |
|
|
285
|
+
| 🇸🇪 **Political parties** | **8** | All Riksdag-represented parties |
|
|
286
|
+
| ⏱️ **CIA subsystems** | **15** | anomaly · coalition · committee · distribution · election · election-cycle · ministry · parties · party · percentile · politician · pre-election · risk · seasonal · voting |
|
|
287
|
+
| 📰 **News articles published** | **2,669+ files** under `news/` | 14 languages |
|
|
252
288
|
|
|
253
|
-
|
|
289
|
+
**Data source:** [extraction_summary_report.csv](https://github.com/Hack23/cia/blob/master/service.data.impl/sample-data/extraction_summary_report.csv) · cached in `cia-data/production-stats.json` (24 h freshness).
|
|
254
290
|
|
|
255
|
-
|
|
256
|
-
|------|------|-----|-------------|
|
|
257
|
-
| 🕵️ | **Political Intelligence Index** | <https://riksdagsmonitor.com/political-intelligence.html> | Complete catalogue of Riksdagsmonitor's evidence-based intelligence work — every analysis methodology, template and **daily analysis artifact** (Family A baseline + Family B + Family C synthesis + Family D extension) covering the Swedish Riksdag and Regeringskansliet. The single best entry point for OSINT/INTOP researchers. |
|
|
258
|
-
| 🗺️ | **Sitemap (Human + Machine)** | <https://riksdagsmonitor.com/sitemap.html> | Human-readable navigation of every page on the platform — dashboards, news articles, methodologies, language variants — plus the machine-readable [`sitemap.xml`](https://riksdagsmonitor.com/sitemap.xml) and [`rss.xml`](https://riksdagsmonitor.com/rss.xml) feeds. Daily refreshed; honours `robots.txt` and search-engine indexing best practices. |
|
|
291
|
+
---
|
|
259
292
|
|
|
260
|
-
|
|
293
|
+
## 🔗 Authoritative Data Sources
|
|
261
294
|
|
|
262
|
-
**
|
|
263
|
-
- English, Swedish, Danish, Norwegian, Finnish
|
|
264
|
-
- German, French, Spanish, Dutch
|
|
265
|
-
- Arabic, Hebrew, Japanese, Korean, Chinese
|
|
295
|
+
Riksdagsmonitor uses a **provider-tiered** data architecture, with each provider chosen for its area of strength.
|
|
266
296
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
297
|
+
| Tier | Provider | Scope | Access |
|
|
298
|
+
|:-----|:---------|:------|:-------|
|
|
299
|
+
| 🏛️ **Parliamentary primary** | **[Riksdagen Open Data](http://data.riksdagen.se/)** | Documents, motions, votes, MPs, speeches, committees | `riksdag-regering` MCP server (32+ tools) |
|
|
300
|
+
| 🏢 **Government primary** | **[Regeringskansliet](https://www.regeringen.se/)** | Propositions, SOU, Ds, directives, press releases | `riksdag-regering` MCP server |
|
|
301
|
+
| 📈 **Primary economic** | **[IMF](https://data.imf.org/)** (Datamapper REST + SDMX 3.0) | GDP, growth, unemployment, inflation, fiscal balance, debt, current account, bilateral trade, commodity prices, exchange rates, government spending by COFOG function — **with T+5 projections** | Pure-TypeScript client `scripts/imf-client.ts` (intentionally non-MCP) |
|
|
302
|
+
| 🇸🇪 **Swedish ground truth** | **[SCB](https://www.scb.se/)** (PxWeb v2) | Swedish monthly labour (AKU), monthly inflation (KPI), regional/municipal, budget execution | `scb` MCP server (`@jarib/pxweb-mcp@2.0.0`, 1,200+ tables) |
|
|
303
|
+
| 🏛️ **Statskontoret** | [Statskontoret](https://www.statskontoret.se/) | Authority count, dept grouping, leadership form, FTE / headcount, central-government budget outturns | `scripts/statskontoret-client.ts` |
|
|
304
|
+
| 🌍 **Non-economic residue** | **[World Bank](http://data.worldbank.org/)** | Governance (WGI, `source=75`), environment, social/education residue, defence historicals | `world-bank` MCP server (`worldbank-mcp@1.0.1`) |
|
|
305
|
+
| 🗳️ **Election authority** | [Valmyndigheten](http://www.val.se/) | Election results, voter turnout, electoral statistics | Public datasets |
|
|
306
|
+
| 💰 **ESV** | [Ekonomistyrningsverket](https://www.esv.se/psidata/) | Government budget and spending data | Public datasets |
|
|
307
|
+
| 🕵️ **Citizen Intelligence Agency** | [Hack23/cia](https://github.com/Hack23/cia) | 15 CIA subsystems consumed nightly via [`update-cia-csv-data.yml`](.github/workflows/update-cia-csv-data.yml) | JSON / CSV exports |
|
|
308
|
+
|
|
309
|
+
**Why this split** — IMF uses uniform SNA 2008 / GFSM 2014 / BPM6 methodology across countries (essential for cross-country comparison), publishes T+5 projections (essential for look-ahead workflows), and has fresher data than World Bank's economic indicators. World Bank remains canonical for the classes IMF does not publish (WGI governance, environment). SCB is the Swedish-specific ground-truth layer. **Banned phrases** (e.g. *"the World Bank reports Swedish GDP growth of …"*) and **vintage discipline** (data > 6 months old → annotation required) are enforced by CI per [`.github/aw/ECONOMIC_DATA_CONTRACT.md`](.github/aw/ECONOMIC_DATA_CONTRACT.md) v2.1.
|
|
270
310
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
**Live Statistics** (Updated Daily at 03:00 CET):
|
|
274
|
-
- **2,494 Politicians** - Complete historical database (1971-2024)
|
|
275
|
-
- **349 Current MPs** - Active Members of Parliament
|
|
276
|
-
- **3.5+ Million Votes** - Comprehensive voting records
|
|
277
|
-
- **109,000+ Documents** - Parliamentary documents processed
|
|
278
|
-
- **8,740 Committee Documents** - Committee work tracked
|
|
279
|
-
- **2,308 Rule Violations** - Transparency issues identified
|
|
280
|
-
|
|
281
|
-
**Data Source**: [extraction_summary_report.csv](https://github.com/Hack23/cia/blob/master/service.data.impl/sample-data/extraction_summary_report.csv)
|
|
282
|
-
**Update Schedule**: Daily automated fetch via GitHub Actions
|
|
283
|
-
**Last Extraction**: See `cia-data/production-stats.json` → `metadata.last_updated` (updated daily)
|
|
284
|
-
|
|
285
|
-
**Implementation**:
|
|
286
|
-
- `scripts/load-cia-stats.js` - Fetches and parses production statistics
|
|
287
|
-
- `scripts/update-stats-from-cia.js` - Updates website files
|
|
288
|
-
- `.github/workflows/update-cia-stats.yml` - Automated daily workflow
|
|
289
|
-
- `cia-data/production-stats.json` - Cached statistics (24-hour freshness)
|
|
290
|
-
|
|
291
|
-
### Schema Integration
|
|
292
|
-
- **Automated Validation** - All CIA exports validated against JSON schemas
|
|
293
|
-
- **Type Safety** - TypeScript type definitions for development
|
|
294
|
-
- **CI/CD Integration** - Daily validation checks in GitHub Actions
|
|
295
|
-
- **Update Detection** - Weekly checks for schema updates
|
|
296
|
-
|
|
297
|
-
See [CIA Schema Integration Documentation](docs/CIA_SCHEMA_INTEGRATION.md) for details.
|
|
298
|
-
|
|
299
|
-
### Data Products
|
|
300
|
-
|
|
301
|
-
Riksdagsmonitor leverages 19 comprehensive visualization products from the CIA platform:
|
|
302
|
-
|
|
303
|
-
### Intelligence Dashboards
|
|
304
|
-
- **Overview Dashboard** - Complete Riksdag intelligence snapshot
|
|
305
|
-
- **Party Performance** - Longitudinal party analysis and effectiveness metrics
|
|
306
|
-
- **Government Cabinet** - Ministry-level performance scorecards
|
|
307
|
-
- **Election Cycle Analysis** - Historical patterns and trend forecasting
|
|
308
|
-
|
|
309
|
-
### Top 10 Rankings
|
|
310
|
-
- Most Influential MPs (network analysis)
|
|
311
|
-
- Most Productive MPs (legislative output)
|
|
312
|
-
- Most Controversial MPs (voting patterns)
|
|
313
|
-
- Most Absent MPs (attendance tracking)
|
|
314
|
-
- Party Rebels (cross-party voting)
|
|
315
|
-
- Coalition Brokers (collaboration patterns)
|
|
316
|
-
- Rising Stars (emerging political figures)
|
|
317
|
-
- Electoral Risk (MPs at risk)
|
|
318
|
-
- Ethics Concerns (transparency issues)
|
|
319
|
-
- Media Presence (public visibility)
|
|
320
|
-
|
|
321
|
-
### Advanced Analytics
|
|
322
|
-
- **Committee Network Analysis** - Influence mapping and assignments
|
|
323
|
-
- **Politician Career Analysis** - Career trajectories and milestones
|
|
324
|
-
- **Party Longitudinal Analysis** - 50+ years of party evolution
|
|
325
|
-
|
|
326
|
-
## 📈 Implemented Dashboards
|
|
327
|
-
|
|
328
|
-
Riksdagsmonitor currently features 4 interactive intelligence dashboards built with Chart.js and D3.js:
|
|
329
|
-
|
|
330
|
-
### 1. 🌡️ Seasonal Activity Patterns Dashboard
|
|
331
|
-
- **Coverage**: 2002-2025 (quarterly data, 23+ years)
|
|
332
|
-
- **Visualizations**: Heat maps, time series, Z-score analysis
|
|
333
|
-
- **Purpose**: Track quarterly parliamentary activity patterns and detect seasonal trends
|
|
334
|
-
- **Data Source**: `cia-data/seasonal/view_riksdagen_seasonal_activity_patterns_sample.csv`
|
|
335
|
-
|
|
336
|
-
### 2. 👤 Politician Dashboard
|
|
337
|
-
- **Coverage**: 349 MPs with comprehensive risk and performance metrics
|
|
338
|
-
- **Visualizations**: Top 10 rankings, risk profiles, influence metrics
|
|
339
|
-
- **Purpose**: Individual MP tracking and transparency assessment
|
|
340
|
-
- **Data Source**: `cia-data/politician/*.csv`
|
|
341
|
-
|
|
342
|
-
### 3. 🗳️ Pre-Election Monitoring Dashboard
|
|
343
|
-
- **Coverage**: Q4 2023-2025 (12-15 months before 2026 election)
|
|
344
|
-
- **Visualizations**: Historical comparisons, election-year patterns
|
|
345
|
-
- **Purpose**: Track pre-election parliamentary activity and behavior changes
|
|
346
|
-
- **Data Source**: `cia-data/pre-election/*.csv`
|
|
347
|
-
|
|
348
|
-
### 4. 🗳️ Party Performance & Effectiveness Dashboard
|
|
349
|
-
|
|
350
|
-
**Coverage:** 1990-2026 (37 years)
|
|
351
|
-
**Analysis:** Comprehensive party analytics across 8 Swedish political parties
|
|
352
|
-
|
|
353
|
-
**Key Features:**
|
|
354
|
-
- **Effectiveness Trends:** Historical legislative productivity and voting consistency
|
|
355
|
-
- **Comparative Analysis:** Party-by-party benchmarking
|
|
356
|
-
- **Coalition Patterns:** Party alignment visualization
|
|
357
|
-
- **Momentum Indicators:** Electoral trajectory with percentile benchmarks
|
|
358
|
-
|
|
359
|
-
### 5. 🚨 Anomaly Detection & Early Warning System
|
|
360
|
-
- **Coverage**: 2002-2026 (41 quarters analyzed)
|
|
361
|
-
- **Visualizations**: 6 interactive charts including timeline, Z-score distribution, heat map
|
|
362
|
-
- **Features**:
|
|
363
|
-
- Real-time alert system for critical anomalies
|
|
364
|
-
- Statistical Z-score analysis (|Z| ≥ 2.0 for anomalies)
|
|
365
|
-
- Severity classification: CRITICAL (≥2.5), HIGH (≥2.0), MODERATE (≥1.5), LOW (<1.5)
|
|
366
|
-
- Anomaly types: Ballot, Document, Attendance
|
|
367
|
-
- Direction indicators: UNUSUALLY_HIGH, UNUSUALLY_LOW
|
|
368
|
-
- **Data Source**: `cia-data/seasonal/view_riksdagen_seasonal_anomaly_detection_sample.csv`
|
|
369
|
-
|
|
370
|
-
**Dashboard Features**:
|
|
371
|
-
- Local-first data loading (1-hour caching)
|
|
372
|
-
- WCAG 2.1 AA accessible
|
|
373
|
-
- 14-language support
|
|
374
|
-
- Responsive design (320px-1440px+)
|
|
375
|
-
- CSP-compliant (SRI hashes on all CDN resources)
|
|
376
|
-
## 🔗 Data Sources
|
|
377
|
-
|
|
378
|
-
Riksdagsmonitor integrates multiple authoritative Swedish open data sources:
|
|
379
|
-
|
|
380
|
-
- **[Swedish Parliament (Riksdagen)](http://data.riksdagen.se/)** - Votes, documents, committee work, MP information
|
|
381
|
-
- **[Swedish Election Authority](http://www.val.se/)** - Election results, voter turnout, electoral statistics
|
|
382
|
-
- **[Swedish Financial Management Authority](https://www.esv.se/psidata/)** - Government budget and spending data
|
|
383
|
-
- **[World Bank Open Data](http://data.worldbank.org/)** - Governance (WGI), environment, and long-horizon social/education indicators
|
|
384
|
-
- **[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`)
|
|
311
|
+
---
|
|
385
312
|
|
|
386
313
|
## 🏗️ Technical Architecture
|
|
387
314
|
|
|
388
|
-
|
|
389
|
-
- **Frontend:** Static HTML/CSS with JavaScript dashboards
|
|
390
|
-
- **Build System:** Vite 8 (ES modules, code splitting)
|
|
391
|
-
- **Visualization:** Chart.js 4 + D3.js 7 hosted locally on CloudFront
|
|
392
|
-
- **Testing:** Vitest (unit), Cypress (E2E) - 2890 tests passing
|
|
393
|
-
- **Styling:** Custom CSS with cyberpunk theme, responsive design
|
|
394
|
-
- **Hosting:** GitHub Pages with CloudFront CDN
|
|
395
|
-
- **CI/CD:** GitHub Actions for automated testing and deployment
|
|
396
|
-
- **Data Platform:** CIA OSINT platform (Java/Spring Boot backend)
|
|
397
|
-
- **Runtime:** Node.js 25.x
|
|
398
|
-
|
|
399
|
-
### JavaScript Architecture
|
|
400
|
-
- **8 Dashboard Modules:**
|
|
401
|
-
- party-dashboard.js (effectiveness analytics)
|
|
402
|
-
- anomaly-detection-dashboard.js (statistical outliers)
|
|
403
|
-
- seasonal-patterns-dashboard.js (temporal trends)
|
|
404
|
-
- pre-election-dashboard.js (election monitoring)
|
|
405
|
-
- politician-dashboard.js (MP tracking)
|
|
406
|
-
- ministry-dashboard.js (cabinet analysis)
|
|
407
|
-
- election-cycle-dashboard.js (cycle patterns)
|
|
408
|
-
- back-to-top.js (navigation)
|
|
409
|
-
|
|
410
|
-
- **Data Loading:** Local-first with GitHub fallback
|
|
411
|
-
- **Caching:** LocalStorage with freshness checks (1-7 days)
|
|
412
|
-
- **Performance:** Code splitting, lazy loading, asset optimization
|
|
413
|
-
- **Security:** SRI hashes (sha384), CSP-compliant script loading
|
|
414
|
-
|
|
415
|
-
### Security
|
|
416
|
-
- **HTTPS-Only:** TLS 1.3 encryption enforced
|
|
417
|
-
- **Security Headers:** CSP, HSTS, X-Frame-Options, X-Content-Type-Options
|
|
418
|
-
- **Access Control:** GitHub MFA, SSH keys, GPG commit signing
|
|
419
|
-
- **Monitoring:** Dependabot, CodeQL, Secret Scanning
|
|
420
|
-
- **Documentation:** [SECURITY_ARCHITECTURE.md](SECURITY_ARCHITECTURE.md), [THREAT_MODEL.md](THREAT_MODEL.md)
|
|
421
|
-
|
|
422
|
-
## 🔐 Commitment to Transparency and Security
|
|
423
|
-
|
|
424
|
-
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.
|
|
425
|
-
|
|
426
|
-
<table>
|
|
427
|
-
<tr>
|
|
428
|
-
<td width="50%">
|
|
429
|
-
<div align="center">
|
|
430
|
-
<h3>📋 ISMS Compliance</h3>
|
|
431
|
-
<p><strong>ISO 27001:2022 Aligned</strong></p>
|
|
432
|
-
<ul align="left">
|
|
433
|
-
<li><a href="https://github.com/Hack23/ISMS-PUBLIC">ISMS Repository</a></li>
|
|
434
|
-
<li><a href="https://github.com/Hack23/ISMS-PUBLIC">Public ISMS</a></li>
|
|
435
|
-
<li><a href="https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md">Secure Development Policy</a></li>
|
|
436
|
-
<li><a href="https://github.com/Hack23/ISMS-PUBLIC/blob/main/Threat_Modeling.md">Threat Modeling</a></li>
|
|
437
|
-
<li><a href="https://github.com/Hack23/ISMS-PUBLIC/blob/main/Compliance_Checklist.md">Compliance Checklist</a></li>
|
|
438
|
-
</ul>
|
|
439
|
-
</div>
|
|
440
|
-
</td>
|
|
441
|
-
<td width="50%">
|
|
442
|
-
<div align="center">
|
|
443
|
-
<h3>🛡️ Security Documentation</h3>
|
|
444
|
-
<p><strong>Defense-in-Depth Architecture</strong></p>
|
|
445
|
-
<ul align="left">
|
|
446
|
-
<li><a href="SECURITY_ARCHITECTURE.md">Security Architecture</a></li>
|
|
447
|
-
<li><a href="THREAT_MODEL.md">Threat Model</a></li>
|
|
448
|
-
<li><a href="WORKFLOWS.md">CI/CD Workflows</a></li>
|
|
449
|
-
<li><a href="ARCHITECTURE.md">System Architecture</a></li>
|
|
450
|
-
<li><a href="FUTURE_SECURITY_ARCHITECTURE.md">Future Security</a></li>
|
|
451
|
-
</ul>
|
|
452
|
-
</div>
|
|
453
|
-
</td>
|
|
454
|
-
</tr>
|
|
455
|
-
</table>
|
|
456
|
-
|
|
457
|
-
### Compliance Frameworks
|
|
458
|
-
- **ISO 27001:2022** - Information security management controls (7 controls implemented)
|
|
459
|
-
- **NIST CSF 2.0** - Cybersecurity framework (6 functions aligned)
|
|
460
|
-
- **CIS Controls v8.1** - Security best practices (6 controls implemented)
|
|
315
|
+
> Full system architecture (C4 Context / Container / Component / Dynamic views) lives in **[`ARCHITECTURE.md`](ARCHITECTURE.md)** (v2.2).
|
|
461
316
|
|
|
462
|
-
###
|
|
463
|
-
|
|
464
|
-
| Metric | Status | Details |
|
|
465
|
-
|--------|--------|---------|
|
|
466
|
-
| **Risk Level** | 🟢 LOW | 5.52/10.0 (99.7% risk reduction) |
|
|
467
|
-
| **HTML Validation** | ✅ PASSED | 0 errors (HTMLHint) |
|
|
468
|
-
| **Dependencies** | ✅ CLEAN | Dependabot monitoring |
|
|
469
|
-
| **Secrets** | ✅ SECURE | Secret scanning enabled |
|
|
470
|
-
| **Code Scanning** | ✅ ACTIVE | CodeQL analysis |
|
|
317
|
+
### Stack
|
|
471
318
|
|
|
472
|
-
|
|
319
|
+
- **Frontend** — Static HTML5 / CSS3 with TypeScript-built Chart.js / D3.js dashboards (no SPA framework, mobile-first, cyberpunk theme)
|
|
320
|
+
- **Build** — Vite 8 (ES modules, code splitting, SRI via `vite-plugin-sri-gen`)
|
|
321
|
+
- **Visualisation** — Chart.js 4 + D3.js 7, hosted locally on CloudFront
|
|
322
|
+
- **Testing** — Vitest 4 (2,890 unit tests, 100 % pass rate, 70 % line coverage) + Cypress 15 (E2E)
|
|
323
|
+
- **Hosting** — AWS CloudFront + S3 dual-region (us-east-1 primary, eu-west-1 replica) via OIDC; GitHub Pages as DR fallback
|
|
324
|
+
- **CI/CD** — 43 GitHub Actions workflows (21 standard `.yml` + 11 agentic `.md` sources + 11 compiled `.lock.yml`); SHA-pinned, `step-security/harden-runner` everywhere
|
|
325
|
+
- **Data Platform** — Citizen Intelligence Agency (CIA) Java/Spring Boot backend + 15 CIA subsystems
|
|
326
|
+
- **Runtime** — Node.js 25.x
|
|
473
327
|
|
|
474
|
-
###
|
|
475
|
-
- **Node.js**: 25.x or higher
|
|
476
|
-
- **npm**: 10.x or higher (comes with Node.js)
|
|
477
|
-
- Git with GPG signing configured
|
|
478
|
-
- GitHub account with MFA enabled
|
|
479
|
-
- SSH keys for GitHub authentication
|
|
328
|
+
### Architecture documentation portfolio
|
|
480
329
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
330
|
+
| Current State | Future State |
|
|
331
|
+
|:--------------|:-------------|
|
|
332
|
+
| 🏗️ [Architecture](ARCHITECTURE.md) | 🚀 [Future Architecture](FUTURE_ARCHITECTURE.md) |
|
|
333
|
+
| 📊 [Data Model](DATA_MODEL.md) | 📊 [Future Data Model](FUTURE_DATA_MODEL.md) |
|
|
334
|
+
| 🔄 [Flowcharts](FLOWCHART.md) | 🔄 [Future Flowcharts](FUTURE_FLOWCHART.md) |
|
|
335
|
+
| 🔄 [State Diagrams](STATEDIAGRAM.md) | 🔄 [Future State Diagrams](FUTURE_STATEDIAGRAM.md) |
|
|
336
|
+
| 🗺️ [Mindmap](MINDMAP.md) | 🗺️ [Future Mindmap](FUTURE_MINDMAP.md) |
|
|
337
|
+
| 💼 [SWOT](SWOT.md) | 💼 [Future SWOT](FUTURE_SWOT.md) |
|
|
487
338
|
|
|
488
|
-
|
|
489
|
-
npm install
|
|
339
|
+
---
|
|
490
340
|
|
|
491
|
-
|
|
492
|
-
npm run dev
|
|
493
|
-
# Opens http://localhost:8080
|
|
341
|
+
## 🔐 Security, Privacy & ISMS Compliance
|
|
494
342
|
|
|
495
|
-
|
|
496
|
-
python3 -m http.server 8080
|
|
497
|
-
# or
|
|
498
|
-
npx http-server -p 8080
|
|
343
|
+
> Full controls in **[`SECURITY_ARCHITECTURE.md`](SECURITY_ARCHITECTURE.md)** · threat model in **[`THREAT_MODEL.md`](THREAT_MODEL.md)** · CRA conformity in **[`CRA-ASSESSMENT.md`](CRA-ASSESSMENT.md)**.
|
|
499
344
|
|
|
500
|
-
|
|
501
|
-
open http://localhost:8080
|
|
502
|
-
```
|
|
345
|
+
### Classification (per [Hack23 Classification Framework](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md))
|
|
503
346
|
|
|
504
|
-
|
|
347
|
+
| Dimension | Level | Note |
|
|
348
|
+
|:----------|:------|:-----|
|
|
349
|
+
| 🔒 **Confidentiality** | 🟢 Public | All data intentionally disclosed (Swedish open data + website content) |
|
|
350
|
+
| ✅ **Integrity** | 🟠 High | Automated validation, GPG-signed commits, SLSA build provenance |
|
|
351
|
+
| 🟢 **Availability** | 🟠 High | 99.998 % design target (CloudFront 99.9 % SLA + multi-region S3 + GitHub Pages DR) |
|
|
352
|
+
| 🏷️ **Privacy** | 🟠 Personal (public officials only) | GDPR Art. 6(1)(e/f); Art. 9(2)(e/g) for political opinions; **no end-user PII**, no accounts, no ads, no tracking |
|
|
353
|
+
| ⏱️ **RTO / RPO** | 1–4 h / 4–24 h | Automated multi-region failover, daily data refresh |
|
|
354
|
+
| 💰 **Business impact** | 🟢 Low (financial) · 🟡 Moderate (reputational) | Open-source project, no revenue dependency |
|
|
505
355
|
|
|
506
|
-
|
|
507
|
-
# Install dependencies (if not already done)
|
|
508
|
-
npm install
|
|
356
|
+
### Compliance frameworks
|
|
509
357
|
|
|
510
|
-
|
|
511
|
-
|
|
358
|
+
- **ISO 27001:2022** — 7 Annex A controls implemented · **NIST CSF 2.0** — 6 functions aligned · **CIS Controls v8.1** — 6 controls implemented
|
|
359
|
+
- **GDPR** — public-interest / legitimate-interest grounds for public-official data; political opinions under Art. 9(2)(e)/(g)
|
|
360
|
+
- **EU CRA** — self-assessment in [`CRA-ASSESSMENT.md`](CRA-ASSESSMENT.md)
|
|
361
|
+
- **OpenSSF Best Practices** — [Project #12069](https://www.bestpractices.dev/projects/12069)
|
|
512
362
|
|
|
513
|
-
|
|
514
|
-
npm run test:watch
|
|
363
|
+
### Defence-in-depth highlights
|
|
515
364
|
|
|
516
|
-
|
|
517
|
-
|
|
365
|
+
- 🔒 **HTTPS-only** — TLS 1.3, HSTS, CSP, X-Frame-Options, X-Content-Type-Options
|
|
366
|
+
- 🧱 **Five-layer agentic-workflow security** — read-only agent tokens, zero secrets in agent context, containerised + Squid/iptables egress firewall, safe-outputs validation, AI threat-detection scan
|
|
367
|
+
- 🔐 **SHA-pinned actions** + `step-security/harden-runner` + Dependabot + CodeQL + Secret Scanning + dependency-review + OIDC-only AWS deploy
|
|
368
|
+
- 📜 **Aligned ISMS policies** — [Information Security Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Information_Security_Policy.md) · [Secure Development Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md) · [Threat Modeling](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Threat_Modeling.md) · [AI Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/AI_Policy.md) · [Vulnerability Management](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Vulnerability_Management.md) · [Change Management](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Change_Management.md) · [Incident Response Plan](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Incident_Response_Plan.md) · [Open Source Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md)
|
|
518
369
|
|
|
519
|
-
|
|
520
|
-
|
|
370
|
+
| Metric | Status |
|
|
371
|
+
|:-------|:-------|
|
|
372
|
+
| **Risk level** | 🟢 LOW (5.52 / 10.0 — 99.7 % risk reduction) |
|
|
373
|
+
| **HTML validation** | ✅ 0 errors (HTMLHint) |
|
|
374
|
+
| **Dependencies** | ✅ Dependabot clean |
|
|
375
|
+
| **Secrets** | ✅ Secret Scanning enabled |
|
|
376
|
+
| **Code scanning** | ✅ CodeQL active |
|
|
521
377
|
|
|
522
|
-
|
|
523
|
-
npm run cypress:open # Interactive GUI
|
|
524
|
-
npm run cypress:run # Headless
|
|
378
|
+
---
|
|
525
379
|
|
|
526
|
-
|
|
527
|
-
npm run e2e # Builds, previews, and runs Cypress
|
|
528
|
-
```
|
|
380
|
+
## 📦 npm Package
|
|
529
381
|
|
|
530
|
-
|
|
382
|
+
The platform's reusable shared utilities are published as **[`riksdagsmonitor`](https://www.npmjs.com/package/riksdagsmonitor)** with SLSA build provenance.
|
|
531
383
|
|
|
532
384
|
```bash
|
|
533
|
-
|
|
534
|
-
npm run build
|
|
535
|
-
|
|
536
|
-
# Preview production build
|
|
537
|
-
npm run preview
|
|
538
|
-
# Opens http://localhost:4173
|
|
539
|
-
|
|
540
|
-
# Build output in dist/
|
|
541
|
-
ls dist/
|
|
385
|
+
npm install riksdagsmonitor
|
|
542
386
|
```
|
|
543
387
|
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
```bash
|
|
547
|
-
# HTML validation
|
|
548
|
-
npm run htmlhint
|
|
549
|
-
|
|
550
|
-
# Link checking
|
|
551
|
-
python3 -m http.server 8080 &
|
|
552
|
-
npm run linkcheck
|
|
388
|
+
**Includes** — Theme System (cyberpunk, WCAG AA) · Chart Factory (Chart.js with responsive breakpoints + keyboard nav) · Resilient Data Loader (retry, cache, CSV/JSON) · DOM utilities · Full TypeScript types · 12 dashboard modules · CIA intelligence modules.
|
|
553
389
|
|
|
554
|
-
|
|
555
|
-
|
|
390
|
+
```typescript
|
|
391
|
+
import { getActiveThemeColors, BREAKPOINTS, getPartyColor } from 'riksdagsmonitor';
|
|
392
|
+
import { loadJSON, loadCSV, createDataSource } from 'riksdagsmonitor';
|
|
393
|
+
import { showLoadingState, formatNumber, debounce } from 'riksdagsmonitor';
|
|
394
|
+
import { createChart, initDashboardSection } from 'riksdagsmonitor/shared/chart-factory';
|
|
395
|
+
import { CIADataLoader } from 'riksdagsmonitor/cia/data-loader';
|
|
396
|
+
import { CIADashboardRenderer } from 'riksdagsmonitor/cia/visualizations';
|
|
556
397
|
```
|
|
557
398
|
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
**Automated Checks:**
|
|
561
|
-
- HTML validation (HTMLHint)
|
|
562
|
-
- Link checking (linkinator)
|
|
563
|
-
- JavaScript testing (Vitest unit tests - 2890 tests)
|
|
564
|
-
- E2E testing (Cypress)
|
|
565
|
-
- Build validation (Vite)
|
|
566
|
-
- Dependency review (Dependabot)
|
|
567
|
-
- Security scanning (CodeQL, Secret Scanning)
|
|
568
|
-
|
|
569
|
-
**Workflows:**
|
|
570
|
-
- `.github/workflows/quality-checks.yml` - HTML/link validation
|
|
571
|
-
- `.github/workflows/javascript-testing.yml` - Vite build, Vitest, Cypress E2E
|
|
572
|
-
- `.github/workflows/dependency-review.yml` - Dependency security
|
|
573
|
-
- `.github/workflows/copilot-setup-steps.yml` - Copilot agent setup
|
|
574
|
-
- `.github/workflows/release.yml` - Release with attestations and documentation-as-code
|
|
575
|
-
|
|
576
|
-
**Test Results**:
|
|
577
|
-
- ✅ 2890/2890 unit tests passing (Vitest)
|
|
578
|
-
- ✅ 100% test pass rate
|
|
579
|
-
- ✅ Coverage: 70% lines, 70% functions, 60% branches
|
|
580
|
-
|
|
581
|
-
## 🚀 Release Process
|
|
582
|
-
|
|
583
|
-
Riksdagsmonitor follows a comprehensive release process with full supply chain security:
|
|
584
|
-
|
|
585
|
-
### Release Workflow
|
|
586
|
-
|
|
587
|
-
- **Trigger**: Manual (workflow_dispatch) or tag push (v*.*.*)
|
|
588
|
-
- **Duration**: ~20-30 minutes
|
|
589
|
-
- **Jobs**: Prepare → Build → Release
|
|
399
|
+
**Peer dependencies** — `chart.js` `d3` `papaparse` (required for dashboards); `chartjs-plugin-annotation` (optional, loaded conditionally).
|
|
590
400
|
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
Each release includes:
|
|
594
|
-
- ✅ Production build (`riksdagsmonitor-vX.Y.Z.zip`)
|
|
595
|
-
- ✅ SHA-256 checksum for verification
|
|
596
|
-
- ✅ SBOM in SPDX format (Software Bill of Materials)
|
|
597
|
-
- ✅ SLSA Build Provenance attestations (signed)
|
|
598
|
-
|
|
599
|
-
### Documentation as Code
|
|
600
|
-
|
|
601
|
-
Every release automatically generates and publishes:
|
|
602
|
-
- 📚 API Documentation (JSDoc)
|
|
603
|
-
- 📊 Test Coverage Report (Vitest)
|
|
604
|
-
- 🧪 E2E Test Reports (Cypress)
|
|
605
|
-
- 📦 Dependency Tree (npm)
|
|
606
|
-
|
|
607
|
-
**Documentation Hub**: [riksdagsmonitor.com/docs/](https://riksdagsmonitor.com/docs/)
|
|
401
|
+
---
|
|
608
402
|
|
|
609
|
-
|
|
403
|
+
## 🚀 Development
|
|
610
404
|
|
|
611
|
-
|
|
612
|
-
|
|
405
|
+
### Prerequisites
|
|
406
|
+
Node.js ≥ 25 · npm ≥ 10 · Git with GPG signing · GitHub MFA + SSH keys.
|
|
613
407
|
|
|
614
|
-
###
|
|
408
|
+
### Quick start
|
|
615
409
|
|
|
616
|
-
Verify attestations using GitHub CLI:
|
|
617
410
|
```bash
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
## 📖 Documentation
|
|
624
|
-
|
|
625
|
-
### Project Documentation
|
|
626
|
-
- [README.md](README.md) - This file
|
|
627
|
-
- [RELEASE_PROCESS.md](RELEASE_PROCESS.md) - Comprehensive release guide with attestations ✨ **NEW**
|
|
628
|
-
- [TRANSLATION_GUIDE.md](TRANSLATION_GUIDE.md) - Multi-language translation standards and glossary
|
|
629
|
-
- [SECURITY.md](SECURITY.md) - Security policy and vulnerability reporting ✨ **NEW**
|
|
630
|
-
- [CONTRIBUTING.md](CONTRIBUTING.md) - Contribution guidelines ✨ **NEW**
|
|
631
|
-
- [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) - Community standards ✨ **NEW**
|
|
632
|
-
- [LICENSE](LICENSE) - Apache License 2.0
|
|
411
|
+
git clone git@github.com:Hack23/riksdagsmonitor.git
|
|
412
|
+
cd riksdagsmonitor
|
|
413
|
+
npm install
|
|
414
|
+
npm run dev # Vite dev server with hot reload → http://localhost:8080
|
|
633
415
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
| [🔄 Flowcharts](FLOWCHART.md) | [🔄 Future Flowcharts](FUTURE_FLOWCHART.md) |
|
|
640
|
-
| [🔄 State Diagrams](STATEDIAGRAM.md) | [🔄 Future State Diagrams](FUTURE_STATEDIAGRAM.md) |
|
|
641
|
-
| [🗺️ Mindmap](MINDMAP.md) | [🗺️ Future Mindmap](FUTURE_MINDMAP.md) |
|
|
642
|
-
| [💼 SWOT](SWOT.md) | [💼 Future SWOT](FUTURE_SWOT.md) |
|
|
643
|
-
|
|
644
|
-
### Security Documentation
|
|
645
|
-
- [🛡️ Security Architecture](SECURITY_ARCHITECTURE.md) - Defense-in-depth security controls
|
|
646
|
-
- [🔮 Future Security Architecture](FUTURE_SECURITY_ARCHITECTURE.md) - Security roadmap
|
|
647
|
-
- [🎯 Threat Model](THREAT_MODEL.md) - STRIDE threat analysis and risk assessment
|
|
648
|
-
- [🛡️ CRA Assessment](CRA-ASSESSMENT.md) - EU Cyber Resilience Act conformity
|
|
649
|
-
- [🔧 Workflows](WORKFLOWS.md) - CI/CD workflows and automation
|
|
650
|
-
- [🔐 Security Policy](SECURITY.md) - Vulnerability reporting and disclosure
|
|
651
|
-
|
|
652
|
-
### ISMS Policy Alignment
|
|
653
|
-
- [🛡️ Secure Development Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md) — Architecture documentation requirements
|
|
654
|
-
- [🔓 Open Source Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md) — OSS governance, license compliance, security posture evidence
|
|
655
|
-
- [🛡️ CRA Conformity Assessment Process](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CRA_Conformity_Assessment_Process.md) — CRA self-assessment template and methodology
|
|
656
|
-
- [🎯 Threat Modeling Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Threat_Modeling.md) — STRIDE/MITRE ATT&CK methodology
|
|
657
|
-
- [🏷️ Classification Framework](https://github.com/Hack23/ISMS-PUBLIC/blob/main/CLASSIFICATION.md) — CIA triad, RTO/RPO, business impact
|
|
658
|
-
|
|
659
|
-
### GitHub Copilot Integration
|
|
660
|
-
|
|
661
|
-
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.
|
|
662
|
-
|
|
663
|
-
- [`.github/agents/README.md`](.github/agents/README.md) — **24 agent files** (14 persona agents + 9 workflow-specialist `.agent.md` + shared `developer.instructions.md`)
|
|
664
|
-
- [`.github/skills/README.md`](.github/skills/README.md) — **91 skills** grouped by 12 functional categories
|
|
665
|
-
- [`.github/prompts/README.md`](.github/prompts/README.md) — 8 bounded-context prompt modules + Tier-C extension, imported by every agentic news workflow
|
|
666
|
-
- [`.github/workflows/README.md`](.github/workflows/README.md) — 43 workflow files (standard + agentic)
|
|
667
|
-
- [AGENTS.md](AGENTS.md) — canonical persona catalog with skill-mapping tables and invocation examples
|
|
668
|
-
- [SKILLS.md](SKILLS.md) — canonical skill catalog with agent-skill mappings
|
|
669
|
-
|
|
670
|
-
**14 Persona Agents** (assignable via `assign_copilot_to_issue`):
|
|
671
|
-
|
|
672
|
-
- **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**
|
|
673
|
-
|
|
674
|
-
**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`
|
|
675
|
-
|
|
676
|
-
**Available Skills (91)** — see [`.github/skills/README.md`](.github/skills/README.md) for the complete catalog across:
|
|
677
|
-
|
|
678
|
-
- 🛡️ Core Infrastructure & Governance (9) · 🕵️ Political Intelligence (11) · 🔐 ISMS & Security (14)
|
|
679
|
-
- ⚙️ Development & Operations (14) · 🧪 Testing & QA (2) · 🎨 UI/UX & Design (8)
|
|
680
|
-
- 📡 Data Integration (6) · 📰 Journalism & Media (5) · 🏛️ Government, Regulatory & Economics (7)
|
|
681
|
-
- 🗣️ Language & Localization (1) · 🤖 GitHub Agentic Workflows (13) · 📋 Copilot Patterns (1)
|
|
682
|
-
|
|
683
|
-
*Economic-Data Integrations (three primary sources, parity-treated):*
|
|
684
|
-
- **scb-mcp** (`@jarib/pxweb-mcp@2.0.0`) — official Swedish statistics via PxWebAPI 2.0 (1,200+ tables)
|
|
685
|
-
- **world-bank-mcp** (`worldbank-mcp@1.0.1`) + `scripts/world-bank-client.ts` — WGI governance, environment, long-horizon social/education
|
|
686
|
-
- **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).
|
|
687
|
-
|
|
688
|
-
### External Documentation
|
|
689
|
-
- [CIA Platform Documentation](https://hack23.github.io/cia/)
|
|
690
|
-
- [CIA JSON Export Specifications](https://github.com/Hack23/cia/tree/master/json-export-specs/visualizations)
|
|
691
|
-
- [Hack23 ISMS](https://github.com/Hack23/ISMS)
|
|
692
|
-
- [Hack23 Public ISMS](https://github.com/Hack23/ISMS-PUBLIC)
|
|
693
|
-
- [Hack23 Secure Development Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md)
|
|
694
|
-
- [Hack23 Blog](https://hack23.com/blog.html)
|
|
695
|
-
|
|
696
|
-
## 🔬 Political Intelligence Analysis & News Creation
|
|
697
|
-
|
|
698
|
-
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.
|
|
416
|
+
# Tests
|
|
417
|
+
npm test # Vitest unit (2,890 tests)
|
|
418
|
+
npm run test:coverage # with coverage
|
|
419
|
+
npm run cypress:open # E2E interactive
|
|
420
|
+
npm run e2e # full E2E (build + preview + Cypress)
|
|
699
421
|
|
|
700
|
-
|
|
422
|
+
# Quality
|
|
423
|
+
npm run htmlhint # HTML5 validation
|
|
424
|
+
npm run linkcheck # link integrity (linkinator)
|
|
701
425
|
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
B --> C[📋 Populate templates<br/>analysis/templates]
|
|
706
|
-
C --> D[📂 Write 9 or 14 artifacts<br/>analysis/daily/$DATE/$SUBFOLDER]
|
|
707
|
-
D --> E{🚦 Analysis Gate<br/>prompts/05}
|
|
708
|
-
E -- pass --> F[📰 Generate article<br/>prompts/06]
|
|
709
|
-
E -- fail --> C
|
|
710
|
-
F --> G[🌐 Translate into<br/>remaining 12 languages]
|
|
711
|
-
G --> H[🔀 One PR per article type<br/>prompts/07]
|
|
712
|
-
style A fill:#0a0e27,stroke:#00d9ff,color:#e0e0e0
|
|
713
|
-
style E fill:#dc3545,stroke:#b02a37,color:#fff
|
|
714
|
-
style H fill:#1a1e3d,stroke:#ffbe0b,color:#e0e0e0
|
|
426
|
+
# Production
|
|
427
|
+
npm run build # Vite production build → dist/
|
|
428
|
+
npm run preview # http://localhost:4173
|
|
715
429
|
```
|
|
716
430
|
|
|
717
|
-
###
|
|
431
|
+
### CI/CD
|
|
718
432
|
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
| **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) |
|
|
723
|
-
| **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.) |
|
|
724
|
-
| **News-generation contract** | [`.github/prompts/README.md`](.github/prompts/README.md) | 8 bounded-context prompt modules + Tier-C extension; single blocking analysis gate |
|
|
725
|
-
| **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 |
|
|
726
|
-
| **Specialist personas** | [`.github/agents/README.md`](.github/agents/README.md) | `intelligence-operative`, `news-journalist`, `content-generator` — and 11 more |
|
|
727
|
-
| **Rules that guide the agents** | [`.github/skills/README.md`](.github/skills/README.md) | 11 political-intelligence skills + 5 journalism skills + 14 ISMS/security skills |
|
|
433
|
+
- HTMLHint validation · Linkinator · Vitest (2,890 tests) · Cypress · Vite build · Dependency review · CodeQL · Secret scanning · Translation validation
|
|
434
|
+
- Releases — workflow_dispatch or `v*.*.*` tag → SBOM (SPDX) + SHA-256 + SLSA Build Provenance attestations + dual deployment (S3/CloudFront primary, GitHub Pages DR)
|
|
435
|
+
- `gh attestation verify riksdagsmonitor-vX.Y.Z.zip -R Hack23/riksdagsmonitor`
|
|
728
436
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
- **Riksdagen & Regeringen** via `riksdag-regering-mcp` (32 tools): MPs, votes, documents, speeches, committees, government docs
|
|
732
|
-
- **Statistics Sweden (SCB)** via `@jarib/pxweb-mcp@2.0.0` (1 200+ PxWeb tables)
|
|
733
|
-
- **World Bank Open Data** via `worldbank-mcp@1.0.1` + `scripts/world-bank-client.ts` (WGI governance, environment, education)
|
|
734
|
-
- **IMF** via `scripts/imf-client.ts` (pure-TS, WEO + Fiscal Monitor + IFS + GFS_COFOG, T+5 projections)
|
|
735
|
-
- **CIA platform** (Hack23) — 19 visualisation products consumed nightly via `update-cia-csv-data.yml`
|
|
437
|
+
See [`WORKFLOWS.md`](WORKFLOWS.md) and [`RELEASE_PROCESS.md`](RELEASE_PROCESS.md) for the canonical reference.
|
|
736
438
|
|
|
737
439
|
---
|
|
738
440
|
|
|
739
|
-
## 🤖
|
|
740
|
-
|
|
741
|
-
> *"While traditional newsrooms debate whether AI will replace journalists, Riksdagsmonitor already runs a fully autonomous political intelligence newsroom — 11 agentic workflows, 14 languages, zero human editors, and a publication schedule that would bankrupt any legacy outlet trying to keep up."*
|
|
742
|
-
|
|
743
|
-
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 **11 specialized workflows** (10 single-run news pipelines + 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.
|
|
441
|
+
## 🤖 GitHub Copilot — Agents, Skills & Agentic Workflows
|
|
744
442
|
|
|
745
|
-
|
|
443
|
+
Riksdagsmonitor uses **GitHub Copilot personas, skills and agentic workflows** as first-class automation. Directory READMEs are the single source of truth; [`AGENTS.md`](AGENTS.md) and [`SKILLS.md`](SKILLS.md) are the long-form catalogs.
|
|
746
444
|
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
E --> F[news/$DATE-$SUB-en.html<br/>news/$DATE-$SUB-sv.html]
|
|
755
|
-
F --> G[news-translate workflow<br/>EN+SV → 12 other languages<br/>OUT-OF-BAND]
|
|
756
|
-
F --> S[sitemap.xml + sitemap.html<br/>rss.xml<br/>political-intelligence_*.html]
|
|
757
|
-
G --> S
|
|
758
|
-
|
|
759
|
-
style C fill:#2196f3,color:#fff
|
|
760
|
-
style E fill:#4caf50
|
|
761
|
-
style G fill:#9e9e9e,color:#fff
|
|
762
|
-
```
|
|
763
|
-
|
|
764
|
-
A new `.md` artifact written anywhere under `analysis/daily/$DATE/$SUB/` is enough to produce a published English + Swedish HTML article on the next CI build — there is no manual scaffolding step, no template fill-in, and no per-type generator class. The news workflows themselves never write localised HTML; that is the sole responsibility of `news-translate`.
|
|
765
|
-
|
|
766
|
-
### 📐 Anatomy of an article
|
|
767
|
-
|
|
768
|
-
Every published article is a deterministic projection of three input sources, in this priority:
|
|
769
|
-
|
|
770
|
-
1. **`analysis/methodologies/`** — the *editorial method* (e.g. STRIDE, devil's-advocate, ACH, comparative-politics framing). These files define **how** an analysis is conducted; they are version-controlled and cited from every article footer.
|
|
771
|
-
2. **`analysis/templates/`** — the *output structure* (executive-brief, synthesis, significance, stakeholders, SWOT, scenarios, comparative, intel-assessment, classification, …). These define **what sections** appear and in **what order**.
|
|
772
|
-
3. **`analysis/daily/$DATE/$SUB/*.md`** — the *evidence* (per-day artifacts produced by the agentic workflow's analysis phase). These provide the **specific facts**, MCP query results, and per-document analyses for one day's coverage.
|
|
445
|
+
| Surface | Catalog | Count |
|
|
446
|
+
|:--------|:--------|:------|
|
|
447
|
+
| 🤖 **Custom agents** | [`.github/agents/README.md`](.github/agents/README.md) | **24** files (14 personas + 9 workflow-specialists + 1 shared developer-instructions) |
|
|
448
|
+
| 🧠 **Skills** | [`.github/skills/README.md`](.github/skills/README.md) | **91** skills across 12 functional categories |
|
|
449
|
+
| 📜 **Prompt modules** | [`.github/prompts/README.md`](.github/prompts/README.md) | 8 bounded-context modules + Tier-C extension |
|
|
450
|
+
| ⚙️ **Workflows** | [`.github/workflows/README.md`](.github/workflows/README.md) | **43** files (21 standard + 11 agentic sources + 11 compiled) |
|
|
451
|
+
| 🔌 **MCP servers** | [`.github/copilot-mcp.json`](.github/copilot-mcp.json) | **8** — `riksdag-regering`, `scb`, `world-bank`, `github` (insiders), `filesystem`, `memory`, `sequential-thinking`, `playwright` |
|
|
773
452
|
|
|
774
|
-
|
|
453
|
+
**14 persona agents** (assignable via `assign_copilot_to_issue`):
|
|
454
|
+
`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`.
|
|
775
455
|
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
> - [`.github/prompts/README.md`](.github/prompts/README.md) — 8 bounded-context prompt modules + `ext/tier-c-aggregation.md`, imported by every news workflow
|
|
779
|
-
> - [`.github/agents/README.md`](.github/agents/README.md) — 24 Copilot agent files (14 personas + 9 workflow-specialists + 1 shared developer-instructions)
|
|
780
|
-
> - [`.github/skills/README.md`](.github/skills/README.md) — 91 skills grouped by 12 functional categories
|
|
781
|
-
> - [`analysis/README.md`](analysis/README.md) — on-disk artifact layout (`analysis/daily/$ARTICLE_DATE/$SUBFOLDER/`) with 9-artifact / 14-artifact contracts
|
|
782
|
-
> - [`analysis/methodologies/README.md`](analysis/methodologies/README.md) — 11 methodology documents
|
|
783
|
-
> - [`analysis/templates/README.md`](analysis/templates/README.md) — 23 canonical output templates (8 core single-type + 15 extended / Tier-C)
|
|
784
|
-
> - [`WORKFLOWS.md`](WORKFLOWS.md) — canonical end-to-end reference (v7.2, includes Stage 6.1 *Agentic Workflow Structure & Prompt Imports*)
|
|
785
|
-
|
|
786
|
-
### Autonomous Publication Schedule
|
|
787
|
-
|
|
788
|
-
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.
|
|
789
|
-
|
|
790
|
-
| Time (UTC) | Workflow | Coverage | Frequency |
|
|
791
|
-
|:-----------:|:---------|:---------|:----------|
|
|
792
|
-
| 🌅 04:00 | **Committee Reports** | Utskottsbetänkanden analysis, voting breakdowns | Mon–Fri |
|
|
793
|
-
| 🌅 05:00 | **Propositions** | Government bills, legislative impact assessment | Mon–Fri |
|
|
794
|
-
| ☀️ 06:00 | **Motions** | Opposition proposals, party strategy decoding | Mon–Fri |
|
|
795
|
-
| ❓ 07:00 | **Interpellations** | Ministerial accountability, evasion detection | Mon–Fri |
|
|
796
|
-
| 🔮 07:00 | **Week Ahead** | Parliamentary calendar preview, agenda intelligence | Friday |
|
|
797
|
-
| 📅 08:00 | **Month Ahead** | Strategic outlook, coalition forecasting | 1st of month |
|
|
798
|
-
| 🔍 10:00 & 14:00 (Mon–Fri); 12:00 (Sat/Sun) | **Realtime Monitor** | Breaking political developments, flash analysis | Mon–Fri (×2) + weekends |
|
|
799
|
-
| 🌍 11:00 & 17:00 (Mon–Fri); 14:00 (Sat/Sun) | **Translate** | 12 additional languages from EN/SV cores | Daily |
|
|
800
|
-
| 🌆 18:00 (16:00 Sat) | **Evening Analysis** | Deep-dive intelligence synthesis | Mon–Sat |
|
|
801
|
-
| 📊 09:00 | **Weekly Review** | Week-in-review scorecard, party performance | Saturday |
|
|
802
|
-
| 📈 10:00 | **Monthly Review** | Comprehensive monthly intelligence assessment | 28th of month |
|
|
456
|
+
**9 workflow-specialist agents** (`.agent.md`, invoked from workflows):
|
|
457
|
+
`agentic-workflows` · `ci-cleaner` · `contribution-checker` · `create-safe-output-type` · `custom-engine-implementation` · `grumpy-reviewer` · `interactive-agent-designer` · `technical-doc-writer` · `w3c-specification-writer`.
|
|
803
458
|
|
|
804
|
-
|
|
459
|
+
---
|
|
805
460
|
|
|
806
|
-
|
|
461
|
+
## 📖 Documentation Index
|
|
807
462
|
|
|
808
|
-
###
|
|
463
|
+
### Project documentation
|
|
464
|
+
- [`Article-Generation.md`](Article-Generation.md) — **Canonical agentic-newsroom contract** (data → analysis → article → HTML → S3)
|
|
465
|
+
- [`AGENTS.md`](AGENTS.md) · [`SKILLS.md`](SKILLS.md) — Copilot persona & skill catalogs
|
|
466
|
+
- [`WORKFLOWS.md`](WORKFLOWS.md) — End-to-end CI/CD reference (v7.2)
|
|
467
|
+
- [`RELEASE_PROCESS.md`](RELEASE_PROCESS.md) — Release with attestations & docs-as-code
|
|
468
|
+
- [`TRANSLATION_GUIDE.md`](TRANSLATION_GUIDE.md) — 14-language standards & glossary
|
|
469
|
+
- [`SECURITY.md`](SECURITY.md) · [`CONTRIBUTING.md`](CONTRIBUTING.md) · [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md) · [`LICENSE`](LICENSE)
|
|
809
470
|
|
|
810
|
-
|
|
471
|
+
### Future planning
|
|
472
|
+
- [`FUTURE_WORKFLOWS.md`](FUTURE_WORKFLOWS.md) · [`FUTURE_MINDMAP.md`](FUTURE_MINDMAP.md) · [`FUTURE_ARCHITECTURE.md`](FUTURE_ARCHITECTURE.md) · [`FUTURE_SECURITY_ARCHITECTURE.md`](FUTURE_SECURITY_ARCHITECTURE.md) · [`FUTURE_SWOT.md`](FUTURE_SWOT.md)
|
|
811
473
|
|
|
812
|
-
|
|
813
|
-
-
|
|
814
|
-
-
|
|
815
|
-
-
|
|
816
|
-
- 🛡️ **GDPR-compliant OSINT**: Only public parliamentary data, with privacy-by-design architecture
|
|
817
|
-
- 🧪 **Quality gates**: HTMLHint validation, link checking, accessibility compliance (WCAG 2.1 AA) — every article passes CI before publication
|
|
474
|
+
### External
|
|
475
|
+
- 📚 [API Documentation (JSDoc)](https://riksdagsmonitor.com/docs/api/) · [Test Coverage](https://riksdagsmonitor.com/docs/coverage/) · [Cypress E2E Reports](https://riksdagsmonitor.com/docs/cypress/)
|
|
476
|
+
- 🕵️ [CIA Platform](https://hack23.github.io/cia/) · [CIA JSON Export Specs](https://github.com/Hack23/cia/tree/master/json-export-specs/visualizations)
|
|
477
|
+
- 🛡️ [Hack23 ISMS-PUBLIC](https://github.com/Hack23/ISMS-PUBLIC) · 📰 [Hack23 Blog](https://hack23.com/blog.html)
|
|
818
478
|
|
|
819
479
|
---
|
|
820
480
|
|
|
821
|
-
## 🔮 Future Roadmap
|
|
481
|
+
## 🔮 Future Roadmap (2026 → 2037)
|
|
822
482
|
|
|
823
|
-
> *From agentic news generation to AGI-powered democratic intelligence —
|
|
483
|
+
> *From agentic news generation to AGI-powered democratic intelligence — an 11-year evolution.*
|
|
824
484
|
>
|
|
825
|
-
>
|
|
826
|
-
|
|
827
|
-
### Evolution Overview
|
|
485
|
+
> Detailed planning: [`FUTURE_WORKFLOWS.md`](FUTURE_WORKFLOWS.md) · [`FUTURE_MINDMAP.md`](FUTURE_MINDMAP.md) · [`FUTURE_ARCHITECTURE.md`](FUTURE_ARCHITECTURE.md)
|
|
828
486
|
|
|
829
487
|
```mermaid
|
|
830
|
-
%%{init: {"theme": "dark", "themeVariables": {"primaryColor": "#00d9ff", "primaryTextColor": "#e0e0e0", "primaryBorderColor": "#ff006e", "lineColor": "#ffbe0b", "secondaryColor": "#1a1e3d", "tertiaryColor": "#0a0e27"
|
|
488
|
+
%%{init: {"theme": "dark", "themeVariables": {"primaryColor": "#00d9ff", "primaryTextColor": "#e0e0e0", "primaryBorderColor": "#ff006e", "lineColor": "#ffbe0b", "secondaryColor": "#1a1e3d", "tertiaryColor": "#0a0e27"}}}%%
|
|
831
489
|
timeline
|
|
832
|
-
title Riksdagsmonitor Evolution — 2026
|
|
490
|
+
title Riksdagsmonitor Evolution — 2026 → 2037
|
|
833
491
|
section Phase 3 — Foundation (2026)
|
|
834
|
-
Q1-Q2 : TypeScript migration
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
2028 : Multi-modal content (audio/video)
|
|
848
|
-
: Self-healing pipelines
|
|
849
|
-
: AI editorial board
|
|
850
|
-
: 65 automation assets
|
|
851
|
-
2029 : Fully autonomous pipeline
|
|
852
|
-
: Expert-level analysis
|
|
853
|
-
: API platform launch
|
|
854
|
-
: 75 automation assets
|
|
855
|
-
section Phase 5 — Scale (2030-2033)
|
|
856
|
-
2030-2031 : EU-wide coverage
|
|
857
|
-
: 85+ automation assets
|
|
858
|
-
: Near-expert analysis
|
|
859
|
-
: Sovereign AI evaluation
|
|
860
|
-
2032-2033 : Global parliamentary monitoring
|
|
861
|
-
: 100 automation assets
|
|
862
|
-
: Pre-AGI capabilities
|
|
863
|
-
: Every UN language
|
|
864
|
-
section Phase 6 — AGI Era (2034-2037)
|
|
865
|
-
2034-2035 : AGI-enhanced intelligence
|
|
866
|
-
: 195 parliaments monitored
|
|
867
|
-
: Predictive governance
|
|
868
|
-
: 110+ automation assets
|
|
869
|
-
2036-2037 : Transformative democracy platform
|
|
870
|
-
: 120+ automation assets
|
|
871
|
-
: Post-AGI capabilities
|
|
872
|
-
: Democratic safeguards architecture
|
|
873
|
-
```
|
|
874
|
-
|
|
875
|
-
### Phase 3: Agentic Intelligence Foundation (2026)
|
|
876
|
-
|
|
877
|
-
*Current phase — AI-disrupted news generation operational*
|
|
878
|
-
|
|
879
|
-
```mermaid
|
|
880
|
-
%%{init: {"theme": "dark", "themeVariables": {"primaryColor": "#00d9ff", "primaryTextColor": "#e0e0e0", "primaryBorderColor": "#ff006e", "lineColor": "#ffbe0b", "secondaryColor": "#1a1e3d", "tertiaryColor": "#0a0e27"}}}%%
|
|
881
|
-
graph LR
|
|
882
|
-
subgraph SGCompleted["✅ Completed"]
|
|
883
|
-
style SGCompleted fill:#006400,stroke:#00d9ff,color:#e0e0e0
|
|
884
|
-
A[TypeScript Migration<br/>31 modules] --> B[Agentic News Gen<br/>12 workflows]
|
|
885
|
-
B --> C[14 Languages<br/>RTL support]
|
|
886
|
-
C --> D[Dual Deploy<br/>S3 + GitHub Pages]
|
|
887
|
-
end
|
|
888
|
-
subgraph SGProgress["🔄 In Progress"]
|
|
889
|
-
style SGProgress fill:#1a1e3d,stroke:#ffbe0b,color:#e0e0e0
|
|
890
|
-
E[CIA Data Pipeline<br/>19 products] --> F[Predictive Dashboards<br/>Chart.js/D3.js]
|
|
891
|
-
F --> G[Content Expansion<br/>Hundreds of articles/month]
|
|
892
|
-
end
|
|
893
|
-
subgraph SGPlanned["📋 Planned"]
|
|
894
|
-
style SGPlanned fill:#0a0e27,stroke:#ff006e,color:#e0e0e0
|
|
895
|
-
H[API Platform<br/>GraphQL] --> I[Nordic Expansion<br/>Denmark, Norway, Finland]
|
|
896
|
-
end
|
|
897
|
-
D --> E
|
|
898
|
-
G --> H
|
|
899
|
-
```
|
|
900
|
-
|
|
901
|
-
| Capability | Status | Details |
|
|
902
|
-
|:-----------|:------:|:--------|
|
|
903
|
-
| TypeScript migration | ✅ Done | 31 modules, 2890 Vitest tests |
|
|
904
|
-
| Agentic news generation | ✅ Live | 12 workflows (11 scheduled + 1 on-demand), 14 languages |
|
|
905
|
-
| 14-language support | ✅ Live | Including Arabic/Hebrew RTL |
|
|
906
|
-
| CIA data integration | 🔄 Active | 19 visualization products |
|
|
907
|
-
| Predictive dashboards | 📋 Planned | Chart.js/D3.js interactive displays |
|
|
908
|
-
|
|
909
|
-
### Phase 4: Predictive Intelligence & Nordic Expansion (2027–2029)
|
|
910
|
-
|
|
911
|
-
```mermaid
|
|
912
|
-
%%{init: {"theme": "dark", "themeVariables": {"primaryColor": "#00d9ff", "primaryTextColor": "#e0e0e0", "primaryBorderColor": "#ff006e", "lineColor": "#ffbe0b", "secondaryColor": "#1a1e3d", "tertiaryColor": "#0a0e27"}}}%%
|
|
913
|
-
graph TB
|
|
914
|
-
subgraph SG2027["2027 — Predictive Analytics"]
|
|
915
|
-
style SG2027 fill:#1a1e3d,stroke:#00d9ff,color:#e0e0e0
|
|
916
|
-
PA1[🔮 ML Election Models<br/>Coalition probability scoring]
|
|
917
|
-
PA2[📡 Real-Time Streams<br/>Live parliamentary feeds]
|
|
918
|
-
PA3[🌍 Nordic Expansion<br/>DK · NO · FI parliaments]
|
|
919
|
-
PA4[🔍 Multi-Source OSINT<br/>Media + social + official]
|
|
920
|
-
end
|
|
921
|
-
subgraph SG2028["2028 — Multi-Modal Intelligence"]
|
|
922
|
-
style SG2028 fill:#1a1e3d,stroke:#ffbe0b,color:#e0e0e0
|
|
923
|
-
MM1[🎙️ Audio/Video Analysis<br/>Debate tone detection]
|
|
924
|
-
MM2[🤖 AI Editorial Board<br/>Autonomous quality control]
|
|
925
|
-
MM3[🔧 Self-Healing Pipelines<br/>Auto-recovery workflows]
|
|
926
|
-
MM4[📊 65 Automation Assets]
|
|
927
|
-
end
|
|
928
|
-
subgraph SG2029["2029 — Autonomous Platform"]
|
|
929
|
-
style SG2029 fill:#1a1e3d,stroke:#ff006e,color:#e0e0e0
|
|
930
|
-
AP1[🚀 Fully Autonomous Pipeline<br/>Zero human intervention]
|
|
931
|
-
AP2[🧠 Expert-Level Analysis<br/>PhD-equivalent insight]
|
|
932
|
-
AP3[🔌 API Platform Launch<br/>GraphQL + REST]
|
|
933
|
-
AP4[📊 75 Automation Assets]
|
|
934
|
-
end
|
|
935
|
-
PA1 --> MM1
|
|
936
|
-
PA2 --> MM2
|
|
937
|
-
PA3 --> MM3
|
|
938
|
-
PA4 --> MM4
|
|
939
|
-
MM1 --> AP1
|
|
940
|
-
MM2 --> AP2
|
|
941
|
-
MM3 --> AP3
|
|
942
|
-
MM4 --> AP4
|
|
943
|
-
```
|
|
944
|
-
|
|
945
|
-
### Phase 5: EU-Wide Coverage & Pre-AGI (2030–2033)
|
|
946
|
-
|
|
947
|
-
```mermaid
|
|
948
|
-
%%{init: {"theme": "dark", "themeVariables": {"primaryColor": "#00d9ff", "primaryTextColor": "#e0e0e0", "primaryBorderColor": "#ff006e", "lineColor": "#ffbe0b", "secondaryColor": "#1a1e3d", "tertiaryColor": "#0a0e27"}}}%%
|
|
949
|
-
graph LR
|
|
950
|
-
subgraph SGEU["2030-2031 — EU Scale"]
|
|
951
|
-
style SGEU fill:#1a1e3d,stroke:#00d9ff,color:#e0e0e0
|
|
952
|
-
EU1[🇪🇺 27 EU Parliaments<br/>+ European Parliament]
|
|
953
|
-
EU2[🧠 Near-Expert Analysis<br/>Opus 8.x capabilities]
|
|
954
|
-
EU3[📊 85+ Automation Assets<br/>Continent-wide coverage]
|
|
955
|
-
EU4[🏛️ Sovereign AI Evaluation<br/>EU AI Act compliance]
|
|
956
|
-
end
|
|
957
|
-
subgraph SGGL["2032-2033 — Global Reach"]
|
|
958
|
-
style SGGL fill:#1a1e3d,stroke:#ff006e,color:#e0e0e0
|
|
959
|
-
GL1[🌍 Global Parliamentary Watch<br/>100+ democracies]
|
|
960
|
-
GL2[🗣️ Every UN Language<br/>Native-quality output]
|
|
961
|
-
GL3[📊 100 Automation Assets<br/>Pre-AGI capabilities]
|
|
962
|
-
GL4[🔒 Zero-Trust Architecture<br/>Quantum-safe cryptography]
|
|
963
|
-
end
|
|
964
|
-
EU1 --> GL1
|
|
965
|
-
EU2 --> GL2
|
|
966
|
-
EU3 --> GL3
|
|
967
|
-
EU4 --> GL4
|
|
968
|
-
```
|
|
969
|
-
|
|
970
|
-
### Phase 6: AGI Era & Transformative Democracy (2034–2037)
|
|
971
|
-
|
|
972
|
-
> *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.*
|
|
973
|
-
|
|
974
|
-
```mermaid
|
|
975
|
-
%%{init: {"theme": "dark", "themeVariables": {"primaryColor": "#ff006e", "primaryTextColor": "#e0e0e0", "primaryBorderColor": "#00d9ff", "lineColor": "#ffbe0b", "secondaryColor": "#1a1e3d", "tertiaryColor": "#0a0e27"}}}%%
|
|
976
|
-
graph TB
|
|
977
|
-
subgraph SGAGI["🤖 6.1 AGI-Enhanced Intelligence"]
|
|
978
|
-
style SGAGI fill:#1a1e3d,stroke:#ff006e,color:#e0e0e0
|
|
979
|
-
AGI1["🤖 Autonomous Analysis<br/>Real-time intelligence across<br/>all 195 parliamentary systems"]
|
|
980
|
-
AGI2["🌐 Universal Language<br/>Every UN language<br/>supported natively"]
|
|
981
|
-
AGI3["📊 Predictive Governance<br/>Policy impact prediction<br/>before legislation proposed"]
|
|
982
|
-
end
|
|
983
|
-
subgraph SGSAFE["⚖️ 6.2 Democratic Safeguards"]
|
|
984
|
-
style SGSAFE fill:#0a0e27,stroke:#00d9ff,color:#e0e0e0
|
|
985
|
-
SAFE1["⚖️ Ethical AI Governance<br/>Human oversight maintained<br/>regardless of AI capability"]
|
|
986
|
-
SAFE2["🛡️ Anti-Weaponization<br/>Architecture prevents<br/>manipulation or misuse"]
|
|
987
|
-
SAFE3["🔒 Constitutional Alignment<br/>Democratic values encoded<br/>in platform architecture"]
|
|
988
|
-
end
|
|
989
|
-
subgraph SGPARA["🧬 6.3 Paradigm Readiness"]
|
|
990
|
-
style SGPARA fill:#0a0e27,stroke:#ffbe0b,color:#e0e0e0
|
|
991
|
-
PARA1["⚛️ Quantum AI Ready<br/>Post-quantum cryptography<br/>Quantum ML integration"]
|
|
992
|
-
PARA2["🧠 Neuromorphic Computing<br/>Brain-inspired architectures<br/>Edge intelligence deployment"]
|
|
993
|
-
PARA3["🌍 Transformative Platform<br/>120+ automation assets · 195 parliaments<br/>Global democratic intelligence"]
|
|
994
|
-
end
|
|
995
|
-
AGI1 --> SAFE1
|
|
996
|
-
AGI2 --> SAFE2
|
|
997
|
-
AGI3 --> SAFE3
|
|
998
|
-
SAFE1 --> PARA1
|
|
999
|
-
SAFE2 --> PARA2
|
|
1000
|
-
SAFE3 --> PARA3
|
|
492
|
+
Q1-Q2 : ✅ TypeScript migration · 11 agentic news workflows
|
|
493
|
+
: ✅ 14 languages · S3 + GitHub Pages dual deploy
|
|
494
|
+
Q3-Q4 : 🔄 CIA pipeline integration · predictive dashboards
|
|
495
|
+
section Phase 4 — Predictive Intelligence (2027–2029)
|
|
496
|
+
2027 : Real-time streams · ML election models · Nordic expansion (DK · NO · FI)
|
|
497
|
+
2028 : Multi-modal (audio/video) · AI editorial board · self-healing pipelines
|
|
498
|
+
2029 : Fully autonomous · expert-level analysis · API platform launch
|
|
499
|
+
section Phase 5 — Scale (2030–2033)
|
|
500
|
+
2030-2031 : EU-wide coverage (27 + EP) · sovereign-AI evaluation
|
|
501
|
+
2032-2033 : Global parliamentary watch (100+ democracies) · every UN language · pre-AGI
|
|
502
|
+
section Phase 6 — AGI Era (2034–2037)
|
|
503
|
+
2034-2035 : AGI-enhanced intelligence · 195 parliaments · predictive governance
|
|
504
|
+
2036-2037 : Transformative democracy platform · democratic safeguards architecture
|
|
1001
505
|
```
|
|
1002
506
|
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
- 📊 **Predictive governance**: Policy impact prediction *before* legislation is proposed
|
|
1007
|
-
- ⚖️ **Ethical AI governance**: Human oversight maintained regardless of AI capability level
|
|
1008
|
-
- 🛡️ **Democratic safeguards**: Platform architecture prevents weaponization or manipulation
|
|
1009
|
-
|
|
1010
|
-
### 📈 AI Model Evolution Strategy
|
|
1011
|
-
|
|
1012
|
-
**Illustrative assumptions** *(high uncertainty — AI landscape evolves rapidly)*:
|
|
1013
|
-
- Model updates assumed roughly quarterly; actual cadence will vary by vendor and paradigm
|
|
1014
|
-
- Version numbers (Opus 5.x–12.x) are illustrative — actual products may differ significantly
|
|
1015
|
-
- Competitors (OpenAI, Google, Meta, EU sovereign AI) evaluated at each major release cycle
|
|
1016
|
-
- Architecture must accommodate potential paradigm shifts (quantum AI, neuromorphic computing, or entirely new approaches)
|
|
1017
|
-
|
|
1018
|
-
**Workflow Count Projection:**
|
|
1019
|
-
|
|
1020
|
-
| Year | Automation Assets | AI Model | Key Capability |
|
|
1021
|
-
|:----:|:---------------:|:---------|:---------------|
|
|
1022
|
-
| **2026** | 44→50 | Opus 4.7–4.9 | 🤖 Agentic news generation (current) |
|
|
507
|
+
| Year | Automation assets | AI model | Key capability |
|
|
508
|
+
|:----:|:----------------:|:---------|:---------------|
|
|
509
|
+
| **2026** | 44 → 50 | Opus 4.7–4.9 | 🤖 Agentic news generation (current) |
|
|
1023
510
|
| **2027** | 50–55 | Opus 5.x | 🔮 Predictive analytics & Nordic expansion |
|
|
1024
|
-
| **2028** | 55–65 | Opus 6.x | 🎙️ Multi-modal content
|
|
511
|
+
| **2028** | 55–65 | Opus 6.x | 🎙️ Multi-modal content |
|
|
1025
512
|
| **2029** | 65–75 | Opus 7.x | 🚀 Fully autonomous pipeline |
|
|
1026
|
-
| **2030** | 75–
|
|
1027
|
-
| **
|
|
1028
|
-
| **2034–2037** | 100–120+ | AGI / Post-AGI | ⚡ Transformative democracy platform |
|
|
513
|
+
| **2030–2033** | 75–100 | Opus 8–10.x / pre-AGI | 🌍 EU → Global coverage |
|
|
514
|
+
| **2034–2037** | 100–120+ | AGI / post-AGI | ⚡ Transformative democracy platform |
|
|
1029
515
|
|
|
1030
|
-
|
|
1031
|
-
%%{init: {"theme": "dark", "themeVariables": {"primaryColor": "#00d9ff", "primaryTextColor": "#e0e0e0", "primaryBorderColor": "#ff006e", "lineColor": "#ffbe0b", "secondaryColor": "#1a1e3d", "tertiaryColor": "#0a0e27"}}}%%
|
|
1032
|
-
xychart-beta
|
|
1033
|
-
title "Riksdagsmonitor Workflow Growth Projection (2026–2037)"
|
|
1034
|
-
x-axis ["2026", "2027", "2028", "2029", "2030", "2031", "2032", "2033", "2034", "2035", "2036", "2037"]
|
|
1035
|
-
y-axis "Automation Assets (Workflows + Prompt Files)" 0 --> 130
|
|
1036
|
-
bar [47, 53, 60, 70, 80, 88, 95, 100, 105, 110, 115, 120]
|
|
1037
|
-
line [47, 53, 60, 70, 80, 88, 95, 100, 105, 110, 115, 120]
|
|
1038
|
-
```
|
|
1039
|
-
|
|
1040
|
-
> Note: The chart values are midpoint estimates within the projected ranges in the table above and are illustrative, not exact counts.
|
|
1041
|
-
|
|
1042
|
-
### 📋 Detailed Future Planning
|
|
1043
|
-
|
|
1044
|
-
| Document | Description |
|
|
1045
|
-
|:---------|:------------|
|
|
1046
|
-
| 📋 [**Future Workflows**](FUTURE_WORKFLOWS.md) | Complete 11-year workflow evolution roadmap with architecture diagrams |
|
|
1047
|
-
| 🗺️ [**Future Mindmap**](FUTURE_MINDMAP.md) | Capability expansion map from Swedish monitoring to global democratic intelligence |
|
|
1048
|
-
| 🚀 [Future Architecture](FUTURE_ARCHITECTURE.md) | Architectural evolution from static site to AI-native platform |
|
|
1049
|
-
| 🔒 [Future Security Architecture](FUTURE_SECURITY_ARCHITECTURE.md) | Security roadmap including post-quantum cryptography |
|
|
1050
|
-
| 💼 [Future SWOT](FUTURE_SWOT.md) | Strategic opportunities in democratic technology |
|
|
516
|
+
> *Version numbers are illustrative — actual products and paradigm shifts (quantum AI, neuromorphic computing) will vary. Architecture is designed for graceful adaptation while preserving democratic safeguards: human oversight maintained regardless of AI capability, anti-weaponisation by design, constitutional alignment encoded in platform architecture.*
|
|
1051
517
|
|
|
1052
518
|
---
|
|
1053
519
|
|
|
1054
|
-
## 🏢 About Hack23
|
|
1055
|
-
|
|
1056
|
-
**Hack23 AB (Org.nr 5595347807)** - Swedish cybersecurity and open-source intelligence consultancy
|
|
1057
|
-
|
|
1058
|
-
- 🌐 **Website**: [www.hack23.com](https://www.hack23.com)
|
|
1059
|
-
- 💼 **LinkedIn**: [Company Profile](https://www.linkedin.com/company/hack23/)
|
|
1060
|
-
- 👨💻 **Founder**: [James Pether Sörling, CISSP, CISM](https://www.linkedin.com/in/jamessorling/)
|
|
1061
|
-
- 🔒 **ISMS**: [Public ISMS Repository](https://github.com/Hack23/ISMS-PUBLIC)
|
|
1062
|
-
|
|
1063
520
|
## 🤝 Contributing
|
|
1064
521
|
|
|
1065
|
-
Contributions welcome
|
|
1066
|
-
|
|
1067
|
-
1. **Fork** the repository
|
|
1068
|
-
2. **Create** a feature branch with descriptive name
|
|
1069
|
-
3. **Sign** commits with GPG key
|
|
1070
|
-
4. **Test** changes locally (HTML validation, link checking)
|
|
1071
|
-
5. **Submit** pull request with comprehensive description
|
|
1072
|
-
6. **Address** code review feedback
|
|
1073
|
-
|
|
1074
|
-
**Requirements:**
|
|
1075
|
-
- GitHub account with MFA enabled
|
|
1076
|
-
- GPG-signed commits
|
|
1077
|
-
- HTML validation passing
|
|
1078
|
-
- No security vulnerabilities introduced
|
|
1079
|
-
|
|
1080
|
-
## 📜 License
|
|
1081
|
-
|
|
1082
|
-
Copyright © 2008-2026 Hack23 AB (Org.nr 5595347807)
|
|
1083
|
-
|
|
1084
|
-
Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) file for details.
|
|
1085
|
-
|
|
1086
|
-
## 🔗 Links
|
|
1087
|
-
|
|
1088
|
-
- **Website:** [riksdagsmonitor.com](https://riksdagsmonitor.com)
|
|
1089
|
-
- **CIA Platform:** [www.hack23.com/cia](https://www.hack23.com/cia)
|
|
1090
|
-
- **GitHub:** [github.com/Hack23/riksdagsmonitor](https://github.com/Hack23/riksdagsmonitor)
|
|
1091
|
-
- **Hack23:** [www.hack23.com](https://www.hack23.com)
|
|
1092
|
-
- **ISMS:** [github.com/Hack23/ISMS](https://github.com/Hack23/ISMS)
|
|
1093
|
-
- **LinkedIn:** [James Pether Sörling](https://www.linkedin.com/in/jamessorling/)
|
|
522
|
+
Contributions welcome under Hack23's secure-development standards.
|
|
1094
523
|
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
[LinkedIn](https://www.linkedin.com/in/jamessorling/) | [GitHub](https://github.com/pethers)
|
|
524
|
+
1. Fork the repository and create a descriptive feature branch
|
|
525
|
+
2. **GPG-sign** every commit · enable **MFA** on your GitHub account
|
|
526
|
+
3. Run quality checks locally (`npm run htmlhint && npm test && npm run build`)
|
|
527
|
+
4. Submit a pull request with comprehensive description; address review feedback
|
|
528
|
+
5. Never introduce security vulnerabilities; follow [`CONTRIBUTING.md`](CONTRIBUTING.md) and [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md)
|
|
1101
529
|
|
|
1102
530
|
---
|
|
1103
531
|
|
|
1104
|
-
|
|
532
|
+
## 🏢 About Hack23
|
|
1105
533
|
|
|
534
|
+
**Hack23 AB** (Org.nr 559534-7807) — Swedish cybersecurity and open-source intelligence consultancy.
|
|
1106
535
|
|
|
536
|
+
- 🌐 [www.hack23.com](https://www.hack23.com) · 📰 [Blog](https://hack23.com/blog.html)
|
|
537
|
+
- 💼 [LinkedIn — Hack23](https://www.linkedin.com/company/hack23/)
|
|
538
|
+
- 👨💻 Founder: [James Pether Sörling, CISSP, CISM](https://www.linkedin.com/in/jamessorling/)
|
|
539
|
+
- 🛡️ [Public ISMS](https://github.com/Hack23/ISMS-PUBLIC) · 🕵️ [CIA platform](https://github.com/Hack23/cia)
|
|
1107
540
|
|
|
1108
541
|
---
|
|
1109
542
|
|
|
1110
|
-
##
|
|
1111
|
-
|
|
1112
|
-
Riksdagsmonitor uses a **provider-tiered** data architecture, with each provider chosen for its area of strength. As of **2026-04-24**, all four providers are implemented and in production.
|
|
1113
|
-
|
|
1114
|
-
| Tier | Provider | Scope | Access |
|
|
1115
|
-
|---|---|---|---|
|
|
1116
|
-
| **Primary economic** | **IMF** (Datamapper REST + SDMX 3.0) | GDP, growth, unemployment, inflation, fiscal balance, debt, current account, bilateral trade, commodity prices, exchange rates, government spending by COFOG function — including T+5 projections | Pure-TypeScript client `scripts/imf-client.ts` (intentionally non-MCP) |
|
|
1117
|
-
| **Parliamentary primary** | **Riksdagen Open Data** | Documents, motions, votes, MPs, speeches | `riksdag-regering` MCP server |
|
|
1118
|
-
| **Swedish ground truth** | **SCB** (PxWeb v2) | Swedish monthly labour (AKU), monthly inflation (KPI), regional/municipal, budget execution | `scb` MCP server |
|
|
1119
|
-
| **Non-economic residue** | **World Bank** | Governance (WGI), environment, social/education residue, defence-spending depth | `world-bank` MCP server |
|
|
1120
|
-
|
|
1121
|
-
**Why this split** — IMF uses uniform SNA 2008 / GFSM 2014 / BPM6 methodology across countries (essential for cross-country comparison), publishes T+5 projections (essential for look-ahead workflows), and has fresher data than World Bank's economic indicators. World Bank remains the canonical source for the classes IMF does not publish (WGI governance, environment).
|
|
543
|
+
## 📜 License
|
|
1122
544
|
|
|
1123
|
-
|
|
545
|
+
Copyright © 2008–2026 **Hack23 AB** (Org.nr 559534-7807). Licensed under the **Apache License 2.0** — see [`LICENSE`](LICENSE).
|
|
1124
546
|
|
|
1125
547
|
---
|
|
1126
548
|
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
Riksdagsmonitor now includes a pure-TypeScript Statskontoret integration for Swedish government-body and central-government budget-execution context.
|
|
1130
|
-
|
|
1131
|
-
| Dataset | Use |
|
|
1132
|
-
|---|---|
|
|
1133
|
-
| Myndighetsförteckning | Authority count, department grouping, leadership form and årsarbetskrafter/headcount over time. |
|
|
1134
|
-
| Årsutfall för statens budget | Annual central-government revenue and expenditure outturns. |
|
|
1135
|
-
| Månadsutfall för statens budget | Monthly budget execution from 2006 onward. |
|
|
1136
|
-
| Tidsserier, statens budget m.m. | Long-run Swedish budget context. |
|
|
1137
|
-
|
|
1138
|
-
Quick commands:
|
|
1139
|
-
|
|
1140
|
-
```bash
|
|
1141
|
-
tsx scripts/statskontoret-fetch.ts list-sources
|
|
1142
|
-
tsx scripts/statskontoret-fetch.ts discover --source arsutfall --persist
|
|
1143
|
-
tsx scripts/statskontoret-fetch.ts headcount --url "https://www.statskontoret.se/...xlsx" --persist
|
|
1144
|
-
```
|
|
1145
|
-
|
|
1146
|
-
Architecture and governance references:
|
|
1147
|
-
|
|
1148
|
-
- `analysis/statskontoret/README.md` — integration hub.
|
|
1149
|
-
- `analysis/statskontoret/indicators-inventory.json` — machine-readable source catalogue.
|
|
1150
|
-
- `analysis/statskontoret/data-dictionary.md` — field and freshness rules.
|
|
1151
|
-
- `scripts/statskontoret-client.ts` / `scripts/statskontoret-fetch.ts` — client and workflow CLI.
|
|
1152
|
-
- `tests/statskontoret-client.test.ts`, `tests/statskontoret-fetch.test.ts`, `tests/statskontoret-inventory.test.ts` — regression coverage.
|
|
1153
|
-
|
|
1154
|
-
Provider rule: IMF remains primary for macro/fiscal projections, SCB remains Swedish statistical ground truth, World Bank remains governance/environment/social residue, and Statskontoret is authoritative for Swedish agency structure and central-government budget execution.
|
|
1155
|
-
|
|
549
|
+
<p align="center"><em>🗳️ Empower citizens · 🔍 Strengthen democratic accountability · 🕵️ Illuminate the political process</em></p>
|