Skip to main content

behavioral-analysis

Political psychology, cognitive biases, group dynamics, leadership analysis, decision-making patterns for Swedish political intelligence

Source facts

Repository
Hack23/cia
Last source activity
May 24, 2026 at 23:43
Detected SKILL.md language
English
Stars
239
Forks
57

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
behavioral-analysis
description
Political psychology, cognitive biases, group dynamics, leadership analysis, decision-making patterns for Swedish political intelligence
license
Apache-2.0
# Behavioral Analysis Skill ## Purpose This skill provides comprehensive behavioral analysis methodologies for understanding political decision-making, cognitive patterns, and psychological dynamics within the Swedish Parliament. It combines political psychology research with OSINT intelligence to identify behavioral indicators, predict policy positions, and assess leadership effectiveness through evidence-based analysis of voting patterns, speech behavior, and collaboration networks. ## When to Use This Skill Apply this skill when: - ✅ Analyzing voting deviation patterns to understand internal party conflicts - ✅ Identifying cognitive biases in parliamentary decision-making - ✅ Assessing leadership styles and personality traits of political figures - ✅ Detecting group polarization and echo chamber effects in committees - ✅ Evaluating constituency influence on voting behavior - ✅ Predicting policy positions based on behavioral indicators - ✅ Conducting psychological profiling for strategic intelligence - ✅ Analyzing coalition dynamics and negotiation patterns - ✅ Identifying behavioral risk indicators (absenteeism, isolation, radicalization) Do NOT use for: - ❌ Clinical psychological diagnosis (not qualified medical assessment) - ❌ Personal mental health speculation without public disclosure - ❌ Behavioral profiling for harassment or discrimination - ❌ Non-evidence-based personality claims ## Behavioral Analysis Framework ### Political Psychology Dimensions The CIA platform analyzes five core behavioral dimensions to create comprehensive political profiles: ```mermaid graph TB subgraph "Behavioral Intelligence Collection" A1["🗳️ Voting Behavior<br/>3.5M+ votes analyzed<br/>Deviation tracking"] A2["👥 Social Networks<br/>Collaboration patterns<br/>Influence metrics"] A3["📄 Productivity Signals<br/>Document authorship<br/>Committee activity"] A4["🎤 Communication Style<br/>Speech analysis<br/>Rhetoric patterns"] A5["⏱️ Temporal Patterns<br/>Attendance trends<br/>Engagement cycles"] end subgraph "Psychological Analysis" A1 --> B1[Decision-Making Analysis] A2 --> B2[Group Dynamics Assessment] A3 --> B3[Motivation Evaluation] A4 --> B4[Leadership Style Profiling] A5 --> B5[Behavioral Consistency Check] end subgraph "Cognitive Bias Detection" B1 --> C1{Confirmation Bias} B2 --> C2{Groupthink} B3 --> C3{Status Quo Bias} B4 --> C4{Authority Bias} B5 --> C5{Recency Bias} end subgraph "Intelligence Product" C1 & C2 & C3 & C4 & C5 --> D["🧠 Behavioral Profile"] D --> E[Predictive Insights] D --> F[Risk Indicators] D --> G[Leadership Assessment] end style A1 fill:#e1f5ff style A2 fill:#e1f5ff style A3 fill:#e1f5ff style A4 fill:#e1f5ff style A5 fill:#e1f5ff style D fill:#ffe6cc style E fill:#ccffcc style F fill:#ffcccc style G fill:#fff9cc ``` ## 1. Voting Deviation Analysis ### Cognitive Dissonance Detection Political psychologists recognize voting deviation as a key indicator of cognitive dissonance - when a politician's personal beliefs conflict with party expectations. The CIA platform tracks this through multi-dimensional analysis. **Database Views:** - `view_riksdagen_vote_data_ballot_politician_summary_daily` - Daily voting patterns - `view_riksdagen_politician_ballot_summary` - Aggregated voting statistics - `view_politician_behavioral_trends` - Long-term behavioral trends - `view_riksdagen_politician_decision_pattern` - Decision pattern classification ### Party Line Conformity Analysis ```java @Component public class PartyConformityAnalyzer { /** * Analyzes voting deviation patterns to identify cognitive dissonance. * * High deviation indicates: * - Internal conflict with party platform * - Constituency pressure overriding party discipline * - Personal ideology asserting independence * - Strategic positioning for leadership */ @Transactional(readOnly = true) public PartyConformityProfile analyzeConformity(String politicianId, String partyId) { String sql = """ SELECT p.person_id, p.first_name || ' ' || p.last_name as name, p.party as current_party, vbs.total_votes, vbs.won_votes, vbs.lost_votes, vbs.rebel_votes, vbs.avg_vote_win_rate, vbs.vote_effectiveness_score, ROUND(100.0 * vbs.rebel_votes / NULLIF(vbs.total_votes, 0), 2) as deviation_rate, -- Behavioral indicators CASE WHEN vbs.rebel_votes::float / NULLIF(vbs.total_votes, 0) < 0.02 THEN 'CONFORMIST' WHEN vbs.rebel_votes::float / NULLIF(vbs.total_votes, 0) < 0.05 THEN 'MODERATE' WHEN vbs.rebel_votes::float / NULLIF(vbs.total_votes, 0) < 0.10 THEN 'INDEPENDENT' ELSE 'MAVERICK' END as conformity_type, -- Cognitive dissonance indicators CASE WHEN vbs.rebel_votes > 50 AND vbs.rebel_votes::float / vbs.total_votes > 0.10 THEN 'HIGH_DISSONANCE' WHEN vbs.rebel_votes > 20 AND vbs.rebel_votes::float / vbs.total_votes > 0.05 THEN 'MODERATE_DISSONANCE' ELSE 'LOW_DISSONANCE' END as dissonance_level FROM view_riksdagen_politician p JOIN view_riksdagen_politician_ballot_summary vbs ON p.person_id = vbs.person_id WHERE p.person_id = :politicianId AND p.party = :partyId """; return jdbcTemplate.queryForObject(sql, PartyConformityProfile.class, Map.of("politicianId", politicianId, "partyId", partyId)); } } ``` ### Psychological Profile Types | Conformity Type | Deviation Rate | Behavioral Indicators | Strategic Implications | |-----------------|----------------|----------------------|----------------------| | **CONFORMIST** | < 2% | Strong party loyalty, risk-averse, hierarchical mindset | Safe coalition partner, reliable vote | | **MODERATE** | 2-5% | Balanced independence, calculated risks | Negotiable on key issues | | **INDEPENDENT** | 5-10% | Constituency-driven, personal ideology | Swing vote potential | | **MAVERICK** | > 10% | Highly independent, ideological purity | Unpredictable, high-risk alliance | ## 2. Group Dynamics & Polarization ### Echo Chamber Detection Political committees can develop echo chambers where dissenting views are suppressed. The CIA platform identifies these through collaboration pattern analysis. ```python import pandas as pd import networkx as nx from typing import Dict, List, Tuple class EchoChamberDetector: """ Detects echo chambers in parliamentary committees using network analysis. Indicators of echo chambers: - High internal connectivity, low external bridges - Ideological homogeneity exceeding party baseline - Resistance to cross-party collaboration - Information isolation from opposing viewpoints """ def analyze_committee_network(self, committee_id: str) -> Dict: """ Analyzes committee collaboration networks for echo chamber indicators. Returns metrics: - Internal density: Collaboration within ideological cluster - Bridge centrality: Cross-cluster information flow - Homophily index: Ideological similarity preference - Polarization score: Cluster separation intensity """ query = """ SELECT c.org_code, c.committee_name, -- Network structure metrics COUNT(DISTINCT cm.person_id) as member_count, COUNT(DISTINCT cm.party) as party_diversity, -- Collaboration patterns (co-authorship, co-sponsorship) (SELECT COUNT(*) FROM document_person dp1 JOIN document_person dp2 ON dp1.document_id = dp2.document_id WHERE dp1.person_id IN (SELECT person_id FROM committee_member WHERE org_code = c.org_code) AND dp2.person_id IN (SELECT person_id FROM committee_member WHERE org_code = c.org_code) AND dp1.person_id < dp2.person_id ) as internal_collaboration, -- Cross-party bridge activity (SELECT COUNT(*) FROM document_person dp1 JOIN document_person dp2 ON dp1.document_id = dp2.document_id JOIN person p1 ON dp1.person_id = p1.person_id JOIN person p2 ON dp2.person_id = p2.person_id WHERE dp1.person_id IN (SELECT person_id FROM committee_member WHERE org_code = c.org_code) AND dp2.person_id IN (SELECT person_id FROM committee_member WHERE org_code = c.org_code) AND p1.party != p2.party AND dp1.person_id < dp2.person_id ) as cross_party_bridges, -- Ideological homogeneity (voting similarity) AVG( (SELECT AVG( CASE WHEN v1.vote = v2.vote THEN 1.0 ELSE 0.0 END ) FROM vote v1, vote v2 WHERE v1.person_id IN (SELECT person_id FROM committee_member WHERE org_code = c.org_code) AND v2.person_id IN (SELECT person_id FROM committee_member WHERE org_code = c.org_code) AND v1.ballot_id = v2.ballot_id AND v1.person_id < v2.person_id ) ) as internal_voting_similarity FROM committee c JOIN committee_member cm ON c.org_code = cm.org_code WHERE c.org_code = %s GROUP BY c.org_code, c.committee_name """ df = pd.read_sql(query, self.connection, params=[committee_id]) # Calculate echo chamber indicators internal_density = df['internal_collaboration'].iloc[0] / (df['member_count'].iloc[0] ** 2) bridge_ratio = df['cross_party_bridges'].iloc[0] / max(df['internal_collaboration'].iloc[0], 1) homophily_index = df['internal_voting_similarity'].iloc[0] # Echo chamber score (0-100, higher = stronger echo chamber) echo_chamber_score = ( (internal_density * 30) + ((1 - bridge_ratio) * 30) + (homophily_index * 40) ) return { 'committee_id': committee_id, 'echo_chamber_score': round(echo_chamber_score, 2), 'internal_density': round(internal_density, 3), 'bridge_ratio': round(bridge_ratio, 3), 'homophily_index': round(homophily_index, 3), 'classification': self._classify_echo_chamber(echo_chamber_score) } def _classify_echo_chamber(self, score: float) -> str: """Classify echo chamber severity.""" if score >= 75: return "SEVERE_ECHO_CHAMBER" elif score >= 60: return "MODERATE_ECHO_CHAMBER" elif score >= 40: return "MILD_POLARIZATION" else: return "HEALTHY_DIVERSITY" ``` ### Groupthink Detection Criteria | Indicator | Measurement | Risk Threshold | Intelligence Assessment | |-----------|-------------|----------------|------------------------| | **Internal Density** | Collaboration frequency within group | > 0.75 | High cohesion, low external input | | **Bridge Ratio** | Cross-party collaboration rate | < 0.20 | Limited opposing viewpoints | | **Homophily Index** | Voting similarity among members | > 0.85 | Ideological homogeneity | | **Dissent Suppression** | Minority opinion frequency | < 5% | Conformity pressure | | **Echo Chamber Score** | Composite metric | > 75 | Critical groupthink risk | ## 3. Leadership Style Profiling ### Five Leadership Dimensions Political leadership styles significantly impact party effectiveness and coalition stability. The CIA platform classifies leaders across five dimensions based on behavioral evidence. ```java @Service public class LeadershipStyleAnalyzer { /** * Analyzes leadership effectiveness through behavioral indicators. * * Based on transformational leadership theory (Bass & Riggio, 2006) * and political leadership research (Burns, 1978). */ public LeadershipProfile analyzeLeadership(String politicianId) { String sql = """ WITH leadership_metrics AS ( SELECT p.person_id, p.first_name || ' ' || p.last_name as name, p.party, -- Dimension 1: Collaborative vs. Authoritarian vim.collaboration_score, vim.network_centrality, -- Dimension 2: Ideological vs. Pragmatic vbs.rebel_votes::float / NULLIF(vbs.total_votes, 0) as ideological_purity, vbs.vote_effectiveness_score as pragmatic_success, -- Dimension 3: Proactive vs. Reactive COUNT(DISTINCT d.document_id) as initiated_documents, vbs.total_votes as participation_votes, -- Dimension 4: Consensus-builder vs. Confrontational vim.cross_party_collaboration_score, vbs.rebel_votes as confrontational_votes, -- Dimension 5: Visible vs. Behind-scenes COUNT(DISTINCT CASE WHEN d.document_type = 'motion' THEN d.document_id END) as public_initiatives, COUNT(DISTINCT CASE WHEN d.document_type = 'interpellation' THEN d.document_id END) as oversight_activity FROM view_riksdagen_politician p LEFT JOIN view_riksdagen_politician_ballot_summary vbs ON p.person_id = vbs.person_id LEFT JOIN view_riksdagen_politician_influence_metrics vim ON p.person_id = vim.person_id LEFT JOIN view_riksdagen_politician_document d ON p.person_id = d.person_id WHERE p.person_id = :politicianId GROUP BY p.person_id, p.first_name, p.last_name, p.party, vim.collaboration_score, vim.network_centrality, vbs.rebel_votes, vbs.total_votes, vbs.vote_effectiveness_score ) SELECT *, -- Leadership style classification CASE WHEN collaboration_score > 0.7 AND cross_party_collaboration_score > 0.6 THEN 'TRANSFORMATIONAL' WHEN ideological_purity > 0.15 AND confrontational_votes > 100 THEN 'IDEOLOGICAL_PURIST' WHEN pragmatic_success > 0.75 AND cross_party_collaboration_score > 0.5 THEN 'PRAGMATIC_DEALMAKER' WHEN initiated_documents > 50 AND public_initiatives > 30 THEN 'POLICY_ENTREPRENEUR' WHEN network_centrality > 0.8 AND collaboration_score < 0.4 THEN 'AUTHORITARIAN_BROKER' ELSE 'BACKBENCHER' END as leadership_style FROM leadership_metrics """; return jdbcTemplate.queryForObject(sql, LeadershipProfile.class, Map.of("politicianId", politicianId)); } } ``` ### Leadership Style Taxonomy | Style | Behavioral Indicators | Strengths | Weaknesses | Strategic Use | |-------|----------------------|-----------|------------|---------------| | **TRANSFORMATIONAL** | High collaboration, cross-party bridges, inspires change | Coalition-building, reform leadership | Can compromise core values | Coalition negotiations | | **IDEOLOGICAL_PURIST** | High deviation, confrontational, principle-driven | Policy consistency, base mobilization | Limited legislative success | Opposition leadership | | **PRAGMATIC_DEALMAKER** | Low deviation, high effectiveness, flexible | Legislative productivity, majority-building | Perceived as lacking principles | Government formation | | **POLICY_ENTREPRENEUR** | High document initiation, innovation-focused | Agenda-setting, thought leadership | Implementation challenges | Committee chairmanship |
View on GitHub
This SKILL.md is very large, so SkillsMP previews the first section here. View on GitHub