Code ยท Tests ยท Docs ยท Translations ยท Political Intelligence ยท Security
๐ช๐บ Civic-tech for European democracy ยท ๐ก๏ธ Security-by-design ยท ๐ 14 languages ยท โฟ WCAG 2.1 AA
๐ Document Owner: CEO | ๐ Version: 1.2 | ๐ Last Updated: 2026-04-27 (UTC) ๐ Review Cycle: Quarterly | โฐ Next Review: 2026-07-27 | ๐ท๏ธ Classification: Public
Thank you for your interest in contributing to EU Parliament Monitor โ the open-source European Parliament political-intelligence platform that publishes AI-generated, evidence-based analysis in 14 languages every day. We welcome contributions from developers, journalists, translators, political scientists, OSINT analysts, accessibility advocates, and security researchers.
This project adheres to the Contributor Covenant 2.1. By participating, you agree to maintain a respectful and inclusive environment. Report unacceptable behaviour to conduct@hack23.com.
| ๐ญ Role | ๐ฏ What you can do |
|---|---|
| ๐จโ๐ป Developers | TypeScript aggregator, MCP integrations, GitHub Actions, accessibility, performance |
| ๐ฐ Journalists | Editorial style review, political analysis quality, source attribution discipline |
| ๐ Translators | Improve any of the 14 languages (EN, SV, DA, NO, FI, DE, FR, ES, NL, AR, HE, JA, KO, ZH) |
| ๐ง Political scientists / OSINT analysts | Methodologies under analysis/methodologies/, threat-framework refinement, ACH/SWOT/PESTLE rigor |
| โฟ Accessibility advocates | WCAG 2.1 AA audits, RTL improvements (Arabic, Hebrew), screen-reader testing |
| ๐ก๏ธ Security researchers | Responsible disclosure via SECURITY.md โ see also SECURITY_ARCHITECTURE.md and THREAT_MODEL.md |
| ๐ Doc authors | Architecture docs (ARCHITECTURE.md), C4 diagrams, ADRs, runbooks |
package.json engines.node)git clone https://github.com/YOUR_USERNAME/euparliamentmonitor.git
cd euparliamentmonitor
npm install
git checkout -b feature/your-feature-name
# Render an article from analysis artifacts (manual testing)
npm run generate-article -- --run analysis/daily/2025-01-01/week-ahead
# Generate index pages
npm run generate-news-indexes
# Generate sitemap
npm run generate-sitemap
# Serve locally
npm run serve
Before committing, run these checks:
# Lint your code
npm run lint
# Auto-fix linting issues
npm run lint:fix
# Format your code
npm run format
# Check formatting
npm run format:check
# Validate HTML
npm run htmlhint
All contributions must meet these quality standards:
All contributions must include appropriate tests:
# Run unit & integration tests
npm test
# Check coverage
npm run test:coverage
# Run specific test file
npx vitest test/unit/your-test.test.js
# Run E2E tests
npm run test:e2e
# Run with UI (interactive debugging)
npm run test:e2e:ui
# Run in headed mode (see browser)
npm run test:e2e:headed
When to add E2E tests:
Required for all code changes:
.prettierrc.json configurationAll exported functions must include:
/**
* Brief function description
* @param {type} paramName - Parameter description
* @returns {type} Return value description
*/
Security Architecture: All security changes must align with the Security Architecture and ISMS Secure Development Policy.
Security Requirements:
=== instead of ==eval() and new Function()Security Review Checklist:
Security Testing:
# Run security audit
npm audit
# Run security-focused tests
npm run test:unit -- --grep="security|xss|injection|sanitize"
# Check for vulnerable dependencies
npm audit --audit-level=moderate
The project uses Husky and lint-staged to automatically:
These hooks run automatically on git commit. To bypass (not recommended):
git commit --no-verify
Use conventional commits format:
<type>(<scope>): <description>
[optional body]
[optional footer]
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating tests (use this for test-related commits!)chore: Maintenance tasksci: CI/CD changesgit commit -m "feat(news): add breaking news article type"
git commit -m "fix(mcp): handle connection timeout gracefully"
git commit -m "docs: update code standards documentation"
git commit -m "refactor(generator): reduce complexity in generateWeekAhead"
git commit -m "test: add unit tests for article template"
git commit -m "test: increase coverage for MCP client"
Run all quality checks:
npm run lint
npm run format:check
npm run htmlhint
npm test
npm run test:e2e
Check test coverage:
npm run test:coverage
# Ensure coverage thresholds are met
# Lines: โฅ80%, Branches: โฅ75%
Test your changes:
# Render an article from analysis (if applicable)
npm run generate-article -- --run analysis/daily/YYYY-MM-DD/week-ahead
# Verify output
npm run generate-news-indexes
npm run generate-sitemap
# Test E2E (if UI changes)
npm run test:e2e:headed
Update documentation if you've:
Include in your PR description:
Your PR must pass these automated checks:
euparliamentmonitor/
โโโ .github/ # GitHub workflows and configuration
โ โโโ workflows/ # CI/CD workflows + agentic workflows (news-*.md)
โ โโโ agents/ # Custom GitHub Copilot agents
โโโ scripts/ # Compiled JavaScript from src/
โ โโโ aggregator/ # Article generation aggregator
โ โโโ generators/ # Index & sitemap generators
โ โโโ mcp/ # MCP clients
โโโ src/ # TypeScript source
โ โโโ aggregator/ # Analysis aggregation + article rendering
โ โโโ generators/ # Sitemap, indexes, political intelligence
โ โโโ mcp/ # MCP client implementations
โ โโโ utils/ # Utilities (file, metadata, sanitize)
โ โโโ types/ # TypeScript type definitions
โ โโโ constants/ # Configuration constants
โโโ test/ # Unit & integration tests
โ โโโ unit/ # Unit tests
โ โโโ integration/ # Integration tests
โ โโโ fixtures/ # Test data
โ โโโ helpers/ # Test utilities
โโโ e2e/ # End-to-end tests
โ โโโ tests/ # E2E test files
โ โโโ README.md # E2E testing guide
โโโ news/ # Generated news articles
โโโ docs/ # Documentation
โ โโโ CODE_STANDARDS.md # Code quality standards
โโโ .husky/ # Pre-commit hooks
โโโ eslint.config.js # ESLint configuration
โโโ .prettierrc.json # Prettier configuration
โโโ playwright.config.js # Playwright E2E configuration
โโโ package.json # Dependencies and scripts
EU Parliament Monitor ships with a layered agent catalog under .github/agents/ โ product-domain agents that own the news critical path, plus infrastructure agents that maintain workflow and CI hygiene. See .github/agents/README.md for the full directory and the .github/skills/ and .github/prompts/ libraries that they share.
| Agent | Role |
|---|---|
๐ต๏ธ @intelligence-operative |
Senior political-intelligence analyst โ applies ACH, SWOT, PESTLE, OSINT tradecraft, threat framework. Owns Stage-B analysis artifacts. |
๐ฐ @news-journalist |
The Economist-style EP reporting in 14 languages. Authors editorial prose only when analysis artifacts are signed off. |
๐ @data-pipeline-specialist |
EP MCP integration (60+ tools), data quality, voting-records fallback to EP Open Data Portal. |
๐จ @frontend-specialist |
HTML5/CSS3, WCAG 2.1 AA accessibility, multi-language UI, RTL support. |
โ
@quality-engineer |
Vitest + Playwright, HTML validation, accessibility testing, performance benchmarking. |
โ๏ธ @devops-engineer |
gh-aw workflow compilation, GitHub Actions, S3/CloudFront deploy, MCP gateway. |
๐ @documentation-architect |
C4 models, Mermaid diagrams, ARCHITECTURE.md, ADRs. |
๐ก๏ธ @security-architect |
ISMS, GDPR, NIS2, EU CRA compliance โ reviews data classification of intelligence products. |
๐ @product-task-agent |
Issue creation, ISMS tracking, capability-roadmap coordination. |
๐ฃ @marketing-specialist |
Privacy-first multi-language engagement, GDPR-compliant outreach. |
๐ผ @business-development-specialist |
Strategic planning, civic-tech partnerships, sustainable transparency models. |
agentic-workflows.agent.md ยท news-generation.agent.md ยท ci-cleaner.agent.md ยท contribution-checker.agent.md ยท create-safe-output-type.agent.md ยท custom-engine-implementation.agent.md ยท grumpy-reviewer.agent.md ยท interactive-agent-designer.agent.md ยท technical-doc-writer.agent.md ยท w3c-specification-writer.agent.md
# View TypeScript compilation
npm run build:check
# Test article generation (requires existing analysis artifacts)
npm run generate-article -- --run analysis/daily/YYYY-MM-DD/article-type
VS Code Extensions:
VS Code Settings:
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
When contributing, be aware of how your changes may affect security badges:
Your PR may affect the scorecard if it:
Best Practices:
All new files must include proper license headers or be covered by .reuse/dep5:
For JavaScript files:
// SPDX-FileCopyrightText: 2024-2026 Hack23 AB
// SPDX-License-Identifier: Apache-2.0
For configuration files:
Add entries to .reuse/dep5 following existing patterns
New code must maintain โฅ80% line coverage, โฅ75% branch coverage:
When SonarCloud is enabled, PRs will be checked for:
See README.md - Badge Maintenance for detailed badge status and procedures.
EU Parliament Monitor operates under the Hack23 ISMS framework. All contributions must align with these public policies โ both in code (Secure Development Policy) and in conduct (Acceptable Use Policy).
| ๐๏ธ Policy | ๐ฏ Why it applies | ๐ What you must do |
|---|---|---|
| ๐ ๏ธ Secure Development Policy | All code changes go through SSDLC gates | Threat-model new pipelines; pin actions to SHAs; no eval/dynamic code |
| ๐ Information Security Policy | Integrity of analysis + confidentiality of methodology notes | Cite primary EP / IMF / World Bank sources; never leak credentials |
| ๐ค AI Policy | Analysis is AI-assisted and must be auditable | Apply Pass-1 + Pass-2 review; disclose assumptions and uncertainty |
| ๐ท๏ธ Classification Policy | Only public open-source material is used | No paywalled, leaked, or embargoed material in artifacts |
| ๐ Vulnerability Management | Severity-based remediation SLAs | Follow the SECURITY.md disclosure timeline |
| ๐ Threat Modelling Policy | New attack surfaces require STRIDE analysis | Update THREAT_MODEL.md for changes that touch CIA assets |
| ๐ Cryptography Policy | No deprecated algorithms (MD5, SHA-1, DES, 3DES) | Use modern crypto only; rely on platform / OIDC primitives |
| ๐ Incident Response Plan | Coordinated handling of security incidents | Notify security@hack23.com for any suspected incident |
| ๐ Open Source Policy | Governance, licence headers, REUSE compliance | Apache-2.0 SPDX headers on every new code file |
| ๐ช๐บ CRA Conformity Assessment | EU Cyber Resilience Act compliance | See CRA-ASSESSMENT.md for the project conformity table |
| Topic | Document |
|---|---|
| ๐๏ธ Architecture | ARCHITECTURE.md ยท DATA_MODEL.md ยท FLOWCHART.md ยท STATEDIAGRAM.md ยท MINDMAP.md |
| ๐ฐ Article generation | Article-Generation.md โ full Stage AโE pipeline |
| ๐ง Analysis methodology | analysis/methodologies/ (17 methodologies) ยท analysis/templates/ (51 templates) |
| ๐ก๏ธ Security | SECURITY.md ยท SECURITY_ARCHITECTURE.md ยท THREAT_MODEL.md ยท CRA-ASSESSMENT.md ยท CLASSIFICATION.md |
| โ๏ธ CI/CD | WORKFLOWS.md ยท .github/workflows/README.md ยท .github/prompts/README.md |
| ๐งช Testing | UnitTestPlan.md ยท E2ETestPlan.md ยท test/README.md ยท e2e/README.md |
| ๐ผ Business / lifecycle | SWOT.md ยท BCPPlan.md ยท End-of-Life-Strategy.md ยท FinancialSecurityPlan.md |
EU Parliament Monitor is part of the broader Hack23 civic-tech and security portfolio. Cross-pollination is welcome โ many architectural patterns and ISMS controls are shared.
| ๐๏ธ Project | ๐ฏ Focus | ๐ Link |
|---|---|---|
| ๐ Hack23 Homepage | Organisation site, ISMS hub | hack23.com ยท Hack23/homepage |
| ๐ ISMS-PUBLIC | Public ISO 27001 / NIST CSF / CIS / GDPR / NIS2 / EU CRA policies | Hack23/ISMS-PUBLIC |
| ๐ European Parliament MCP Server | TypeScript MCP server with 60+ EP open-data tools | Hack23/European-Parliament-MCP-Server |
| ๐ธ๐ช Riksdag Monitor | Swedish Parliament monitor (sister project, foundation for this codebase) | Hack23/riksdagsmonitor |
| ๐ต๏ธ CIA | Swedish Parliament intelligence platform (Java/Spring) | Hack23/cia |
| โ CIA Compliance Manager | CIA-triad compliance dashboard (TypeScript) | Hack23/cia-compliance-manager |
| ๐ฅ Black Trigram | Korean martial-arts game with security focus | Hack23/blacktrigram |
By contributing, you agree that your contributions will be licensed under the Apache License 2.0 โ the same licence that covers the rest of the project. All new code files must include SPDX headers:
// SPDX-FileCopyrightText: 2024-2026 Hack23 AB
// SPDX-License-Identifier: Apache-2.0
Configuration files without headers must be covered by entries in .reuse/dep5.
๐ Thank you for contributing to EU Parliament Monitor! ๐ช๐บ
Maintained by Hack23 AB โ Intelligence Operations Team under the Hack23 ISMS framework.