Skip to content

Latest commit

 

History

History
737 lines (607 loc) · 56.4 KB

File metadata and controls

737 lines (607 loc) · 56.4 KB

Hack23 Logo

🔬 EU Parliament Monitor — Analysis Directory

📊 Political Intelligence Analysis Framework for European Parliament Agentic Workflows
🎯 Evidence-Based · Multi-Framework · Per-Document · Temporal Aggregation

Owner Version Effective Date Classification

📋 Document Owner: CEO | 📄 Version: 3.0 | 📅 Last Updated: 2026-03-31 (UTC) | 🔄 Review Cycle: Quarterly | ⏰ Next Review: 2026-06-30 🏢 Owner: Hack23 AB (Org.nr 5595347807) | 🏷️ Classification: Public


📚 Architecture Documentation Map

Document Focus Description Documentation Link
Architecture 🏛️ Architecture C4 model showing current system structure View Source
Security Architecture 🛡️ Security Security controls and compliance mapping View Source
Threat Model 🎯 Security Political Threat Landscape analysis View Source
SWOT Analysis 💼 Business Strategic assessment (formatting exemplar) View Source
Workflows ⚙️ DevOps CI/CD and agentic workflow documentation View Source
Analysis Methodologies 📐 Methodology Political intelligence analysis frameworks View Source
Analysis Templates 📋 Templates Structured analysis output templates View Source

🔐 ISMS Policy Alignment

ISMS Policy Analysis Implementation
🛠️ Secure Development Policy Quality gates enforce evidence-based analysis; anti-pattern rejection prevents low-quality output
🤖 AI Policy AI agents MUST read methodology docs before analysis; per-file protocol ensures reproducibility
📝 Classification Policy 7-dimension classification adapted from ISMS for EP political events (see reference/)
🔍 Vulnerability Management Political threat analysis uses 6 purpose-built dimensions, NOT software-centric models
🔓 Open Source Policy All methodology documents published under project license for transparency

🎯 Purpose

The analysis/ directory stores intermediate political intelligence artifacts produced and consumed by EU Parliament Monitor's 10 agentic workflows. These artifacts bridge raw European Parliament data (sourced via the European Parliament MCP Server v1.2.1) and the final published political intelligence articles across 14 languages.

%%{init: {"theme":"dark","themeVariables":{"primaryColor":"#1565C0","primaryTextColor":"#ffffff","primaryBorderColor":"#0A3F7F","lineColor":"#90CAF9","secondaryColor":"#2E7D32","secondaryTextColor":"#ffffff","secondaryBorderColor":"#0F3F00","tertiaryColor":"#FF9800","tertiaryTextColor":"#000000","tertiaryBorderColor":"#7F4F00","mainBkg":"#1565C0","secondBkg":"#2E7D32","tertiaryBkg":"#FF9800","noteBkgColor":"#FFC107","noteTextColor":"#000000","noteBorderColor":"#7F6000","errorBkgColor":"#D32F2F","errorTextColor":"#ffffff","fontFamily":"Inter, Helvetica, Arial, sans-serif","pie1":"#1565C0","pie2":"#2E7D32","pie3":"#FF9800","pie4":"#D32F2F","pie5":"#FFC107","pie6":"#7B1FA2","pie7":"#9E9E9E","pie8":"#0288D1","pie9":"#388E3C","pie10":"#F57C00","pie11":"#C62828","pie12":"#FBC02D","pieTitleTextSize":"18px","pieSectionTextSize":"14px","pieLegendTextSize":"13px","pieStrokeColor":"#1e1e1e","pieOuterStrokeColor":"#1e1e1e","git0":"#1565C0","git1":"#2E7D32","git2":"#FF9800","git3":"#D32F2F","gitBranchLabel0":"#ffffff","gitBranchLabel1":"#ffffff","gitBranchLabel2":"#000000","gitBranchLabel3":"#ffffff","cScale0":"#1565C0","cScale1":"#2E7D32","cScale2":"#FF9800","cScale3":"#D32F2F","cScale4":"#FFC107","cScale5":"#7B1FA2","cScale6":"#9E9E9E","cScale7":"#0288D1","xyChart":{"backgroundColor":"#1e1e1e","plotColorPalette":"#1565C0,#2E7D32,#FF9800,#D32F2F,#FFC107,#7B1FA2,#9E9E9E"}}}}%%
flowchart LR
    subgraph "📡 Data Collection"
        EP["🏛️ EP MCP Server\nv1.2.1"]
    end

    subgraph "🔬 Analysis Pipeline"
        DL["📥 Download\nFeed Data"]
        AI["🤖 Per-File\nAI Analysis"]
        QG["✅ Quality\nGate ≥7.0"]
    end

    subgraph "📰 Article Generation"
        GEN["📝 Generate\nEN Article"]
        TR["🌐 Translate\n13 Languages"]
    end

    EP --> DL --> AI --> QG --> GEN --> TR

    style EP fill:#003399,stroke:#002266,color:#fff
    style DL fill:#0d6efd,stroke:#0a58ca,color:#fff
    style AI fill:#6f42c1,stroke:#59359a,color:#fff
    style QG fill:#198754,stroke:#146c43,color:#fff
    style GEN fill:#fd7e14,stroke:#ca6510,color:#fff
    style TR fill:#dc3545,stroke:#b02a37,color:#fff
Loading

Analysis artifacts are not final content — they are structured intermediate products that enable:

  • 🔄 Workflow composition: Upstream agents deposit analysis; downstream agents consume it
  • 📐 Consistent methodology: Methodology frameworks + template catalog enforce analytical rigor (see methodologies/ and templates/)
  • 📊 Full data analysis: Every downloaded MCP file receives per-file deep analysis
  • 🧠 Reusable intelligence: Cross-workflow pattern sharing and knowledge accumulation
  • 🎯 Quality assurance: Minimum 7.0/10 quality gate before article generation
  • 🔀 Collision-free design: Per-workflow directories prevent merge conflicts
  • 📅 Temporal aggregation: Daily → Weekly → Monthly intelligence roll-ups

🏗️ Analysis System Architecture

