LABELS.md
May 3, 2026 Β· View on GitHub
π·οΈ Riksdagsmonitor β Label System
π€ Automated Pull-Request & Issue Categorisation
π― File-Path Routing Β· Title Detection Β· Body Heuristics Β· GitHub Actions Driven
π Document Owner: CEO | π Last Updated: 2026-05-03 (UTC) | π’ Owner: Hack23 AB (Org.nr 559534-7807) | π·οΈ Classification: π’ Public
π What changed since last review (v1.0 β v1.1, 2026-05-03):
- π Drift reconciliation with the live label set (
gh label list --repo Hack23/riksdagsmonitor --limit 300): the repository now carries 159 labels (was 46 in v1.0). The categories below cover the original 46 plus 113 agentic-newsroom additions, grouped as:
- Agent ownership:
agent:news-journalist,agent:security-architect,agent:documentation-architect,agent:data-pipeline-specialist,agent:intelligence-operative- Component routing:
component:content,component:visualization,component:i18n,component:navigation,component:news,component:ai-workflows,component:security,component:architecture,component:cia-data,component:data-integration,component:data-pipeline,component:workflow,component:strategy,component:future,component:performance,component:dashboard,component:documentation- Priority (canonical & legacy):
priority:critical,priority:high,priority:medium,priority:low(legacypriority-critical,priority-high,priority-medium,priority-lowstill active)- Type:
type:feature,type:documentation,type:security,type:accessibility,type:monitoring- Agentic newsroom:
agentic-workflows,agentic-workflow,agentic-news,automated-news,news-generation,news-content,news-article,auto-generated,ai-generated,needs-editorial-review,analysis-data,analysis-only- Article horizons & types:
realtime-monitor,realtime-pulse,evening-analysis,week-ahead,month-ahead,year-ahead,long-horizon,forward-look,weekly-review,monthly-review,committee-reports,propositions,motions,interpellations,interpellation-debates,opposition-motions,article:motions- Language tracks:
lang:en,lang:sv,multi-language,translations- Pipeline:
automated-pipeline,economic-context,cia-intelligence,data-update,heartbeat,news/content,content- Tooling:
npm,github-actions,code-quality,frontend,refactoring,typescript,validation,maintenance- π The taxonomy is documented categorically below; for the canonical machine-readable taxonomy see
.github/labeler.ymland the setup workflow.github/workflows/setup-labels.yml.
This document describes the automatic labeling system for the riksdagsmonitor repository. Labels are automatically applied to pull requests based on file changes, PR titles, and PR body content.
π Overview
The riksdagsmonitor repository uses an automated labeling system powered by GitHub Actions to categorize pull requests and issues. This helps maintain organization, improves searchability, and provides quick visual context about changes.
Key Features
- β Automatic labeling based on file paths, PR titles, and descriptions
- β
159 labels total β 46 base labels managed by
setup-labels.yml+ 113 labels created dynamically by agentic workflows, GitHub Actions labeler, and manual additions - β Size labels automatically calculated from PR diff
- β Security hardened workflows with SHA pinning
- β Status tracking with priority and progress labels
- β
Agentic-newsroom taxonomy:
agent:*(per-Copilot-agent owner),component:*(subsystem),priority:*/priority-*,agentic-workflows,news-generation,needs-editorial-review,auto-generated,ai-generated, horizon tags (week-ahead,month-ahead,quarter-ahead,year-ahead,long-horizon,forward-look,realtime-monitor,realtime-pulse)
Note: The
setup-labels.ymlworkflow verifies exactly 46 base labels (the core taxonomy defined in the workflow itself). The remaining 113 labels are created on-the-fly by the agentic news workflows, the GitHub Actions labeler (.github/labeler.yml), and manual issue triage. The full live label set can be queried withgh label list --repo Hack23/riksdagsmonitor --limit 300.
π Setup
Initial Setup
Run the label setup workflow to create all required labels:
- Go to Actions β Setup Repository Labels
- Click Run workflow
- (Optional) Check "Recreate all labels" to delete existing labels first
- Wait for completion (usually < 1 minute)
Direct link: Setup Repository Labels Workflow
Automatic Labeling
Once labels are created, the automatic labeler runs on every PR:
- Triggers on PR opened, synchronize, reopened, edited
- Applies labels based on
.github/labeler.ymlconfiguration - Adds size labels based on diff statistics
- Posts a summary comment on new PRs
π·οΈ Label Categories
π³οΈ Content & Features
Labels for content generation and feature development:
| Label | Color | Description |
|---|---|---|
news | News articles and content generation | |
dashboard | Interactive dashboards (Chart.js/D3.js) | |
visualization | Data visualization features | |
intelligence | Political intelligence analysis |
Auto-applies when:
- Changing files in
news/,dashboard/,js/*-dashboard.js - PR title starts with
news:,dashboard:,viz: - PR body contains
- [x] π° News Content,- [x] π Dashboard
π» Technology
Labels for technical implementation:
| Label | Color | Description |
|---|---|---|
html-css | HTML/CSS changes | |
javascript | JavaScript code changes | |
workflow | GitHub Actions workflows | |
security | Security improvements |
Auto-applies when:
- Changing
.html,.css,.jsfiles - Modifying
.github/workflows/files - Updating security documentation
- PR title starts with
html:,js:,workflow:,security:
π Data Integration
Labels for data pipeline and integration:
| Label | Color | Description |
|---|---|---|
cia-data | CIA platform data integration | |
riksdag-data | Riksdag-Regering MCP data | |
data-pipeline | ETL and data processing | |
schema | Data schema changes |
Auto-applies when:
- Changing files in
cia-data/,data/cia/,schemas/ - Modifying
scripts/load-cia-*.js,scripts/mcp-client.js - PR title starts with
cia:,riksdag:,pipeline:,schema:
π Internationalization
Labels for multi-language support (14 languages):
| Label | Color | Description |
|---|---|---|
i18n | Internationalization/localization | |
translation | Translation updates | |
rtl | RTL language support (Arabic, Hebrew) |
Auto-applies when:
- Changing
index_*.html,sitemap_*.html,news/**/*-*.html - Modifying
TRANSLATION_GUIDE.md - PR title starts with
i18n:,translation:,rtl:
Supported Languages:
- 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)
π ISMS & Compliance
Labels for security and compliance frameworks:
| Label | Color | Description |
|---|---|---|
isms | ISMS compliance changes | |
iso-27001 | ISO 27001 controls | |
nist-csf | NIST CSF compliance | |
cis-controls | CIS Controls |
Auto-applies when:
- Changing
SECURITY_ARCHITECTURE.md,THREAT_MODEL.md,CRA-ASSESSMENT.md - Modifying
.github/skills/iso-27001-controls/,.github/skills/nist-csf-mapping/ - PR title starts with
isms:,iso-27001:,nist:,cis:
Frameworks:
- ISO 27001:2022 - Information security management
- NIST CSF 2.0 - Cybersecurity framework
- CIS Controls v8.1 - Security best practices
ποΈ Infrastructure & Operations
Labels for CI/CD and infrastructure:
| Label | Color | Description |
|---|---|---|
ci-cd | CI/CD pipeline changes | |
deployment | Deployment configuration | |
performance | Performance optimization | |
monitoring | Monitoring and alerting |
Auto-applies when:
- Changing
.github/workflows/files - Modifying
CNAME,robots.txt,vite.config.js - PR title starts with
ci:,deploy:,perf:,monitoring:
π Quality & Testing
Labels for code quality and testing:
| Label | Color | Description |
|---|---|---|
testing | Test coverage | |
accessibility | WCAG 2.1 AA compliance | |
documentation | Documentation updates | |
refactor | Code refactoring |
Auto-applies when:
- Changing files in
tests/,cypress/,*.test.js - Modifying
**/*.mdfiles - PR title starts with
test:,a11y:,docs:,refactor:
π·οΈ Standard Labels
Essential workflow labels:
| Label | Color | Description |
|---|---|---|
bug | Bug fixes | |
enhancement | Enhancements | |
dependencies | Dependency updates |
Auto-applies when:
- PR title starts with
fix:,bug:,feat:,deps: - Changing
package.json,package-lock.json - PR body contains
- [x] π Bug Fix,- [x] β¨ Enhancement
π€ AI & Automation
Labels for GitHub Copilot agents and agentic workflows:
| Label | Color | Description |
|---|---|---|
agent | Agent configuration | |
skill | Skill configuration | |
agentic-workflow | Agentic workflow changes |
Auto-applies when:
- Changing
.github/agents/,.github/skills/,AGENTS.md,SKILLS.md - Modifying
.github/workflows/*.md,.github/workflows/*.lock.yml - PR title starts with
agent:,skill:,aw:
π¦ Priority Labels
Manual labels for prioritization:
| Label | Color | Description |
|---|---|---|
priority-critical | Critical priority (security, outages) | |
priority-high | High priority (important features) | |
priority-medium | Medium priority (standard work) | |
priority-low | Low priority (nice-to-have) |
Usage: Manually add to PRs/issues to indicate urgency.
π Size Labels
Automatically calculated from PR diff:
| Label | Color | Lines Changed | Description |
|---|---|---|---|
size-xs | < 10 | Extra small change | |
size-s | 10-50 | Small change | |
size-m | 50-250 | Medium change | |
size-l | 250-1000 | Large change | |
size-xl | > 1000 | Extra large change |
Auto-applies: Calculated from additions + deletions in PR diff.
π Status Labels
Manual labels for workflow tracking:
| Label | Color | Description |
|---|---|---|
status-needs-review | Needs code review | |
status-in-progress | Work in progress | |
status-blocked | Blocked by dependencies | |
status-ready | Ready to merge |
Usage: Manually add/update as PR progresses through workflow.
π§ Configuration
Labeler Configuration
The automatic labeler is configured in .github/labeler.yml. Labels are applied based on:
- File path patterns - Uses glob patterns to match changed files
- PR title - Matches title prefixes (e.g.,
fix:,feat:) - PR body - Matches checkbox patterns (e.g.,
- [x] π Bug Fix)
Example:
news:
- any:
- changed-files:
- any-glob-to-any-file:
- "news/**/*.html"
- "scripts/article-template.js"
- title: "news:*"
- body: "- [x] π° News Content"
Modifying Labels
To modify the labeling system:
- Edit label definitions: Modify
.github/workflows/setup-labels.yml - Edit auto-labeling rules: Modify
.github/labeler.yml - Run setup workflow: Actions β Setup Repository Labels
- Test on new PR: Create a test PR to verify labels
π Usage Examples
Example 1: News Article PR
Files changed:
news/2026-02-15-riksdag-budget-vote-en.htmlnews/2026-02-15-riksdag-budget-vote-sv.html
Labels applied:
- β
news(news article) - β
html-css(HTML files) - β
i18n(multi-language) - β
translation(Swedish translation) - β
size-s(< 50 lines)
Example 2: Dashboard Enhancement
Files changed:
js/politician-dashboard.jspolitician-dashboard.htmlcia-data/politician/view_riksdagen_politician_ranking_sample.csv
PR Title: feat: Add politician influence network visualization
Labels applied:
- β
dashboard(dashboard changes) - β
visualization(data visualization) - β
javascript(JS code) - β
html-css(HTML file) - β
cia-data(CIA data) - β
enhancement(feature) - β
size-m(50-250 lines)
Example 3: Security Architecture Update
Files changed:
SECURITY_ARCHITECTURE.mdTHREAT_MODEL.md.github/skills/iso-27001-controls/SKILL.md
PR Title: security: Update ISO 27001 control mapping
Labels applied:
- β
security(security changes) - β
isms(ISMS compliance) - β
iso-27001(ISO 27001) - β
documentation(markdown files) - β
skill(skill changes) - β
size-m(50-250 lines)
Example 4: CI/CD Workflow
Files changed:
.github/workflows/data-pipeline.yml.github/workflows/quality-checks.yml
PR Title: ci: Optimize data pipeline workflow
Labels applied:
- β
workflow(GitHub Actions) - β
ci-cd(CI/CD changes) - β
data-pipeline(data pipeline) - β
performance(optimization) - β
size-s(< 50 lines)
π οΈ Troubleshooting
Labels Not Applied
Problem: Labels are not being applied to PRs.
Solutions:
- Check if labels exist: Actions β Setup Repository Labels β Run workflow
- Verify labeler workflow ran: Actions β Pull Request Automatic Labeler
- Check workflow logs for errors
- Ensure
.github/labeler.ymlis valid YAML
Missing Labels
Problem: Some labels don't exist in the repository.
Solution:
- Go to Actions β Setup Repository Labels
- Click "Run workflow"
- (Optional) Check "Recreate all labels" to rebuild from scratch
- Wait for completion
- Re-trigger labeler on existing PRs
Size Label Incorrect
Problem: Size label doesn't match PR diff.
Explanation: Size is calculated from total changes (additions + deletions), not just additions.
Formula:
TOTAL_CHANGES = ADDITIONS + DELETIONS
if TOTAL_CHANGES < 10: size-xs
elif TOTAL_CHANGES < 50: size-s
elif TOTAL_CHANGES < 250: size-m
elif TOTAL_CHANGES < 1000: size-l
else: size-xl
π References
- Labeler Configuration:
.github/labeler.yml - Setup Workflow:
.github/workflows/setup-labels.yml - Labeler Workflow:
.github/workflows/labeler.yml - GitHub Labeler Action: actions/labeler
- ISMS Documentation: Hack23 ISMS-PUBLIC
π€ Contributing
When contributing to the labeling system:
- β Test label changes on a test PR first
- β Document new labels in this file
- β Follow existing color scheme patterns
- β Ensure labels align with repository structure
- β Update WORKFLOWS.md if adding new workflows
Last Updated: 2026-02-15
Version: 1.0
Maintained by: Hack23 AB (Org.nr 5595347807)
π 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 |
π³οΈ Empower citizens Β· π Strengthen democratic accountability Β· π΅οΈ Illuminate the political process
Β© 2008β2026 Hack23 AB (Org.nr 559534-7807) Β· Maintainer: James Pether SΓΆrling, CISSP CISM