Skip to content

Add article-type-specific analytics matrices to analysis and workflow documentation#1469

Merged
pethers merged 21 commits intomainfrom
copilot/improve-analysis-methodologies-templates
Mar 31, 2026
Merged

Add article-type-specific analytics matrices to analysis and workflow documentation#1469
pethers merged 21 commits intomainfrom
copilot/improve-analysis-methodologies-templates

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 30, 2026

  • Fix CI: Remove unused ArticleEntry interface and ArticleCategory import in tests/news-realtime-monitor.test.ts (TS6196)
  • Fix review comment 1: Replace STRIDE categories with Political Threat Taxonomy in scripts/prompts/v2/per-file-intelligence-analysis.md
  • Fix review comment 2: Align version in analysis/templates/threat-analysis.md to 3.0
  • Fix review comment 3: Update 3 dead v1 prompt references → v2 in analysis/methodologies/political-style-guide.md
  • Fix review comment 4: Align threat prompt JSON example with canonical TS identifiers
  • Fix review round 2 comment 1+2: Add canonical ThreatCategory slugs (polarization, institutional-erosion, etc.) to taxonomy table so models emit correct identifiers matching JSON example and TS types
  • Fix review round 2 comment 3: Update Propositions MCP tools to match actual code (get_propositioner, search_dokument_fulltext, analyze_g0v_by_department, search_anforanden)
  • Fix review round 2 comment 4: Update MCP diagram node from search_dokument to search_dokument_fulltext
  • Fix review round 3 comment 1: Add missing BET --> WF_EV edge in MCP diagram (Evening Analysis uses get_betankanden)
  • Fix review round 3 comment 2: Update 3 remaining v1 prompt references → v2 in analysis/reference/isms-style-guide-adaptation.md
  • Fix review round 4 comment 1: Realign ECONOMIC DISRUPTION / SOCIETAL IMPACT assessment sections with taxonomy categories in threat prompt
  • Fix review round 4 comment 2: Fix significance scoring docs (0–100 → 1–10 to match computeSignificanceScore implementation)
  • Fix review round 4 comment 3+4: Split DOK into search_dokument + search_dokument_fulltext nodes, add all missing workflow→tool edges matching actual REQUIRED_TOOLS arrays
  • Fix review round 5 comment 1: Align SOCIETAL IMPACT ASSESSMENT with canonical definition (vulnerable groups / rights erosion, not executive overreach)
  • Fix review round 5 comment 2: Convert Gantt schedule to flowchart for reliable Mermaid rendering
  • Fix review round 5 comment 3: Fix prohibited patterns to use canonical ThreatCategory slugs (economic-disruption ≠ societal-impact)

@github-actions github-actions bot added the size-xs Extra small change (< 10 lines) label Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🏷️ Automatic Labeling Summary

This PR has been automatically labeled based on the files changed and PR metadata.

Applied Labels: size-xs

Label Categories

  • 🗳️ Content: news, dashboard, visualization, intelligence
  • 💻 Technology: html-css, javascript, workflow, security
  • 📊 Data: cia-data, riksdag-data, data-pipeline, schema
  • 🌍 I18n: i18n, translation, rtl
  • 🔒 ISMS: isms, iso-27001, nist-csf, cis-controls
  • 🏗️ Infrastructure: ci-cd, deployment, performance, monitoring
  • 🔄 Quality: testing, accessibility, documentation, refactor
  • 🤖 AI: agent, skill, agentic-workflow

For more information, see .github/labeler.yml.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

…der isolation, multi-framework threat modeling

Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/013f9fca-57ad-48c6-9ddd-4071be409ac4

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
@github-actions github-actions bot added documentation Documentation updates size-l Large change (250-1000 lines) labels Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

…I analysis guide with advanced techniques

Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/013f9fca-57ad-48c6-9ddd-4071be409ac4

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
@github-actions github-actions bot added the size-xl Extra large change (> 1000 lines) label Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

… depth, folder isolation, and anti-pattern guidance

Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/013f9fca-57ad-48c6-9ddd-4071be409ac4

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

… mandate, add fallback mechanism

Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/013f9fca-57ad-48c6-9ddd-4071be409ac4

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve analysis methodologies and templates for better workflows Overhaul analysis framework v2.0: folder isolation, multi-framework depth, anti-scripted-content rules Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