%%{init: {"theme":"dark","themeVariables":{"primaryColor":"#1565C0","primaryTextColor":"#ffffff","primaryBorderColor":"#0A3F7F","lineColor":"#90CAF9","secondaryColor":"#2E7D32","secondaryTextColor":"#ffffff","secondaryBorderColor":"#0F3F00","tertiaryColor":"#FF9800","tertiaryTextColor":"#000000","tertiaryBorderColor":"#7F4F00","mainBkg":"#1565C0","secondBkg":"#2E7D32","tertiaryBkg":"#FF9800","noteBkgColor":"#FFC107","noteTextColor":"#000000","noteBorderColor":"#7F6000","errorBkgColor":"#D32F2F","errorTextColor":"#ffffff","fontFamily":"Inter, Helvetica, Arial, sans-serif","pie1":"#1565C0","pie2":"#2E7D32","pie3":"#FF9800","pie4":"#D32F2F","pie5":"#FFC107","pie6":"#7B1FA2","pie7":"#9E9E9E","pie8":"#0288D1","pie9":"#388E3C","pie10":"#F57C00","pie11":"#C62828","pie12":"#FBC02D","pieTitleTextSize":"18px","pieSectionTextSize":"14px","pieLegendTextSize":"13px","pieStrokeColor":"#1e1e1e","pieOuterStrokeColor":"#1e1e1e","git0":"#1565C0","git1":"#2E7D32","git2":"#FF9800","git3":"#D32F2F","gitBranchLabel0":"#ffffff","gitBranchLabel1":"#ffffff","gitBranchLabel2":"#000000","gitBranchLabel3":"#ffffff","cScale0":"#1565C0","cScale1":"#2E7D32","cScale2":"#FF9800","cScale3":"#D32F2F","cScale4":"#FFC107","cScale5":"#7B1FA2","cScale6":"#9E9E9E","cScale7":"#0288D1","xyChart":{"backgroundColor":"#1e1e1e","plotColorPalette":"#1565C0,#2E7D32,#FF9800,#D32F2F,#FFC107,#7B1FA2,#9E9E9E"}}}}%%
graph TB
    subgraph "🌐 Data Sources"
        EP["🏛️ European Parliament\nOpen Data Portal"]
        IMF["💱 IMF SDMX 3.0
Economic Data"]
        WB["🌍 World Bank\nNon-Economic Only"]
    end

    subgraph "📥 Data Ingestion Layer"
        MCP["🔌 EP MCP Server\nv1.2.1"]
        PRE["📥 Agentic Workflow\nData Download Stage"]
    end

    subgraph "📚 Methodology Framework (v3.0)"
        direction TB
        GUIDE["🤖 AI-Driven Guide\n<i>Master Protocol</i>"]
        M1["🏷️ Classification"]
        M2["⚠️ Risk"]
        M3["🎭 Threat"]
        M4["💼 SWOT"]
        M5["✍️ Style"]
    end

    subgraph "📋 Template Library (8 Templates)"
        T1["🔍 Per-File Intel"]
        T2["🏷️ Classification"]
        T3["⚠️ Risk"]
        T4["💼 SWOT"]
        T5["🎭 Threat"]
        T6["📈 Significance"]
        T7["👥 Stakeholder"]
        T8["🧩 Synthesis"]
    end

    subgraph "🤖 AI Analysis Engine"
        AI["🧠 GitHub Copilot\nCoding Agent\n<i>All analysis performed here</i>"]
    end

    subgraph "✅ Quality Assurance"
        QG["✅ Quality Gate\n<i>Checklist + 5D score</i>"]
    end

    subgraph "📰 Output"
        ART["📰 News Articles\n<i>14 languages</i>"]
        DASH["📊 Analysis Artifacts\n<i>Political intelligence</i>"]
    end

    EP & WB --> MCP
    MCP --> PRE
    PRE -->|"raw data only"| AI
    GUIDE & M1 & M2 & M3 & M4 & M5 -->|"frameworks"| AI
    T1 & T2 & T3 & T4 & T5 & T6 & T7 & T8 -->|"templates"| AI
    AI -->|"analysis artifacts"| QG
    QG -->|"approved"| ART & DASH

    style EP fill:#003399,color:#fff,stroke:#002266,stroke-width:2px
    style WB fill:#003399,color:#fff,stroke:#002266,stroke-width:2px
    style MCP fill:#6610f2,color:#fff,stroke:#520dc2,stroke-width:2px
    style PRE fill:#6610f2,color:#fff,stroke:#520dc2,stroke-width:2px
    style GUIDE fill:#dc3545,color:#fff,stroke:#b02a37,stroke-width:2px
    style AI fill:#198754,color:#fff,stroke:#146c43,stroke-width:3px
    style QG fill:#fd7e14,color:#fff,stroke:#ca6510,stroke-width:2px
    style ART fill:#ffc107,color:#000,stroke:#cc9a06,stroke-width:2px
    style DASH fill:#ffc107,color:#000,stroke:#cc9a06,stroke-width:2px
    style M1 fill:#e9ecef,color:#212529,stroke:#adb5bd
    style M2 fill:#e9ecef,color:#212529,stroke:#adb5bd
    style M3 fill:#e9ecef,color:#212529,stroke:#adb5bd
    style M4 fill:#e9ecef,color:#212529,stroke:#adb5bd
    style M5 fill:#e9ecef,color:#212529,stroke:#adb5bd
    style T1 fill:#cfe2ff,color:#084298,stroke:#9ec5fe
    style T2 fill:#cfe2ff,color:#084298,stroke:#9ec5fe
    style T3 fill:#cfe2ff,color:#084298,stroke:#9ec5fe
    style T4 fill:#cfe2ff,color:#084298,stroke:#9ec5fe
    style T5 fill:#cfe2ff,color:#084298,stroke:#9ec5fe
    style T6 fill:#cfe2ff,color:#084298,stroke:#9ec5fe
    style T7 fill:#cfe2ff,color:#084298,stroke:#9ec5fe
    style T8 fill:#cfe2ff,color:#084298,stroke:#9ec5fe
Loading

📁 Directory Structure

analysis/
├── README.md                          ← This file (CRITICAL RULES — read first)
├── methodologies/                     ← Methodology guides, tradecraft standards, indicator mappings, quality thresholds
│   ├── README.md                          ← Methodology catalog and pipeline overview
│   ├── ai-driven-analysis-guide.md        ← 10-step analysis protocol (authoritative, read FIRST)
│   ├── artifact-catalog.md                ← Master map of every analysis artifact by folder group
│   ├── per-artifact-methodologies.md      ← Per-artifact construction rules (purpose + inputs + structure + Mermaid + floor)
│   ├── osint-tradecraft-standards.md      ← OSINT/INTOP tradecraft (ICD 203, Admiralty grades, Kent/WEP bands, SAT catalog)
│   ├── political-classification-guide.md  ← 7-dimension EP event classification
│   ├── political-risk-methodology.md      ← Likelihood × Impact scoring for EP
│   ├── political-threat-framework.md      ← Political Threat Landscape (6 dims) + 5 frameworks
│   ├── political-swot-framework.md        ← Evidence-based SWOT for EP landscape
│   ├── political-style-guide.md           ← Writing standards, depth levels, evidence density
│   ├── imf-indicator-mapping.md           ← IMF indicator mapping for economic context (sole authoritative source)
│   ├── worldbank-indicator-mapping.md     ← World Bank indicator mapping for **non-economic** domains only (health, education, social, environment, demographics, defence, agriculture, innovation, governance)
│   └── reference-quality-thresholds.json  ← Machine-readable per-artifact line-floor thresholds (Stage C gate)
├── templates/                         ← 39 structured templates (+ README + analysis-index) — see templates/README.md
│   ├── README.md                          ← Template catalog and selection guide
│   └── …                                  ← 14 agentic-workflow (incl. 6 reusable framework) + 25 per-artifact templates
├── reference/                         ← 4 ISMS adaptation mappings
│   ├── isms-classification-adaptation.md  ← ISMS → Political classification mapping
│   ├── isms-risk-assessment-adaptation.md ← ISMS → Political risk mapping
│   ├── isms-threat-modeling-adaptation.md ← ISMS → Political threat mapping
│   └── isms-style-guide-adaptation.md     ← ISMS → Political writing standards mapping
├── daily/                             ← Per-day analysis artifacts (see "Run-relative structure" below)
│   └── README.md
├── weekly/                            ← Per-week aggregations
│   └── README.md
├── monthly/                           ← Per-month strategic briefs
│   └── README.md
├── imf/                               ← Cached IMF dataset snapshots
├── worldbank/                         ← Cached World Bank dataset snapshots
└── daily/YYYY-MM-DD/                  ← Run-relative output root
    └── <article-type-slug>-run<NN>/   ← Per-workflow, per-run isolation (e.g. week-ahead-run01)
        ├── manifest.json              ← Run metadata (start/end, MCP tools called, hashes)
        ├── intelligence/              ← 19 intelligence artifacts (analysis-index, synthesis-summary, stakeholder-map, …)
        ├── classification/            ← 4 classification artifacts (significance, actor-mapping, forces, impact-matrix)
        ├── risk-scoring/              ← 4 risk artifacts (risk-matrix, quantitative-swot, capital-risk, velocity-risk)
        ├── threat-assessment/         ← 5 threat artifacts (political-stride-assessment, consequence-trees, actor-threat-profiles, …)
        └── data/                      ← Raw MCP payloads for this run

Canonical run-relative path: analysis/daily/<YYYY-MM-DD>/<article-type-slug>-run<NN>/ is the single location Stage C's validator (npm run validate-analysis) checks. All per-artifact file names and depth floors are defined in methodologies/artifact-catalog.md + methodologies/per-artifact-methodologies.md + methodologies/reference-quality-thresholds.json.

Prompt-library entry points that own each stage:


📛 Canonical Artifact Naming Convention

All analysis pipeline methods produce files with canonical filenames defined in ANALYSIS_METHOD_FILENAMES (exported from src/generators/pipeline/analysis-stage.ts). Agentic workflows and TypeScript pipeline MUST use these exact names to ensure cross-session intelligence correlation is reliable.

Pipeline Method → Canonical Filename Mapping

The Source Template column identifies the corresponding template file in analysis/templates/ when a pipeline method has a direct template counterpart. A dash () means the method has no direct template counterpart.

Note: The source template filename may differ from the canonical artifact filename. Template files retain their original names in analysis/templates/; the canonical filename reflects the method/output concept used by the pipeline.

Analysis Method Subdirectory Canonical Filename Source Template
significance-classification classification/ significance-classification.md significance-scoring.md ¹
impact-matrix classification/ impact-matrix.md
actor-mapping classification/ actor-mapping.md
forces-analysis classification/ forces-analysis.md
political-threat-landscape threat-assessment/ political-threat-landscape.md threat-analysis.md
actor-threat-profiling threat-assessment/ actor-threat-profiling.md
consequence-trees threat-assessment/ consequence-trees.md
legislative-disruption threat-assessment/ legislative-disruption.md
risk-matrix risk-scoring/ risk-matrix.md risk-assessment.md
political-capital-risk risk-scoring/ political-capital-risk.md
quantitative-swot risk-scoring/ quantitative-swot.md swot-analysis.md
legislative-velocity-risk risk-scoring/ legislative-velocity-risk.md
agent-risk-workflow risk-scoring/ agent-risk-workflow.md
deep-analysis existing/ deep-analysis.md
stakeholder-analysis existing/ stakeholder-impact.md stakeholder-impact.md
coalition-analysis existing/ coalition-dynamics.md
voting-patterns existing/ voting-patterns.md
cross-session-intelligence existing/ cross-session-intelligence.md
document-analysis (default) documents/ document-analysis-index.md per-file-political-intelligence.md

¹ Template filenames are legacy and may not match the canonical artifact name. The pipeline always produces the canonical filename listed in the table.

Agentic Workflow Canonical Names

For high-level analysis artifacts produced by agentic workflows (AI-generated, not pipeline methods):

Analysis Type Canonical Filename
Intelligence Brief intelligence-brief.md
Political Landscape political-landscape.md
Risk Assessment risk-assessment.md
SWOT Analysis swot-analysis.md
Threat Assessment threat-assessment.md
Coalition Dynamics coalition-dynamics.md
Stakeholder Impact stakeholder-impact.md
Significance Scoring significance-scoring.md
Synthesis Summary synthesis-summary.md
Political Classification political-classification.md

Naming Rules

  1. No ai- prefix — Older runs used ai-deep-analysis.md, ai-coalition-dynamics.md etc. This is deprecated. Use the canonical names above.
  2. Kebab-case only — All filenames are lowercase, hyphen-separated with .md extension.
  3. Align with the output concept — Where a matching template exists in analysis/templates/, use the template name only when the generated content is intended to match that same template concept. Otherwise, use the canonical filename for the analysis method/output concept.
  4. Method name ≠ filename — The AnalysisMethod identifier (e.g. stakeholder-analysis) may differ from its canonical filename (e.g. stakeholder-impact.md). Always use the ANALYSIS_METHOD_FILENAMES constant.

Legacy runs

Historical analysis directories in older commits may retain previous filenames and structures. For example, some legacy runs use names such as significance-assessment.md or older ai-* prefixes instead of the canonical filenames listed above.

Treat the canonical naming rules in this section as the standard for runs generated on or after the effective date of this document (2026-03-31), unless a later generator/version note states otherwise. When reviewing older date-based directories, check for legacy equivalents before concluding that an expected output is missing.


🚨 Critical Rules for Agentic Workflows

Rule 1: Mandatory Data Download — ALWAYS Before Analysis

Every agentic workflow MUST download EP data before deciding whether to produce an article. Data collection is NEVER optional:

%%{init: {"theme":"dark","themeVariables":{"primaryColor":"#1565C0","primaryTextColor":"#ffffff","primaryBorderColor":"#0A3F7F","lineColor":"#90CAF9","secondaryColor":"#2E7D32","secondaryTextColor":"#ffffff","secondaryBorderColor":"#0F3F00","tertiaryColor":"#FF9800","tertiaryTextColor":"#000000","tertiaryBorderColor":"#7F4F00","mainBkg":"#1565C0","secondBkg":"#2E7D32","tertiaryBkg":"#FF9800","noteBkgColor":"#FFC107","noteTextColor":"#000000","noteBorderColor":"#7F6000","errorBkgColor":"#D32F2F","errorTextColor":"#ffffff","fontFamily":"Inter, Helvetica, Arial, sans-serif","pie1":"#1565C0","pie2":"#2E7D32","pie3":"#FF9800","pie4":"#D32F2F","pie5":"#FFC107","pie6":"#7B1FA2","pie7":"#9E9E9E","pie8":"#0288D1","pie9":"#388E3C","pie10":"#F57C00","pie11":"#C62828","pie12":"#FBC02D","pieTitleTextSize":"18px","pieSectionTextSize":"14px","pieLegendTextSize":"13px","pieStrokeColor":"#1e1e1e","pieOuterStrokeColor":"#1e1e1e","git0":"#1565C0","git1":"#2E7D32","git2":"#FF9800","git3":"#D32F2F","gitBranchLabel0":"#ffffff","gitBranchLabel1":"#ffffff","gitBranchLabel2":"#000000","gitBranchLabel3":"#ffffff","cScale0":"#1565C0","cScale1":"#2E7D32","cScale2":"#FF9800","cScale3":"#D32F2F","cScale4":"#FFC107","cScale5":"#7B1FA2","cScale6":"#9E9E9E","cScale7":"#0288D1","xyChart":{"backgroundColor":"#1e1e1e","plotColorPalette":"#1565C0,#2E7D32,#FF9800,#D32F2F,#FFC107,#7B1FA2,#9E9E9E"}}}}%%
flowchart TD
    Start(["🚀 Workflow Triggered"]) --> Health["🏥 MCP Health Gate\nget_plenary_sessions"]
    Health -->|"✅ Healthy"| Feeds["📡 Download ALL\nFeed Endpoints"]
    Health -->|"❌ Failed 3x"| Abort(["⛔ Abort Run"])
    Feeds --> Advisory["📋 Download Advisory\nFeeds MANDATORY"]
    Advisory --> Analytics["🔬 Run Analytical\nContext Tools"]
    Analytics --> Gate{"📰 Newsworthy\nItems Found?"}
    Gate -->|"✅ Yes"| Analyze["🤖 Per-File Analysis\n+ Article Generation"]
    Gate -->|"❌ No"| Noop["📝 noop\nwith analysis summary"]

    style Start fill:#0d6efd,stroke:#0a58ca,color:#fff
    style Health fill:#6c757d,stroke:#565e64,color:#fff
    style Feeds fill:#198754,stroke:#146c43,color:#fff
    style Advisory fill:#20c997,stroke:#1aa179,color:#fff
    style Analytics fill:#6f42c1,stroke:#59359a,color:#fff
    style Gate fill:#ffc107,stroke:#cc9a06,color:#000
    style Analyze fill:#fd7e14,stroke:#ca6510,color:#fff
    style Noop fill:#adb5bd,stroke:#6c757d,color:#000
    style Abort fill:#dc3545,stroke:#b02a37,color:#fff
Loading

Key rules:

  • timeframe: "today" first, fallback to "one-week" for empty/error/timeout feeds
  • EP API can take 30–90+ seconds per call — NEVER abort slow responses
  • Partial data is better than no data — continue with other feeds on individual failures
  • Even on noop, all data collection and analysis MUST complete first

Rule 2: Per-Workflow Directory Isolation — Never Overwrite

Every agentic workflow MUST write to its own separate directory:

✅ news-breaking         → analysis/daily/2026-03-31/breaking/
✅ news-weekly-review     → analysis/daily/2026-03-31/week-in-review/
✅ news-committee-reports → analysis/daily/2026-03-31/committee-reports/
✅ news-motions           → analysis/daily/2026-03-31/motions/
❌ news-breaking overwrites news-weekly-review output → PROHIBITED

An agentic workflow MUST NEVER overwrite analysis produced by another workflow. Each workflow run creates new files in its own scope. If a file already exists, the workflow MUST skip it or create an addendum, never replace.

%%{init: {"theme":"dark","themeVariables":{"primaryColor":"#1565C0","primaryTextColor":"#ffffff","primaryBorderColor":"#0A3F7F","lineColor":"#90CAF9","secondaryColor":"#2E7D32","secondaryTextColor":"#ffffff","secondaryBorderColor":"#0F3F00","tertiaryColor":"#FF9800","tertiaryTextColor":"#000000","tertiaryBorderColor":"#7F4F00","mainBkg":"#1565C0","secondBkg":"#2E7D32","tertiaryBkg":"#FF9800","noteBkgColor":"#FFC107","noteTextColor":"#000000","noteBorderColor":"#7F6000","errorBkgColor":"#D32F2F","errorTextColor":"#ffffff","fontFamily":"Inter, Helvetica, Arial, sans-serif","pie1":"#1565C0","pie2":"#2E7D32","pie3":"#FF9800","pie4":"#D32F2F","pie5":"#FFC107","pie6":"#7B1FA2","pie7":"#9E9E9E","pie8":"#0288D1","pie9":"#388E3C","pie10":"#F57C00","pie11":"#C62828","pie12":"#FBC02D","pieTitleTextSize":"18px","pieSectionTextSize":"14px","pieLegendTextSize":"13px","pieStrokeColor":"#1e1e1e","pieOuterStrokeColor":"#1e1e1e","git0":"#1565C0","git1":"#2E7D32","git2":"#FF9800","git3":"#D32F2F","gitBranchLabel0":"#ffffff","gitBranchLabel1":"#ffffff","gitBranchLabel2":"#000000","gitBranchLabel3":"#ffffff","cScale0":"#1565C0","cScale1":"#2E7D32","cScale2":"#FF9800","cScale3":"#D32F2F","cScale4":"#FFC107","cScale5":"#7B1FA2","cScale6":"#9E9E9E","cScale7":"#0288D1","xyChart":{"backgroundColor":"#1e1e1e","plotColorPalette":"#1565C0,#2E7D32,#FF9800,#D32F2F,#FFC107,#7B1FA2,#9E9E9E"}}}}%%
flowchart LR
    A["Workflow starts"] --> B{"Does target folder<br/>already contain<br/>analysis files?"}
    B -->|"No"| C["✅ Create analysis<br/>in own folder"]
    B -->|"Yes — from SAME workflow"| D["✅ Update/append<br/>to own files only"]
    B -->|"Yes — from DIFFERENT workflow"| E["🚫 NEVER touch<br/>other workflow's files"]

    style C fill:#28a745,color:#fff
    style D fill:#ffc107,color:#000
    style E fill:#dc3545,color:#fff
Loading

Rule 3: AI Must Read Methodology Then Analyse — Never Script

Scripts download data. AI performs ALL analysis. This is a fundamental architectural principle.

✅ Scripts MAY 🚫 Scripts MUST NEVER
Download MCP data to workflow's data/ subdirectory Generate analysis prose, tables, or conclusions
Catalog pending files Create SWOT entries, risk scores, or threat assessments
Validate output format (quality gate) Fill template sections with generated content
Move/rename files Produce "placeholder" analysis that looks real

AI agents must:

  1. Read every methodology document in analysis/methodologies/ before any analysis
  2. Read the relevant templates in analysis/templates/ to understand the expected output format (see the per-artifact map in per-artifact-methodologies.md)
  3. Analyse the actual data — produce original intelligence, not scripted boilerplate
  4. Follow the templates exactly — structured tables, Mermaid diagrams, evidence citations, confidence labels

🚫 "Scripted crap content" is REJECTED. Generic summaries or templates filled with placeholder text are unacceptable.

Fallback mechanism: If AI analysis fails or produces unusable output (detected by the quality gate), the workflow should:

  1. Commit a minimal data-download-manifest.md documenting what was downloaded
  2. Flag the analysis as pending for the next workflow run
  3. Never commit placeholder or stub content that masquerades as genuine analysis

Rule 4: Political Threat Landscape — NOT STRIDE

Software-centric threat models (STRIDE, DREAD, PASTA) are explicitly rejected. Use the Political Threat Landscape (6 dimensions):

Dimension Monitors Example
🔄 Coalition Shifts Political group realignment, defection patterns EPP–S&D grand coalition weakening
🔍 Transparency Deficit Access-to-information gaps, lobbying opacity Committee meeting minutes delayed
Policy Reversal Legislative rollback, position changes Green Deal implementation weakened
🏛️ Institutional Pressure Inter-institutional friction, mandate conflicts Council blocking EP amendments
🚧 Legislative Obstruction Procedure stalling, amendment flooding 1000+ amendments on AI Act
🗳️ Democratic Erosion Participation decline, representation gaps EP election turnout decreasing

Layer Diamond Model, Attack Trees, PESTLE, Scenario Planning, and Kill Chain for threats rated MODERATE or above.

Rule 5: Evidence-Based Only

Every factual claim must have a source citation. Every non-factual assessment must have a confidence level (HIGH/MEDIUM/LOW). Opinion-only entries are REJECTED.

Rule 6: Deep Analysis — Not Shallow Summaries

Every analysis file must demonstrate genuine political intelligence depth. The quality standard is SWOT.md and Political Threat Framework — not brief summaries.

Minimum depth indicators:

  • ≥ 3 evidence-backed claims per SWOT quadrant (with EP procedure ID or adopted text citations)
  • ≥ 1 colour-coded Mermaid diagram per analysis file (with real data, not placeholders)
  • Multi-perspective analysis (Grand Coalition, Opposition, Citizens, Industry, International)
  • Explicit confidence labels on every analytical claim (HIGH/MEDIUM/LOW)
  • Forward-looking indicators (what to watch next, with specific triggers and timelines)
  • Cross-document pattern identification (how this document relates to other recent EP activity)

Rule 7: ALWAYS Commit Analysis — No Workflow Run Wasted

Per ai-driven-analysis-guide.md Rule 5, every agentic workflow run MUST produce and commit analysis artifacts. No workflow run should ever be wasted.

  • Analysis artifacts MUST be included in PRs — never deleted before PR creation
  • On quiet days with no article, create an analysis-only PR instead of discarding analysis via noop
  • Before producing new analysis, check for existing analysis and improve/extend/correct/complete it
  • Even the translation workflow must perform translation coverage and quality analysis
  • Raw MCP data payloads (e.g. large JSON/XML responses) may be cleaned to control PR size, but the data/ directory itself MUST NOT be deleted wholesale — all per-file analysis markdown (*.analysis.md and other .md files stored alongside the data) MUST ALWAYS be preserved and committed

🤖 Workflow-Specific Data Requirements

Each agentic workflow downloads unique data tailored to its article type:

%%{init: {"theme":"dark","themeVariables":{"primaryColor":"#1565C0","primaryTextColor":"#ffffff","primaryBorderColor":"#0A3F7F","lineColor":"#90CAF9","secondaryColor":"#2E7D32","secondaryTextColor":"#ffffff","secondaryBorderColor":"#0F3F00","tertiaryColor":"#FF9800","tertiaryTextColor":"#000000","tertiaryBorderColor":"#7F4F00","mainBkg":"#1565C0","secondBkg":"#2E7D32","tertiaryBkg":"#FF9800","noteBkgColor":"#FFC107","noteTextColor":"#000000","noteBorderColor":"#7F6000","errorBkgColor":"#D32F2F","errorTextColor":"#ffffff","fontFamily":"Inter, Helvetica, Arial, sans-serif","pie1":"#1565C0","pie2":"#2E7D32","pie3":"#FF9800","pie4":"#D32F2F","pie5":"#FFC107","pie6":"#7B1FA2","pie7":"#9E9E9E","pie8":"#0288D1","pie9":"#388E3C","pie10":"#F57C00","pie11":"#C62828","pie12":"#FBC02D","pieTitleTextSize":"18px","pieSectionTextSize":"14px","pieLegendTextSize":"13px","pieStrokeColor":"#1e1e1e","pieOuterStrokeColor":"#1e1e1e","git0":"#1565C0","git1":"#2E7D32","git2":"#FF9800","git3":"#D32F2F","gitBranchLabel0":"#ffffff","gitBranchLabel1":"#ffffff","gitBranchLabel2":"#000000","gitBranchLabel3":"#ffffff","cScale0":"#1565C0","cScale1":"#2E7D32","cScale2":"#FF9800","cScale3":"#D32F2F","cScale4":"#FFC107","cScale5":"#7B1FA2","cScale6":"#9E9E9E","cScale7":"#0288D1","xyChart":{"backgroundColor":"#1e1e1e","plotColorPalette":"#1565C0,#2E7D32,#FF9800,#D32F2F,#FFC107,#7B1FA2,#9E9E9E"}}}}%%
flowchart TD
    subgraph "📡 EP MCP Server v1.2.13"
        F1["get_adopted_texts_feed"]
        F2["get_events_feed"]
        F3["get_procedures_feed"]
        F4["get_meps_feed"]
        F5["get_documents_feed"]
        F6["get_committee_documents_feed"]
        F7["get_plenary_documents_feed"]
        F8["get_parliamentary_questions_feed"]
        F9["get_plenary_session_documents_feed"]
    end

    subgraph "📰 Agentic Workflows"
        W1["🔴 Breaking News"]
        W2["📋 Motions"]
        W3["📜 Propositions"]
        W4["🏛️ Committee Reports"]
        W5["📅 Week Ahead"]
        W6["📊 Weekly Review"]
        W7["📆 Month Ahead"]
        W8["📈 Monthly Review"]
    end

    F1 --> W1 & W2 & W3 & W6 & W8
    F2 --> W1 & W5 & W7
    F3 --> W1 & W2 & W3 & W5 & W6 & W7 & W8
    F4 --> W1 & W2
    F5 --> W1 & W3 & W4
    F6 --> W4
    F7 --> W4 & W5 & W6
    F8 --> W1 & W2 & W6
    F9 --> W5

    style W1 fill:#dc3545,stroke:#b02a37,color:#fff
    style W2 fill:#fd7e14,stroke:#ca6510,color:#fff
    style W3 fill:#ffc107,stroke:#cc9a06,color:#000
    style W4 fill:#198754,stroke:#146c43,color:#fff
    style W5 fill:#0d6efd,stroke:#0a58ca,color:#fff
    style W6 fill:#6f42c1,stroke:#59359a,color:#fff
    style W7 fill:#d63384,stroke:#ab296a,color:#fff
    style W8 fill:#0dcaf0,stroke:#0aa2c0,color:#000
Loading

Detailed Workflow Data Matrix

Workflow Slug Primary Feeds Analytical Tools Unique Focus
news-breaking breaking adopted_texts, events, procedures, meps (today→one-week fallback) detect_voting_anomalies, analyze_coalition_dynamics, early_warning_system, generate_political_landscape ⚡ Real-time events: Items published TODAY only; 6-hour cycle
news-motions motions adopted_texts, parliamentary_questions, meps, procedures detect_voting_anomalies, analyze_coalition_dynamics, get_voting_records, compare_political_groups 🗳️ Specific resolutions: Individual motion IDs, vote breakdowns by group
news-propositions propositions procedures, documents, adopted_texts, plenary_documents search_documents, monitor_legislative_pipeline, track_legislation, analyze_legislative_effectiveness 📜 Legislative tracking: Procedure stages, committee assignments, rapporteur analysis
news-committee-reports committee-reports committee_documents, plenary_documents, adopted_texts, procedures get_committee_info, monitor_legislative_pipeline, analyze_legislative_effectiveness 🏛️ Committee deep-dive: Per-committee output, meeting agendas, document analysis
news-week-ahead week-ahead events, procedures, plenary_documents, plenary_session_documents get_plenary_sessions (future), get_committee_info, monitor_legislative_pipeline, generate_political_landscape 📅 Prospective: Next week's agenda, scheduled votes, upcoming hearings
news-weekly-review week-in-review adopted_texts, procedures, plenary_documents, parliamentary_questions get_voting_records, detect_voting_anomalies, generate_political_landscape 📊 Retrospective: Week's accomplishments, vote outcomes, legislative progress
news-month-ahead month-ahead events, procedures, plenary_documents, committee_documents, adopted_texts, plenary_session_documents, meps get_plenary_sessions, get_committee_info, monitor_legislative_pipeline, generate_political_landscape, compare_political_groups, analyze_country_delegation 📆 Strategic outlook: Upcoming legislative calendar, committee programming
news-monthly-review month-in-review adopted_texts, procedures, plenary_documents, parliamentary_questions get_voting_records, detect_voting_anomalies, generate_political_landscape, compare_political_groups, analyze_legislative_effectiveness 📈 Comprehensive review: Month's legislative output, political trends
news-translate (n/a) 🌐 Translation only: Translates EN articles to 13 languages

Per-Document Unique Intelligence

For high-significance documents (significance score ≥ 7.0), workflows produce document-specific deep dives that only that workflow type can generate:

Workflow EP Data Type Unique Deep-Dive Analysis
Breaking News Adopted texts, Emergency events Real-time significance assessment, political temperature spike detection, urgency classification with 6-hour refresh
Motions Legislative resolutions, Positions Per-resolution vote breakdown by political group, defection pattern analysis, cross-party alignment maps
Propositions Legislative procedures Pipeline stage tracking (committee → plenary → trilogue → adoption), rapporteur influence mapping, amendment success rate analysis
Committee Reports Committee documents, Opinions Committee-level productivity metrics, cross-committee workload comparison, meeting frequency analysis, rapporteur assignment patterns
Week Ahead Calendar events, Upcoming sessions Scheduled vote significance pre-assessment, debate intensity forecast, committee hearing preview
Weekly Review Aggregated weekly output Week-over-week trend delta, cross-workflow pattern detection, political narrative arc tracking
Month Ahead Forward calendar, Procedure pipeline Strategic legislative calendar, major policy decision forecast, committee programming analysis
Monthly Review Comprehensive monthly data Legislative throughput metrics, political group productivity rankings, Grand Coalition scorecard, inter-temporal trend synthesis

📊 Per-File AI Analysis (Primary Analysis Mode)

The primary analysis mode is per-file AI analysis: for every downloaded EP MCP data file, the AI agent produces a deep analysis markdown file stored alongside it.

%%{init: {"theme":"dark","themeVariables":{"primaryColor":"#1565C0","primaryTextColor":"#ffffff","primaryBorderColor":"#0A3F7F","lineColor":"#90CAF9","secondaryColor":"#2E7D32","secondaryTextColor":"#ffffff","secondaryBorderColor":"#0F3F00","tertiaryColor":"#FF9800","tertiaryTextColor":"#000000","tertiaryBorderColor":"#7F4F00","mainBkg":"#1565C0","secondBkg":"#2E7D32","tertiaryBkg":"#FF9800","noteBkgColor":"#FFC107","noteTextColor":"#000000","noteBorderColor":"#7F6000","errorBkgColor":"#D32F2F","errorTextColor":"#ffffff","fontFamily":"Inter, Helvetica, Arial, sans-serif","pie1":"#1565C0","pie2":"#2E7D32","pie3":"#FF9800","pie4":"#D32F2F","pie5":"#FFC107","pie6":"#7B1FA2","pie7":"#9E9E9E","pie8":"#0288D1","pie9":"#388E3C","pie10":"#F57C00","pie11":"#C62828","pie12":"#FBC02D","pieTitleTextSize":"18px","pieSectionTextSize":"14px","pieLegendTextSize":"13px","pieStrokeColor":"#1e1e1e","pieOuterStrokeColor":"#1e1e1e","git0":"#1565C0","git1":"#2E7D32","git2":"#FF9800","git3":"#D32F2F","gitBranchLabel0":"#ffffff","gitBranchLabel1":"#ffffff","gitBranchLabel2":"#000000","gitBranchLabel3":"#ffffff","cScale0":"#1565C0","cScale1":"#2E7D32","cScale2":"#FF9800","cScale3":"#D32F2F","cScale4":"#FFC107","cScale5":"#7B1FA2","cScale6":"#9E9E9E","cScale7":"#0288D1","xyChart":{"backgroundColor":"#1e1e1e","plotColorPalette":"#1565C0,#2E7D32,#FF9800,#D32F2F,#FFC107,#7B1FA2,#9E9E9E"}}}}%%
flowchart LR
    A["📥 EP MCP\nDownload"] --> B["📋 Catalog\npending files"]
    B --> C["📖 Read every\nmethodology doc"]
    C --> D["🔍 Per-file\ndeep analysis"]
    D --> E["💾 Save\nid.analysis.md"]
    E --> F["📊 Compose\ndaily synthesis"]
    F --> G["📅 Weekly/Monthly\naggregation"]

    style A fill:#003399,stroke:#002266,color:#fff
    style B fill:#0d6efd,stroke:#0a58ca,color:#fff
    style C fill:#6f42c1,stroke:#59359a,color:#fff
    style D fill:#198754,stroke:#146c43,color:#fff
    style E fill:#20c997,stroke:#1aa179,color:#fff
    style F fill:#fd7e14,stroke:#ca6510,color:#fff
    style G fill:#dc3545,stroke:#b02a37,color:#fff
Loading
Step Action Quality Check
1 Download EP MCP data to data/ subdirectory All mandatory feeds queried
2 Catalog files needing analysis No file missed
3 AI reads every methodology doc Evidence: methodology citations in output
4 Per-file deep analysis following template Mermaid diagrams, evidence tables, confidence labels
5 Save analysis alongside data file {id}.analysis.md next to {id}.json
6 Compose daily synthesis Aggregates all per-file analyses
7 Weekly/monthly aggregation Temporal pattern detection

Quality Gate

Every per-file analysis must score ≥ 7.0/10 across 5 weighted dimensions:

Dimension Weight Minimum Description
Evidence density 30% 6/10 Citations per claim, source variety
Analytical depth 25% 6/10 Multi-framework application, insight quality
Structural completeness 20% 7/10 All template sections filled, Mermaid diagrams present
Political relevance 15% 6/10 EP-specific insights, stakeholder identification
Writing quality 10% 7/10 Style guide compliance, clarity, no boilerplate

📐 Methodology & Template Cross-Reference

Methodology Documents (AI Must Read Before Analysing)

Priority Document Key Content
🔴 1 political-swot-framework.md Evidence hierarchy, confidence levels, temporal decay, aggregation
🔴 2 political-risk-methodology.md 5×5 Likelihood × Impact matrix, EU calibration examples
🔴 3 political-threat-framework.md Political Threat Landscape (6 dimensions) + Diamond Model + Attack Trees + PESTLE + Scenario Planning + Kill Chain
🟠 4 political-classification-guide.md Sensitivity levels, EP domain taxonomy, urgency matrix
🟠 5 political-style-guide.md Writing standards, 3 depth levels, evidence density, anti-patterns
🟠 6 ai-driven-analysis-guide.md Per-file protocol, quality gates, document-type focus, conflict resolution

Template Selection by Data Category

MCP Data Category Primary Templates Supporting Templates
adopted-texts/ Political Classification + Risk Assessment Significance Scoring
committee-documents/ Stakeholder Impact + Risk Assessment Political Classification
procedures/ Risk Assessment + SWOT Analysis Significance Scoring
votes/ Political Classification + SWOT + Threat Analysis Risk Assessment
speeches/ Stakeholder Impact + Significance Scoring Political Classification
questions/ Political Classification + Significance Scoring Stakeholder Impact
events/ Significance Scoring + Risk Assessment Stakeholder Impact
meps/ Stakeholder Impact + Political Classification Significance Scoring
plenary-documents/ Political Classification + Risk Assessment All templates

📅 Temporal Aggregation

%%{init: {"theme":"dark","themeVariables":{"primaryColor":"#1565C0","primaryTextColor":"#ffffff","primaryBorderColor":"#0A3F7F","lineColor":"#90CAF9","secondaryColor":"#2E7D32","secondaryTextColor":"#ffffff","secondaryBorderColor":"#0F3F00","tertiaryColor":"#FF9800","tertiaryTextColor":"#000000","tertiaryBorderColor":"#7F4F00","mainBkg":"#1565C0","secondBkg":"#2E7D32","tertiaryBkg":"#FF9800","noteBkgColor":"#FFC107","noteTextColor":"#000000","noteBorderColor":"#7F6000","errorBkgColor":"#D32F2F","errorTextColor":"#ffffff","fontFamily":"Inter, Helvetica, Arial, sans-serif","pie1":"#1565C0","pie2":"#2E7D32","pie3":"#FF9800","pie4":"#D32F2F","pie5":"#FFC107","pie6":"#7B1FA2","pie7":"#9E9E9E","pie8":"#0288D1","pie9":"#388E3C","pie10":"#F57C00","pie11":"#C62828","pie12":"#FBC02D","pieTitleTextSize":"18px","pieSectionTextSize":"14px","pieLegendTextSize":"13px","pieStrokeColor":"#1e1e1e","pieOuterStrokeColor":"#1e1e1e","git0":"#1565C0","git1":"#2E7D32","git2":"#FF9800","git3":"#D32F2F","gitBranchLabel0":"#ffffff","gitBranchLabel1":"#ffffff","gitBranchLabel2":"#000000","gitBranchLabel3":"#ffffff","cScale0":"#1565C0","cScale1":"#2E7D32","cScale2":"#FF9800","cScale3":"#D32F2F","cScale4":"#FFC107","cScale5":"#7B1FA2","cScale6":"#9E9E9E","cScale7":"#0288D1","xyChart":{"backgroundColor":"#1e1e1e","plotColorPalette":"#1565C0,#2E7D32,#FF9800,#D32F2F,#FFC107,#7B1FA2,#9E9E9E"}}}}%%
flowchart TD
    D["📅 Daily per-workflow analysis\nanalysis/YYYY-MM-DD/slug/"] --> W["📅 Weekly aggregation\nanalysis/weekly/YYYY-WNN/"]
    W --> M["📅 Monthly strategic brief\nanalysis/monthly/YYYY-MM/"]
    D --> SYN["🤖 Cross-article synthesis\nanalysis/YYYY-MM-DD/*.md"]
    SYN --> W

    style D fill:#198754,stroke:#146c43,color:#fff
    style W fill:#0d6efd,stroke:#0a58ca,color:#fff
    style M fill:#6f42c1,stroke:#59359a,color:#fff
    style SYN fill:#fd7e14,stroke:#ca6510,color:#fff
Loading
Scope Format Example Cadence
Daily YYYY-MM-DD 2026-03-31/ Every workflow run
Weekly YYYY-WNN 2026-W14/ news-weekly-review aggregation
Monthly YYYY-MM 2026-03/ news-monthly-review aggregation
Cross-article *.md daily-synthesis.md Date root synthesis

🔒 ISMS Adaptation Reference

The reference/ directory maps ISMS security frameworks to political intelligence:

Reference Document Source ISMS Document Political Adaptation
isms-classification-adaptation.md CLASSIFICATION.md Confidentiality → Sensitivity, Integrity → Accuracy, Availability → Urgency
isms-risk-assessment-adaptation.md Risk_Assessment_Methodology.md CIA Triad → Political Triad (Accountability, Policy Fidelity, Democratic Continuity)
isms-threat-modeling-adaptation.md Threat_Modeling.md Political Threat Landscape + Attack Trees + Diamond Model
isms-style-guide-adaptation.md STYLE_GUIDE.md ISMS writing standards → Political intelligence writing standards

📚 Related Documentation

Document Focus Link
📐 Analysis Methodologies Political intelligence frameworks methodologies/README.md
📋 Analysis Templates Structured analysis templates templates/README.md
🏛️ Architecture C4 system architecture ARCHITECTURE.md
⚙️ Workflows CI/CD and agentic workflows WORKFLOWS.md
🚀 Future Workflows Workflow evolution roadmap FUTURE_WORKFLOWS.md
🛡️ Threat Model Platform threat analysis THREAT_MODEL.md
💼 SWOT Analysis Strategic assessment SWOT.md
🔐 Security Architecture Security controls SECURITY_ARCHITECTURE.md

Document Control: