Verify SBOM attestation

July 18, 2026 ยท View on GitHub

Hack23 Logo

๐Ÿ”„ EU Parliament Monitor โ€” CI/CD Workflows

๐Ÿ›ก๏ธ Automated Security Excellence Through Continuous Integration
๐ŸŽฏ Transparent Pipeline Operations Demonstrating ISMS Policy Compliance

Owner Version Effective Date Review Cycle

๐Ÿ“‹ Document Owner: CEO | ๐Ÿ“„ Version: 4.6 | ๐Ÿ“… Last Updated: 2026-05-28 (UTC) | ๐Ÿ“ฆ Release: v0.9.26
๐Ÿ”„ Review Cycle: Quarterly | โฐ Next Review: 2026-08-28


๐Ÿ“Š Workflow Status Badges

CI/CD Pipeline Status:

Test and Report Knip โ€” Unused Code Detection CodeQL E2E Tests Release Dependency Review Scorecard supply-chain security Deploy S3 REUSE Compliance

Security & Quality Metrics:

OpenSSF Scorecard SLSA 3


๐Ÿ” ISMS Policy Alignment

EU Parliament Monitor's CI/CD workflows implement security controls mandated by Hack23 AB's ISMS framework:

ISMS PolicyWorkflow Implementation
๐Ÿ› ๏ธ Secure Development PolicySAST (CodeQL), SCA (Dependency Review), E2E (Playwright), performance testing
๐Ÿ“ Change ManagementAutomated testing gates, security scanning, PR review requirements
๐Ÿ” Vulnerability ManagementDependabot, CodeQL, OSSF Scorecard, npm audit, security advisories
๐Ÿ”“ Open Source PolicySLSA attestations, SBOM generation, REUSE license compliance
๐Ÿ” Information Security PolicySecurity-hardened runners, SHA-pinned actions, least privilege permissions
๐Ÿ”‘ Access Control PolicyOIDC authentication, minimal workflow permissions, branch protection
๐Ÿ”’ Cryptography PolicySigstore signing, SLSA L3 provenance, build attestations
๐Ÿšจ Incident Response PlanAutomated rollback procedures, incident classification workflows
๐Ÿ’พ Backup & Recovery PolicyMulti-CDN deployment (S3 + GitHub Pages DR), version control
๐Ÿค Third Party ManagementSHA-pinned actions, dependency review, supply chain security

Compliance Framework Mapping

FrameworkVersionRelevant ControlsImplementation
ISO 270012022A.8.25, A.8.26, A.8.27, A.8.28, A.12.1.4, A.12.6.1, A.14.2.1Secure development lifecycle, testing, change management
NIST CSF2.0PR.DS, DE.CM, ID.SC, RS.MIData security, monitoring, supply chain, mitigation
CIS Controlsv8.12.2, 4.1, 7.1, 16.1, 17.1Software inventory, access control, code signing, application security
EU CRA2024Art. 10, Art. 11SBOM generation, vulnerability disclosure, security updates

๐Ÿ“š Architecture Documentation Map

DocumentFocusDescriptionDocumentation Link
Architecture๐Ÿ›๏ธ ArchitectureC4 model showing current system structureView Source
Future Architecture๐Ÿ›๏ธ ArchitectureC4 model showing future system structureView Source
Mindmaps๐Ÿง  ConceptCurrent system component relationshipsView Source
Future Mindmaps๐Ÿง  ConceptFuture capability evolutionView Source
SWOT Analysis๐Ÿ’ผ BusinessCurrent strategic assessmentView Source
Future SWOT Analysis๐Ÿ’ผ BusinessFuture strategic opportunitiesView Source
Data Model๐Ÿ“Š DataCurrent data structures and relationshipsView Source
Future Data Model๐Ÿ“Š DataEnhanced European Parliament data architectureView Source
Flowcharts๐Ÿ”„ ProcessCurrent data processing workflowsView Source
Future Flowcharts๐Ÿ”„ ProcessEnhanced AI-driven workflowsView Source
State Diagrams๐Ÿ”„ BehaviorCurrent system state transitionsView Source
Future State Diagrams๐Ÿ”„ BehaviorEnhanced adaptive state transitionsView Source
Security Architecture๐Ÿ›ก๏ธ SecurityCurrent security implementationView Source
Future Security Architecture๐Ÿ›ก๏ธ SecuritySecurity enhancement roadmapView Source
Threat Model๐ŸŽฏ SecurityPolitical Threat Landscape analysisView Source
Classification๐Ÿท๏ธ GovernanceCIA classification & BCPView Source
CRA Assessment๐Ÿ›ก๏ธ ComplianceCyber Resilience ActView Source
Workflowsโš™๏ธ DevOpsCI/CD documentationView Source
Future Workflows๐Ÿš€ DevOpsPlanned CI/CD enhancementsView Source
Business Continuity Plan๐Ÿ”„ ResilienceRecovery planningView Source
Financial Security Plan๐Ÿ’ฐ FinancialCost & security analysisView Source
End-of-Life Strategy๐Ÿ“ฆ LifecycleTechnology EOL planningView Source
Unit Test Plan๐Ÿงช TestingUnit testing strategyView Source
E2E Test Plan๐Ÿ” TestingEnd-to-end testingView Source
Performance Testingโšก PerformancePerformance benchmarksView Source
Security Policy๐Ÿ”’ SecurityVulnerability reporting & security policyView Source

๐Ÿ“‹ Executive Summary

EU Parliament Monitor employs a comprehensive suite of GitHub Actions workflows (~15 standard + 15 agentic โ€” 14 unified news-<type>.md + news-translate.md) for automated intelligence operations, quality assurance, security scanning, and release management. All workflows follow the Hack23 ISMS Secure Development Policy standards.

Workflow Portfolio

#WorkflowPurposeSchedule / TriggerISMS Alignment
1Agentic News Workflows (ร—15)AI-generated multi-language news articles (14 article-type unified news-<type>.md + news-translate)Varied schedules (see ยง1)Integrity controls (Medium)
2Test & ReportUnit + integration tests, 5,933+ tests, coverage, performanceOn PR/push to mainQuality assurance (ISO 27001 A.12.1.4)
3CodeQLSAST security scanning (JS/TS + GitHub Actions)On PR/push + weekly SaturdayVulnerability management (ISO 27001 A.12.6)
4E2E TestsEnd-to-end Playwright tests (Chromium) + axe-coreOn PR/push + daily midnight UTCFunctional validation + WCAG 2.1 AA
5ReleaseBuild, attest (SLSA L3), document, publish to npm (provenance)Manual/tag pushSLSA L3, Documentation-as-code, npm provenance
6Dependency ReviewSupply chain security scanningOn PRSupply chain security (NIST CSF ID.SC)
7OpenSSF ScorecardSecurity posture assessmentWeekly Tuesday 07:20 UTCContinuous improvement
8Deploy S3Production deployment to AWS S3 + CloudFront (OIDC, egress: block)Push to mainInfrastructure as Code
9REUSE ComplianceLicense and copyright verification (REUSE 3.3)On PR/push + weekly MondayOpen Source Policy
10SLSA ProvenanceBuild provenance attestation (integrated in release.yml)On release + manualSupply chain security (SLSA L3)
11Compile Agentic WorkflowsCompile .md โ†’ .lock.yml via gh-aw CLI (pinned GH_AW_VERSION: v0.77.3)Manual dispatchAutomation governance
12Agentics MaintenanceHousekeeping for agentic workflows (stale lock cleanup, health probes)ScheduledAutomation governance
13LabelerAutomatic PR labelingOn pull_request_targetWorkflow governance
14Setup LabelsRepository label managementManual dispatchRepository governance
15Copilot Setup StepsGitHub Copilot agent environment setupPush/PR to itself + manualAgent infrastructure
16news-translate-reconcilerReconcile missing translation artifacts across 14 languagesScheduledTranslation consistency
17MCP Reliability ProbeDaily EP/IMF/WB MCP health matrix via npm run mcp:probeDaily + manualThird-party data source assurance

๐Ÿ”’ Security Posture: All 14 standard workflows use SHA-pinned actions (100%), Harden Runner (step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0), and minimal permissions following least privilege principle. Agentic workflows implement the gh-aw 3-layer defense-in-depth trust model: ๐Ÿ”’ Substrate (AWF Squid firewall, Docker isolation, MCP sandboxing), ๐Ÿ“‹ Configuration (lock-file compilation, SHA pinning, actionlint/zizmor/poutine scanners, content sanitization, integrity filtering), and ๐Ÿ“ Plan (SafeOutputs permission isolation, Threat Detection pipeline, Secret Redaction, JSONL audit trail).

๐Ÿ—๏ธ Pipeline Architecture

graph LR
    A[Code Push] --> B[Build & Test]
    B --> C[SCA Scan]
    C --> D[CodeQL Scan]
    D --> E[Quality Gate]
    E --> F[Security Gate]
    F --> G[SBOM Generation]
    G --> H[Attestations]
    H --> I[Release]
    I --> J[Deploy]

    classDef trigger fill:#3498db,stroke:#2980b9,stroke-width:1.5px,color:white
    classDef process fill:#9b59b6,stroke:#8e44ad,stroke-width:1.5px,color:white
    classDef security fill:#e74c3c,stroke:#c0392b,stroke-width:1.5px,color:white
    classDef decision fill:#f39c12,stroke:#e67e22,stroke-width:1.5px,color:black
    classDef success fill:#27ae60,stroke:#1e8449,stroke-width:1.5px,color:white

    class A trigger
    class B process
    class C,D security
    class E,F decision
    class G,H security
    class I,J success

Workflow Relationships

flowchart TB
    subgraph "Continuous Integration"
        direction TB
        PR[Pull Request] --> CodeQLScan[CodeQL Analysis]
        PR --> DependencyReview[Dependency Review]
        PR --> Labeler[PR Labeler]
        PR --> REUSECheck[REUSE Compliance]
        CodeQLScan --> SecurityEvents[Security Events]
    end

    subgraph "Agentic Content Pipeline"
        direction TB
        Schedule1[Scheduled / Manual Triggers] --> AgenticNews[15 Agentic News Workflows]
        AgenticNews --> Analysis[Political Intelligence Analysis]
        Analysis --> Articles[14-Language Article Generation]
        Articles --> ContentPR[Content Pull Request]
    end

    subgraph "Continuous Deployment"
        direction TB
        Release[Release Trigger] --> BuildTest[Prepare & Test]
        BuildTest --> BuildPackage[Build & Package]
        BuildPackage --> GenerateSBOM[Generate SBOM]
        GenerateSBOM --> Attestations[Create Attestations]
        Attestations --> CreateRelease[Create GitHub Release]
    end

    subgraph "Security Scanning"
        direction TB
        Weekly[Weekly Schedule] --> WeeklyScan[CodeQL Weekly Scan]
        BranchProtection[Branch Protection] --> Scorecard[Scorecard Analysis]
    end

    PR -.-> |"approved & merged"| main[Main Branch]
    ContentPR -.-> |"reviewed & merged"| main
    main --> Scorecard
    main --> DeployS3[Deploy to S3 + CloudFront]
    main -.-> |"tag created"| Release

    classDef trigger fill:#3498db,stroke:#2980b9,stroke-width:1.5px,color:white
    classDef process fill:#9b59b6,stroke:#8e44ad,stroke-width:1.5px,color:white
    classDef success fill:#27ae60,stroke:#1e8449,stroke-width:1.5px,color:white
    classDef decision fill:#f39c12,stroke:#e67e22,stroke-width:1.5px,color:black
    classDef security fill:#e74c3c,stroke:#c0392b,stroke-width:1.5px,color:white

    class PR,CodeQLScan,DependencyReview,Labeler,REUSECheck trigger
    class Release,BuildTest,BuildPackage,GenerateSBOM,Attestations,CreateRelease process
    class main,DeployS3 success
    class Schedule1,AgenticNews,Analysis,Articles,ContentPR decision
    class SecurityEvents,Weekly,WeeklyScan,BranchProtection,Scorecard security

๐Ÿš€ Workflow Detailed Documentation

1. Agentic News Workflows (ร—15)

๐ŸŽฏ Purpose: AI-powered generation of multi-language news articles about European Parliament activities using GitHub Copilot. The 14 unified news-<type>.md article workflows run on the claude-opus-4.8 model; the news-translate.md translation helper runs on claude-sonnet-4.6. ๐Ÿ“ Architecture: 15 markdown source files (14 unified news-<type>.md covering 14 article types + 1 news-translate.md helper) compiled to 15 .lock.yml files via gh aw compile (GitHub Agentic Workflows CLI) ๐ŸŒ Languages: 14 (en, sv, da, no, fi, de, fr, es, nl, ar, he, ja, ko, zh) ๐Ÿ“œ Horizon registry: Every horizon's data window, cadence, mandatory artifacts, stage budgets, scenario depth and electoral overlay is defined in src/config/article-horizons.ts โ€” the single source of truth consumed by the aggregator, the forward-statements registry, and the drift-guard tests.

Agentic Workflow Schedule Matrix

๐Ÿค– Workflow๐Ÿ“„ File๐Ÿ“… Scheduleโฑ๏ธ Timeout
๐Ÿšจ EU Parliament Breaking Newsnews-breaking.lock.ymlEvery 6 hours (0 */6 * * *)60 min
๐Ÿ”ฎ EU Parliament Week Aheadnews-week-ahead.lock.ymlFriday 07:00 UTC60 min
๐Ÿ“Š EU Parliament Month Aheadnews-month-ahead.lock.yml1st of month 08:00 UTC60 min
๐ŸŒ EU Parliament Quarter Aheadnews-quarter-ahead.lock.yml1st of month 08:00 UTC (0 8 1 * *)60 min
๐Ÿ›ฐ๏ธ EU Parliament Year Aheadnews-year-ahead.lock.ymlQuarterly โ€” 2nd of Jan/Apr/Jul/Oct 08:00 UTC (0 8 2 1,4,7,10 *)60 min
๐Ÿ—“๏ธ EU Parliament Term Outlooknews-term-outlook.lock.ymlSemi-annual โ€” 1 Jan & 1 Jul 08:00 UTC (0 8 1 1,7 *)60 min
๐Ÿ—ณ๏ธ EU Parliament Election Cyclenews-election-cycle.lock.ymlAnnual โ€” 1 Dec 08:00 UTC (0 8 1 12 *) + T-180 / T-90 / T-30 imminent triggers60 min
๐Ÿ“‹ EU Parliament Week in Reviewnews-week-in-review.lock.ymlSaturday 09:00 UTC60 min
๐Ÿ“ˆ EU Parliament Month in Reviewnews-month-in-review.lock.yml28th of month 10:00 UTC60 min
๐Ÿ“š EU Parliament Quarter in Reviewnews-quarter-in-review.lock.yml5th of month 08:00 UTC (0 8 5 * *)60 min
๐Ÿ“œ EU Parliament Year in Reviewnews-year-in-review.lock.ymlAnnual โ€” 15 Jan 08:00 UTC (0 8 15 1 *)60 min
๐Ÿ—ณ๏ธ EU Parliament Plenary Votes & Resolutionsnews-motions.lock.ymlWeekdays (Monโ€“Fri) 06:00 UTC60 min
โš–๏ธ EU Parliament Legislative Proceduresnews-propositions.lock.ymlWeekdays (Monโ€“Fri) 05:00 UTC60 min
๐Ÿ›๏ธ EU Parliament Committee Activitynews-committee-reports.lock.ymlWeekdays (Monโ€“Fri) 04:00 UTC60 min
๐ŸŒ Translate Articlesnews-translate.lock.ymlManual dispatch only (workflow_dispatch)60 min

Each news-<type>.md workflow runs Stages A โ†’ B โ†’ C โ†’ D โ†’ E in one 60-minute session and produces exactly one PR containing both analysis artifacts and rendered article HTML. The earlier split-pair news-<type>-analysis.md + news-<type>-article.md layout and the manual news-article-generator.md helper were deleted in the April-2026 aggregator-pipeline migration. The news-translate.md helper (manual dispatch only) is the sole exemption from the single-PR rule.

Long-horizon family classification

FamilySlugsStage budgets (A/B/C/D/E)Stage-C exitPR-call deadlineElectoral overlay
Standard short-formbreaking, week-ahead, month-ahead, week-in-review, month-in-review, committee-reports, motions, propositions5/22/4/2/2 = 35 (prospective) ยท 4/22/4/2/2 = 34 (retrospective)minute 36โ‰ค 45โ€”
Long-horizon prospectivequarter-ahead, year-ahead5/24โ€“25/4/2/2minute 38โ€“39โ‰ค 45โ€”
Long-horizon retrospectivequarter-in-review, year-in-review4โ€“5/24โ€“25/4/2/2minute 38โ€“39โ‰ค 45โ€”
Electoral overlayterm-outlook, election-cycle5/26โ€“28/4/2/2 = up to 41minute 42โ‰ค 47โœ…

Electoral-overlay invariants (enforced by Stage-C completeness gate when electoralOverlay: true in the registry):

  1. The mandatory artifact set includes forward-projection.md, term-arc.md, seat-projection.md, mandate-fulfilment-scorecard.md, presidency-trio-context.md, commission-wp-alignment.md, forward-indicators.md, comparative-international.md, and historical-parallels.md.
  2. The scenario-forecast must include an EP-election outcome branch.
  3. forwardStatementsHorizonDays is bounded at 1500 (term-outlook) / 1825 (election-cycle) โ€” the registry caps it at 1825.
  4. dataWindow.anchor is next-election (constant June 2029 today), giving deterministic windowing across runs.

Fallback behaviour: every horizon inherits the standard fallback chain โ€” empty today MCP feed โ†’ fall back to the wider sliding window declared in the registry; failed get_voting_records for retrospective runs โ†’ EP Open Data Portal direct fetch (see scripts/mcp-setup.sh and src/mcp/ep-mcp-client.ts). A failed long-horizon run does not fall back to a shorter horizon โ€” Stage-C blocks the PR and the workflow exits non-zero.

Agentic Workflow Architecture

All 15 agentic workflows share a common architecture. The 14 article workflows render the committed analysis run into all 14 language-aware HTML variants in Stage D; news-translate.md is a manual helper for refreshing translated Markdown sources when needed:

graph TD
    A[๐Ÿ• Schedule / Manual Trigger] --> B[๐Ÿ”‘ Activation Job]
    B --> C{Conditions Met?}
    C -->|โœ… Yes| D[๐Ÿค– Agent Job<br/>GitHub Copilot + claude-opus-4.8<br/>translate: claude-sonnet-4.6]
    C -->|โŒ No| E[โญ๏ธ Skip]
    D --> F[๐Ÿ“ฅ Checkout Repository]
    F --> G[โš™๏ธ Setup Node.js 26]
    G --> H[๐Ÿ“ฆ Install Dependencies]
    H --> I[๐Ÿ”— Install EP MCP Server v1.4.0+]
    I --> J1[๐Ÿ”ฌ Analysis Stage<br/>Political Intelligence Pipeline<br/>--analysis flag]
    J1 --> J1a[๐Ÿ“Š Classification: significance, impact-matrix, actors, forces]
    J1 --> J1b[๐Ÿ›ก๏ธ Threat Assessment: Political Threat Landscape,<br/>actor-threats, disruption]
    J1 --> J1c[๐Ÿ“ˆ Risk Scoring: risk-matrix, SWOT, velocity, capital-at-risk]
    J1a --> J1d["๐Ÿ“ analysis/daily/YYYY-MM-DD/article-type/"]
    J1b --> J1d
    J1c --> J1d
    J1d --> J[๐Ÿ“ฐ Generate News Articles<br/>npx tsx src/generators/news-enhanced.ts --analysis]
    J --> K[๐Ÿ‡ฌ๐Ÿ‡ง English HTML Output]
    K --> L[๐Ÿ“ Create Pull Request<br/>Includes analysis/ artifacts]
    L --> M[โœ… PR Ready for Review]
    L -.-> N[๐ŸŒ news-translate Workflow<br/>Generates 13 Additional Languages]

    classDef trigger fill:#3498db,stroke:#2980b9,stroke-width:2px,color:white
    classDef process fill:#9b59b6,stroke:#8e44ad,stroke-width:1.5px,color:white
    classDef decision fill:#f39c12,stroke:#e67e22,stroke-width:2px,color:black
    classDef skip fill:#95a5a6,stroke:#7f8c8d,stroke-width:1.5px,color:white
    classDef analysis fill:#e74c3c,stroke:#c0392b,stroke-width:1.5px,color:white
    classDef output fill:#27ae60,stroke:#1e8449,stroke-width:1.5px,color:white

    class A,B trigger
    class D,F,G,H,I process
    class C decision
    class E skip
    class J1,J1a,J1b,J1c,J1d analysis
    class J,K,L,M,N output

Bounded Context Architecture (TypeScript Modules)

The workflow support logic is organized into bounded contexts under src/workflows/:

src/workflows/
โ”œโ”€โ”€ index.ts                    # Barrel export โ€” public API
โ”œโ”€โ”€ types.ts                    # Shared contracts: DataMode, GateVerdict, PipelineStage
โ”œโ”€โ”€ completeness-gate/          # Stage C analysis validation
โ”‚   โ”œโ”€โ”€ index.ts                # Public API
โ”‚   โ”œโ”€โ”€ types.ts                # ValidationRules, ValidatorOptions, ValidationContext
โ”‚   โ”œโ”€โ”€ constants.ts            # Regex patterns, thresholds (extracted from validator JS)
โ”‚   โ””โ”€โ”€ validators.ts           # Pure validation functions (hasMermaid, hasWepBand, etc.)
โ”œโ”€โ”€ infrastructure/             # Shell safety validation rules and utilities
โ”‚   โ”œโ”€โ”€ index.ts                # Public API
โ”‚   โ””โ”€โ”€ shell-safety.ts         # SHELL_SAFETY_RULES[], validateShellSafety()
โ””โ”€โ”€ safe-outputs/               # Stage E PR creation constraints
    โ”œโ”€โ”€ index.ts                # Public API
    โ””โ”€โ”€ types.ts                # SafeOutputsPRParams, FORBIDDEN_PHRASES, timing constraints

Design principles:

  • Single responsibility per module โ€” each file has one clear purpose
  • Strict TypeScript typing โ€” all interfaces use readonly fields
  • Pure functions โ€” validators are side-effect-free and independently testable
  • Constants extracted โ€” regex patterns defined once, used by both validator scripts and tests
  • Barrel exports โ€” each bounded context has an index.ts for clean imports

Import pattern:

import { completenessGate, infrastructure, safeOutputs } from './workflows/index.js';
// or selectively:
import { hasPlaceholders, computeEffectiveMinLines } from './workflows/completeness-gate/index.js';

Common Agentic Workflow Properties