…axonomy in methodologies, templates, and prompts

Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/92e012f4-8a48-4e85-ba65-ef28754ccdc7

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
@github-actions github-actions bot added the refactor Code refactoring label Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

… reference docs — replace with Political Threat Taxonomy

Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/92e012f4-8a48-4e85-ba65-ef28754ccdc7

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
@github-actions github-actions bot added workflow GitHub Actions workflows ci-cd CI/CD pipeline changes news News articles and content generation labels Mar 30, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 62 out of 62 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

analysis/templates/synthesis-summary.md:169

  • This threat summary section has been renamed to “Threat Category”, but the table rows still list STRIDE categories (S/T/R/I/D/E). Update the rows to the Political Threat Taxonomy categories used elsewhere (e.g., Narrative Integrity / Legislative Integrity / Accountability / Transparency / Democratic Process / Power Balance) to avoid reintroducing STRIDE in the synthesis template.

INTERP --> WF_IP
ANF --> WF_IP
VOTE --> WF_EV
ANF --> WF_EV
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diagram routes WF_EV (Evening Analysis) from search_voteringar, search_anforanden, and get_calendar_events, but the Evening Analysis workflow also pulls committee reports via get_betankanden (see .github/workflows/news-evening-analysis.md). Add the missing BET --> WF_EV edge (or remove get_betankanden from the Evening Analysis data description if it’s no longer used) so the diagram matches reality.

Suggested change
ANF --> WF_EV
ANF --> WF_EV
BET --> WF_EV

