CONTRIBUTING.md

April 27, 2026 Β· View on GitHub

Hack23 Logo

🀝 Contributing β€” Riksdagsmonitor

πŸ›‘οΈ Secure Contribution Guidelines
🎯 Building Democratic Transparency Through Collaborative Excellence

Owner Version Effective Date Review Cycle

πŸ“‹ Document Owner: CEO | πŸ“„ Version: 1.0 | πŸ“… Last Updated: 2026-02-20 (UTC)
πŸ”„ Review Cycle: Quarterly | ⏰ Next Review: 2026-05-20
🏒 Owner: Hack23 AB (Org.nr 5595347807) | 🏷️ Classification: Public


🎯 Purpose Statement

This contributing guide establishes secure contribution procedures for Riksdagsmonitor, implementing Secure Development Policy and Change Management from Hack23 AB's ISMS framework.

We believe in security through transparency and continuous improvement, welcoming contributions that enhance democratic transparency while maintaining our high security standards.

β€” James Pether SΓΆrling, CEO/Founder


Contributing

Hi there! We're thrilled that you'd like to contribute to Riksdagsmonitor. Your help is essential for keeping it great.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Issues and PRs

If you have suggestions for how this project could be improved, or want to report a bug, open an issue! We'd love all and any contributions. If you have questions, too, we'd love to hear them.

We'd also love PRs. If you're thinking of a large PR, we advise opening up an issue first to talk about it, though! Look at the links below if you're not sure how to open a PR.

Submitting a Pull Request

  1. Fork and clone the repository.
  2. Install dependencies: npm install
  3. Make sure the tests pass on your machine: npm test
  4. Create a new branch: git checkout -b my-branch-name
  5. Make your change, add tests, and make sure the tests still pass.
  6. Validate HTML: npm run htmlhint
  7. Push to your fork and submit a pull request.
  8. Pat yourself on the back and wait for your pull request to be reviewed and merged.

Here are a few things you can do that will increase the likelihood of your pull request being accepted:

  • Follow the existing code style (HTML5 semantic markup, CSS custom properties, mobile-first design)
  • Write and update tests (Vitest for unit tests, Cypress for E2E)
  • Keep your changes as focused as possible
  • Ensure WCAG 2.1 AA accessibility compliance
  • Validate HTML with HTMLHint before submitting
  • Write a good commit message

Work in Progress pull requests are also welcome to get feedback early on.

πŸ—οΈ Project Structure

DirectoryPurpose
*.htmlMulti-language index pages (14 languages)
styles.cssCyberpunk theme design system
js/Dashboard JavaScript modules (Chart.js, D3.js, Mermaid init)
dashboard/Interactive intelligence dashboards
news/Rendered political news articles ($DATE-$SUB-$LANG.html)
analysis/daily/$DATE/$SUB/Per-day analysis artifacts consumed by the aggregator
analysis/methodologies/Editorial method files (source of truth for how analysis is done)
analysis/templates/Output section templates (source of truth for what goes in an article)
scripts/aggregate-analysis.tsConcatenates daily artifacts β†’ canonical article.md + manifest
scripts/render-articles.ts + scripts/render-lib/Markdown β†’ sanitised HTML (unified / remark / rehype)
scripts/Other build, generation, and utility scripts
tests/Vitest unit tests
cypress/Cypress E2E tests
cia-data/CIA platform data exports

πŸ“° How to add a new news type

The legacy content-generator approach (generate-news-enhanced, article-template) has been removed. To add a new news type:

  1. Pick a subfolder slug (e.g. interpellations-deep) β€” this becomes analysis/daily/$DATE/$SUB/.
  2. Register it in the aggregator section-order config under analysis/templates/ β€” this determines narrative flow without touching TypeScript.
  3. Copy an existing per-type workflow .md from .github/workflows/news-*.md (e.g. news-propositions.md) and adapt:
    • analysis phase: the specific MCP queries the new type needs
    • analysis gate: the per-type 9-artifact or 14-artifact list (see .github/prompts/05-analysis-gate.md)
    • front-matter: schedule, subfolder slug, description
  4. Compile with gh aw compile to produce the matching .lock.yml.
  5. Never hand-write localised HTML. The per-type workflow only produces $DATE-$SUB-en.html + $DATE-$SUB-sv.html; the rest are the sole responsibility of the news-translate workflow.

See WORKFLOWS.md Β§5 for the full agentic-workflow structure, and ARCHITECTURE.md Β§"News Generation Pipeline Architecture" for the aggregator/renderer contract.

βœ… Quality Gates

All PRs must pass these quality gates before merge:

CheckToolPurpose
HTML ValidationHTMLHintStandards compliance
Link CheckingLinkinatorVerify internal/external links
JavaScript LintingESLintCode quality
Unit TestsVitestFunctionality verification
Security ScanningCodeQL, DependabotVulnerability detection
Secret ScanningGitHubCredential leak prevention

🌐 Multi-Language Support

Riksdagsmonitor supports 14 languages. When making content changes:

  • Update all affected language files
  • Use lang attribute on <html> tags
  • Support RTL for Arabic (index_ar.html) and Hebrew (index_he.html)
  • Include hreflang tags for SEO
  • See TRANSLATION_GUIDE.md for vocabulary reference

πŸ€– GitHub Copilot Agents

This project has 14 specialized GitHub Copilot agents to assist development:

  • security-architect β€” Security architecture and ISMS compliance
  • documentation-architect β€” C4 models and technical documentation
  • quality-engineer β€” HTML/CSS validation and accessibility
  • frontend-specialist β€” Responsive design and multi-language support
  • intelligence-operative β€” Political data analysis
  • content-generator β€” Automated news generation

Learn more in AGENTS.md.

Resources


πŸ› οΈ Development & Security Policies

πŸ“ Project Documentation


πŸ“‹ Document Control:
βœ… Approved by: James Pether SΓΆrling, CEO
πŸ“€ Distribution: Public
🏷️ Classification: Confidentiality: Public
πŸ“… Effective Date: 2026-02-20
⏰ Next Review: 2026-05-20
🎯 Framework Compliance: ISO 27001 NIST CSF 2.0 CIS Controls


πŸ”— Hack23 Ecosystem

🌐 Platforms πŸ“¦ Open-Source Projects πŸ›‘οΈ Governance & Standards
πŸ—³οΈ Riksdagsmonitor β€” Swedish Parliament intelligence
πŸ‡ͺπŸ‡Ί EU Parliament Monitor β€” European coverage
πŸ•΅οΈ Citizen Intelligence Agency β€” political-data engine
🌐 Hack23 AB β€” corporate site
πŸ“° Hack23 Blog β€” engineering & policy
πŸ’Ό Hack23 on LinkedIn
πŸ—³οΈ Hack23/riksdagsmonitor
πŸ•΅οΈ Hack23/cia
πŸ‡ͺπŸ‡Ί Hack23/euparliamentmonitor
πŸ”Œ Hack23/european-parliament-mcp
βœ… Hack23/cia-compliance-manager
πŸ₯‹ Hack23/black-trigram
🏠 Hack23/homepage
πŸ›‘οΈ Hack23 ISMS-PUBLIC β€” public ISMS
πŸ”’ Information Security Policy
πŸ€– AI Policy
πŸ§ͺ Secure Development Policy
🎯 Threat Modeling Policy
⚠️ Vulnerability Management
🏷️ Classification Framework

OpenSSF Best Practices OpenSSF Scorecard ISO 27001:2022 NIST CSF 2.0 CIS Controls v8.1 Apache 2.0

πŸ—³οΈ Empower citizens Β· πŸ” Strengthen democratic accountability Β· πŸ•΅οΈ Illuminate the political process

Β© 2008–2026 Hack23 AB (Org.nr 559534-7807) Β· Maintainer: James Pether SΓΆrling, CISSP CISM