PropertyValue
Source formatMarkdown (.md) compiled by gh aw compile
Lock formatYAML (.lock.yml) โ€” auto-generated, do not edit directly
AI Modelclaude-opus-4.8 (14 article workflows) / claude-sonnet-4.6 (news-translate.md) via GitHub Copilot CLI
Top-level permissions{} (empty โ€” no default permissions)
Activation job permissionscontents: read
Agent job permissionscontents: write, pull-requests: write, issues: write, models: read
Concurrency groupgh-aw-${{ github.workflow }}
Node.js version26
EP MCP Servereuropean-parliament-mcp-server@1.4.0 (globally installed via scripts/mcp-setup.sh, MCP gateway EP_MCP_GATEWAY_URL resolved dynamically from MCP config; default http://host.docker.internal:8080/mcp/european-parliament)
Data sourcesEuropean Parliament MCP Server v1.4.0+ (primary, 60+ tools โ€” sliding + fixed-window feeds + analytical), IMF REST SDMX 3.0 (native fetch in src/mcp/imf-mcp-client.ts, primary economic source โ€” WEO+FM+IFS+BOP+ER+PCPS+GFSR+EREO+FSI+GFS+DOT), World Bank Open Data MCP (non-economic only โ€” WDI social/health/education/environment/governance). Economic-context enforcement is editorial at the Stage-C completeness review against .github/prompts/03-analysis-completeness-gate.md and the per-artifact line floors in analysis/methodologies/reference-quality-thresholds.json โ€” the runtime articlePolicyHas* gates were purged in April-2026
Analysis stageStage B writes structured Markdown artifacts under the run directory using the 10-step AI-driven analysis protocol
Analysis outputanalysis/daily/{date}/{article-type}/ (or suffixed same-day variants) containing manifest.json, raw data, Stage-B artifacts, article.md, and article-meta.json. Article-type scoping prevents merge conflicts between concurrent workflows.

5-Stage Pipeline (matches the prompt library 00โ†’09)

Every article-generating news-*.md (all except news-translate.md) executes the same five bounded stages. This is the canonical flow; it aligns 1-to-1 with the ten-file prompt library in .github/prompts/:

StageNamePrompt file(s)Output location
AData collection01-data-collection.md + 07-mcp-reference.mdanalysis/daily/<YYYY-MM-DD>/<type>-run<NN>/intelligence/*
BAnalysis (2-pass mandatory)02-analysis-protocol.md โ†’ analysis/methodologies/ai-driven-analysis-guide.md (10 steps, Rules 1โ€“22)classification / threat / risk / synthesis artifacts under the same run dir
CCompleteness gate03-analysis-completeness-gate.md โ†’ npm run validate-analysis vs analysis/methodologies/reference-quality-thresholds.jsonblocks PR if any floor is missed
DDeterministic article render04-article-generation.md + 05-analysis-to-article-contract.md; no AI-authored HTMLanalysis/daily/<date>/<type>/article.md, article-meta.json, news/<slug>.en.md, and 14 news/<slug>-<lang>.html files
ESingle PR06-pr-and-safe-outputs.md โ†’ one safeoutputs___create_pull_request call at end of runGitHub PR (max 1 per run; news-translate.md is the sole exemption โ€” multi-call flush for 14-language fan-out)

Stage D's Read-Before-Write rule requires the agent to consult every artifact produced in Stage B before drafting prose; the artifact โ†’ article-section map lives in 04-article-generation.md ยง 7.1. The 39-template artifact catalogue (14 agentic-workflow templates โ€” which include 6 reusable framework templates โ€” plus 25 per-artifact templates, and the analysis-index.md + README.md catalogue files) is enumerated in analysis/templates/README.md and mapped to methodologies in analysis/methodologies/artifact-catalog.md.

Imports structure (shared component + runtime-import + lock-file)

Each news-*.md (except news-translate.md) uses gh-aw's imports: field twice:

imports:
  - shared/mcp/news-mcp-servers.md        # frontmatter-only: MCP servers merged into frontmatter
  - ../agents/news-generation.agent.md    # body-only: Required Reading + Stage Contract appended to prompt
  • shared/mcp/news-mcp-servers.md is the single source of truth for the mcp-servers: block (EP, World Bank, IMF, MCP Gateway mounts). Editing it propagates to every importing workflow on next compile.
  • .github/agents/news-generation.agent.md contributes body-only content (confirmed against gh-aw v0.77.3, 2026-05-28: imported agent frontmatter is not merged into workflow frontmatter). It appends the canonical Required Reading order and the 5-stage Stage Contract to every importing prompt.
  • Both files are tracked; any change triggers a recompile of every importing .lock.yml by compile-agentic-workflows.yml.

safeoutputs semantics (gh-aw v0.77.3)

Every news-*.md declares:

safe-outputs:
  create-pull-request:
    max: 1                # default for every news-*.md

Documented exceptions:

  • news-translate.md uses excluded-files: and a multi-call flush pattern with max-patch-size; it is exempt from the single-PR rule and is the only workflow that calls safeoutputs___create_pull_request more than once.

Critical semantic: safeoutputs___create_pull_request takes a synchronous git format-patch snapshot AT CALL TIME of the agent's working tree. Calling it before all files are written produces a partial PR. It must therefore be invoked exactly once at the very end of the run, after every article, analysis artifact, and manifest has been written to disk. The banned alternatives โ€” checkpoint PRs, keep-alive heartbeats, progressive safe outputs, and safeoutputs___push_repo_memory โ€” are CI-lint-enforced by scripts/lint-prompts.js / npm run lint:prompts. See .github/prompts/README.md ยง Drift-guard Lint for the full rule set.

Compilation Process

Source markdown files are compiled to lock files using the GitHub Agentic Workflows CLI:

# Compile all agentic workflow definitions
gh aw compile

The compile-agentic-workflows.yml workflow automates this process (see ยง11).

๐Ÿ”’ Security Controls (gh-aw Architecture)

See ยง1b "gh-aw Security Architecture" below for the full 3-layer trust model, SafeOutputs isolation, and Threat Detection pipeline.

ControlImplementationISMS Reference
๐Ÿ” Input ValidationMCP data validated via TypeScript schemas before useISO 27001 A.14.2.1
๐Ÿงน HTML SanitizationStrip scripts, encode entities in generated contentOWASP Top 10 (XSS)
๐Ÿ”’ Empty Top-Level Permissionspermissions: {} โ€” no default permissionsLeast privilege
๐ŸŽฏ Scoped Job PermissionsWrite permissions only on safe-output jobs (not agent)Least privilege
๐Ÿ”„ Concurrency Controlgh-aw-${{ github.workflow }} โ€” single concurrent runResource governance
๐Ÿ“ PR-Based OutputSafeOutputs subsystem buffers writes, threat-detects, then PRsChange review
๐ŸŒ Network IsolationAWF Squid proxy enforces domain allowlist (default-deny)Network Security Policy
๐Ÿ” Compilation Securityactionlint + zizmor + poutine scanners validate .lock.ymlNIST CSF PR.AC-4
๐Ÿ”‘ Secret RedactionUnconditional artifact scan before upload (if: always())Cryptography Policy

ISMS Evidence


Unique Data & Analytics Per Workflow (PRIO 1)

Every workflow downloads unique data and produces article-type-specific analytics. The following matrix shows the mandatory MCP data downloads and analytical tools unique to each workflow:

flowchart LR
    subgraph "๐Ÿ”ด Breaking News"
        B1["adopted_texts_feed\nevents_feed\nprocedures_feed\nmeps_feed"] --> B2["detect_voting_anomalies\nanalyze_coalition_dynamics\nearly_warning_system\ngenerate_political_landscape"]
    end

    subgraph "๐Ÿ“‹ Motions"
        M1["adopted_texts_feed\nquestions_feed\nmeps_feed\nprocedures_feed"] --> M2["detect_voting_anomalies\nanalyze_coalition_dynamics\nget_voting_records\ncompare_political_groups"]
    end

    subgraph "๐Ÿ“œ Propositions"
        P1["procedures_feed\ndocuments_feed\nadopted_texts_feed\nplenary_docs_feed"] --> P2["search_documents\nmonitor_legislative_pipeline\ntrack_legislation\nanalyze_legislative_effectiveness"]
    end

    subgraph "๐Ÿ›๏ธ Committee Reports"
        C1["committee_docs_feed\nplenary_docs_feed\nadopted_texts_feed\nprocedures_feed"] --> C2["get_committee_info\nmonitor_legislative_pipeline\nanalyze_legislative_effectiveness"]
    end

    style B1 fill:#dc3545,stroke:#b02a37,color:#fff
    style B2 fill:#dc3545,stroke:#b02a37,color:#fff
    style M1 fill:#fd7e14,stroke:#ca6510,color:#fff
    style M2 fill:#fd7e14,stroke:#ca6510,color:#fff
    style P1 fill:#ffc107,stroke:#cc9a06,color:#000
    style P2 fill:#ffc107,stroke:#cc9a06,color:#000
    style C1 fill:#198754,stroke:#146c43,color:#fff
    style C2 fill:#198754,stroke:#146c43,color:#fff
WorkflowMandatory Feed DataMandatory Analytical ToolsUnique Focus
Breakingadopted_texts, events, procedures, meps (todayโ†’one-week) + documents, plenary_docs, committee_docs, questionsdetect_voting_anomalies, analyze_coalition_dynamics, early_warning_system, generate_political_landscapeโšก Only TODAY's items; 6-hour cycle
Motionsadopted_texts, parliamentary_questions, meps, proceduresdetect_voting_anomalies, analyze_coalition_dynamics, get_voting_records, compare_political_groups๐Ÿ—ณ๏ธ Per-resolution vote breakdowns
Propositionsprocedures, documents, adopted_texts, plenary_documentssearch_documents, monitor_legislative_pipeline, track_legislation, analyze_legislative_effectiveness๐Ÿ“œ Procedure stage tracking
Committeecommittee_documents, plenary_documents, adopted_texts, proceduresget_committee_info, monitor_legislative_pipeline, analyze_legislative_effectiveness๐Ÿ›๏ธ Per-committee deep analysis
Week Aheadevents, procedures, plenary_documents, plenary_session_documentsget_plenary_sessions (future), get_committee_info, monitor_legislative_pipeline, generate_political_landscape๐Ÿ“… Prospective agenda analysis
Weekly Reviewadopted_texts, procedures, plenary_documents, parliamentary_questionsget_voting_records, detect_voting_anomalies, generate_political_landscape๐Ÿ“Š Retrospective outcome review
Month Aheadevents, procedures, plenary/committee docs, adopted_texts, session docs, mepsget_plenary_sessions, get_committee_info, monitor_pipeline, generate_landscape, compare_groups, analyze_delegation๐Ÿ“† Strategic calendar outlook
Monthly Reviewadopted_texts, procedures, plenary_documents, parliamentary_questionsget_voting_records, detect_anomalies, generate_landscape, compare_groups, analyze_effectiveness๐Ÿ“ˆ Comprehensive monthly trends
Translateโ€” (manual helper)โ€”๐ŸŒ Refresh translated Markdown sources

PRIO 1 MANDATE: Each workflow ALWAYS downloads its mandatory feed data and runs its mandatory analytical tools BEFORE deciding whether to produce an article. Data collection is NEVER skipped, even for noop runs.


1b. Agentic News Workflows (gh-aw)

๐Ÿ“„ Files: .github/workflows/news-*.md (14 content workflows + 1 translation workflow) ๐ŸŽฏ Purpose: AI-powered news article generation using GitHub Agentic Workflows (gh-aw) with European Parliament MCP Server data โฐ Schedule: Various (see table below)

Architecture: Unified Article Render + Manual Translation Helper

The agentic news system uses a deterministic aggregator architecture:

  1. Article workflows (14 workflows) โ†’ Collect data, author Stage-B artifacts, run Stage-C completeness checks, and render all 14 language-aware HTML variants from the committed analysis run.
  2. Translation helper (1 workflow) โ†’ Manual-only workflow for refreshing translated Markdown sources with multi-call safe-output flushes when needed.

This keeps political-intelligence authoring in Markdown artifacts and makes HTML generation reproducible across every language.

graph TD
    A[๐Ÿ“‹ Article Workflows<br/>Stage A-E] -->|Write| B[๐Ÿง  analysis/daily run]
    B -->|Render| C[๐ŸŒ 14 HTML variants]
    C -->|Single safe-output| D[๐Ÿ“ Content PR]
    B -.->|Manual refresh| E[๐ŸŒ news-translate.md]
    E -.->|Translated Markdown sources| C
    D -->|Merge + deploy| F[โ˜๏ธ S3 / CloudFront<br/>Language Switchers + Sitemaps]

    classDef trigger fill:#3498db,stroke:#2980b9,stroke-width:2px,color:white
    classDef process fill:#9b59b6,stroke:#8e44ad,stroke-width:1.5px,color:white
    classDef render fill:#27ae60,stroke:#1e8449,stroke-width:1.5px,color:white
    classDef translation fill:#e67e22,stroke:#d35400,stroke-width:1.5px,color:white

    class A trigger
    class B,D process
    class C,F render
    class E translation

Content Workflow Schedule

WorkflowArticle TypeScheduleFocus
๐Ÿค– Workflow๐Ÿท๏ธ Type๐Ÿ“… Schedule๐ŸŽฏ Purpose
------------
news-committee-reports.mdcommittee-reportsMonโ€“Fri 04:00 UTCCommittee activity analysis
news-propositions.mdpropositionsMonโ€“Fri 05:00 UTCLegislative pipeline tracking
news-motions.mdmotionsMonโ€“Fri 06:00 UTCVoting patterns & resolutions
news-week-ahead.mdweek-aheadFri 07:00 UTCUpcoming parliamentary agenda
news-month-ahead.mdmonth-ahead1st of month 08:00 UTCMonthly strategic outlook
news-week-in-review.mdweek-in-reviewSat 09:00 UTCWeek in review
news-month-in-review.mdmonth-in-review28th of month 10:00 UTCMonthly retrospective
news-breaking.mdbreakingEvery 6 hoursReal-time EP feed events

Each news-<type>.md runs the full Stage Aโ†’E protocol in one ~60-minute session and produces exactly one PR with both analysis artifacts and the rendered article HTML. The earlier split-pair news-<type>-analysis.md + news-<type>-article.md layout and the manual news-article-generator.md helper were deleted in the April-2026 aggregator-pipeline migration (the prior legacy single-job news-<type>.md were briefly replaced by split pairs in 2025 because those exceeded the safeoutputs MCP TTL โ€” the unified workflows intentionally do not set engine.mcp.session-timeout because the bundled MCP gateway rejects the field; the default gateway keepalive is used and the PR call lands by minute โ‰ค 45 of the 60-min timeout-minutes cap).

Translation Workflow

WorkflowSchedulePurpose
news-translate.mdManual (workflow_dispatch) onlyRefresh or complete sv, da, no, fi, de, fr, es, nl, ar, he, ja, ko, zh translated Markdown sources; multi-call safe-output flush is allowed only here

Supported Languages (14 total)

English (en)Swedish (sv)Danish (da)Norwegian (no)Finnish (fi)
German (de)French (fr)Spanish (es)Dutch (nl)Arabic (ar)
Hebrew (he)Japanese (ja)Korean (ko)Chinese (zh)
๐ŸŒ Always-14-Languages-Always-HTML Contract (May 2026)

Every article.md produced by an agentic workflow always renders to 14 language-aware HTML files โ€” there is no opt-out, no subset, and no markdown-only escape hatch.

PropertyBefore May 2026After May 2026
npm run generate-article -- --lang en --lang svRendered selected languages onlyRejected โ€” flag removed; CLI always renders all 14
npm run generate-article -- --markdown-onlySkipped HTML emissionRejected โ€” flag removed; HTML is always emitted
news-translate.md languages: workflow_dispatch input (all-non-en / eu-core / nordic / comma-separated)Configurable subsetRemoved โ€” every run translates to all 13 non-English languages
Article workflows (news-<type>.md) Stage DCould be configured to render fewer languages via --langAlways render all 14 languages from the committed analysis run

Why: per-language partial coverage created a long tail of articles where <slug>-en.html existed but <slug>-zh.html did not, and silent CLI subset selection let workflows drift from the committed product contract. Hard-wiring "always 14" at the CLI boundary makes coverage a property of every run rather than a property of every invocation choice. The aggregator's idempotent skip-write logic (mtime โ‰ฅ source artefacts) keeps re-renders cheap when only a subset of languages were actually missing.

Programmatic escape hatch: generateArticle() (called from unit / integration tests for speed) still accepts langs and markdownOnly directly on the options object โ€” only the CLI surface area (and therefore every workflow) is locked down.

๐Ÿ”’ gh-aw Security Architecture (3-Layer Trust Model)

Reference: GitHub Agentic Workflows Architecture โ€” official specification for AW security layers, trust boundaries, and component isolation.

All 15 agentic workflows inherit the gh-aw 3-layer defense-in-depth trust model. Each layer provides independent security guarantees โ€” compromise of any single layer does NOT compromise the system:

LayerBoundaryEU Parliament Monitor ImplementationThreat Assumption
๐Ÿ”’ SubstrateVM โ†’ kernel โ†’ container โ†’ networkAWF Squid proxy (network.allowed 30+ entries across GitHub/infra, EU, IMF, World Bank, Hack23 domains), Docker --cap-drop=ALL, MCP server sandboxing, iptables default-denyAdversary controls user-level containers
๐Ÿ“‹ ConfigurationDeclarative specs + toolchainLock-file compilation (gh aw compile v0.77.3), SHA-pinned actions, actionlint/zizmor/poutine scanners, content sanitization, integrity filteringMisconfiguration, overly permissive specs
๐Ÿ“ PlanStaged execution + output vettingSafeOutputs (read-only agent โ†’ buffered โ†’ vetted PR), Threat Detection pipeline, Secret Redaction (if: always()), JSONL audit trailIncorrect plan, stage bypass attempts
flowchart LR
    subgraph L1["๐Ÿ”’ Substrate (Layer 1)"]
        AWF["๐ŸŒ AWF Firewall<br/>Squid Proxy<br/>Default-Deny Egress"]
        DOCKER["๐Ÿณ Container Isolation<br/>cap-drop=ALL<br/>Resource Limits"]
        MCP_S["๐Ÿ“ฆ MCP Sandboxing<br/>Per-Server Container<br/>Tool Allowlists"]
    end

    subgraph L2["๐Ÿ“‹ Configuration (Layer 2)"]
        COMPILE["๐Ÿ” Lock-File Compilation<br/>Schema + SHA Pin"]
        SCANNERS["๐Ÿ” Security Scanners<br/>actionlint + zizmor + poutine"]
        SANITIZE["๐Ÿงน Content Sanitization<br/>@mention + URI + Unicode"]
        INTEGRITY["๐Ÿ›ก๏ธ Integrity Filtering<br/>Author Trust Levels"]
    end

    subgraph L3["๐Ÿ“ Plan (Layer 3)"]
        SAFE["โœ… SafeOutputs<br/>Read-Only Agent<br/>Buffered Writes"]
        THREAT["๐Ÿง  Threat Detection<br/>AI + Custom Analysis"]
        REDACT["๐Ÿ”‘ Secret Redaction<br/>Unconditional Scan"]
        AUDIT["๐Ÿ“‹ JSONL Audit Trail<br/>90-Day Retention"]
    end

    L1 --> L2 --> L3

    style AWF fill:#ffe1e1,stroke:#c0392b
    style DOCKER fill:#ffe1e1,stroke:#c0392b
    style MCP_S fill:#ffe1e1,stroke:#c0392b
    style COMPILE fill:#e1f5ff,stroke:#2980b9
    style SCANNERS fill:#e1f5ff,stroke:#2980b9
    style SANITIZE fill:#e1f5ff,stroke:#2980b9
    style INTEGRITY fill:#e1f5ff,stroke:#2980b9
    style SAFE fill:#e8f5e9,stroke:#1e8449
    style THREAT fill:#e8f5e9,stroke:#1e8449
    style REDACT fill:#e8f5e9,stroke:#1e8449
    style AUDIT fill:#e8f5e9,stroke:#1e8449
๐ŸŒ AWF Network Firewall (Substrate Layer)
Endpoint GroupPurposeAccess Pattern
GitHub + base runtime (defaults, github, node, docker.io)Workflow orchestration, actions, dependency/runtime accessHTTPS
EU data domains (*.europa.eu, ec.europa.eu, eur-lex.europa.eu, data.ecb.europa.eu, etc.)EP/institutional legislative and policy dataHTTPS
IMF domains (*.imf.org, including api.imf.org)IMF SDMX 3.0 and IMF data servicesHTTPS (API key where required)
World Bank domains (*.worldbank.org)World Bank MCP and economic context datasetsHTTPS
Hack23/platform domains (*.hack23.com, *.euparliamentmonitor.com, related project domains)Project-controlled APIs and platform integrationsHTTPS
host.docker.internal:8080MCP Gateway (Docker bridge, local-only)HTTP (local bridge)
Authoritative sourceFull allowlist maintained in .github/workflows/shared/config/news-common-settings.mdVersion-controlled
โŒ All non-allowlisted domainsBlocked by AWF default-deny policyiptables DROP
๐Ÿ›ก๏ธ SafeOutputs Permission Isolation (Plan Layer)
Agent Job (read-only) โ†’ Buffered Artifacts โ†’ Threat Detection (separate job) โ†’ Safe Output Jobs (write)
  • Agent never has direct contents: write at runtime โ€” writes are buffered as artifacts
  • Separate Threat Detection job downloads artifacts and performs AI + custom security analysis
  • Only on "safe" verdict do Safe Output Jobs execute with scoped write permissions
  • Single PR per workflow run enforced by safe-outputs: create-pull-request: max: 1
๐Ÿงน Content Sanitization (Configuration Layer)
MechanismProtection
๐Ÿท๏ธ @mention โ†’ `@mention`Prevents unintended GitHub notifications
๐Ÿค– fixes #123 โ†’ `fixes #123`Prevents automatic issue linking/closure
๐Ÿ”’ <script> โ†’ (script)Blocks XML/HTML injection vectors
๐ŸŒ http://evil.com โ†’ (redacted)URI filtering (HTTPS + trusted domains only)
๐Ÿ“ 0.5 MB / 65k lines maxTruncation prevents resource exhaustion
๐Ÿ”ค Homoglyph normalizationPrevents visual spoofing attacks
๐Ÿ“Š Security Controls Summary
ControlImplementationISMS Reference
๐ŸŒ Network IsolationAWF Squid proxy with network.allowed 30+ domain entries (see news-common-settings.md), iptables default-denyNetwork Security Policy
๐Ÿณ Container IsolationDocker --cap-drop=ALL, resource limits, read-only FSISO 27001 A.8.31
๐Ÿ“ฆ MCP SandboxingPer-server Docker containers, tool allowlistingSecure Development Policy
๐Ÿ” Compilation SecuritySchema validation, expression safety, SHA pinningISO 27001 A.8.25
๐Ÿ” Security Scannersactionlint + zizmor + poutine at compile timeNIST CSF PR.AC-4
๐Ÿงน Input Sanitization@mention neutralization, URI filtering, content limitsOWASP Top 10 (XSS/Injection)
๐Ÿ›ก๏ธ Integrity FilteringAuthor trust levels (min-integrity: approved)Data integrity
โœ… SafeOutputsPermission separation โ€” read-only agent, buffered writesLeast privilege
๐Ÿง  Threat DetectionAI-powered analysis of agent outputs before writeISO 27001 A.12.6
๐Ÿ”‘ Secret RedactionUnconditional artifact scan (if: always())Cryptography Policy
๐Ÿ“‹ Audit TrailJSONL logging, 90-day retention, gh aw logs/auditISO 27001 A.12.4
๐Ÿ‘๏ธ Human ReviewMandatory PR approval before mergeChange management
๐Ÿ”„ Concurrencygh-aw-${{ github.workflow }} prevents parallel conflictsResource governance

Enhanced Analysis Features (v2)

The following 14 unified article-generation workflows include mandatory analytical enhancements: news-breaking.md, news-week-ahead.md, news-month-ahead.md, news-quarter-ahead.md, news-year-ahead.md, news-term-outlook.md, news-election-cycle.md, news-week-in-review.md, news-month-in-review.md, news-quarter-in-review.md, news-year-in-review.md, news-committee-reports.md, news-propositions.md, news-motions.md. The news-translate.md workflow has complementary analysis-fidelity requirements for preserving these elements in translation.

๐ŸŽญ Multi-Stakeholder Perspective Requirements

Every major parliamentary action must be analyzed from at least 3 of 6 stakeholder perspectives:

PerspectiveAnalysis Focus
EP Political GroupsCoalition dynamics, group influence, voting alliances
Civil Society & NGOsCitizens' rights, democratic participation, transparency
Industry & BusinessRegulatory burden, market effects, compliance dynamics
National GovernmentsSubsidiarity, implementation requirements, national interests
EU CitizensDirect life impact, rights, services, democratic representation
EU InstitutionsCommission, Council, ECB, Court of Justice โ€” inter-institutional dynamics

Stakeholder perspective analysis is rendered by the TypeScript generator (buildStakeholderPerspectivesSection) as a card grid in each article's deep-analysis portion. Agents provide structured perspective content โ€” impact direction (positive/negative/neutral/mixed), severity (high/medium/low), reasoning, and evidence backed by specific EP MCP data citations โ€” and the generator handles the HTML markup (analysis-stakeholder-perspectives / stakeholder-perspectives-grid). Agents must NOT write raw HTML for this section. Impact and severity values must remain as canonical English enum tokens (e.g. positive, high) even in non-English articles โ€” the generator handles localized display labels and CSS classing from these tokens. (Note: the separate winners/losers outcomes list uses analysis-stakeholders / stakeholder-list โ€” that is a different section rendered by buildStakeholderSection.)

๐Ÿ”„ Iterative AI Content Refinement Cycle

All analytical content sections follow a mandatory 4-pass refinement process:

PassActivityOutput
Pass 1 โ€” Initial AssessmentGather MCP baseline data; identify actors, actions, outcomesDraft narrative
Pass 2 โ€” Stakeholder ChallengeRe-examine from each stakeholder angle; flag blind spotsRevised draft with gaps identified
Pass 3 โ€” Evidence Cross-ValidationVerify claims against EP documents/votes; add ๐ŸŸข/๐ŸŸก/๐Ÿ”ด confidence indicatorsEvidenced assertions only
Pass 4 โ€” Synthesis & ScenariosProduce balanced conclusions; provide 2โ€“3 forward-looking scenarios with probability labelsFinal publishable analysis

Localization requirement: All text labels โ€” confidence (๐ŸŸข High / ๐ŸŸก Medium / ๐Ÿ”ด Low), probability (likely / possible / unlikely), and significance (High / Medium / Low) โ€” must be rendered in the article's output language while preserving the underlying 3-level scale and keeping emoji markers (๐ŸŸข/๐ŸŸก/๐Ÿ”ด, โ†‘โ†“โ†’) unchanged. Non-English articles must use the equivalent terms in the target language, not English labels.

โœ… Enhanced Analysis Quality Gates

In addition to the existing content quality gates (500-word minimum, no synthetic IDs, current dates), all articles must pass two new quality gate categories:

Analysis Depth Gates:

  • Minimum 3 stakeholder perspectives analyzed per key development
  • SWOT dimensions cover both political AND economic/regulatory aspects
  • Dashboard trend indicators included (โ†‘โ†“โ†’), not just current values
  • Cross-domain policy links shown (e.g., environment โ†” trade โ†” social)
  • Evidence chains cite specific document IDs, vote counts, or MCP data points
  • Outlook provides at least 2 named scenarios with probability labels

Political Intelligence Gates:

  • Coalition dynamics named explicitly (not just "EPP and S&D voted together")
  • Each group's position explained with reasoning (incentives, ideology, constituency)
  • Winner/loser analysis identified with supporting evidence
  • Historical EP context referenced where comparable precedents exist
๐Ÿ“„ EP Document Analysis Framework

Every key EP document featured in the deep-analysis section must include structured analysis (other document references may remain as citations without full framework analysis):

  1. Political Context โ€” Why introduced? Who pushed it? What problem does it solve?
  2. Stakeholder Impact โ€” Who benefits/faces costs? Quantified where possible.
  3. Procedure Stage โ€” Where in the legislative pipeline? Next steps and timeline.
  4. Coalition Dynamics โ€” Which groups support/oppose? Key fault lines.
  5. Significance Rating โ€” High / Medium / Low with one-sentence justification. (Note: significance ratings use text labels, not color indicators, to avoid confusion with the ๐ŸŸข/๐ŸŸก/๐Ÿ”ด confidence scale used in the refinement cycle.)
๐Ÿ”ฌ Workflow-Specific Intelligence Modules

Each scheduled content workflow includes a tailored intelligence module beyond the shared framework:

WorkflowModuleFocus
news-week-ahead.md๐Ÿ”ญ Strategic Preview AnalysisWhat to watch, coalitions under stress, legislative inflection points, geopolitical triggers
news-month-ahead.md๐Ÿ“ˆ Long-Term Trend ContextTerm trajectory, policy momentum, coalition evolution, EU external context
news-quarter-ahead.md๐Ÿงญ Quarterly OutlookCoalition stability projection, policy momentum, blocking coalitions
news-year-ahead.md๐Ÿ”ฎ Annual Forward ProjectionMulti-quarter trajectory, electoral pressure, partisan/coalition shifts
news-term-outlook.md๐Ÿ›๏ธ Term-Length Strategic OutlookMulti-year coalition viability, mandate-fulfillment trajectory
news-election-cycle.md๐Ÿ—ณ๏ธ Electoral-Cycle IntelligenceCycle-position drivers, group-volatility forecast
news-breaking.mdโšก Rapid Stakeholder Impact AssessmentImmediate winners/losers, market/policy signals, next 24โ€“48 hour tracking
news-committee-reports.md๐Ÿ›๏ธ Committee Power Dynamics AnalysisRapporteur influence, shadow rapporteur positions, amendment landscape, trilogue implications
news-propositions.md๐Ÿ—“๏ธ Legislative Pipeline IntelligencePassage probability, amendment expectations, timeline forecast, blocking coalitions
news-motions.md๐Ÿ—ณ๏ธ Voting Pattern IntelligenceCoalition map, abstention analysis, cross-party defections, margin analysis
news-week-in-review.md๐Ÿ“Š Week-in-Context AnalysisParliamentary landscape shift, promises vs. delivery, surprise developments
news-month-in-review.md๐Ÿ—บ๏ธ Monthly Trend SynthesisLegislative productivity, coalition stability index, policy trajectory, emerging themes
news-quarter-in-review.md๐Ÿ“š Quarterly RetrospectiveCoalition stability index, productivity benchmarks
news-year-in-review.md๐Ÿ“† Annual RetrospectiveYear-long trend confirmation, accountability ledger

The translation workflow has its own fidelity module:

WorkflowModuleFocus
news-translate.md๐ŸŒ Analysis Fidelity RequirementsStakeholder framing preservation, confidence indicator translation, EP official terminology

๐Ÿ“„ File: .github/workflows/test-and-report.yml
๐ŸŽฏ Purpose: Comprehensive testing with unit tests, integration tests, coverage reporting, and performance benchmarks
โฐ Trigger: On push to main, on PR to main
๐Ÿ“Š Status: Test and Report

Test Coverage

Test TypeFrameworkCoverage TargetCurrent Status
Unit TestsVitest 4.1.7 (happy-dom)153 test filesโœ… 5,933+ passing
Integration TestsVitest + MCP contract suites (test/integration/mcp-integration.test.js, test/integration/mcp/imf-mcp.test.js, test/integration/mcp/worldbank-mcp.test.js)IMF/WB canonical tool lists asserted via drift-guard tests; EP MCP covered by mcp-integration.test.js (no canonical EP_MCP_TOOLS export yet)โœ… All passing
Line CoverageVitest (V8)โ‰ฅ80%โœ… 82%+
Branch CoverageVitest (V8)โ‰ฅ75%โœ… 83%+
Function CoverageVitest (V8)โ‰ฅ80%โœ… 89%+
E2EPlaywright 1.60.0 + @axe-core/playwright 4.11.3WCAG 2.1 AAโœ… Passing

Workflow Jobs (6 Jobs)

graph LR
    A[Prepare] --> B[Validation]
    A --> C[Functional Tests]
    A --> D[Performance]
    A --> E[Security Check]
    B --> F[Report]
    C --> F
    D --> F
    E --> F

    classDef prepare fill:#3498db,stroke:#2980b9,stroke-width:2px,color:white
    classDef test fill:#27ae60,stroke:#1e8449,stroke-width:1.5px,color:white
    classDef security fill:#e74c3c,stroke:#c0392b,stroke-width:1.5px,color:white
    classDef perf fill:#f39c12,stroke:#e67e22,stroke-width:1.5px,color:black
    classDef report fill:#9b59b6,stroke:#8e44ad,stroke-width:1.5px,color:white

    class A prepare
    class B,C test
    class D perf
    class E security
    class F report
JobNamePurposeKey Steps
preparePrepare EnvironmentCache dependencies, setup Node.js 26Checkout, npm ci, cache
validationValidate CodeESLint, Prettier, HTMLHint, npm auditLint, format check, HTML validation
functional-testsFunctional TestsVitest unit + integration testsRun tests, coverage report
performancePerformance TestingLighthouse CI + article generation benchmarks@lhci/cli@0.15.1, performance metrics
security-checkSecurity Checknpm audit analysisVulnerability triage, CodeQL integration
reportGenerate ReportAggregate results, PR commentsCoverage summary, status checks

Security Controls

ControlImplementationISMS Reference
Code QualityESLint + PrettierCode quality standards
Vulnerability Scanningnpm auditISO 27001 A.12.6.1
Coverage Thresholds80%+ lines, 75%+ branchesQuality gates
Performance BenchmarksLighthouse CI scoringPerformance validation
False Positive HandlingIntelligent npm audit triageRisk acceptance process

ISMS Evidence


2b. Knip โ€” Unused Code Detection

๐Ÿ“„ File: .github/workflows/knip.yml
๐ŸŽฏ Purpose: Detect unused files, exports, dependencies, and types across src/** and the hand-written scripts in scripts/** so the codebase stays lean ahead of releases.
โฐ Trigger: On push to main, on PR to main
๐Ÿ“Š Mode: โš ๏ธ Warning-only (continue-on-error: true) until the baseline stabilises across two consecutive PR cycles, then flipped to blocking.

What Knip Scans

SurfaceCoverage
Source filessrc/**/*.ts (the authoritative TypeScript tree)
Hand-written JSAll scripts/**/*.js files referenced from package.json scripts are auto-discovered (e.g. scripts/copy-vendor.js, scripts/lint-prompts.js, scripts/validate-analysis-completeness.js); files only invoked from agentic-workflow .md bodies (e.g. scripts/backport-article-seo.js, scripts/aggregator/forward-statements-registry.js) are listed explicitly in knip.json entry
Test fixturestest/**/*.test.js, e2e/**/*.spec.js
Compiled scripts/**Excluded from project (it is a 1:1 build output of src/**); CLI entry points are auto-discovered via the package.json exports map
Generated artefactsanalysis/**, data/**, news/**, docs/**, coverage/**, js/vendor/** โ€” never scanned

Configuration

The full configuration lives in knip.json. Highlights:

  • Entries explicitly list every CLI / npm-script / agentic-workflow-invoked script that knip cannot otherwise reach (e.g. scripts referenced only from .github/workflows/*.md gh-aw bodies).
  • ignoreDependencies covers runtime-spawned packages (european-parliament-mcp-server โ€” launched via npx by the MCP gateway, not imported), browser-vendored bundles (chart.js, d3, mermaid, chartjs-plugin-annotation, papaparse โ€” copied by scripts/copy-vendor.js), and config-only tooling (jscpd, lint-staged, eslint-config-prettier, ts-api-utils).
  • Runtime-spawned tools (e.g. european-parliament-mcp-server invoked via npx by the MCP gateway, never imported as a library) are listed in ignoreDependencies so they are not flagged as unused.

Local Workflow

npm run knip            # show all unused files / exports / deps
npm run knip:production # production-only mode (skips test entries)
npm run knip:fix        # auto-remove unused exports (use with care, review diff)

Triage Categories

FindingCategoryAction
Unused file(a) should be wired upOpen follow-up issue; do not delete
Unused export(b) used by workflow not detectedRefine entry/project in knip.json (preferred) or add comment-justified ignore
Unused dependency(c) truly unusedRemove from package.json, run npm install, commit lockfile
Unused type(c) truly unusedDelete and update tests

Prefer fixing knip's view of the world over adding ignores. Every ignore must carry an inline $comment or a one-line rationale in the PR description.

Workflow Jobs

JobNamePurposeKey Steps
knipKnip ScanUnused-code detectionCheckout โ†’ setup Node 26 โ†’ npm ci โ†’ npm run build โ†’ npm run knip โ†’ write $GITHUB_STEP_SUMMARY โ†’ upload knip-output.txt artefact (14-day retention)

The job runs npm run build first because knip resolves imports through the package.json exports map, which points at compiled scripts/**.

Security Controls

ControlImplementationISMS Reference
Hardened Runnerstep-security/harden-runner (audit egress)ISO 27001 A.8.16
Read-only permissionscontents: read, pull-requests: readISO 27001 A.5.15
SHA-pinned actionsAll third-party actions pinned by digestISO 27001 A.8.30
Concurrency controlcancel-in-progress: true per refResource hygiene

ISMS Evidence


3. CodeQL Security Scanning

๐Ÿ“„ File: .github/workflows/codeql.yml
๐ŸŽฏ Purpose: Static Application Security Testing (SAST) for JavaScript/TypeScript and GitHub Actions
โฐ Schedule: On push to main, on PR to main, weekly Saturday 21:33 UTC
๐Ÿ“Š Status: CodeQL

Security Analysis

ParameterValue
Languagesjavascript-typescript, actions
Build Modenone (interpreted languages)
Query SuiteSecurity Extended
Analysis TypeSource code + dependencies

Vulnerability Types Detected:

  • SQL Injection
  • XSS (Cross-Site Scripting)
  • Path Traversal
  • Command Injection
  • Unsafe Deserialization
  • GitHub Actions expression injection

Security Controls

ControlImplementationISMS Reference
SAST ScanningCodeQL security-extended (JS/TS + Actions)ISO 27001 A.14.2.5
Automated AnalysisOn every PR + pushShift-left security
SHA-Pinned ActionsAll actions pinned to SHASupply chain security
Security AlertsGitHub Security tab integrationIncident response

ISMS Evidence


4. E2E Testing Workflow

๐Ÿ“„ File: .github/workflows/e2e.yml
๐ŸŽฏ Purpose: End-to-end testing with Playwright across browsers
โฐ Schedule: On push to main, on PR to main, daily at midnight UTC
๐Ÿ“Š Status: E2E Tests

Test Coverage

  • Browser: Chromium (optimised for speed)
  • Timeout: 60 minutes
  • Test Categories:
    • Homepage validation
    • Accessibility (axe-core integration)
    • Responsive design
    • Multi-language support (14 languages)
  • Artifacts: Screenshots, videos, HTML reports

Security Controls

ControlImplementationISMS Reference
Accessibility Testingaxe-core WCAG AA complianceInclusive security
Visual RegressionScreenshot comparisonQuality assurance
Functional ValidationUser workflow testingRequirements validation
Daily RegressionScheduled midnight UTCContinuous validation

ISMS Evidence


5. Release Workflow

๐Ÿ“„ File: .github/workflows/release.yml
๐ŸŽฏ Purpose: Comprehensive release automation with attestations and documentation
โฐ Trigger: Manual dispatch (with version input) or tag push (v*)
๐Ÿ“Š Status: Release

Release Pipeline

graph TD
    A[๐Ÿš€ Trigger: Manual/Tag] --> B[๐Ÿ“‹ Prepare Job]
    B --> C[โœ… Run Tests with Coverage]
    C --> D[๐ŸŽญ Run E2E Tests]
    D --> E[๐Ÿ“– Generate API Docs]
    E --> F[๐Ÿ“Š Generate Coverage Reports]
    F --> G[๐ŸŽจ Generate Doc Index]
    G --> H[โœ… Verify Structure]
    H --> I[๐Ÿ’พ Commit Documentation]
    I --> J[๐Ÿ”จ Build Job]
    J --> K[๐Ÿ“ฆ Create Release Artifacts]
    K --> L[๐Ÿ” Generate SBOM]
    L --> M[๐Ÿ“œ Build Provenance]
    M --> N[๐Ÿ” SBOM Attestation]
    N --> O[๐Ÿš€ Release Job]
    O --> P[๐Ÿ“ Draft Release Notes]
    P --> Q[๐ŸŽ‰ Create GitHub Release]

    classDef trigger fill:#3498db,stroke:#2980b9,stroke-width:2px,color:white
    classDef test fill:#27ae60,stroke:#1e8449,stroke-width:1.5px,color:white
    classDef docs fill:#9b59b6,stroke:#8e44ad,stroke-width:1.5px,color:white
    classDef build fill:#f39c12,stroke:#e67e22,stroke-width:1.5px,color:black
    classDef security fill:#e74c3c,stroke:#c0392b,stroke-width:1.5px,color:white
    classDef release fill:#2ecc71,stroke:#27ae60,stroke-width:2px,color:white

    class A trigger
    class B,C,D test
    class E,F,G,H,I docs
    class J,K build
    class L,M,N security
    class O,P,Q release

Release Jobs

JobNameKey Permissions
preparePrepare Releasecontents: write
buildBuild Release Packagecontents: read, id-token: write, attestations: write
releaseCreate Releasecontents: write, id-token: write

Documentation as Code

Every release automatically generates:

DocumentationGeneratorOutput
API DocumentationJSDoc52 files, searchable
Test CoverageVitest HTMLInteractive reports
E2E Test ReportsPlaywrightScreenshots, videos
Documentation IndexCustom scriptBeautiful hub page

Security Controls

ControlImplementationISMS Reference
SLSA Level 3Build provenance attestation + npm provenance (--provenance flag on publish)Supply chain security
SBOM GenerationSPDX JSON format via anchore/sbom-actionNTIA SBOM minimum elements
Artifact SigningGitHub Attestations API (Sigstore, OIDC keyless)Integrity verification
npm RegistryPublished to registry.npmjs.org/euparliamentmonitor with Sigstore provenanceSupply chain transparency
Documentation Audit TrailCommitted to main branchEvidence trail
Test Validation5,933+ unit/integration tests + E2E PlaywrightQuality gates

ISMS Evidence


6. Dependency Review Workflow

๐Ÿ“„ File: .github/workflows/dependency-review.yml
๐ŸŽฏ Purpose: Supply chain security scanning for pull requests
โฐ Trigger: On pull request
๐Ÿ“Š Status: Dependency review enabled

Security Controls

ControlImplementationISMS Reference
License ComplianceAllowed licenses onlyLegal compliance
Vulnerability DetectionKnown CVEs blockedISO 27001 A.12.6.1
Supply Chain SecurityDependency graph analysisNIST CSF ID.SC

ISMS Evidence


7. OpenSSF Scorecard Workflow

๐Ÿ“„ File: .github/workflows/scorecards.yml
๐ŸŽฏ Purpose: Security posture assessment against OpenSSF best practices
โฐ Schedule: Weekly on Tuesday 07:20 UTC, push to main, branch protection rule
๐Ÿ“Š Status: OpenSSF Scorecard

Assessed Security Practices

  • Binary artifacts
  • Branch protection
  • CI tests
  • Code review
  • Dangerous workflows
  • Dependency update tool
  • Fuzzing
  • License
  • Maintained
  • Pinned dependencies
  • SAST
  • Security policy
  • Signed releases
  • Token permissions
  • Vulnerabilities

ISMS Evidence


8. Deploy S3 Workflow

๐Ÿ“„ File: .github/workflows/deploy-s3.yml
๐ŸŽฏ Purpose: Production deployment to AWS S3 + CloudFront
โฐ Trigger: Push to main
๐Ÿ“Š Status: Production deployment

Deployment Pipeline

graph LR
    A[Push to main] --> B[Checkout Code]
    B --> C[๐Ÿ”’ Harden Runner<br/>egress: BLOCK]
    C --> D[Configure AWS OIDC]
    D --> E[Sync to S3]
    E --> F[Invalidate CloudFront]
    F --> G[โœ… Production Live]

    classDef trigger fill:#3498db,stroke:#2980b9,stroke-width:2px,color:white
    classDef security fill:#e74c3c,stroke:#c0392b,stroke-width:1.5px,color:white
    classDef aws fill:#FF9900,stroke:#232F3E,stroke-width:1.5px,color:white
    classDef complete fill:#27ae60,stroke:#1e8449,stroke-width:2px,color:white

    class A trigger
    class B,C security
    class D,E,F aws
    class G complete

Note: deploy-s3.yml is the only workflow using egress-policy: block (all other workflows use audit). Outbound network calls are restricted to an explicit allowlist defined in the allowed-endpoints parameter of the Harden Runner step within deploy-s3.yml.

Security Controls

ControlImplementationISMS Reference
OIDC Federationaws-actions/configure-aws-credentials with role ARNNo long-lived secrets
Egress Block ModeHarden Runner blocks all non-allowlisted endpointsNetwork security
IAM Least PrivilegeMinimal S3 + CloudFront permissionsAWS security best practices
HTTPS OnlyCloudFront SSL/TLS distributionData in transit protection
Infrastructure as CodeGitHub Actions workflowReproducible deployments

ISMS Evidence


9. REUSE Compliance Workflow

๐Ÿ“„ File: .github/workflows/reuse.yml
๐ŸŽฏ Purpose: License and copyright compliance verification using the REUSE Specification
โฐ Schedule: On push to main, on PR to main, weekly Monday 06:00 UTC
๐Ÿ“Š Status: REUSE Compliance

License Compliance Scope

ArtifactLicenseSPDX Header Required
Source scripts (scripts/)Apache-2.0โœ… Yes
Test files (test/, e2e/)Apache-2.0โœ… Yes
HTML pages (index-*.html)Apache-2.0โœ… Yes
Workflow files (.github/workflows/)Apache-2.0โœ… Yes
Binary assetsDeclared in REUSE.tomlVia manifest

Security Controls

ControlImplementationISMS Reference
License VerificationSPDX header validation on every fileOpen Source Policy
Copyright CompliancePer-file copyright trackingIP management
Supply Chain ClarityMachine-readable REUSE.tomlNIST CSF ID.SC-4
SHA-Pinned Actionfsfe/reuse-action pinned to SHASupply chain security

ISMS Evidence


10. SLSA Provenance (Integrated in Release Workflow)

๐Ÿ“„ File: .github/workflows/release.yml
๐ŸŽฏ Purpose: Generate cryptographic build provenance for supply chain integrity verification
โฐ Trigger: On tag push (v*) + manual dispatch with version input
๐Ÿ“Š Status: Release

Provenance Generation Pipeline

SLSA Level 3 provenance is generated as part of the release workflow build job. All attestations and SBOM are created during the build step and attached to the immutable GitHub Release in a single atomic operation.

Attestation Artifacts

ArtifactActionVerification Command
Build Provenanceactions/attest-build-provenance (SHA-pinned)gh attestation verify --owner Hack23 <file>
SBOM (SPDX)anchore/sbom-action + actions/attest (SHA-pinned)gh attestation verify --owner Hack23 <file>
Distribution Archive.zip with excluded dev filesSHA-256 checksum
SBOM JSONSPDX formatLicense compliance check

Security Controls

ControlImplementationISMS Reference
OIDC Keyless Signingid-token: write + GitHub SigstoreSLSA Level 3
Immutable ReleaseimmutableCreate: true โ€” single-write releaseIntegrity
Minimal Permissionspermissions: read-all top-levelLeast privilege
Harden Runneregress audit on all outbound callsNetwork security

ISMS Evidence


11. Compile Agentic Workflows

๐Ÿ“„ File: .github/workflows/compile-agentic-workflows.yml
๐ŸŽฏ Purpose: Compile agentic workflow markdown source files (.md) into executable lock files (.lock.yml) using the gh-aw CLI (pinned GH_AW_VERSION: v0.77.3)
โฐ Trigger: Manual dispatch only (workflow_dispatch)
๐Ÿ“Š Status: Compile Agentic Workflows

Version pin contract: GH_AW_VERSION: v0.77.3 is a repository-level environment pin in compile-agentic-workflows.yml. Bumping this pin requires re-compilation of all 15 .lock.yml files, a full PR review, and successful gh aw compile --validate across the workflow set. Any .md โ†’ .lock.yml drift is detected by agentics-maintenance.yml.

Compilation Pipeline

graph LR
    A[Manual Trigger] --> B[Checkout Repository]
    B --> C["Install gh-aw CLI<br/>(pinned v0.77.3)"]
    C --> D["Run gh aw compile --validate<br/>Validates frontmatter + safe-outputs"]
    D --> E["Commit & Push<br/>.lock.yml Files"]

    classDef trigger fill:#3498db,stroke:#2980b9,stroke-width:2px,color:white
    classDef process fill:#9b59b6,stroke:#8e44ad,stroke-width:1.5px,color:white
    classDef output fill:#27ae60,stroke:#1e8449,stroke-width:1.5px,color:white

    class A trigger
    class B,C,D process
    class E output

gh-aw Architecture Gotchas (AI-First Quality Principle)

GotchaImpactMitigation
Bash Tool Call ContractEvery bash tool call in an agentic workflow MUST specify BOTH command and description parameters โ€” omitting description causes silent tool-call rejectionValidator in gh aw compile --validate + agent system prompt enforcement
AWF Sandbox Expansion RestrictionsDangerous shell expansions (${var@P}, chained variable assignments building command substitutions, ${!var}, eval-like constructs) are refused by the sandboxAgents must not attempt prompt-injection patterns; sandbox logs refused attempts
max-patch-size TuningDefault create-pull-request max-patch-size is 1024 KB; news-translate.md overrides to 10240 KB at top level to accommodate 14-language fan-out patchesTop-level YAML frontmatter in news-translate.md sets the elevated limit
Dynamic file resolutionAgents must not hallucinate filenames; use ls -t "news/${TODAY}-${TYPE}"*"-en.html" | head -1 pattern to resolve latest English source for translationPattern documented in workflow system prompts

Security Controls

ControlImplementationISMS Reference
Manual Trigger Onlyworkflow_dispatch โ€” no automatic runsChange control
Version PinGH_AW_VERSION: v0.77.3 pinned at workflow envSupply chain integrity
Token FallbackCOPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN with GITHUB_TOKEN fallbackCredential management
Write Permissionscontents: write, pull-requests: write, actions: write, issues: writeLeast privilege for compilation

12. Pull Request Automatic Labeler

๐Ÿ“„ File: .github/workflows/labeler.yml
๐ŸŽฏ Purpose: Automatically label pull requests based on file paths and content
โฐ Trigger: pull_request_target (opened, synchronize, reopened, edited)

Security Controls

ControlImplementationISMS Reference
Minimal Job Permissionscontents: read, pull-requests: write, issues: readLeast privilege
Target Eventpull_request_target โ€” runs on base branch codeWorkflow security

13. Setup Repository Labels

๐Ÿ“„ File: .github/workflows/setup-labels.yml
๐ŸŽฏ Purpose: Create and manage repository labels for issue/PR governance
โฐ Trigger: Manual dispatch only (workflow_dispatch with recreate_all input)

Security Controls

ControlImplementationISMS Reference
Manual Trigger Onlyworkflow_dispatch โ€” deliberate action requiredChange control
Minimal Permissionscontents: read, issues: writeLeast privilege

14. Copilot Setup Steps

๐Ÿ“„ File: .github/workflows/copilot-setup-steps.yml
๐ŸŽฏ Purpose: Set up the development environment for GitHub Copilot coding agents
โฐ Trigger: Push/PR to copilot-setup-steps.yml file + manual dispatch

Environment Setup

ComponentVersion / Configuration
Node.js25
EP MCP Servereuropean-parliament-mcp-server (global)
Playwright BrowsersInstalled for E2E
Virtual DisplayXvfb (:99)

Security Controls

ControlImplementationISMS Reference
Broad Read PermissionsMultiple read scopes for agent accessCopilot agent requirement
Write LimitedOnly pull-requests: write, issues: writeLeast privilege for agents
Token ManagementCOPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKENCredential management

15. Agentics Maintenance

๐Ÿ“„ File: .github/workflows/agentics-maintenance.yml
๐ŸŽฏ Purpose: Housekeeping for the agentic workflow fleet โ€” detect .md โ†” .lock.yml drift, probe MCP gateway health, prune stale analysis artifacts, verify GH_AW_VERSION: v0.77.3 is in effect.
โฐ Trigger: Scheduled (weekly) + manual dispatch

Security Controls

ControlImplementation
Read-only probesHealth checks write no state to the repo
Drift detectionCompares gh aw compile --validate output against committed .lock.yml
PR on driftOpens a PR via safe-outputs when lock drift is detected

16. News Translate Reconciler

๐Ÿ“„ File: .github/workflows/news-translate-reconciler.yml
๐ŸŽฏ Purpose: Sweep news/ for English articles that are missing translations in one or more of the 13 target languages (sv, da, no, fi, de, fr, es, nl, ar, he, ja, ko, zh) and enqueue backfill runs for news-translate.md.
โฐ Trigger: Scheduled (multiple times daily) + manual dispatch

Reconciliation Logic

flowchart LR
    A[Scan news/*.html] --> B{English article exists<br/>without all 13 translations?}
    B -- Yes --> C[Enqueue news-translate<br/>with article slug + date]
    B -- No --> D[Log reconciled]
    C --> E[news-translate produces<br/>missing languages]

    classDef scan fill:#3498db,stroke:#2980b9,stroke-width:1.5px,color:white
    classDef decision fill:#f39c12,stroke:#e67e22,stroke-width:1.5px,color:black
    classDef action fill:#27ae60,stroke:#1e8449,stroke-width:1.5px,color:white

    class A scan
    class B decision
    class C,E action

Security Controls

ControlImplementation
Scoped dispatchOnly calls news-translate.md with a specific {slug,date} input โ€” no arbitrary workflow chaining
max-patch-size coordinationTranslation runs use news-translate.md's top-level 10240 KB max-patch-size for fan-out
IdempotencySkips slugs already at 14/14 language coverage

๐Ÿง  AI-First Quality Principle Enforcement

The AI-First Quality Principle (.github/skills/ai-first-quality.md, non-negotiable) governs all agentic content generation. Workflow-level enforcement:

Mandatory 2-Pass Iterative Improvement

PassTime BudgetMandatory Outputs
Pass 1 (~60%)First 60% of workflow timeoutInitial narrative draft; full MCP data fetch; first stakeholder perspective pass
Pass 2 (~40%)Remaining 40% of workflow timeoutRead-back of entire draft; evidence cross-validation; gap filling; scenario elaboration

Time Budget Enforcement

Workflow timeoutMinimum active time (no early exit)
60-minute workflowโ‰ฅ45 minutes actively engaged
120-minute workflow (article-generator)โ‰ฅ90 minutes actively engaged

Quality Gates (Validator โ€” validate-analysis-completeness)

Before PR creation, the agentic workflow MUST run:

node scripts/utils/validate-analysis-completeness.js --article-html="$(ls -t news/${TODAY}-${TYPE}*-en.html | head -1)"

which asserts:

  • โ‰ฅ80 words per SWOT item
  • โ‰ฅ150 words per stakeholder perspective
  • โ‰ฅ60% prose ratio (non-HTML text content)
  • โ‰ฅ1 Chart.js visualization embedded
  • 0 [AI_ANALYSIS_REQUIRED] sentinel markers remaining
  • Economic context present: IMF (primary economic source, mandatory for policy articles per Stage-C review) and/or World Bank (non-economic context). Enforcement is editorial at the Stage-C completeness gate against .github/prompts/03-analysis-completeness-gate.md
  • scanHtmlForFallbackLeaks() returns empty โ€” no FALLBACK_TEMPLATE_PATTERNS in output

Reference thresholds (analysis/methodologies/reference-quality-thresholds.json):

ArtifactMin wordsBreaking threshold
intelligence/mcp-reliability-audit.md200385
intelligence/reference-analysis-quality.md140190

Pre-Translation Validator Gate

news-translate.md runs the validator against all English source articles before fan-out to the 13 target languages. A single failing English source blocks the entire translation run, preserving translation fidelity.

Analysis-to-Article Data Contract

buildDefaultStakeholderPerspectives in src/templates/section-builders.ts emits AI_MARKER sentinels into the HTML template. Agents author the stakeholder/impact slots directly in rendered HTML โ€” the generator emits markup shells (analysis-stakeholder-perspectives / stakeholder-perspectives-grid) and the agent fills the semantic content. Agents MUST NOT write raw HTML for this section structure but MUST author the perspective text.


๐Ÿ“Š Workflow Metrics

Execution Statistics

MetricTargetCurrentStatus
Test Success Rateโ‰ฅ95%100%โœ… Excellent
Test Execution Time<10 min~3 minโœ… Excellent
Release FrequencyAs neededManualโœ… On-demand
Mean Time to Deploy<1 hour~15 minโœ… Excellent
Failed Deployment Rate<5%0%โœ… Perfect

Security Metrics

MetricTargetCurrentStatus
Critical Vulnerabilities00โœ… Secure
High Vulnerabilities00โœ… Secure
Code Coverageโ‰ฅ80% lines/functions/statements, โ‰ฅ75% branchesEnforced by vitest configโœ… CI-gated
SHA-Pinned Actions100%100%โœ… Complete
OpenSSF Scoreโ‰ฅ8.0TBD๐Ÿ”„ Monitoring

๐Ÿ” Security Hardening Practices

EU Parliament Monitor implements industry best practices for securing CI/CD pipelines, with StepSecurity hardening for all workflows:

flowchart LR
    subgraph "๐Ÿ›ก๏ธ Pipeline Security Hardening"
        PH[Permissions Hardening] --> LAP[Least Access Principle]
        PS[Pin SHA Versions] --> IDT[Immutable Dependencies]
        AV[Action Verification] --> TS[Trusted Sources]
        RH[Runner Hardening] --> AL[Audit Logging]
        OT[OIDC Tokens] --> EF[Ephemeral Credentials]
    end

    subgraph "๐Ÿ”’ Security Measures"
        AS[Asset Security] --> AC[Asset Verification]
        DS[Dependency Security] --> PD[Dependency Pinning]
        BS[Build Security] --> BA[Build Attestations]
        RS[Release Security] --> SBOM[SBOM Generation]
    end

    PH --> AS
    PS --> DS
    AV --> BS
    RH --> RS

    classDef practice fill:#e74c3c,stroke:#c0392b,stroke-width:1.5px,color:white
    classDef measures fill:#9b59b6,stroke:#8e44ad,stroke-width:1.5px,color:white

    class PH,PS,AV,RH,OT practice
    class LAP,IDT,TS,AL,EF practice
    class AS,DS,BS,RS measures
    class AC,PD,BA,SBOM measures

Specific Hardening Measures

The project's workflows collectively implement the following security measures (applied per workflow where applicable):

  1. ๐Ÿ”’ Permissions Restriction: Explicit least-privilege permissions with read-all or empty {} top-level
  2. ๐Ÿ“Œ SHA Pinning: 100% of actions pinned to specific SHA hashes โ€” zero tag references
  3. ๐Ÿ›ก๏ธ Runner Hardening: StepSecurity harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 for audit logging
  4. ๐Ÿ“„ SBOM Generation: The release workflow generates a Software Bill of Materials in SPDX format via anchore/sbom-action
  5. ๐Ÿ” Build Attestations: The release workflow creates SLSA Level 3 provenance via actions/attest-build-provenance
  6. โฑ๏ธ Timeout Limits: Critical workflows (e.g., E2E and agentic *.lock.yml pipelines) use explicit timeout-minutes to prevent resource exhaustion; remaining workflows rely on GitHub's default job timeouts and are monitored for anomalies
  7. ๐Ÿ”‘ OIDC Tokens: The deploy-s3 workflow uses AWS OIDC federation โ€” no long-lived secrets
  8. ๐Ÿšซ Egress Control: The deploy-s3 workflow uses harden-runner with egress-policy: block

๐Ÿ›ก๏ธ Workflow Security Architecture

Workflow Permissions Matrix

Every workflow declares explicit, minimal permissions following the principle of least privilege. Some workflows use top-level permissions: read-all with job-level write overrides where needed, while others define more restrictive explicit top-level scopes tailored to their tasks.

WorkflowTop-LevelJob-Level OverridesSecrets Used
codeqlcontents: readanalyze: security-events: write, packages: read, actions: readNone
compile-agentic-workflowscontents: write, pull-requests: write, actions: write, issues: writeโ€”COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN
copilot-setup-stepscontents: read, actions: read, attestations: read, checks: read, issues: write, models: read, discussions: read, pages: read, pull-requests: write, security-events: read, statuses: readโ€”COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN
dependency-reviewcontents: readโ€”None
deploy-s3contents: read, id-token: write, actions: writeโ€”AWS OIDC role
e2econtents: reade2e-tests: contents: readNone
labelerread-alllabeler: contents: read, pull-requests: write, issues: readGITHUB_TOKEN
releaseread-allprepare: contents: write; build: contents: read, id-token: write, attestations: write; release: contents: write, id-token: writeGITHUB_TOKEN
reusecontents: readโ€”None
scorecardsread-allanalysis: security-events: write, id-token: write, contents: read, actions: read, issues: read, pull-requests: read, checks: readNone
setup-labelscontents: read, issues: writeโ€”GITHUB_TOKEN
test-and-reportread-allvalidation: contents: read, pull-requests: write; functional-tests: contents: read; performance: contents: read; security-check: contents: read, security-events: write; report: contents: read, `pull-requests: write$\text{None}
\text{news}-* (\text{agentic} \times 9)${}` (empty)activation: contents: read; agent: contents: write, pull-requests: write, issues: write, models: readGITHUB_TOKEN

Security Control Layers

graph TD
    subgraph Layer1["๐Ÿ”ต Layer 1: Developer Workstation"]
        PC[Pre-Commit Hooks<br/>gitleaks ยท eslint ยท prettier]
        LS[Lint-Staged<br/>ESLint fix ยท Prettier ยท HTMLHint]
        PC --> LS
    end

    subgraph Layer2["๐ŸŸข Layer 2: Source Control"]
        BP[Branch Protection<br/>Required status checks]
        CR[Code Review<br/>Required approvals]
        BP --> CR
    end

    subgraph Layer3["๐ŸŸก Layer 3: CI Pipeline"]
        HR[Harden Runner v2.15.1<br/>Egress policy: audit/block]
        ST[SHA-Pinned Actions 100%<br/>Supply chain integrity]
        HR --> ST
    end

    subgraph Layer4["๐Ÿ”ด Layer 4: Security Scanning"]
        CQL[CodeQL SAST<br/>JS/TS + Actions analysis]
        DR[Dependency Review<br/>CVE blocking on PR]
        NA[npm audit<br/>CVE check]
        CQL --> DR --> NA
    end

    subgraph Layer5["๐ŸŸฃ Layer 5: Build Integrity"]
        SB[SBOM Generation<br/>CycloneDX / SPDX]
        AT[Build Attestation<br/>Sigstore / SLSA L3]
        SB --> AT
    end

    subgraph Layer6["โšซ Layer 6: Deployment"]
        S3[S3 Sync<br/>Cache-optimised headers]
        CF[CloudFront Invalidation<br/>HTTPS-only CDN]
        S3 --> CF
    end

    Layer1 --> Layer2 --> Layer3 --> Layer4 --> Layer5 --> Layer6

    classDef layer1 fill:#3498db,stroke:#2980b9,stroke-width:1.5px,color:white
    classDef layer2 fill:#27ae60,stroke:#1e8449,stroke-width:1.5px,color:white
    classDef layer3 fill:#f1c40f,stroke:#f39c12,stroke-width:1.5px,color:black
    classDef layer4 fill:#e74c3c,stroke:#c0392b,stroke-width:1.5px,color:white
    classDef layer5 fill:#9b59b6,stroke:#8e44ad,stroke-width:1.5px,color:white
    classDef layer6 fill:#2c3e50,stroke:#1a252f,stroke-width:1.5px,color:white

    class PC,LS layer1
    class BP,CR layer2
    class HR,ST layer3
    class CQL,DR,NA layer4
    class SB,AT layer5
    class S3,CF layer6

๐Ÿช Pre-Commit Security Controls

The project employs two complementary pre-commit enforcement mechanisms: Husky (Node.js native) and pre-commit framework.

Husky + lint-staged

Configuration: .husky/pre-commit โ†’ runs npx lint-staged

File PatternCommandsPurpose
scripts/**/*.jseslint --fix, prettier --writeJS quality + formatting
*.mdprettier --writeDocumentation formatting
*.htmlhtmlhintHTML validation

Pre-Commit Framework

Configuration: .pre-commit-config.yaml

graph LR
    A[git commit] --> B{Husky Hook Triggered}
    B --> C[lint-staged]
    C --> D[ESLint --fix JS]
    C --> E[Prettier --write MD]
    C --> F[HTMLHint HTML]
    D --> G{All Pass?}
    E --> G
    F --> G
    G -->|โœ… Pass| H[Commit Proceeds]
    G -->|โŒ Fail| I[Commit Blocked]
    I --> J[Developer Fixes Issues]
    J --> A

    classDef trigger fill:#3498db,stroke:#2980b9,stroke-width:2px,color:white
    classDef decision fill:#f39c12,stroke:#e67e22,stroke-width:2px,color:black
    classDef lint fill:#9b59b6,stroke:#8e44ad,stroke-width:1.5px,color:white
    classDef pass fill:#27ae60,stroke:#1e8449,stroke-width:1.5px,color:white
    classDef fail fill:#e74c3c,stroke:#c0392b,stroke-width:2px,color:white

    class A trigger
    class B,G decision
    class C,D,E,F lint
    class H pass
    class I,J fail
HookVersionPurposeSecurity Value
gitleaksv8.16.3Secret scanningPrevent credential exposure
mirrors-eslintv8.38.0JS lintingCode quality enforcement
end-of-file-fixerpre-commit v4.4.0File terminationConsistency
trailing-whitespacepre-commit v4.4.0Whitespace cleanupConsistency

Security Value: gitleaks scans for hardcoded secrets (API keys, tokens, passwords) before any commit reaches the remote repository, providing first-line credential leak prevention aligned with Cryptography Policy.


๐Ÿ† SLSA Level 3 Compliance

Supply-chain Levels for Software Artifacts (SLSA) Level 3 compliance is achieved through GitHub's native attestation infrastructure integrated into the release and SLSA provenance workflows.

SLSA Requirements Matrix

SLSA L3 RequirementImplementationWorkflow
Source โ€” Version controlledGit + GitHub branch protectionAll
Source โ€” Verified historyProtected main branchAll
Build โ€” Scripted buildnpm ci + reproducible stepsrelease.yml
Build โ€” Build serviceGitHub Actions managed runnersAll
Build โ€” Non-falsifiable provenanceGitHub Sigstore / OIDC keylessrelease.yml
Build โ€” IsolatedGitHub-hosted Ubuntu ubuntu-26.04 runnersAll
Provenance โ€” Available.intoto.jsonl attached to releaserelease.yml
Provenance โ€” AuthenticatedOIDC id-token: writerelease.yml
Provenance โ€” Service generatedactions/attest-build-provenancerelease.yml
Provenance โ€” Non-falsifiableSigstore transparency logrelease.yml

Build Provenance Flow

graph TD
    A[Developer: git tag vX.Y.Z] --> B[GitHub Actions: release.yml triggered]
    B --> C[prepare job: run tests + generate docs]
    C --> D[build job: npm ci - hermetic install]
    D --> E[Create release-artifacts/euparliamentmonitor-vX.Y.Z.zip]
    E --> F[anchore/sbom-action: SPDX JSON SBOM]
    F --> G[actions/attest-build-provenance<br/>Subject: release zip file]
    G --> H[GitHub Sigstore: OIDC token exchange]
    H --> I[Sigstore Transparency Log Entry]
    I --> J[.intoto.jsonl bundle saved]
    J --> K[actions/attest-sbom<br/>Subject: release zip + SBOM path]
    K --> L[GitHub Release: all artifacts attached]
    L --> M[Verification: gh attestation verify --owner Hack23 file.zip]

    classDef trigger fill:#3498db,stroke:#2980b9,stroke-width:2px,color:white
    classDef build fill:#9b59b6,stroke:#8e44ad,stroke-width:1.5px,color:white
    classDef security fill:#e74c3c,stroke:#c0392b,stroke-width:1.5px,color:white
    classDef crypto fill:#f39c12,stroke:#e67e22,stroke-width:1.5px,color:black
    classDef release fill:#27ae60,stroke:#1e8449,stroke-width:1.5px,color:white

    class A trigger
    class B,C,D,E build
    class F,K security
    class G,H,I,J crypto
    class L,M release

Attestation Verification

End-users can verify artifact integrity using the GitHub CLI:

# Verify build provenance
gh attestation verify euparliamentmonitor-v1.0.0.zip --owner Hack23

# Verify SBOM attestation
gh attestation verify euparliamentmonitor-v1.0.0.spdx.json --owner Hack23

# Expected output: โœ… Verification successful
# Attestation bundle verified with signer's certificate

ISMS Reference: Secure Development Policy ยง4.4 โ€” Supply Chain Security


๐Ÿ” Security Scanning Pipeline

Security scanning tools are integrated into the CI/CD pipeline with triggers as documented in the matrix below (e.g., push, pull request, schedule, pre-commit).

Scanning Tool Matrix

ToolTypeTriggersFindings LocationBlocks Merge?
CodeQLSASTPush, PR, weekly SaturdayGitHub Security tabYes (via required check)
npm auditSCAPush, PRWorkflow logsYes (new โ‰ฅ moderate, allowlist exceptions)
Dependency ReviewSCAPR onlyPR commentsYes
ESLintSAST LintPush, PR, pre-commitWorkflow logsYes
HTMLHintValidationPush, PR, pre-commitWorkflow logsWarning
REUSECompliancePush, PR, weekly MondayWorkflow logsYes
OpenSSF ScorecardPosturePush, weekly TuesdaySARIF โ†’ Security tabAdvisory
gitleaksSecret ScanPre-commitTerminalYes (pre-commit)

Integrated Scanning Flow

graph LR
    subgraph Triggers["โšก Triggers"]
        PR[Pull Request]
        PS[Push to main]
        SC[Schedule Weekly]
    end

    subgraph Scanning["๐Ÿ” Security Scanning"]
        CQL[CodeQL SAST<br/>JS/TS + Actions]
        NA[npm audit<br/>CVE check]
        DR[Dependency Review<br/>CVE block on PR]
        RL[REUSE<br/>License compliance]
        SC2[OpenSSF Scorecard<br/>Posture assessment]
    end

    subgraph Output["๐Ÿ“Š Results"]
        GH[GitHub Security<br/>Alerts Dashboard]
        PRC[PR Comments<br/>Inline feedback]
        SAR[SARIF Upload<br/>Code scanning tab]
        WL[Workflow Logs<br/>Actions tab]
    end

    PR --> CQL & NA & DR & RL
    PS --> CQL & NA & RL & SC2

    CQL --> SAR
    NA --> WL
    DR --> PRC
    RL --> WL
    SC2 --> SAR
    SAR --> GH

    classDef trigger fill:#3498db,stroke:#2980b9,stroke-width:2px,color:white
    classDef scanning fill:#e74c3c,stroke:#c0392b,stroke-width:1.5px,color:white
    classDef output fill:#27ae60,stroke:#1e8449,stroke-width:1.5px,color:white

    class PR,PS,SC trigger
    class CQL,NA,DR,RL,SC2 scanning
    class GH,PRC,SAR,WL output

๐Ÿšฆ Deployment Security Gates

Production deployment to AWS S3 + CloudFront is protected by multiple sequential security gates that must all pass before code reaches production.

Security Gate Sequence

graph TD
    A[Developer: Push / PR] --> B{Branch Protection<br/>Rules}
    B -->|Protected branch| C[Required Status Checks]
    C --> D{CI Tests Pass?<br/>test-and-report.yml}
    D -->|โœ… Pass| E{CodeQL Scan Pass?<br/>codeql.yml}
    D -->|โŒ Fail| BLOCK[๐Ÿšซ Merge Blocked]
    E -->|โœ… Pass| F{REUSE Compliance?<br/>reuse.yml}
    E -->|โŒ Fail| BLOCK
    F -->|โœ… Pass| G{Code Review<br/>Approved?}
    F -->|โŒ Fail| BLOCK
    G -->|โœ… Approved| H[Merge to main]
    G -->|โŒ Pending| BLOCK
    H --> I[Deploy to S3<br/>deploy-s3.yml triggered]
    I --> J[Harden Runner<br/>egress: BLOCK mode]
    J --> K[OIDC AWS Auth<br/>id-token: write]
    K --> L[S3 Sync<br/>Cache-optimised]
    L --> M[CloudFront Invalidation<br/>Cache flush]
    M --> N[โœ… Production Live<br/>hack23.com]

    classDef trigger fill:#3498db,stroke:#2980b9,stroke-width:2px,color:white
    classDef decision fill:#f39c12,stroke:#e67e22,stroke-width:2px,color:black
    classDef pass fill:#27ae60,stroke:#1e8449,stroke-width:1.5px,color:white
    classDef fail fill:#e74c3c,stroke:#c0392b,stroke-width:2px,color:white
    classDef aws fill:#FF9900,stroke:#232F3E,stroke-width:1.5px,color:white
    classDef security fill:#9b59b6,stroke:#8e44ad,stroke-width:1.5px,color:white

    class A trigger
    class B,D,E,F,G decision
    class C,H,N pass
    class BLOCK fail
    class I,J,K security
    class L,M aws

AWS Deployment Security Controls

ControlImplementationISMS Reference
OIDC Federationaws-actions/configure-aws-credentials with role ARNNo long-lived secrets
Minimal IAM RoleGithubWorkFlowRole โ€” S3 + CloudFront onlyLeast privilege
Egress Block ModeHarden Runner blocks all non-allowlisted endpointsNetwork security
mtime PreservationGit commit times restored before syncChange detection accuracy
Cache-Optimised SyncPer-type cache headers (HTML: 1h, assets: 1y)Performance + integrity
HTTPS EnforcementCloudFront HTTPS-only distributionData in transit protection
TLS 1.3CloudFront + S3 expected to enforce TLS 1.3 (configured in AWS account)Cryptography Policy

โšก Build Cache & Install Resilience

Caching Strategy

All standard GitHub Actions workflows follow a single, consistent caching convention:

CacheMechanismKey PatternExpiry
npm packages (~/.npm)setup-node built-in cache: 'npm' + cache-dependency-path: package-lock.json<runner-os>-node-<hash(package-lock.json)>Expires automatically when package-lock.json changes; GitHub evicts unused entries after 7 days
Playwright browsers (~/.cache/ms-playwright)actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5<runner-os>-playwright-v2-<scope>-<hash(package-lock.json)>Key versioned (v2) โ€” increment the version prefix (e.g., v2 โ†’ v3) to expire all existing Playwright caches and force re-download on next run

Design decisions

  • No separate actions/cache step for ~/.npm โ€” setup-node with cache: 'npm' already uses actions/cache internally. Adding a second explicit step creates two cache entries for the same data under different keys, wastes cache quota, and introduces key drift.
  • One canonical actions/cache SHA pin (27d5ce7fโ€ฆ v5.0.5) used for all non-npm caches. Every workflow that needs Playwright or another tool-specific cache MUST use this exact SHA to stay consistent and auditable.
  • cache-dependency-path: package-lock.json is always set explicitly so the internal npm cache key is scoped to the exact lock-file hash (rather than a glob scan of all **/package-lock.json files).
  • Cache expiry โ€” GitHub Actions evicts caches unused for 7 days automatically. The v2 prefix in Playwright cache keys ensures all caches created before this change are treated as stale and re-populated on next run.

Install Resilience

All external network installs are wrapped in retry loops to survive transient registry or mirror outages:

Install typeRetry mechanismTimeout
npm ci3 attempts, 15 s back-offtimeout-minutes: 10
npx playwright install-deps (apt)3 attempts, 20 s back-offtimeout-minutes: 10
npx playwright install <browser>3 attempts, 20 s back-offtimeout-minutes: 20
apt-get install (copilot setup)3 attempts, 20 s back-offtimeout-minutes: 10
npm install -g <mcp-package>3 attempts, 15 s back-off via helper functiontimeout-minutes: 15

Retry pattern (shell)

for attempt in 1 2 3; do
  if <install-command>; then
    echo "โœ… succeeded on attempt $attempt"
    exit 0          # or break for inline steps
  fi
  echo "โš ๏ธ failed on attempt $attempt โ€” retrying in 15s"
  sleep 15
done
echo "โŒ failed after 3 attempts"
exit 1

All install steps also set --prefer-offline for npm ci so that the warm npm cache is used in preference to the network on subsequent attempts.

Per-workflow cache summary

Workflownpm cachePlaywright cacheOther caches
test-and-report.ymlsetup-node built-inplaywright-v2-chromium-* (functional-tests job)โ€”
release.ymlsetup-node built-inplaywright-v2-chromium-* (prepare job)โ€”
e2e.ymlsetup-node built-inplaywright-v2-all-* (full browser suite)โ€”
knip.ymlsetup-node built-inโ€”โ€”
deploy-s3.ymlsetup-node built-inโ€”โ€”
compile-agentic-workflows.ymlsetup-node built-inโ€”โ€”
copilot-setup-steps.ymlsetup-node built-inโ€”โ€”
agentics-maintenance.yml (generated)โ€”โ€”activity-report-logs (custom key per run+repo)

๐Ÿ”„ Workflow Failure Handling & Rollback

Failure Classification and Response

Failure TypeDetectionAutomated ResponseManual Action
Test failureCI job exits non-zeroWorkflow marked failed, merge blockedReview logs, fix code, re-push
Security finding (CodeQL, new)CodeQL analysisPR comment + GitHub Security alertAssess, fix or document false positive
Security finding (npm audit, new)npm audit in test-and-report.ymlWorkflow failed, findings in logs onlyReview audit output, update deps or add to allowlist per policy
Security finding (known / accepted)Known GHSA in audit allowlistIntelligent triage passesDocument in SECURITY.md and risk register
Deployment failureS3 sync / CF invalidation errorWorkflow failed, previous version still liveCheck AWS CloudWatch, re-run
Attestation failureSigstore API / OIDC errorRelease blockedRetry workflow, check OIDC config
REUSE non-complianceMissing SPDX headerPR blockedAdd SPDX-FileCopyrightText headers
Agentic workflow failureAgent timeout or errorPR not created, workflow marked failedReview agent logs, re-trigger manually

Rollback Procedure

graph TD
    A[๐Ÿšจ Production Incident Detected] --> B{Incident Type}
    B -->|Content error| C[Re-run deploy-s3.yml<br/>from previous commit]
    B -->|Security breach| D[Immediate CloudFront disable]
    B -->|Dependency vuln| E[npm audit fix + re-deploy]
    C --> F[git revert + push to main]
    F --> G[Auto-deploy triggered]
    D --> H[Revoke AWS role session]
    H --> I[Investigate + patch]
    I --> J[Re-enable CloudFront]
    E --> K[PR with dep update]
    K --> L[CI gates pass]
    L --> M[Merge + auto-deploy]
    G --> N[โœ… Rollback Complete]
    J --> N
    M --> N

    classDef alert fill:#e74c3c,stroke:#c0392b,stroke-width:2px,color:white
    classDef decision fill:#f39c12,stroke:#e67e22,stroke-width:2px,color:black
    classDef content fill:#3498db,stroke:#2980b9,stroke-width:1.5px,color:white
    classDef security fill:#9b59b6,stroke:#8e44ad,stroke-width:1.5px,color:white
    classDef dependency fill:#e67e22,stroke:#d35400,stroke-width:1.5px,color:white
    classDef complete fill:#27ae60,stroke:#1e8449,stroke-width:2px,color:white

    class A alert
    class B decision
    class C,F,G content
    class D,H,I,J security
    class E,K,L,M dependency
    class N complete

Recovery Time Objectives

ScenarioRTO TargetProcedure
Broken deployment< 15 minutesRe-run deploy-s3.yml from last good commit
Content regression< 30 minutesgit revert + auto-deploy pipeline
Dependency vulnerability< 4 hoursnpm audit fix + PR + deploy
Security incident< 1 hourCloudFront disable + incident response

ISMS Reference: BCP Plan | Incident Response


๐Ÿ“ฆ Dependabot Security Configuration

Configuration: .github/dependabot.yml

Dependabot is configured with two package ecosystems, both scheduled on Monday to batch updates and reduce CI noise.

Dependabot Configuration Summary

EcosystemDirectorySchedulePR LimitGroups
npm/Weekly, Mon 06:00 UTC10dev-deps (minor/patch), prod-deps (minor/patch)
github-actions/Weekly, Mon 07:00 UTCUnlimitedgithub-actions (minor/patch)

Update Grouping Strategy

graph LR
    A[Dependabot Scan] --> B{Package Type?}
    B -->|Development dep| C[Group: development-dependencies<br/>minor + patch updates]
    B -->|Production dep| D[Group: production-dependencies<br/>minor + patch updates]
    B -->|GitHub Action| E[Group: github-actions<br/>minor + patch updates]
    C --> F[Single PR: all dev dep updates]
    D --> G[Single PR: all prod dep updates]
    E --> H[Single PR: all action SHA updates]
    F --> I[CI gates validate]
    G --> I
    H --> I
    I --> J{Pass?}
    J -->|Yes| K[Auto-merge eligible]
    J -->|No| L[Manual review required]

    classDef scanner fill:#3498db,stroke:#2980b9,stroke-width:2px,color:white
    classDef decision fill:#f39c12,stroke:#e67e22,stroke-width:2px,color:black
    classDef group fill:#9b59b6,stroke:#8e44ad,stroke-width:1.5px,color:white
    classDef pr fill:#e67e22,stroke:#d35400,stroke-width:1.5px,color:white
    classDef pass fill:#27ae60,stroke:#1e8449,stroke-width:1.5px,color:white
    classDef fail fill:#e74c3c,stroke:#c0392b,stroke-width:1.5px,color:white

    class A scanner
    class B,J decision
    class C,D,E group
    class F,G,H pr
    class I,K pass
    class L fail

Commit Message Convention

TypePrefixExample
npm dep updatebuild(deps):build(deps): bump eslint from 8.x to 9.x
npm dev depbuild(deps-dev):build(deps-dev): bump vitest from 2.x to 3.x
Actions updatebuild(deps):build(deps): bump actions/checkout from v4 to v5

Security Labels: All Dependabot PRs are labelled dependencies + javascript or github_actions for easy filtering.


๐Ÿ“ก Workflow Monitoring & Alerting

Workflow Status Badges

All primary workflows expose real-time status badges in README.md and this document for instant visibility into pipeline health:

WorkflowBadgeTarget
Test & ReportTest and ReportGreen always
CodeQLCodeQLGreen always
E2E TestsE2E TestsGreen always
REUSEREUSE ComplianceGreen always
OpenSSF ScorecardOpenSSF Scorecardโ‰ฅ 8.0/10

GitHub Security Dashboard Integration

The following tools integrate with the GitHub Security Dashboard via SARIF or native mechanisms:

ToolIntegration TypeDestination
CodeQLSARIF via github/codeql-action/analyzeGitHub Security Dashboard (code scanning alerts)
OpenSSF ScorecardSARIF via github/codeql-action/upload-sarifGitHub Security Dashboard (code scanning alerts)
DependabotNative GitHub integrationGitHub Security Dashboard (Dependabot alerts)

Alerting Channels

EventAlert ChannelSeverity
Critical CVE foundGitHub Security AdvisoriesP1 โ€” Immediate
Workflow failure on mainGitHub email notificationP2 โ€” Same day
Scorecard score dropWeekly scorecard badgeP3 โ€” Weekly review
Dependabot PR openedGitHub PR notificationP4 โ€” Next Monday batch

๐Ÿ”’ ISMS Policy Alignment Summary

Policy Coverage

ISMS PolicyWorkflows Implementing ControlsEvidence
๐Ÿ› ๏ธ Secure Development PolicyAll 24 workflowsThis document
๐Ÿ” Information Security PolicyCodeQL, OpenSSF ScorecardSECURITY_ARCHITECTURE.md
๐Ÿ”‘ Access Control Policydeploy-s3 (OIDC), release (minimal permissions)Workflow files
๐Ÿ”’ Cryptography Policydeploy-s3 (TLS), release (Sigstore/SLSA)Attestations
๐Ÿ”“ Open Source PolicyREUSE compliance workflowREUSE.toml
๐Ÿ” Vulnerability ManagementCodeQL, npm audit, Dependency ReviewGitHub Security tab, PR checks
๐Ÿ“ Change ManagementBranch protection, CI gates, PR reviewsWorkflow gate enforcement
๐Ÿšจ Incident Response PlanRollback procedures, incident classificationยงFailure Handling section

Secure Development Policy Alignment

Policy SectionImplementationEvidence
ยง3.2 Architecture DocumentationDocumentation-as-code in release workflowSECURITY_ARCHITECTURE.md
ยง3.3 Testing Requirements5,933+ unit/integration tests, E2E tests, 82%+ coverageTest & Report Workflow
ยง4.1 CI/CD SecurityAll workflows with security controlsThis document
ยง4.3 Security ScanningCodeQL, npm audit, DependabotCodeQL Workflow
ยง4.4 Supply Chain SecuritySLSA L3, SBOM, Dependency Review, REUSE, npm provenanceRelease Workflow
ยง10.1 CI/CD Workflow Excellence24 automated workflows, 100% SHA-pinnedThis document

Compliance Frameworks

FrameworkVersionControls ImplementedEvidence Location
ISO 270012022A.8.25, A.8.26, A.8.27, A.8.28, A.12.1.4, A.12.6.1, A.14.2.1Workflow files + this document
NIST CSF2.0ID.SC (Supply Chain), DE.CM (Detection), PR.DS (Data Security)SECURITY_ARCHITECTURE.md
CIS Controlsv8.12.2, 4.1, 7.1, 16.1, 16.5, 16.7, 16.12Scorecard
SLSAL3Build provenance, hermetic build, non-falsifiable, authenticatedAttestations
OpenSSFโ€”SHA-pinned actions (100%), Harden Runner, branch protectionScorecard Report
EU CRA2024SBOM generation, vulnerability disclosure, security updatesRelease Workflow

๐Ÿ”ฌ Political Intelligence Operations Centre

The 15 agentic news workflows collectively form a European Parliament Political Intelligence Operations Centre โ€” a systematic, automated pipeline that transforms raw parliamentary data into multi-language political intelligence articles published daily, weekly, monthly, quarterly, annually and across the full EP-term electoral cycle.

Intelligence Collection Cycle

The following diagram shows the complete intelligence cycle from EP data collection through analysis to multi-language publication:

flowchart TD
    subgraph Collection["๐Ÿ“ก COLLECTION<br/>(EP MCP Server v1.4.0+)"]
        direction TB
        C1["๐Ÿ—ณ๏ธ Votes &<br/>Adopted Texts"]
        C2["๐Ÿ“œ Legislative<br/>Procedures"]
        C3["๐Ÿ›๏ธ Committee<br/>Documents"]
        C4["๐ŸŽค Plenary<br/>Speeches"]
        C5["โ“ Parliamentary<br/>Questions"]
        C6["๐Ÿ“… Events &<br/>Meetings"]
        C7["๐Ÿ‘ค MEP Data &<br/>Declarations"]
    end

    subgraph Analysis["๐Ÿ”ฌ ANALYSIS<br/>(Political Intelligence Pipeline)"]
        direction TB
        A1["๐Ÿท๏ธ Classification<br/>7-dimension taxonomy"]
        A2["โš ๏ธ Risk Assessment<br/>5ร—5 Likelihood ร— Impact"]
        A3["๐ŸŽญ Threat Landscape<br/>6 political dimensions"]
        A4["๐Ÿ’ผ SWOT Analysis<br/>Evidence-based quadrants"]
        A5["๐Ÿ“Š Significance Scoring<br/>Publication priority"]
        A6["๐Ÿ‘ฅ Stakeholder Impact<br/>Multi-perspective"]
    end

    subgraph Production["๐Ÿ“ฐ PRODUCTION<br/>(9 Content Workflows)"]
        direction TB
        P1["โšก Breaking News<br/>Every 6 hours"]
        P2["๐Ÿ“‹ Daily Intelligence<br/>Motions + Propositions + Committees"]
        P3["๐Ÿ“… Weekly Intelligence<br/>Week Ahead + Weekly Review"]
        P4["๐Ÿ“Š Monthly Intelligence<br/>Month Ahead + Monthly Review"]
        P5["๐ŸŽฏ On-Demand<br/>Article Generator"]
    end

    subgraph Distribution["๐ŸŒ DISTRIBUTION<br/>(14 Languages)"]
        direction TB
        D1["๐Ÿ‡ฌ๐Ÿ‡ง English<br/>(source)"]
        D2["๐Ÿ‡ธ๐Ÿ‡ช๐Ÿ‡ฉ๐Ÿ‡ฐ๐Ÿ‡ณ๐Ÿ‡ด๐Ÿ‡ซ๐Ÿ‡ฎ<br/>Nordic Languages"]
        D3["๐Ÿ‡ฉ๐Ÿ‡ช๐Ÿ‡ซ๐Ÿ‡ท๐Ÿ‡ช๐Ÿ‡ธ๐Ÿ‡ณ๐Ÿ‡ฑ<br/>Western European"]
        D4["๐Ÿ‡ธ๐Ÿ‡ฆ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿ‡ฏ๐Ÿ‡ต๐Ÿ‡ฐ๐Ÿ‡ท๐Ÿ‡จ๐Ÿ‡ณ<br/>Global Languages"]
    end

    Collection --> Analysis --> Production --> D1
    D1 --> |"news-translate<br/>workflow"| D2 & D3 & D4

    style Collection fill:#1565C0,stroke:#0D47A1,color:#FFFFFF
    style Analysis fill:#6A1B9A,stroke:#4A148C,color:#FFFFFF
    style Production fill:#2E7D32,stroke:#1B5E20,color:#FFFFFF
    style Distribution fill:#E65100,stroke:#BF360C,color:#FFFFFF

Threat Landscape Dimensions Monitored

The political intelligence pipeline monitors six threat landscape dimensions across all parliamentary activity:

mindmap
  root((๐ŸŽญ Political<br/>Threat Landscape))
    ๐Ÿ”„ Coalition Shifts
      Grand coalition stability
      Cross-party alliance formation
      Defection patterns
      Group cohesion metrics
    ๐Ÿ” Transparency Deficit
      Access-to-information gaps
      Lobbying disclosure failures
      Declaration compliance
      Procedural opacity
    โช Policy Reversal
      Legislative rollback risk
      Position contradiction
      Commitment abandonment
      Implementation failure
    ๐Ÿ›๏ธ Institutional Pressure
      Inter-institutional friction
      Council-Parliament disputes
      Commission accountability
      Rule-of-law mechanisms
    ๐Ÿšง Legislative Obstruction
      Procedure stalling
      Amendment flooding
      Committee bottlenecks
      Trilogue deadlocks
    ๐Ÿ—ณ๏ธ Democratic Erosion
      Participation decline
      Representation gaps
      Accountability weakening
      Mandate legitimacy

Workflow Cadence โ€” Weekly Intelligence Rhythm

The 15 agentic workflows follow a carefully orchestrated schedule to ensure continuous intelligence coverage of the European Parliament across daily / weekly / monthly / quarterly / annual / term-scoped horizons.

Note: The Gantt chart below uses sample dates (week of 2026-01-05) to illustrate the recurring weekly cadence. Mermaid's gantt format requires concrete dates; the actual schedule repeats every week.

gantt
    title Weekly Agentic Workflow Cadence UTC โ€” Sample Week
    dateFormat YYYY-MM-DD
    axisFormat %a

    section Daily Mon-Fri
    Committee Reports 04h00 UTC    :active, d1, 2026-01-05, 1d
    Propositions 05h00 UTC         :active, d2, 2026-01-05, 1d
    Motions 06h00 UTC              :active, d3, 2026-01-05, 1d
    Breaking News 4x daily         :crit, d4, 2026-01-05, 1d

    section Weekly
    Week Ahead Fri 07h00 UTC       :d5, 2026-01-09, 1d

    section Weekend
    Weekly Review Sat 09h00 UTC    :d6, 2026-01-10, 1d

    section Translation
    Translate Weekdays 3x daily    :d7, 2026-01-05, 5d
    Translate Sat 15h00 UTC        :d8, 2026-01-10, 1d

    section Monthly
    Month Ahead 1st 08h00 UTC      :d9, 2026-01-01, 1d
    Monthly Review 28th 10h00 UTC  :d10, 2026-01-28, 1d

Data Flow โ€” EP MCP Server to Published Article

flowchart LR
    subgraph "๐Ÿ›๏ธ European Parliament"
        EP["EP Open Data Portal"]
    end

    subgraph "๐Ÿ”Œ MCP Layer"
        MCP["EP MCP Server<br/>v1.4.0+<br/>(180s timeout;<br/>60+ tools, sliding + fixed-window feeds)"]
    end

    subgraph "๐Ÿค– Agent Layer"
        Agent["GitHub Copilot<br/>claude-opus-4.8 (articles)<br/>claude-sonnet-4.6 (translate)"]
        Analyze["Analysis Pipeline<br/>11 methodology assets<br/>39 templates"]
    end

    subgraph "๐Ÿ“ฐ Output Layer"
        EN["๐Ÿ‡ฌ๐Ÿ‡ง English Article"]
        Translate["Translation Agent"]
        Multi["๐ŸŒ 13 Additional<br/>Languages"]
    end

    subgraph "๐Ÿš€ Deployment"
        PR["Pull Request"]
        Pages["GitHub Pages"]
        S3["AWS S3 CDN"]
    end

    EP --> MCP --> Agent --> Analyze --> EN --> PR
    EN --> Translate --> Multi --> PR
    PR --> |"merge"| Pages & S3

    style EP fill:#003399,stroke:#002266,color:#FFFFFF
    style MCP fill:#6A1B9A,stroke:#4A148C,color:#FFFFFF
    style Agent fill:#1565C0,stroke:#0D47A1,color:#FFFFFF
    style Analyze fill:#C62828,stroke:#B71C1C,color:#FFFFFF
    style EN fill:#2E7D32,stroke:#1B5E20,color:#FFFFFF
    style Translate fill:#E65100,stroke:#BF360C,color:#FFFFFF
    style Multi fill:#F57F17,stroke:#F9A825,color:#000000
    style PR fill:#37474F,stroke:#263238,color:#FFFFFF
    style Pages fill:#00695C,stroke:#004D40,color:#FFFFFF
    style S3 fill:#FF6F00,stroke:#E65100,color:#FFFFFF

Analysis Artifact Structure

Each content workflow deposits analysis artifacts in an isolated directory. Cross-article artifacts (such as ai-daily-synthesis.md) live at the date root analysis/daily/{date}/, while per-workflow artifacts are scoped under analysis/daily/{date}/{article-type}/:

analysis/daily/2026-03-31/
โ”œโ”€โ”€ ai-daily-synthesis.md              โ† Cross-article synthesis (date root)
โ”œโ”€โ”€ breaking/                          โ† news-breaking workflow
โ”‚   โ”œโ”€โ”€ manifest.json
โ”‚   โ”œโ”€โ”€ classification/
โ”‚   โ”œโ”€โ”€ threat-assessment/
โ”‚   โ”œโ”€โ”€ risk-scoring/
โ”‚   โ””โ”€โ”€ data/                          โ† EP MCP data for this workflow
โ”œโ”€โ”€ committee-reports/                 โ† news-committee-reports workflow
โ”‚   โ”œโ”€โ”€ manifest.json
โ”‚   โ”œโ”€โ”€ classification/
โ”‚   โ””โ”€โ”€ data/
โ”œโ”€โ”€ motions/                           โ† news-motions workflow
โ”‚   โ”œโ”€โ”€ manifest.json
โ”‚   โ””โ”€โ”€ data/
โ”œโ”€โ”€ propositions/                      โ† news-propositions workflow
โ”‚   โ”œโ”€โ”€ manifest.json
โ”‚   โ””โ”€โ”€ data/
โ””โ”€โ”€ week-ahead/                        โ† news-week-ahead workflow (Fridays)
    โ”œโ”€โ”€ manifest.json
    โ””โ”€โ”€ data/

๐Ÿšจ Isolation Rule: Each workflow writes ONLY to its own {article-type-slug}/ subdirectory. Cross-workflow overwrites are prohibited. The ai-*.md synthesis files at the date root aggregate across all workflows.


๐Ÿ“– Prompt Library Architecture

The agentic news workflows share a common prompt library under .github/prompts/. Each file maps to a specific pipeline stage and is imported by the workflow agent at runtime:

#FilePipeline StagePurpose
000-scope-and-ground-rules.mdAll stagesFoundational rules, shell-safety constraints, banned patterns, time budgets
101-data-collection.mdStage AMCP tool invocation patterns, feed selection, data-window logic
202-analysis-protocol.mdStage B10-step AI analysis protocol (Rules 1โ€“22), 2-pass mandatory
303-analysis-completeness-gate.mdStage CCompleteness validator invocation, threshold enforcement
404-article-generation.mdStage DArtifact-to-article section map, Read-Before-Write rule
505-analysis-to-article-contract.mdStage DData contract between analysis and render
606-pr-and-safe-outputs.mdStage ESingle PR semantics, timing constraints, banned alternatives
707-mcp-reference.mdStage AEP MCP Server tool reference (60+ tools), IMF/World Bank guidance
808-infrastructure.mdAll stagesShell-safety long-form rules, forbidden expansion patterns
909-troubleshooting.mdAll stagesCommon failure modes, workarounds, timeout handling
1010-horizon-stage-helpers.mdStage BLong-horizon-specific artifact requirements
1111-forward-projection.mdStage BForward-projection methodology and scenario authoring
1212-electoral-cycle.mdStage BElectoral overlay invariants, cycle-position drivers

Drift-Guard Lint (npm run lint:prompts)

scripts/lint-prompts.js validates every .md file in .github/prompts/ and all news-*.md workflows against banned patterns:

Banned PatternRisk if Present
checkpoint prPartial PRs break the single-PR invariant
keep-aliveIdle heartbeats waste budget without output
heartbeatSame as keep-alive
progressive safe outputPartial patches violate snapshot semantics
push_repo_memoryUnaudited state persistence

The lint is wired into compile-agentic-workflows.yml and fails CI on any match. news-translate.md is exempted from the multi-call check (legitimate multi-call flush for 14-language fan-out).

AWF Firewall (Squid Proxy Allowlist)

All agentic workflows execute inside a sandboxed Docker container with network access restricted by a Squid proxy (AWF Firewall). Only explicitly allowlisted domains are reachable:

Allowed DomainPurpose
data.europarl.europa.euEP Open Data Portal (MCP Server backend)
api.github.comGitHub API (PR creation, file operations)
github.comGit operations
registry.npmjs.orgnpm package resolution
sdmxcentral.imf.orgIMF SDMX API (economic data)
api.worldbank.orgWorld Bank Open Data API

All other outbound network traffic is blocked by the Squid proxy. This prevents data exfiltration and restricts the agent's attack surface to known-good endpoints.


๐Ÿ”ฌ Political Intelligence Methodologies & Templates Framework

The 15 agentic news workflows produce political intelligence using a structured framework of 22 analysis methodologies and 60 analysis artifact templates. This section documents the complete political intelligence methodology stack.

Analysis Methodology Catalogue (analysis/methodologies/)

The following 22 methodology files govern how political intelligence is authored:

#Methodology FileDomainKey Capabilities
1ai-driven-analysis-guide.mdCore protocol10-step analysis protocol, Rules 1โ€“22, Pass-2 mandatory improvement cycle
2osint-tradecraft-standards.mdTradecraftAdmiralty Code (A1โ€“F6), WEP confidence bands, source grading, โ‰ฅ10 SATs/run
3political-threat-framework.mdThreat analysis6-dimension political threat landscape (coalition shifts, transparency deficit, policy reversal, institutional pressure, legislative obstruction, democratic erosion)
4political-risk-methodology.mdRisk assessment5ร—5 likelihood ร— impact matrix, residual risk, risk velocity
5political-swot-framework.mdStrategicEvidence-based SWOT/TOWS, quantitative scoring, cross-domain linkage
6political-classification-guide.mdClassification7-dimension political alignment taxonomy, significance scoring
7electoral-cycle-methodology.mdElectoralCycle-position drivers, volatility forecast, turnout modelling
8electoral-domain-methodology.mdElectoralDomain-specific electoral analysis (seats, mandates, coalitions)
9forward-projection-methodology.mdForecastingMulti-scenario modelling, probability bands, time-horizon calibration
10synthesis-methodology.mdSynthesisMulti-source intelligence fusion, cross-artifact correlation
11strategic-extensions-methodology.mdLong-horizonQuarter/year/term-scoped strategic analysis extensions
12per-artifact-methodologies.mdConstruction rules34 per-artifact sections โ€” construction rules + quality signals for each template
13analytical-supplementary-methodology.mdSupplementaryCross-session intelligence, devil's advocate, wildcards
14per-document-methodology.mdDocument analysisEP document deep-analysis framework (5-point structured analysis)
15structural-metadata-methodology.mdMetadataManifest structure, artifact cataloging, cross-reference mapping
16imf-indicator-mapping.mdEconomicIMF WEO/FM/IFS/BOP/ER/PCPS indicator โ†’ article-section mapping
17worldbank-indicator-mapping.mdEconomicWorld Bank WDI social/health/education/governance indicators
18political-style-guide.mdStyleEconomist-quality editorial standards, prose requirements
19political-style-guide.jsonStyle (machine)Machine-readable style rules for automated validation
20artifact-catalog.mdCatalogueMaster map: artifact โ†’ methodology + template + depth floor + Mermaid type
21reference-quality-thresholds.jsonQuality floorsPer-artifact line-count floors enforced by Stage-C validator (v1.4.0)
22README.mdIndexMethodology library entry point

Analysis Template Catalogue (analysis/templates/)

The following 60 templates are used by Stage-B to produce structured intelligence artifacts. They are grouped by analytical domain:

Political Analysis Templates (6)

TemplatePurposeKey Outputs
coalition-dynamics.mdCoalition formation/dissolution analysisAlliance mapping, defection patterns, cohesion metrics
coalition-mathematics.mdQuantitative coalition modellingSeat arithmetic, blocking minorities, qualified majority paths
political-capital-risk.mdPolitical capital expenditure/depletionLeadership position strength, mandate utilisation
seat-projection.mdElectoral seat projection modellingGroup size forecasts, majority thresholds
voter-segmentation.mdVoter base analysisDemographic segments, issue salience
voting-patterns.mdRoll-call vote analysisCross-party alliances, abstention clusters, margin analysis

Threat & Risk Templates (6)

TemplatePurposeKey Outputs
threat-analysis.mdStructured threat identificationThreat actors, capabilities, intent
threat-model.mdSTRIDE-based political threat modellingAttack trees, mitigation mapping
political-threat-landscape.md6-dimension threat landscape scanDimension severity scores, trend vectors
risk-assessment.mdLikelihood ร— Impact risk scoringRisk register, residual risk
risk-matrix.md5ร—5 risk matrix visualisationHeat map, priority ranking
actor-threat-profiles.mdPer-actor threat profilesCapability, intent, opportunity scores

Strategic Analysis Templates (6)

TemplatePurposeKey Outputs
swot-analysis.mdEvidence-based SWOT quadrantsโ‰ฅ80 words/item, cross-domain linkage
quantitative-swot.mdScored SWOT with numeric weightingWeighted priority scores, TOWS strategies
pestle-analysis.mdPolitical-Economic-Social-Tech-Legal-Environmental6-dimension macro context
forces-analysis.mdPorter's 5 Forces adapted for politicsCompetitive dynamics, barrier analysis
scenario-forecast.mdMulti-scenario probability modelling2โ€“4 named scenarios with WEP bands
wildcards-blackswans.mdLow-probability / high-impact eventsEarly warning signals, contingency options

Intelligence Assessment Templates (6)

TemplatePurposeKey Outputs
intelligence-assessment.mdICD-203-style structured assessmentKey judgements, confidence levels, alternatives
devils-advocate-analysis.mdChallenge function for dominant hypothesisCounter-arguments, blind-spot identification
significance-classification.mdPublication priority classificationHigh/Medium/Low + justification
significance-scoring.mdMulti-factor significance scoreNovelty, scope, impact, urgency composite
cross-session-intelligence.mdCross-run intelligence continuityTrend tracking, hypothesis evolution
synthesis-summary.mdMulti-source intelligence synthesisBLUF, evidence base, confidence assessment

Legislative Analysis Templates (6)

TemplatePurposeKey Outputs
legislative-pipeline-forecast.mdProcedure stage tracking & timelinePassage probability, next steps, blockers
legislative-velocity-risk.mdLegislative pace risk assessmentAcceleration/deceleration signals, backlog risk
legislative-disruption.mdAmendment flooding/obstruction detectionDisruption indicators, obstruction tactics
mandate-fulfilment-scorecard.mdPolitical programme delivery trackingPromise vs. delivery, completion percentage
implementation-feasibility.mdLegislative implementation assessmentTransposition complexity, compliance burden
parliamentary-calendar-projection.mdSession calendar forward-projectionSitting weeks, recess periods, crunch points

Context & Comparative Templates (7)

TemplatePurposeKey Outputs
economic-context.mdIMF/World Bank economic contextGDP, inflation, employment, fiscal indicators
historical-baseline.mdHistorical norm establishmentBaseline metrics for deviation detection
historical-parallels.mdPrecedent-based reasoningAnalogous situations, outcomes, lessons
comparative-international.mdCross-jurisdiction comparisonEU vs. national parliament comparisons
presidency-trio-context.mdCouncil Presidency trio analysisPriority alignment, legislative agenda
commission-wp-alignment.mdCommission Work Programme trackingCWP delivery, legislative pipeline alignment
term-arc.mdEP term trajectory analysisTerm phase, momentum indicators

Forward-Looking Templates (5)

TemplatePurposeKey Outputs
forward-indicators.mdLeading indicator identificationEarly warning signals, predictive metrics
forward-projection.mdStructured scenario projectionTime-horizon-calibrated WEP probability bands
impact-matrix.mdMulti-stakeholder impact assessmentImpact scores by stakeholder ร— dimension
consequence-trees.mdCascading consequence modelling2nd/3rd-order effects, feedback loops
per-file-political-intelligence.mdPer-document intelligence extractionDocument-level political significance

Media & Stakeholder Templates (4)

TemplatePurposeKey Outputs
media-framing-analysis.mdMedia narrative frame identificationDominant frames, counter-narratives
stakeholder-impact.mdStakeholder impact assessment (โ‰ฅ150 words/perspective)Multi-perspective analysis, winners/losers
stakeholder-map.mdStakeholder power/interest mappingInfluence quadrant, alliance networks
actor-mapping.mdPolitical actor identification & classificationActor profiles, motivations, capabilities

Meta & Audit Templates (10)

TemplatePurposeKey Outputs
methodology-reflection.mdAnalysis quality self-assessment (Step 10.5)SAT count (โ‰ฅ10), WEP coverage, improvement notes
workflow-audit.mdWorkflow execution audit trailStage timings, tool calls, data coverage
mcp-reliability-audit.mdMCP Server reliability assessmentTool success rates, latency, data freshness
cross-reference-map.mdInter-artifact cross-reference networkArtifact dependencies, citation graph
cross-run-diff.mdDelta analysis between consecutive runsChanged assessments, new signals
data-download-manifest.mdMCP data download recordTools invoked, data volumes, timestamps
reference-analysis-quality.mdQuality benchmark comparisonPer-artifact quality scores vs. reference
imf-vintage-audit.mdIMF data vintage verificationDataset recency, WEO edition, vintage dates
session-baseline.mdSession initial state captureStarting conditions, prior-run context
political-classification.md7-dimension political classification outputAlignment scores, taxonomy placement

Output & Index Templates (4)

TemplatePurposeKey Outputs
executive-brief.mdBLUF executive summaryKey judgements, confidence, recommendations
deep-analysis.mdExtended deep-analysis sectionFull analytical depth, evidence chains
intelligence-assessment.mdICD-203 formatted assessmentStructured intelligence product
analysis-index.mdRun-level artifact indexTable of contents for all run outputs

Quality Gates & Enforcement

Per-Artifact Line Floors (reference-quality-thresholds.json v1.4.0)

The Stage-C completeness validator (scripts/validate-analysis-completeness.js) enforces minimum line counts per artifact type:

CategoryFloor RangeEnforcement
Executive brief80โ€“120 linesRED (blocking) โ€” PR creation blocked
Intelligence artifacts40โ€“100 linesRED (blocking)
Risk scoring artifacts35โ€“80 linesRED (blocking)
Classification artifacts30โ€“60 linesRED (blocking)
Data manifests20โ€“40 linesRED (blocking)

DataMode reductions (when EP MCP data availability is constrained):

  • full (default): 100% of configured floors
  • degraded-imf / degraded-voting: 85% of floors
  • title-only: 75% of floors
  • minimal: 65% of floors

Tradecraft Quality Signals

In addition to line floors, the following tradecraft signals are always RED (blocking) regardless of --strict mode:

SignalRequirementArtifacts Affected
WEP BandEvery headline judgement must carry a WEP (Words of Estimative Probability) confidence band + time horizon12 artifacts (executive-brief, scenario-forecast, forward-projection, threat-model, etc.)
Admiralty GradeEvery external source must carry an Admiralty Code grade (A1โ€“F6)13 artifacts (intelligence assessments, comparatives, historical parallels)
โ‰ฅ10 SATs per runAt least 10 Structured Analytic Techniques applied and documented in methodology-reflection.mdmethodology-reflection.md ยง12
Mermaid diagramsRequired structural diagrams presentPer-artifact requirements in artifact-catalog.md
Required sectionsTemplate-mandated sections presentAll templates with ## Required Sections headers

ICD-203 / WEP Confidence Framework

The intelligence assessments follow the US Intelligence Community Directive 203 (ICD-203) confidence framework adapted for political intelligence:

WEP BandProbability RangeUsage
Almost certain93โ€“99%Reserved for near-term procedural certainties
Very likely80โ€“92%Strong evidence, limited alternatives
Likely63โ€“79%Preponderance of evidence supports
Roughly even40โ€“62%Evidence supports multiple outcomes equally
Unlikely20โ€“39%Limited evidence against dominant view
Very unlikely5โ€“19%Minimal evidence, contrarian scenarios
Remote1โ€“4%Black swan / wildcard territory

Admiralty Source Grading

ReliabilityCredibilityCombined Grade
A Completely reliable1 ConfirmedA1 (highest)
B Usually reliable2 Probably trueB2
C Fairly reliable3 Possibly trueC3
D Not usually reliable4 DoubtfulD4
E Unreliable5 ImprobableE5
F Cannot be judged6 Cannot be judgedF6 (lowest)

EP Official Journal and adopted texts are rated A1; MCP feed data is rated B2; press reports are rated C3 unless corroborated.


๐Ÿ”„ Continuous Improvement

Planned Enhancements

See FUTURE_WORKFLOWS.md for:

  • Advanced security scanning
  • Performance testing enhancements
  • Deployment automation improvements
  • Multi-environment support
  • Fuzzing integration

DocumentFocusLink
๐Ÿ” Security ArchitectureCurrent security implementationSECURITY_ARCHITECTURE.md
๐Ÿ“ˆ Security FlowchartsProcess flows with security controlsFLOWCHART.md
๐Ÿ“Š Data ModelData structures and flowsDATA_MODEL.md
๐Ÿ›๏ธ ArchitectureSystem structure (ยงAnalysis Framework)ARCHITECTURE.md
๐Ÿš€ Future WorkflowsPlanned enhancementsFUTURE_WORKFLOWS.md
๐Ÿ“‹ Release ProcessRelease proceduresdocs/RELEASE_PROCESS.md
๐Ÿ›ก๏ธ ISMS PolicySecurity policy frameworkHack23 ISMS-PUBLIC
๐Ÿ“ฆ Dependabot ConfigAutomated dependency updates.github/dependabot.yml
๐Ÿ”ฌ Analysis Methodologies22 intelligence methodologiesanalysis/methodologies/
๐Ÿ“„ Analysis Templates60 artifact templatesanalysis/templates/
๐Ÿ“– Prompt Library13-file prompt architecture.github/prompts/

๐Ÿ“ž Questions? Contact: Security Team
๐Ÿ” Security Issues? See SECURITY.md for vulnerability disclosure


Last updated: 2026-05-28 by Documentation Architect / Security Architect (EU Parliament Monitor v0.9.26)