Copilot uses AI. Check for mistakes.
Comment on lines 7 to +19
```
scripts/prompts/
├── README.md ← This file
└── v1/ ← Current production prompts
├── political-analysis.md ← Core political analysis instructions
├── swot-generation.md ← SWOT analysis prompt templates
├── dashboard-generation.md ← Dashboard interpretation prompts
├── stakeholder-perspectives.md ← Multi-perspective analysis instructions
└── quality-criteria.md ← Output quality self-assessment rubric
├── README.md ← This file
└── v2/ ← Production prompts (current)
├── README.md ← v2 overview and API reference
├── political-analysis.md ← Core political analysis framework (6 analytical lenses)
├── per-file-intelligence-analysis.md ← Per-file AI analysis protocol
├── political-classification-prompt.md ← Political classification (Temperature Index)
├── political-risk-prompt.md ← Risk assessment methodology
├── political-threat-prompt.md ← Political Threat Taxonomy (replaces STRIDE)
├── quality-criteria.md ← Quality self-assessment rubric (minimum 7/10)
├── stakeholder-perspectives.md ← Multi-perspective analysis instructions
└── swot-generation.md ← SWOT generation with pre-computed data preference
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since scripts/prompts/v1/ has been removed, there are still internal docs linking to v1 prompt paths (e.g. analysis/reference/isms-style-guide-adaptation.md references scripts/prompts/v1/political-analysis.md). This will likely break link checking (linkinator) and creates dead references; update those remaining links to v2 (or remove the references) as part of this migration.

Copilot uses AI. Check for mistakes.
@pethers
Copy link
Copy Markdown
Member

pethers commented Mar 31, 2026

@copilot apply changes based on the comments in this thread

…te 3 remaining v1 prompt refs to v2 in isms-style-guide-adaptation.md

Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/760765b7-fdf5-4daf-afc7-bfce57a88d5a

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 31, 2026

@copilot apply changes based on the comments in this thread

Both review comments addressed in commit e3e7b35:

  1. Missing BET --> WF_EV edge — Added BET --> WF_EV to the MCP data-flow diagram since Evening Analysis uses get_betankanden (confirmed in .github/workflows/news-evening-analysis.md).
  2. Remaining v1 prompt references — Updated all 3 scripts/prompts/v1/ references to v2/ in analysis/reference/isms-style-guide-adaptation.md. Confirmed zero v1 references remain across all .md files.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 62 out of 62 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

analysis/templates/synthesis-summary.md:169

  • In synthesis-summary.md the Threat Summary table header was updated to “Threat Category”, but the rows still list STRIDE categories (S/T/R/I/D/E). This contradicts the switch to Political Threat Taxonomy elsewhere in this PR and will mislead generators consuming this template. Update the rows to the 6 taxonomy categories (Narrative Integrity, Legislative Integrity, Accountability, Transparency, Democratic Process, Power Balance) and/or align row IDs with whatever identifier format is expected (e.g., NI/LI/AC/TR/DP/PB).

Comment on lines +96 to +115
## DEMOCRATIC PROCESS ASSESSMENT

Look for:
- Fiscal crisis signals: budgetkris, statsbankrutt, skuldkris, finanskris
- FiU involvement with economic disruption keywords
- Unstable coalition combined with economic policy deadlock
- Budget failure or rejection scenarios
- Filibustering, quorum manipulation, procedural abuse

Countermeasures: Independent Riksbank, Finanspolitiska rådet, EU SGP, cross-party budget framework

## SOCIETAL IMPACT ASSESSMENT (S)
## POWER BALANCE ASSESSMENT

Look for:
- Vulnerable group signals: marginaliserade, utsatta grupper, diskriminering
- Rights erosion: rättighetsförlust, ojämlikhet, mänskliga rättigheter
- Executive overreach: maktkoncentration, undantag från lagstiftning
- Constitutional boundary tests: bypassing Riksdag vote
- Disproportionate burden distribution signals
- SoU, SfU, AU committee involvement with social welfare content

Countermeasures: Diskrimineringsombudsmannen (DO), welfare state baseline, ECHR Article 14, EU equality law
Countermeasures: Diskrimineringsombudsmannen (DO), welfare state baseline, ECHR Article 14, JO/JK
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to the taxonomy mismatch above: the “DEMOCRATIC PROCESS ASSESSMENT” section mixes fiscal-crisis indicators with procedural-obstruction indicators, and the “POWER BALANCE ASSESSMENT” section includes DO/welfare-rights countermeasures but focuses on executive overreach. After aligning category semantics, please move indicators/countermeasures so each section consistently reflects its category (economic disruption vs societal impact) to avoid confusing outputs.

Copilot uses AI. Check for mistakes.
Comment on lines +215 to +217
| **Score Range** | 0–100 composite score |
| **Dimensions** | Political Weight · Public Impact · Legislative Consequence · Temporal Urgency · Cross-Reference Density |
| **Thresholds** | ≥80 Breaking News · 60–79 Major Analysis · 40–59 Standard Coverage · <40 Monitoring Only |
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “Significance Scoring” section documents a 0–100 composite score with ≥80/60–79 thresholds, but the implementation (scripts/analysis-framework/significance-scorer.ts) produces a 1–10 integer score. This mismatch will cause incorrect guidance and thresholds in downstream docs/workflows. Please update the score range + thresholds here to match the actual 1–10 model (or update the scorer if the intent is to move to 0–100).

Suggested change
| **Score Range** | 0–100 composite score |
| **Dimensions** | Political Weight · Public Impact · Legislative Consequence · Temporal Urgency · Cross-Reference Density |
| **Thresholds** |80 Breaking News · 60–79 Major Analysis · 40–59 Standard Coverage · <40 Monitoring Only |
| **Score Range** | 1–10 integer composite score |
| **Dimensions** | Political Weight · Public Impact · Legislative Consequence · Temporal Urgency · Cross-Reference Density |
| **Thresholds** |8 Breaking News · 6–7 Major Analysis · 4–5 Standard Coverage · <4 Monitoring Only |

Copilot uses AI. Check for mistakes.
Comment on lines +764 to +771
BET["get_betankanden<br/><i>Committee reports</i>"]
PROP["get_propositioner<br/><i>Government bills</i>"]
MOT["get_motioner<br/><i>Opposition motions</i>"]
INTERP["get_interpellationer<br/><i>Parliamentary questions</i>"]
VOTE["search_voteringar<br/><i>Voting records</i>"]
ANF["search_anforanden<br/><i>Debate speeches</i>"]
DOK["search_dokument_fulltext<br/><i>All document types</i>"]
CAL["get_calendar_events<br/><i>Parliamentary calendar</i>"]
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the “Per-Workflow Data Download” Mermaid diagram, the DOK node is labeled search_dokument_fulltext and is wired to workflows like Realtime/Weekly/Week-ahead. In the codebase, search_dokument_fulltext is only used by propositions/motions, while most workflows call search_dokument (see scripts/mcp-client/client.ts#searchDocuments). Please split this into two nodes (search_dokument vs search_dokument_fulltext) and connect them to the workflows that actually call each tool so the documentation matches reality.

Copilot uses AI. Check for mistakes.
Comment on lines +776 to +799
subgraph "📰 Agentic Workflows"
WF_CR["📋 Committee Reports"]
WF_PR["📜 Propositions"]
WF_MO["✊ Motions"]
WF_IP["❓ Interpellations"]
WF_EV["🌙 Evening Analysis"]
WF_RT["⚡ Realtime Monitor"]
WF_WR["📅 Weekly Review"]
WF_WA["🔮 Week Ahead"]
end

BET --> WF_CR
VOTE --> WF_CR
SCB --> WF_CR
PROP --> WF_PR
DOK --> WF_PR
MOT --> WF_MO
DOK --> WF_MO
INTERP --> WF_IP
ANF --> WF_IP
VOTE --> WF_EV
ANF --> WF_EV
BET --> WF_EV
CAL --> WF_EV
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow→MCP-tool mapping in this diagram is incomplete vs the actual generators. For example, committee-reports requires search_anforanden and get_propositioner (see scripts/news-types/committee-reports.ts), and propositions/motions require search_anforanden + analyze_g0v_by_department (see scripts/news-types/propositions.ts / scripts/news-types/motions.ts), but those edges aren’t represented. Please update the diagram to reflect the real required tool calls per workflow to avoid drift between docs and code.

Copilot uses AI. Check for mistakes.
@pethers
Copy link
Copy Markdown
Member

pethers commented Mar 31, 2026

@copilot apply changes based on the comments in this thread

…gnificance scoring range (1-10), split MCP diagram into search_dokument vs search_dokument_fulltext, add missing workflow→tool edges

Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/caea87cd-9e7d-4251-b41f-aa9659414f5a

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 31, 2026

@copilot apply changes based on the comments in this thread

All 4 review comments addressed in commit 23b1909:

  1. Threat prompt assessment sections — Renamed DEMOCRATIC PROCESS → ECONOMIC DISRUPTION ASSESSMENT (fiscal/budget/welfare indicators) and POWER BALANCE → SOCIETAL IMPACT ASSESSMENT (executive overreach, procedural abuse, power concentration), consistent with taxonomy table mapping.
  2. Significance scoring range — Changed from 0–100 to 1–10 integer score with thresholds ≥8/6–7/4–5/<4, matching computeSignificanceScore in significance-scorer.ts.
  3. MCP diagram split — Created separate DOK (search_dokument) and DOKFT (search_dokument_fulltext) nodes, wired to the correct workflows based on actual usage.
  4. Missing workflow→tool edges — Added all missing edges verified against each generator's REQUIRED_TOOLS array: committee-reports now shows search_anforanden+get_propositioner, motions shows search_anforanden+analyze_g0v_by_department, interpellations shows search_dokument_fulltext+get_calendar_events, realtime shows search_voteringar+search_anforanden+get_betankanden, etc.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 62 out of 62 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

analysis/templates/synthesis-summary.md:169

  • The Threat Summary table still lists STRIDE categories (S/T/R/I/D/E) even though the template header and dashboard diagram were updated to Political Threat Taxonomy (NI/LI/AC/TR/DP/PB). This mismatch will push authors/models to fill STRIDE labels into a taxonomy-based workflow. Update the rows to the six Political Threat Taxonomy categories (and use the canonical abbreviations/slugs used elsewhere in the templates/prompts).

Comment on lines +108 to +116
## SOCIETAL IMPACT ASSESSMENT

Look for:
- Vulnerable group signals: marginaliserade, utsatta grupper, diskriminering
- Rights erosion: rättighetsförlust, ojämlikhet, mänskliga rättigheter
- Disproportionate burden distribution signals
- SoU, SfU, AU committee involvement with social welfare content
- Executive overreach: maktkoncentration, undantag från lagstiftning
- Constitutional boundary tests: bypassing Riksdag vote
- Filibustering, quorum manipulation, procedural abuse
- Societal polarisation or marginalisation signals

Countermeasures: Diskrimineringsombudsmannen (DO), welfare state baseline, ECHR Article 14, EU equality law
Countermeasures: Diskrimineringsombudsmannen (DO), JO/JK, constitutional court review, cross-party norms
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “SOCIETAL IMPACT ASSESSMENT” section currently focuses on executive overreach / procedural abuse and suggests countermeasures like constitutional court review, which conflicts with the repository’s canonical definition of societal-impact (disproportionate harm to vulnerable groups / rights erosion). Align the indicators + countermeasures with the intended category semantics so the prompt doesn’t train the model toward the wrong threatCategory.

Copilot uses AI. Check for mistakes.
WORKFLOWS.md Outdated
Comment on lines +166 to +185
gantt
title Weekday Agentic Workflow Schedule (UTC)
dateFormat HH:mm
axisFormat %H:%M

section 🌅 Morning Analysis
CIA Stats Update :crit, 02:00, 60min
Committee Reports :active, 04:00, 90min
Government Propositions :active, 05:00, 90min
Opposition Motions :active, 06:00, 90min
Interpellation Debates :active, 07:00, 90min

section 📰 Midday Monitoring
Realtime Monitor (AM) :done, 10:00, 120min
Translation Batch (AM) :done, 11:00, 90min

section 🌆 Afternoon/Evening
Realtime Monitor (PM) :done, 14:00, 120min
Translation Batch (PM) :done, 17:00, 90min
Evening Analysis :crit, 18:00, 120min
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Mermaid Gantt uses a time-only dateFormat HH:mm and durations like 60min/90min, which is inconsistent with other Mermaid Gantt usage in the repo (e.g. .github/skills/swedish-political-system/SKILL.md uses YYYY-MM-DD with 30d) and may not render reliably in GitHub/Markdown Mermaid. Consider switching to a supported Gantt format (full dates + 1h/2h-style durations if supported) or use a flowchart/timeline diagram for a daily schedule to avoid broken rendering.

Suggested change
gantt
title Weekday Agentic Workflow Schedule (UTC)
dateFormat HH:mm
axisFormat %H:%M
section 🌅 Morning Analysis
CIA Stats Update :crit, 02:00, 60min
Committee Reports :active, 04:00, 90min
Government Propositions :active, 05:00, 90min
Opposition Motions :active, 06:00, 90min
Interpellation Debates :active, 07:00, 90min
section 📰 Midday Monitoring
Realtime Monitor (AM) :done, 10:00, 120min
Translation Batch (AM) :done, 11:00, 90min
section 🌆 Afternoon/Evening
Realtime Monitor (PM) :done, 14:00, 120min
Translation Batch (PM) :done, 17:00, 90min
Evening Analysis :crit, 18:00, 120min
flowchart TD
%% Weekday Agentic Workflow Schedule (UTC)
subgraph Morning_Analysis["🌅 Morning Analysis"]
A["CIA Stats Update<br/>02:00 · 60 min"]
B["Committee Reports<br/>04:00 · 90 min"]
C["Government Propositions<br/>05:00 · 90 min"]
D["Opposition Motions<br/>06:00 · 90 min"]
E["Interpellation Debates<br/>07:00 · 90 min"]
end
subgraph Midday_Monitoring["📰 Midday Monitoring"]
F["Realtime Monitor (AM)<br/>10:00 · 120 min"]
G["Translation Batch (AM)<br/>11:00 · 90 min"]
end
subgraph Afternoon_Evening["🌆 Afternoon/Evening"]
H["Realtime Monitor (PM)<br/>14:00 · 120 min"]
I["Translation Batch (PM)<br/>17:00 · 90 min"]
J["Evening Analysis<br/>18:00 · 120 min"]
end
%% Chronological flow
A --> B --> C --> D --> E --> F --> G --> H --> I --> J

Copilot uses AI. Check for mistakes.
Comment on lines 173 to +180
❌ Do not assign "critical" severity without citing constitutional or fundamental rights signals
❌ Do not claim a non-`none` threat level without referencing observable parliamentary signals — if no signals are present, explicitly use the no-threat case (`overallThreatLevel: 'none'`, `primaryThreat: null`, `threatAnalyses: []`)
❌ Do not omit countermeasures — Swedish democracy has strong institutional resilience
❌ Do not assign a single threat agent when multiple actors are involved
❌ Do not conflate PRIDES categories (e.g., economic-disruptionsocietal-impact)
❌ Do not conflate threat categories (e.g., democratic-processpower-balance)
❌ Do not use generic rationale — always tie reasoning to specific document signals
❌ Do not ignore committee context — KU = institutional-erosion, FiU = economic-disruption signals
❌ Do not use STRIDE categories (S/T/R/I/D/E) — use Political Threat Taxonomy categories
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prohibited-pattern example democratic-process ≠ power-balance uses kebab-case identifiers that are not canonical ThreatCategory slugs (and could be misread as valid values to emit). If the intent is to reference democratic functions, use the exact labels from the taxonomy table (e.g., “Democratic Process” vs “Power Balance”); if the intent is to reference categories, use the canonical slugs (e.g., economic-disruption vs societal-impact).

Copilot uses AI. Check for mistakes.
@pethers
Copy link
Copy Markdown
Member

pethers commented Mar 31, 2026

@copilot apply changes based on the comments in this thread

…convert Gantt to flowchart, fix prohibited patterns slugs

Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/453e7a11-7855-4c96-903e-50bbf9cf5d83

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 31, 2026

@copilot apply changes based on the comments in this thread

All 3 review comments addressed in commit 37d76dc:

  1. SOCIETAL IMPACT ASSESSMENT — Replaced executive overreach/procedural abuse content with vulnerable groups/rights erosion indicators (welfare cuts, social marginalisation, discrimination, ECHR Article 14). Updated taxonomy table description to match. Moved welfare-specific content out of ECONOMIC DISRUPTION to avoid duplication.
  2. Gantt → Flowchart — Converted unreliable dateFormat HH:mm Gantt to a flowchart TD with subgroups for Morning/Midday/Evening, consistent with standard Mermaid rendering.
  3. Prohibited patterns — Changed democratic-process ≠ power-balance to canonical slugs economic-disruption ≠ societal-impact.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 62 out of 62 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

analysis/templates/synthesis-summary.md:169

  • The Threat Summary table still lists STRIDE categories (S/T/R/I/D/E) even though the header and earlier sections have moved to the Political Threat Taxonomy. This is inconsistent and will likely cause downstream syntheses to emit the wrong category identifiers; update the rows to the 6 taxonomy categories (NI/LI/AC/TR/DP/PB) and align labels with the rest of the template.

Comment on lines 154 to 161
| KU investigation of constitutional breach | institutional-erosion | critical | ruling-coalition |
| Budget policy harming welfare recipients | societal-impact | high | ruling-coalition |
| Government restricts press access | democratic-deficit | critical | ruling-coalition |
| Populist migration rhetoric in parliamentary debate | polarization | high | opposition-parties |
| Interpellation on budget fiscal irresponsibility | economic-disruption | medium | ruling-coalition |
| Foreign influence in legislative process | institutional-erosion | high | external-actors |
| Routine administrative committee report | societal-impact | low | institutional |
| Foreign influence in legislative process | regulatory-overreach | high | external-actors |
| Routine administrative committee report | polarization | low | institutional |

Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The calibration example "Routine administrative committee report" is mapped to polarization with low severity, but this contradicts the stated rule that documents with no discernible threat signals should return overallThreatLevel: none, primaryThreat: null, and an empty threatAnalyses. Consider changing this example to the no-threat case (or provide explicit observable signals that would justify polarization).

Copilot uses AI. Check for mistakes.
@pethers pethers merged commit 3e1c35c into main Mar 31, 2026
21 checks passed
@pethers pethers deleted the copilot/improve-analysis-methodologies-templates branch March 31, 2026 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentic-workflow Agentic workflow changes ci-cd CI/CD pipeline changes documentation Documentation updates news News articles and content generation refactor Code refactoring size-l Large change (250-1000 lines) size-xl Extra large change (> 1000 lines) size-xs Extra small change (< 10 lines) testing Test coverage workflow GitHub Actions workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants