Conversation
🏷️ Automatic Labeling SummaryThis PR has been automatically labeled based on the files changed and PR metadata. Applied Labels: size-xs Label Categories
For more information, see |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
…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>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
…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>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
… 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>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
… 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>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
…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>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
… 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>
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
| ANF --> WF_EV | |
| ANF --> WF_EV | |
| BET --> WF_EV |
| ``` | ||
| 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 |
There was a problem hiding this comment.
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 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>
Both review comments addressed in commit e3e7b35:
|
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
There was a problem hiding this comment.
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.mdthe 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).
| ## 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 |
There was a problem hiding this comment.
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.
analysis/templates/README.md
Outdated
| | **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 | |
There was a problem hiding this comment.
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).
| | **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 | |
| 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>"] |
There was a problem hiding this comment.
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.
| 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 |
There was a problem hiding this comment.
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 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>
All 4 review comments addressed in commit 23b1909:
|
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
There was a problem hiding this comment.
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).
| ## 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 |
There was a problem hiding this comment.
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.
WORKFLOWS.md
Outdated
| 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 |
There was a problem hiding this comment.
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.
| 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 |
| ❌ 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-disruption ≠ societal-impact) | ||
| ❌ Do not conflate threat categories (e.g., democratic-process ≠ power-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 |
There was a problem hiding this comment.
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 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>
All 3 review comments addressed in commit 37d76dc:
|
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
There was a problem hiding this comment.
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.
| | 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 | | ||
|
|
There was a problem hiding this comment.
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).
ArticleEntryinterface andArticleCategoryimport intests/news-realtime-monitor.test.ts(TS6196)scripts/prompts/v2/per-file-intelligence-analysis.mdanalysis/templates/threat-analysis.mdto 3.0v1prompt references →v2inanalysis/methodologies/political-style-guide.mdThreatCategoryslugs (polarization,institutional-erosion, etc.) to taxonomy table so models emit correct identifiers matching JSON example and TS typesget_propositioner,search_dokument_fulltext,analyze_g0v_by_department,search_anforanden)search_dokumenttosearch_dokument_fulltextBET --> WF_EVedge in MCP diagram (Evening Analysis usesget_betankanden)v1prompt references →v2inanalysis/reference/isms-style-guide-adaptation.mdcomputeSignificanceScoreimplementation)search_dokument+search_dokument_fulltextnodes, add all missing workflow→tool edges matching actual REQUIRED_TOOLS arrayseconomic-disruption ≠ societal-impact)