Skip to content

[Methodology] Integrate search_voteringar voting-record fetch into committee/legislative analysis workflows #2029

@pethers

Description

@pethers

📋 Issue Type

Feature / Methodology Hardening

🎯 Objective

Automatically fetch actual voting records (Ja/Nej/Avstår/Frånvarande, by party + by MP) for every primary betänkande and proposition analyzed, so claims about "coalition consensus" / "cross-party defectors" / "expected SD position" are evidence-grounded rather than inferred.

📊 Current State (evidence from 2026-04-26 reflections)

  • committeeReports/methodology-reflection.md Improvement 1: "The current analysis does not include actual voting records (Ja/Nej/Frånvarande by party) for any of the 12 betänkanden. Voting record data would: confirm or refute 'coalition consensus' claims, identify cross-party defectors (especially C, L on JuU10 weapons ban), strengthen electoral impact analysis."
  • week-ahead/methodology-reflection.md Improvement 5: "For HD01JuU10 (vapenlag), cross-reference search_voteringar from past weapons-related votes … to estimate expected SD/C/M positions more precisely."
  • realtime-pulse/methodology-reflection.md Improvement 1 on SD coalition friction inferred without voting record corroboration.

🚀 Desired State

  1. scripts/fetch-voting-records.ts calls riksdag-regering-search_voteringar for each dok_id in the day's manifest.
  2. Output data/voteringar/{date}/{dok_id}.json with {party, ja, nej, avstår, frånvarande, defectors[]}.
  3. Auto-inject voting-record table into intelligence-assessment.md and coalition-mathematics.md via template helper.
  4. Defectors highlighted automatically (any MP voting against own party whip).

🔧 Implementation Approach

  1. New script invoking the existing riksdag-regering MCP tool.
  2. Update analysis/methodologies/ai-driven-analysis-guide.md to require voting-record cross-reference for any KJ that asserts coalition behavior.
  3. Add Vitest contract test asserting that any betänkande-citing KJ in intelligence-assessment.md has a corresponding voting-record reference (or explicit "vote pending" annotation).

🤖 Recommended Agent

data-pipeline-specialist — MCP/ETL ownership.
Co-owner: intelligence-operative for analytical interpretation contract.

✅ Acceptance Criteria

  • scripts/fetch-voting-records.ts exists; takes --date YYYY-MM-DD and reads data-download-manifest.md
  • Voting records auto-injected into intelligence-assessment.md and coalition-mathematics.md
  • Defector detection logic + Mermaid visualisation
  • Vitest coverage including "vote pending" branch
  • Documented in analysis/methodologies/ai-driven-analysis-guide.md

📚 References

  • analysis/daily/2026-04-26/{committeeReports,week-ahead,realtime-pulse}/methodology-reflection.md
  • MCP: riksdag-regering-search_voteringar
  • Skill: legislative-monitoring, riksdag-regering-mcp
  • ISMS: Secure_Development_Policy.md

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions