Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.47
    Preparing search index...

    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


    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


    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.

    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.

    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.

    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

    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.

    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

    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

    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.



    ๐Ÿ“‹ 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 27001NIST CSF 2.0CIS Controls


    ๐ŸŒ 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 PracticesOpenSSF ScorecardISO 27001:2022NIST CSF 2.0CIS Controls v8.1Apache 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