| name | risk-assessment-frameworks |
| description | Political risk indicators, institutional risk, corruption risk, democratic backsliding, early warning systems for Swedish political intelligence |
| license | Apache-2.0 |
Risk Assessment Frameworks Skill
🔴 AI FIRST Quality Principle
Apply the AI FIRST principle: never accept first-pass quality. Minimum 2 iterations. Read all output, improve every section. No shortcuts.
Purpose
This skill provides comprehensive risk assessment methodologies for evaluating political, institutional, and democratic risks within the Swedish political system. It integrates international frameworks (V-Dem, Transparency International, Freedom House) with Riksdagsmonitor platform's proprietary 50+ Drools risk rules to create systematic early warning capabilities for democratic backsliding, corruption, institutional erosion, political violence, and coalition instability.
When to Use This Skill
Apply this skill when:
- ✅ Conducting democratic health assessments of Swedish institutions
- ✅ Identifying early warning signs of institutional erosion
- ✅ Assessing corruption risk at politician or party level
- ✅ Evaluating coalition stability and government sustainability
- ✅ Detecting democratic backsliding indicators
- ✅ Measuring institutional accountability effectiveness
- ✅ Analyzing political violence risk factors
- ✅ Creating risk-based intelligence priorities
- ✅ Benchmarking Sweden against international democracy standards
- ✅ Generating risk reports for stakeholders and media
Do NOT use for:
- ❌ Political persecution or targeting of legitimate opposition
- ❌ Fabricating risks to manipulate public opinion
- ❌ Undermining democratic institutions through false alarms
- ❌ Violating privacy or conducting surveillance without legal basis
Risk Assessment Framework Architecture
Integrated Risk Intelligence System
The Riksdagsmonitor platform integrates four layers of risk intelligence to create comprehensive political risk profiles:
graph TB
subgraph "Layer 1: Data Collection"
A1[🗳️ Behavioral Data<br/>3.5M+ votes, attendance<br/>Productivity metrics]
A2[💰 Financial Data<br/>World Bank, ESV<br/>Economic indicators]
A3[📊 Democracy Indices<br/>V-Dem, Freedom House<br/>International benchmarks]
A4[📰 Media Coverage<br/>Sentiment analysis<br/>Scandal tracking]
end
subgraph "Layer 2: Risk Rules Engine (Drools)"
A1 --> B1[Behavioral Risk Rules<br/>24 politician rules<br/>12 party rules]
A2 --> B2[Financial Risk Rules<br/>8 corruption indicators]
A3 --> B3[Democratic Health Rules<br/>6 institutional rules]
A4 --> B4[Reputational Risk Rules<br/>4 scandal detection rules]
end
subgraph "Layer 3: Risk Aggregation"
B1 --> C1[Individual Risk Profiles]
B2 --> C2[Institutional Risk Profiles]
B3 --> C3[Systemic Risk Profiles]
B4 --> C4[Reputational Risk Profiles]
end
subgraph "Layer 4: Risk Intelligence"
C1 & C2 & C3 & C4 --> D[🎯 Composite Risk Score]
D --> E[Early Warning Alerts]
D --> F[Risk Mitigation Strategies]
D --> G[Intelligence Priorities]
end
style A1 fill:#e1f5ff
style A2 fill:#e1f5ff
style A3 fill:#e1f5ff
style A4 fill:#e1f5ff
style B1 fill:#fff9cc
style B2 fill:#fff9cc
style B3 fill:#fff9cc
style B4 fill:#fff9cc
style D fill:#ffe6cc
style E fill:#ffcccc
style F fill:#ccffcc
style G fill:#e6ccff
1. Democratic Backsliding Detection
V-Dem Integration Framework
The Varieties of Democracy (V-Dem) project provides the world's most comprehensive democracy measurement. The Riksdagsmonitor platform integrates V-Dem indicators with behavioral data.
V-Dem Core Indicators Tracked:
- Liberal Democracy Index - Rule of law, checks on government
- Electoral Democracy Index - Free and fair elections
- Participatory Democracy Index - Citizen participation
- Deliberative Democracy Index - Quality of public discourse
- Egalitarian Democracy Index - Equal access to power
from typing import Dict, List, Tuple
import pandas as pd
import numpy as np
from datetime import datetime, timedelta
class DemocraticBackslidingDetector:
"""
Detects democratic backsliding through trend analysis and threshold monitoring.
Based on V-Dem Early Warning of Democratic Decline (Edda) methodology
and combines international indices with Riksdagsmonitor platform behavioral data.
"""
CRITICAL_THRESHOLDS = {
'liberal_democracy_index': 0.50,
'electoral_democracy_index': 0.60,
'participatory_democracy_index': 0.45,
'deliberative_democracy_index': 0.50,
'egalitarian_democracy_index': 0.55
}
def assess_democratic_health(self, country_code: str = 'SWE') -> Dict:
"""
Comprehensive democratic health assessment for Sweden.
Combines:
1. V-Dem historical trends (5-year analysis)
2. CIA behavioral indicators (parliamentary effectiveness)
3. International comparison (Nordic benchmarking)
4. Early warning signals (acceleration detection)
"""
vdem_query =
vdem_df = pd.read_sql(vdem_query, .connection, params=[country_code])
trends = {}
column vdem_df.columns:
column [, , ]:
X = vdem_df[].values.reshape(-, )
y = vdem_df[column].values
slope = np.polyfit(X.flatten(), y, )[]
trends[column] = (slope, )
behavioral_query =
behavioral_data = pd.read_sql(behavioral_query, .connection).iloc[]
current_vdem = vdem_df.iloc[]
risks = ._identify_risks(current_vdem, trends, behavioral_data)
health_score = ._calculate_health_score(current_vdem, behavioral_data)
early_warnings = ._detect_early_warnings(trends, current_vdem)
{
: country_code,
: datetime.now().isoformat(),
: {
: (current_vdem[], ),
: (current_vdem[], ),
: (current_vdem[], ),
: (current_vdem[], ),
: (current_vdem[], )
},
: trends,
: {
: (behavioral_data[], ),
: (behavioral_data[], ),
: (behavioral_data[], ),
: (behavioral_data[], ),
: (behavioral_data[], )
},
: (health_score, ),
: ._classify_health(health_score),
: risks,
: early_warnings,
: ._get_nordic_comparison(current_vdem)
}
() -> []:
risks = []
indicator, threshold .CRITICAL_THRESHOLDS.items():
current.get(indicator, ) < threshold:
risks.append(
)
indicator, slope trends.items():
slope < -:
risks.append(
)
behavioral[] < :
risks.append()
behavioral[] < :
risks.append()
behavioral[] < :
risks.append()
risks risks []
() -> :
vdem_score = (
vdem[] * +
vdem[] * +
vdem[] * +
vdem[] * +
vdem[] *
)
behavioral_score = (
(behavioral[] / ) * +
(behavioral[] / ) * +
(behavioral[] / ) *
)
vdem_score * + behavioral_score
() -> :
score >= :
score >= :
score >= :
score >= :
:
() -> []:
warnings = []
declining_indicators = [k k, v trends.items() v < -]
(declining_indicators) >= :
warnings.append(
)
(current.get(, ) <
trends.get(, ) < -):
warnings.append(
)
(current.get(, ) <
trends.get(, ) < -):
warnings.append(
)
(current.get(, ) <
trends.get(, ) < -):
warnings.append(
)
trends.get(, ) > :
warnings.append(
)
warnings warnings []
() -> :
query =
nordic_df = pd.read_sql(query, .connection)
sweden_rank = nordic_df[
nordic_df[] ==
].index[] + nordic_df[].values
{
: sweden_rank ,
: nordic_df.to_dict()
}
2. Corruption Risk Assessment
Transparency International Integration
The Riksdagsmonitor platform integrates Transparency International's Corruption Perceptions Index (CPI) methodology with behavioral indicators to assess corruption risk.
@Service
public class CorruptionRiskAnalyzer {
public CorruptionRiskProfile assessCorruptionRisk(String politicianId) {
String sql = """
WITH financial_risk AS (
SELECT
p.person_id,
-- Financial disclosure completeness
fd.disclosure_completeness_score,
fd.wealth_change_unexplained_ratio,
fd.conflict_of_interest_declarations,
-- Red flags
CASE WHEN fd.wealth_change_unexplained_ratio > 0.30 THEN 1 ELSE 0 END as wealth_anomaly_flag,
CASE WHEN fd.disclosure_completeness_score < 0.70 THEN 1 ELSE 0 END as disclosure_failure_flag,
CASE WHEN fd.conflict_of_interest_declarations = 0 AND fd.business_holdings > 0
THEN 1 ELSE 0 END as coi_omission_flag
FROM person p
LEFT JOIN financial_disclosure fd ON p.person_id = fd.person_id
WHERE p.person_id = :politicianId
),
behavioral_risk AS (
SELECT
p.person_id,
-- Rhetoric-action gaps (potential deception)
raa.credibility_score,
raa.contradiction_count,
-- Voting patterns (influence indicators)
vbs.rebel_votes,
vbs.total_votes,
-- Policy area concentration (capture risk)
(SELECT COUNT(DISTINCT issue_category)
FROM document WHERE person_id = p.person_id) as policy_focus_diversity,
-- Red flags
CASE WHEN raa.credibility_score < 50 THEN 1 ELSE 0 END as credibility_flag,
CASE WHEN raa.contradiction_count > 20 THEN 1 ELSE 0 END as contradiction_flag
FROM person p
LEFT JOIN rhetoric_action_alignment raa ON p.person_id = raa.person_id
LEFT JOIN vote_ballot_summary vbs ON p.person_id = vbs.person_id
WHERE p.person_id = :politicianId
),
network_risk AS (
SELECT
p.person_id,
-- Network connections to high-risk entities
COUNT(DISTINCT CASE WHEN ne.entity_risk_level = 'HIGH'
THEN ne.entity_id END) as high_risk_connections,
COUNT(DISTINCT CASE WHEN ne.entity_type = 'SANCTIONED_ENTITY'
THEN ne.entity_id END) as sanctioned_connections,
COUNT(DISTINCT CASE WHEN ne.entity_type = 'CONVICTED_CRIMINAL'
THEN ne.entity_id END) as criminal_connections,
-- Red flags
CASE WHEN COUNT(DISTINCT CASE WHEN ne.entity_risk_level = 'HIGH'
THEN ne.entity_id END) > 0
THEN 1 ELSE 0 END as network_risk_flag
FROM person p
LEFT JOIN network_entity ne ON p.person_id = ne.person_id
WHERE p.person_id = :politicianId
GROUP BY p.person_id
),
transparency_risk AS (
SELECT
p.person_id,
-- Response to oversight
oa.response_rate,
oa.substantive_response_rate,
oa.avg_response_time,
-- Media transparency
COUNT(DISTINCT mi.interview_id) as media_engagement_count,
-- Red flags
CASE WHEN oa.response_rate < 70 THEN 1 ELSE 0 END as evasion_flag,
CASE WHEN oa.substantive_response_rate < 50 THEN 1 ELSE 0 END as opacity_flag
FROM person p
LEFT JOIN oversight_activity oa ON p.person_id = oa.person_id
LEFT JOIN media_interview mi ON p.person_id = mi.person_id
WHERE p.person_id = :politicianId
GROUP BY p.person_id, oa.response_rate, oa.substantive_response_rate,
oa.avg_response_time
)
SELECT
p.person_id,
p.first_name || ' ' || p.last_name as name,
p.party,
-- Financial risk indicators
fr.wealth_anomaly_flag,
fr.disclosure_failure_flag,
fr.coi_omission_flag,
fr.wealth_change_unexplained_ratio,
-- Behavioral risk indicators
br.credibility_flag,
br.contradiction_flag,
br.credibility_score,
-- Network risk indicators
nr.network_risk_flag,
nr.high_risk_connections,
nr.sanctioned_connections,
-- Transparency risk indicators
tr.evasion_flag,
tr.opacity_flag,
tr.response_rate,
-- Total red flags
(fr.wealth_anomaly_flag + fr.disclosure_failure_flag + fr.coi_omission_flag +
br.credibility_flag + br.contradiction_flag +
nr.network_risk_flag +
tr.evasion_flag + tr.opacity_flag) as total_red_flags,
-- Corruption risk score (0-100, higher = higher risk)
(
(fr.wealth_anomaly_flag + fr.disclosure_failure_flag + fr.coi_omission_flag) * 8 +
(br.credibility_flag + br.contradiction_flag) * 6 +
nr.network_risk_flag * 10 +
(tr.evasion_flag + tr.opacity_flag) * 6 +
(fr.wealth_change_unexplained_ratio * 20) +
((100 - br.credibility_score) / 100 * 15) +
(nr.high_risk_connections * 3) +
((100 - tr.response_rate) / 100 * 10)
) as corruption_risk_score,
-- Risk classification
CASE
WHEN (
(fr.wealth_anomaly_flag + fr.disclosure_failure_flag + fr.coi_omission_flag) * 8 +
(br.credibility_flag + br.contradiction_flag) * 6 +
nr.network_risk_flag * 10 +
(tr.evasion_flag + tr.opacity_flag) * 6 +
(fr.wealth_change_unexplained_ratio * 20) +
((100 - br.credibility_score) / 100 * 15) +
(nr.high_risk_connections * 3) +
((100 - tr.response_rate) / 100 * 10)
) >= 70 THEN 'CRITICAL_CORRUPTION_RISK'
WHEN (
(fr.wealth_anomaly_flag + fr.disclosure_failure_flag + fr.coi_omission_flag) * 8 +
(br.credibility_flag + br.contradiction_flag) * 6 +
nr.network_risk_flag * 10 +
(tr.evasion_flag + tr.opacity_flag) * 6 +
(fr.wealth_change_unexplained_ratio * 20) +
((100 - br.credibility_score) / 100 * 15) +
(nr.high_risk_connections * 3) +
((100 - tr.response_rate) / 100 * 10)
) >= 50 THEN 'HIGH_CORRUPTION_RISK'
WHEN (
(fr.wealth_anomaly_flag + fr.disclosure_failure_flag + fr.coi_omission_flag) * 8 +
(br.credibility_flag + br.contradiction_flag) * 6 +
nr.network_risk_flag * 10 +
(tr.evasion_flag + tr.opacity_flag) * 6 +
(fr.wealth_change_unexplained_ratio * 20) +
((100 - br.credibility_score) / 100 * 15) +
(nr.high_risk_connections * 3) +
((100 - tr.response_rate) / 100 * 10)
) >= 30 THEN 'MODERATE_CORRUPTION_RISK'
ELSE 'LOW_CORRUPTION_RISK'
END as risk_classification
FROM person p
LEFT JOIN financial_risk fr ON p.person_id = fr.person_id
LEFT JOIN behavioral_risk br ON p.person_id = br.person_id
LEFT JOIN network_risk nr ON p.person_id = nr.person_id
LEFT JOIN transparency_risk tr ON p.person_id = tr.person_id
WHERE p.person_id = :politicianId
""";
jdbcTemplate.queryForObject(sql, CorruptionRiskProfile.class,
Map.of(, politicianId));
}
}
3. Institutional Erosion Metrics
Measuring Parliamentary Effectiveness Decline
Institutional health requires effective parliamentary procedures, accountability mechanisms, and checks on executive power.
WITH institutional_metrics AS (
SELECT
(SELECT AVG(oversight_effectiveness_score)
FROM oversight_activity
WHERE created_date >= NOW() - INTERVAL '2 years'
) as oversight_effectiveness,
(SELECT COUNT(*)
FROM document
WHERE document_type = 'adopted_law'
AND created_date >= NOW() - INTERVAL '2 years'
)::float /
(SELECT COUNT(*)
FROM document
WHERE document_type = 'adopted_law'
AND created_date >= NOW() - INTERVAL '4 years'
AND created_date < NOW() - INTERVAL '2 years'
) as legislative_productivity_trend,
(SELECT (overall_effectiveness_score)
committee_effectiveness
analysis_date NOW()
) avg_committee_effectiveness,
( ( avg_absent_percentage)
vote_ballot_summary
analysis_date NOW()
) avg_participation_rate,
( (oversight_effectiveness_score)
oversight_activity oa
person p oa.person_id p.person_id
p.party ( party government_coalition)
oa.created_date NOW()
) opposition_effectiveness,
( (debate_time_allocated:: debate_time_requested)
parliamentary_debate
debate_date NOW()
) debate_time_fairness,
( (collaboration_intensity)
cross_party_collaboration
analysis_date NOW()
) cross_party_collaboration
),
historical_comparison (
metric,
im.oversight_effectiveness current_value,
( (oversight_effectiveness_score)
oversight_activity
created_date NOW()
created_date NOW()
) historical_baseline,
im.oversight_effectiveness
( (oversight_effectiveness_score)
oversight_activity
created_date NOW()
created_date NOW()
) change_from_baseline
institutional_metrics im
metric,
im.avg_committee_effectiveness current_value,
( (overall_effectiveness_score)
committee_effectiveness
analysis_date NOW()
analysis_date NOW()
) historical_baseline,
im.avg_committee_effectiveness
( (overall_effectiveness_score)
committee_effectiveness
analysis_date NOW()
analysis_date NOW()
) change_from_baseline
institutional_metrics im
metric,
im.avg_participation_rate current_value,
( ( avg_absent_percentage)
vote_ballot_summary
analysis_date NOW()
analysis_date NOW()
) historical_baseline,
im.avg_participation_rate
( ( avg_absent_percentage)
vote_ballot_summary
analysis_date NOW()
analysis_date NOW()
) change_from_baseline
institutional_metrics im
)
im.,
(
im.oversight_effectiveness ( im.oversight_effectiveness)
im.legislative_productivity_trend ( im.legislative_productivity_trend)
im.avg_committee_effectiveness ( im.avg_committee_effectiveness)
im.avg_participation_rate ( im.avg_participation_rate)
im.opposition_effectiveness ( im.opposition_effectiveness)
im.debate_time_fairness ( im.debate_time_fairness)
im.cross_party_collaboration ( im.cross_party_collaboration)
) institutional_erosion_index,
(
im.oversight_effectiveness ( im.oversight_effectiveness)
im.legislative_productivity_trend ( im.legislative_productivity_trend)
im.avg_committee_effectiveness ( im.avg_committee_effectiveness)
im.avg_participation_rate ( im.avg_participation_rate)
im.opposition_effectiveness ( im.opposition_effectiveness)
im.debate_time_fairness ( im.debate_time_fairness)
im.cross_party_collaboration ( im.cross_party_collaboration)
)
(
im.oversight_effectiveness ( im.oversight_effectiveness)
im.legislative_productivity_trend ( im.legislative_productivity_trend)
im.avg_committee_effectiveness ( im.avg_committee_effectiveness)
im.avg_participation_rate ( im.avg_participation_rate)
im.opposition_effectiveness ( im.opposition_effectiveness)
im.debate_time_fairness ( im.debate_time_fairness)
im.cross_party_collaboration ( im.cross_party_collaboration)
)
(
im.oversight_effectiveness ( im.oversight_effectiveness)
im.legislative_productivity_trend ( im.legislative_productivity_trend)
im.avg_committee_effectiveness ( im.avg_committee_effectiveness)
im.avg_participation_rate ( im.avg_participation_rate)
im.opposition_effectiveness ( im.opposition_effectiveness)
im.debate_time_fairness ( im.debate_time_fairness)
im.cross_party_collaboration ( im.cross_party_collaboration)
)
erosion_classification,
(
( change_from_baseline )
( change_from_baseline )
( change_from_baseline )
historical_comparison
) historical_trend
institutional_metrics im;
4. Coalition Instability Prediction
Government Sustainability Forecasting
Coalition governments in parliamentary systems are vulnerable to collapse. The Riksdagsmonitor platform predicts coalition stability.
from sklearn.ensemble import GradientBoostingClassifier
from typing import Dict, List
import pandas as pd
class CoalitionStabilityPredictor:
"""
Predicts coalition stability and government sustainability.
Features:
- Intra-party discipline (deviation rates)
- Inter-party alignment (voting agreement)
- Policy conflict indicators (deviation on key issues)
- Leadership approval ratings
- Economic conditions
- Scandal/crisis events
- Time in office (fatigue factor)
"""
def __init__(self):
self.model = GradientBoostingClassifier(n_estimators=200, max_depth=5)
self.trained = False
def predict_stability(
self,
coalition_parties: List[str],
prediction_horizon_months: int = 12
) -> Dict:
"""
Predicts coalition stability over specified time horizon.
Returns:
- Survival probability (0-1)
- Key risk factors
- Collapse scenarios
- Recommended monitoring priorities
"""
query = """
WITH coalition_features AS (
SELECT
-- Party discipline
AVG(pd.avg_deviation_rate) as avg_intra_party_deviation,
MAX(pd.max_deviation_rate) as max_intra_party_deviation,
STDDEV(pd.avg_deviation_rate) as deviation_heterogeneity,
-- Cross-party alignment
AVG(cpa.alignment_rate) as avg_cross_party_alignment,
MIN(cpa.alignment_rate) as min_cross_party_alignment,
-- Policy conflict indicators
COUNT(DISTINCT CASE
WHEN pd.issue_category IN ('economic_policy', 'foreign_policy', 'justice')
AND pd.avg_deviation_rate > 15
THEN pd.issue_category
END) as critical_policy_conflicts,
-- Leadership factors
AVG(lp.approval_rating) as avg_leadership_approval,
MIN(lp.approval_rating) as min_leadership_approval,
-- Time factors
EXTRACT(MONTH FROM NOW() - MIN(gc.formation_date)) as months_in_office,
-- Crisis events
COUNT(DISTINCT ce.crisis_id) as recent_crises,
-- Scandal exposure
COUNT(DISTINCT se.scandal_id) as recent_scandals
FROM party_deviation pd
JOIN cross_party_alignment cpa ON pd.party IN (cpa.party_a, cpa.party_b)
JOIN leadership_profile lp ON pd.party = lp.party
JOIN government_coalition gc ON pd.party = gc.party
LEFT JOIN crisis_event ce ON ce.event_date >= NOW() - INTERVAL '6 months'
LEFT JOIN scandal_event se ON se.event_date >= NOW() - INTERVAL '6 months'
AND se.party IN (SELECT unnest(%s))
WHERE pd.party = ANY(%s)
AND pd.analysis_date >= NOW() - INTERVAL '6 months'
GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
)
SELECT * FROM coalition_features
"""
features = pd.read_sql(
query,
.connection,
params=[coalition_parties, coalition_parties]
).iloc[]
.trained:
.train()
X = ._prepare_features(features)
survival_probability = .model.predict_proba(X)[][]
risk_factors = ._identify_risk_factors(features)
scenarios = ._generate_scenarios(features, survival_probability)
{
: coalition_parties,
: prediction_horizon_months,
: (survival_probability, ),
: ._classify_stability(survival_probability),
: (survival_probability - ) > ,
: risk_factors,
: scenarios,
: ._recommend_monitoring(features)
}
() -> []:
risks = []
features[] > :
risks.append({
: ,
: ,
: (features[], ),
:
})
features[] < :
risks.append({
: ,
: ,
: (features[], ),
:
})
features[] > :
risks.append({
: ,
: ,
: (features[]),
:
})
features[] < :
risks.append({
: ,
: ,
: (features[], ),
:
})
features[] > :
risks.append({
: ,
: ,
: (features[]),
:
})
features[] > :
risks.append({
: ,
: ,
: (features[]),
:
})
(risks, key= x:
{: , : , : }.get(x[], ),
reverse=)
() -> []:
scenarios = []
features[] > :
scenarios.append({
: ,
: ,
: (
base_probability * ( + features[] * ),
),
: ,
: [
,
,
]
})
features[] < :
scenarios.append({
: ,
: ,
: (
base_probability * ( + ( - features[]) / ),
),
: ,
: [
,
,
]
})
features[] > :
scenarios.append({
: ,
: ,
: (
base_probability * ( + features[] / ),
),
: ,
: [
,
,
]
})
features[] > :
scenarios.append({
: ,
: ,
: (
base_probability * ( + features[] * ),
),
: ,
: [
,
,
]
})
(scenarios, key= x: x[], reverse=)
() -> :
probability >= :
probability >= :
probability >= :
:
() -> []:
priorities = []
features[] < :
priorities.append()
features[] < :
priorities.append()
features[] > :
priorities.append()
features[] > :
priorities.append()
features[] > :
priorities.append()
priorities priorities [
]
5. Political Violence Risk Indicators
Early Warning System for Political Violence
Political violence threatens democratic stability. The Riksdagsmonitor platform monitors behavioral and contextual indicators.
WITH violence_risk_indicators AS (
SELECT
COUNT(CASE WHEN dc.contains_violent_rhetoric = TRUE THEN 1 END) as violent_rhetoric_count,
COUNT(CASE WHEN dc.contains_dehumanizing_language = TRUE THEN 1 END) as dehumanization_count,
COUNT(CASE WHEN dc.contains_threat = TRUE THEN 1 END) as threat_count,
AVG(pp.polarization_index) as avg_polarization,
MAX(pp.polarization_index) as max_polarization,
COUNT(DISTINCT pe.protest_event_id) as protest_count,
AVG(pe.violence_level) as avg_protest_violence,
COUNT(CASE WHEN pe.violence_level >= 3 THEN 1 ) violent_protests,
( () hate_crime_incident
incident_date NOW()
political_motivation
) political_hate_crimes,
( oec.extremist_content_id) extremist_content_items,
( ma.incitement_score ) high_incitement_articles
document_content dc
party_polarization pp
protest_event pe pe.event_date NOW()
online_extremist_content oec oec.detected_date NOW()
media_article ma ma.published_date NOW()
dc.created_date NOW()
)
vri.,
(
LEAST(vri.violent_rhetoric_count , )
LEAST(vri.dehumanization_count , )
LEAST(vri.threat_count , )
vri.avg_polarization
LEAST(vri.violent_protests , )
LEAST(vri.political_hate_crimes , )
LEAST(vri.extremist_content_items , )
) violence_risk_score,
(
LEAST(vri.violent_rhetoric_count , )
LEAST(vri.dehumanization_count , )
LEAST(vri.threat_count , )
vri.avg_polarization
LEAST(vri.violent_protests , )
LEAST(vri.political_hate_crimes , )
LEAST(vri.extremist_content_items , )
)
(
LEAST(vri.violent_rhetoric_count , )
LEAST(vri.dehumanization_count , )
LEAST(vri.threat_count , )
vri.avg_polarization
LEAST(vri.violent_protests , )
LEAST(vri.political_hate_crimes , )
LEAST(vri.extremist_content_items , )
)
(
LEAST(vri.violent_rhetoric_count , )
LEAST(vri.dehumanization_count , )
LEAST(vri.threat_count , )
vri.avg_polarization
LEAST(vri.violent_protests , )
LEAST(vri.political_hate_crimes , )
LEAST(vri.extremist_content_items , )
)
risk_classification,
vri.threat_count vri.violent_protests
immediate_action_required
violence_risk_indicators vri;
ISMS Compliance Mapping
ISO 27001:2022 Controls
| Control | Risk Assessment Application |
|---|
| A.5.7 - Threat intelligence | Systematic threat intelligence from risk frameworks |
| A.5.10 - Acceptable use of information and other associated assets | Ethical use of political risk intelligence |
| A.8.16 - Monitoring activities | Continuous risk monitoring and early warning |
NIST Cybersecurity Framework 2.0
| Function | Risk Assessment Integration |
|---|
| IDENTIFY (ID.RA) | Comprehensive political risk identification |
| DETECT (DE.CM) | Early warning detection systems |
| RESPOND (RS.AN) | Risk-based response prioritization |
CIS Controls v8
| Control | Application |
|---|
| CIS Control 4 - Secure Configuration | Secure risk assessment system configuration |
| CIS Control 8 - Audit Log Management | Risk assessment audit trail |
Hack23 ISMS Policy References
This skill implements requirements from:
References
Risk Assessment Literature
- Coppedge, M., et al. (2021). V-Dem Codebook v11. Varieties of Democracy (V-Dem) Project.
- Transparency International (2023). Corruption Perceptions Index: Methodology.
- Lührmann, A., & Lindberg, S. I. (2019). "A Third Wave of Autocratization is Here: What is New About It?" Democratization, 26(7), 1095-1113.
- Schedler, A. (2013). The Politics of Uncertainty: Sustaining and Subverting Electoral Authoritarianism. Oxford University Press.
Database Intelligence Sources
🔗 Integration with agentic workflows & analysis artifacts
This skill is consumed by the 11 agentic news workflows in .github/workflows/news-*.md. The authoritative contract lives in .github/prompts/README.md; this skill supplies domain expertise on top of that contract.
🌐 IMF as Primary Source for Economic Risk Indicators
Effective: 2026-04-24
IMF risk-indicator matrix
| Risk dimension | IMF source | Indicator(s) | Threshold of concern |
|---|
| Sovereign debt sustainability | IMF WEO + Fiscal Monitor | GGXWDG_NGDP (general government debt %GDP), GGXWDN_NGDP (net debt) | >60% (Maastricht) / >90% (Rogoff–Reinhart) |
| Fiscal deficit | IMF WEO + FM | GGXCNL_NGDP (overall balance), GGSB_NPGDP (cyclically-adjusted) | <-3% (Maastricht), <-1% structural |
| External vulnerability | IMF WEO + BOP | BCA_NGDPD (current account %GDP), reserves coverage | <-4% (warning), <-6% (acute) |
| Inflation pressure | IMF WEO + IFS | PCPIPCH (CPI inflation) | >Riksbank target +200bps |
| Growth slowdown | IMF WEO | NGDP_RPCH (real GDP growth, T+5 projections) | <0% any year in 5-year horizon |
| Trade exposure | IMF DOTS | Bilateral concentration index | top-3 partner share >50% |
| Commodity-price exposure | IMF PCPS | Energy/food index volatility | rolling stdev >threshold |
Canonical risk rule: Every economic-risk assessment in Riksdagsmonitor uses IMF as the primary source for the risk indicator and IMF projections (T+5) for the forward-looking risk horizon. World Bank governance indicators (WGI) supplement for political-risk dimension. See .github/aw/ECONOMIC_DATA_CONTRACT.md v2.1 and analysis/imf/agentic-integration.md.
🔭 Horizon stratification
Authoritative source: .github/prompts/ext/long-horizon-forecasting.md. Runtime helper: scripts/horizon-context.ts.
Risk assessments use horizon bands to calibrate threat-likelihood language:
| Band | Days | WEP language ceiling | Risk-assessment application |
|---|
72h | 3 | very likely / very unlikely | Imminent threat (e.g. no-confidence motion filed) |
week | 7 | likely / unlikely | Near-term policy risk, scheduled government decisions |
month | 30 | likely / unlikely | Budget-cycle risk, regulatory deadline exposure |
quarter | 90 | roughly even / about even | Session-level institutional stability |
year | 365 | roughly even; stronger requires ≥ 3 cycle-aged sources | Fiscal sustainability (IMF WEO/FM T+1–T+5), structural reform risk |
cycle | 1460 | roughly even / unlikely; never likely without ≥ 3 cycle-aged sources | Long-range political-risk trajectory, democratic-backsliding indicators |
election | 1460 | scenario-driven; coalition outcomes never above "likely" | Election-cycle regime-change risk, coalition-formation scenarios |
Cycle-rollover rules (±30 days of election anchor) are defined in .github/prompts/ext/cycle-rollover.md.