Improve AI analysis prompts, methodology guides & templates (v5.0)#1659
Improve AI analysis prompts, methodology guides & templates (v5.0)#1659
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 |
Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/320efe76-e009-4528-b7c4-3e8b543cebce Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
There was a problem hiding this comment.
Pull request overview
Updates the political analysis pipeline’s written methodology/templates and streamlines agentic workflow prompts to produce richer, more structured analysis outputs with an Election 2026 lens and a unified 5-level confidence model.
Changes:
- Expanded analysis templates with Election 2026 implication sections, historical comparison (synthesis), and confidence-scale references.
- Updated methodology guides to incorporate Election 2026 framing, new confidence mapping, and diagram mandates.
- Condensed multiple
.github/workflows/news-*.mdprompts by centralizing repeated guidance intoSHARED_PROMPT_PATTERNS.mdreferences.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 37 comments.
Show a summary per file
| File | Description |
|---|---|
| analysis/templates/threat-analysis.md | Adds Election 2026 threat implications + confidence reference; currently has header encoding/version inconsistencies. |
| analysis/templates/synthesis-summary.md | Adds historical comparison + Election 2026 implications + 5-level overall confidence. |
| analysis/templates/swot-analysis.md | Adds Election 2026 SWOT dimension + confidence reference. |
| analysis/templates/stakeholder-impact.md | Adds Election 2026 stakeholder effects + voting-bloc table; Document Control version mismatch. |
| analysis/templates/significance-scoring.md | Adds Election 2026 relevance scoring adjustments + confidence reference. |
| analysis/templates/risk-assessment.md | Adds Election 2026 risk dimensions + 5-level confidence fields; checklist still references H/M/L. |
| analysis/templates/README.md | Documents cross-template v2.3 improvements; Effective Date badge inconsistent with updated version/date. |
| analysis/templates/political-classification.md | Adds Election 2026 classification context + 5-level confidence fields/reference. |
| analysis/templates/per-file-political-intelligence.md | Adds Election 2026 implications + upgrades confidence fields to 5-level. |
| analysis/methodologies/README.md | Adds v4.1 methodology upgrades; Effective Date badge inconsistent with updated version/date. |
| analysis/methodologies/political-threat-framework.md | Adds Election 2026 taxonomy + confidence scale notes; header Effective/Next Review inconsistent with Document Control. |
| analysis/methodologies/political-swot-framework.md | Upgrades to 5-level confidence + mandatory Election 2026 dimension; header Next Review inconsistent with Document Control. |
| analysis/methodologies/political-style-guide.md | Adds Election 2026 framing/vocabulary + confidence requirements; header Next Review inconsistent with Document Control. |
| analysis/methodologies/political-risk-methodology.md | Adds 5-level confidence mapping + election proximity factor; header Next Review inconsistent with Document Control. |
| analysis/methodologies/political-classification-guide.md | Adds Election 2026 urgency boosts; header Next Review inconsistent with Document Control. |
| analysis/methodologies/ai-driven-analysis-guide.md | Introduces Election 2026 lens + 5-level confidence + diagram mandates; contains contradictory “mandatory vs skip” guidance and Effective Date mismatch. |
| .github/workflows/news-weekly-review.md | Streamlines prompt blocks; now missing canonical skill-path strings and uses a renamed Riksmöte heading that breaks tests. |
| .github/workflows/news-week-ahead.md | Streamlines prompt blocks; missing canonical skill-path strings + renamed Riksmöte heading; also missing stakeholder-perspectives reference. |
| .github/workflows/news-realtime-monitor.md | Streamlines prompt blocks; missing canonical skill-path strings required by tests. |
| .github/workflows/news-propositions.md | Streamlines prompt blocks; missing canonical skill-path strings + renamed Riksmöte heading; missing “HOW SAFE PR CREATION WORKS” header required by tests. |
| .github/workflows/news-motions.md | Streamlines prompt blocks; missing canonical skill-path strings + renamed Riksmöte heading; missing “HOW SAFE PR CREATION WORKS” header required by tests. |
| .github/workflows/news-monthly-review.md | Streamlines prompt blocks; missing canonical skill-path strings + renamed Riksmöte heading that breaks tests. |
| .github/workflows/news-month-ahead.md | Streamlines prompt blocks; missing canonical skill-path strings + renamed Riksmöte heading that breaks tests. |
| .github/workflows/news-interpellations.md | Streamlines prompt blocks; missing canonical skill-path strings + renamed Riksmöte heading; missing “HOW SAFE PR CREATION WORKS” header required by tests. |
| .github/workflows/news-evening-analysis.md | Streamlines prompt blocks; missing canonical skill-path strings + renamed Riksmöte heading; missing “HOW SAFE PR CREATION WORKS” header required by tests. |
| .github/workflows/news-committee-reports.md | Streamlines prompt blocks; missing canonical skill-path strings + renamed Riksmöte heading; missing “HOW SAFE PR CREATION WORKS” header required by tests. |
| <a href="#"><img src="https://img.shields.io/badge/Version-3.2-555?style=for-the-badge" alt="Version"/></a> | ||
| <a href="#"><img src="https://img.shields.io/badge/Effective-2026--04--06-success?style=for-the-badge" alt="Effective Date"/></a> | ||
| <a href="#"><img src="https://img.shields.io/badge/Effective-2026--06--01-success?style=for-the-badge" alt="Effective Date"/></a> | ||
| <a href="#"><img src="https://img.shields.io/badge/Classification-Public-green?style=for-the-badge" alt="Classification"/></a> | ||
| </p> | ||
|
|
||
| **📋 Document Owner:** CEO | **📄 Version:** 3.2 | **📅 Last Updated:** 2026-04-06 (UTC) | ||
| **📋 Document Owner:** CEO | **�� Version:** 3.3 | **📅 Last Updated:** 2026-06-01 (UTC) | ||
| **🏢 Owner:** Hack23 AB (Org.nr 5595347807) | **🏷️ Classification:** Public |
There was a problem hiding this comment.
Header metadata has corrupted UTF-8 ("�� Version:") and inconsistent versioning: badge still shows Version 3.2 while the line below says Version 3.3. Please fix the corrupted character (should be 📄) and make the version consistent across the badge + header block (and ensure it matches Document Control).
| **Document Control:** | ||
| - **Template Path:** `/analysis/templates/threat-analysis.md` | ||
| - **Framework Reference:** [THREAT_MODEL.md](../../THREAT_MODEL.md), [methodologies/political-threat-framework.md](../methodologies/political-threat-framework.md) | ||
| - **Version:** 3.2 | ||
| - **Effective Date:** 2026-04-06 (UTC) | ||
| - **Effective Date:** 2026-06-01 (UTC) | ||
| - **Key Changes v3.3:** Added Election 2026 Threat Implications section, 5-level confidence scale reference, updated quality checklist |
There was a problem hiding this comment.
Document Control still lists Version 3.2 while this PR introduces Key Changes v3.3. Update the Document Control version (and any related references) so versioning is consistent with the rest of the template.
| @@ -414,7 +453,8 @@ quadrantChart | |||
| **Document Control:** | |||
| - **Template Path:** `/analysis/templates/stakeholder-impact.md` | |||
| - **Version:** 2.2 | |||
There was a problem hiding this comment.
Document Control still lists Version 2.2, but the header badge/metadata and Key Changes indicate v2.3. Update the Document Control version so the template has a single authoritative version number.
| - **Version:** 2.2 | |
| - **Version:** 2.3 |
| - [ ] **Election 2026 Risk Dimensions present:** All 5 dimensions assessed with overall electoral significance rating | ||
| - [ ] **5-level confidence applied:** Assessment Confidence and Trend Confidence use VERY HIGH/HIGH/MEDIUM/LOW/VERY LOW scale | ||
| - [ ] **Named actors:** ≥2 named politicians/parties with party affiliations cited | ||
| - [ ] **Confidence labels:** Every claim has H/M/L confidence or numeric severity |
There was a problem hiding this comment.
The Quality Self-Check checklist still references the old 3-level confidence model ("H/M/L") even though the template now requires the 5-level confidence scale. Update this checklist item to match the new VERY HIGH/HIGH/MEDIUM/LOW/VERY LOW scale to avoid conflicting instructions.
| - [ ] **Confidence labels:** Every claim has H/M/L confidence or numeric severity | |
| - [ ] **Confidence labels:** Every claim has VERY HIGH/HIGH/MEDIUM/LOW/VERY LOW confidence or numeric severity |
| <a href="#"><img src="https://img.shields.io/badge/Version-4.2-555?style=for-the-badge" alt="Version"/></a> | ||
| <a href="#"><img src="https://img.shields.io/badge/Effective-2026--04--06-success?style=for-the-badge" alt="Effective Date"/></a> | ||
| <a href="#"><img src="https://img.shields.io/badge/Classification-Public-green?style=for-the-badge" alt="Classification"/></a> | ||
| </p> | ||
|
|
||
| **📋 Document Owner:** CEO | **📄 Version:** 4.1 | **📅 Last Updated:** 2026-04-06 (UTC) | ||
| **📋 Document Owner:** CEO | **📄 Version:** 4.2 | **📅 Last Updated:** 2026-06-01 (UTC) | ||
| **🔄 Review Cycle:** Quarterly | **⏰ Next Review:** 2026-06-30 |
There was a problem hiding this comment.
README header metadata is inconsistent: Last Updated is 2026-06-01 and Version is 4.2, but the Effective Date badge still shows 2026-04-06. Align Effective Date with the new version/update (or clarify if Effective Date intentionally differs from Last Updated).
| Branch: `news/content/{YYYY-MM-DD}/evening-analysis`. `safeoutputs___create_pull_request` handles this automatically. | ||
|
|
||
| ## Step 5: Commit & Create PR | ||
|
|
There was a problem hiding this comment.
The standardized HOW SAFE PR CREATION WORKS header block is missing here, but tests/workflow-architecture.test.ts asserts that this exact phrase exists in all workflows. Please reintroduce the HOW SAFE PR CREATION WORKS header text in this PR creation section (you can keep the condensed content, but include the header string).
| ### HOW SAFE PR CREATION WORKS |
| 11. **`analysis/methodologies/ai-driven-analysis-guide.md`** — Methodology for deep per-file analysis | ||
| 12. **`analysis/templates/per-file-political-intelligence.md`** — Per-file analysis output template | ||
| Consult as needed — do NOT read all files upfront: | ||
| - **Skills:** `editorial-standards`, `swedish-political-system`, `legislative-monitoring`, `riksdag-regering-mcp`, `language-expertise`, `gh-aw-safe-outputs` (all in `.github/skills/*/SKILL.md`) |
There was a problem hiding this comment.
The Required Skills section no longer includes the 6 canonical skill file paths (e.g., editorial-standards/SKILL.md, swedish-political-system/SKILL.md, etc.). The repo's workflow-architecture tests require these exact strings in a consistent order across all news workflows. Please restore the explicit .github/skills/.../SKILL.md references (in the standard order).
| - **Skills:** `editorial-standards`, `swedish-political-system`, `legislative-monitoring`, `riksdag-regering-mcp`, `language-expertise`, `gh-aw-safe-outputs` (all in `.github/skills/*/SKILL.md`) | |
| - **Skills:** `.github/skills/editorial-standards/SKILL.md`, `.github/skills/swedish-political-system/SKILL.md`, `.github/skills/legislative-monitoring/SKILL.md`, `.github/skills/riksdag-regering-mcp/SKILL.md`, `.github/skills/language-expertise/SKILL.md`, `.github/skills/gh-aw-safe-outputs/SKILL.md` |
| ``` | ||
|
|
||
| ## 📅 Riksmöte (Parliamentary Session) Calculation | ||
| ## 📅 Riksmöte Calculation |
There was a problem hiding this comment.
Heading was renamed to ## 📅 Riksmöte Calculation, but tests expect the exact header ## 📅 Riksmöte (Parliamentary Session) Calculation to be present in all news workflows. Please restore the standardized heading text to avoid CI failures.
| ## 📅 Riksmöte Calculation | |
| ## 📅 Riksmöte (Parliamentary Session) Calculation |
| > `safeoutputs___create_pull_request` handles branch creation, push, and PR opening — do NOT run `git push` or `git checkout -b` manually. Stage files, then call the tool directly. | ||
|
|
||
|
|
There was a problem hiding this comment.
The standardized HOW SAFE PR CREATION WORKS header block is missing here, but tests/workflow-architecture.test.ts asserts that this exact phrase exists in all workflows. Please reintroduce the HOW SAFE PR CREATION WORKS header text in the PR creation section (you can keep the condensed content, but include the header string).
| > `safeoutputs___create_pull_request` handles branch creation, push, and PR opening — do NOT run `git push` or `git checkout -b` manually. Stage files, then call the tool directly. | |
| ### HOW SAFE PR CREATION WORKS | |
| > `safeoutputs___create_pull_request` handles branch creation, push, and PR opening — do NOT run `git push` or `git checkout -b` manually. Stage files, then call the tool directly. |
| 11. **`analysis/methodologies/ai-driven-analysis-guide.md`** — Methodology for deep per-file analysis | ||
| 12. **`analysis/templates/per-file-political-intelligence.md`** — Per-file analysis output template | ||
| Consult as needed — do NOT read all files upfront: | ||
| - **Skills:** `editorial-standards`, `swedish-political-system`, `legislative-monitoring`, `riksdag-regering-mcp`, `language-expertise`, `gh-aw-safe-outputs` (all in `.github/skills/*/SKILL.md`) |
There was a problem hiding this comment.
The Required Skills section no longer includes the 6 canonical skill file paths (e.g., editorial-standards/SKILL.md, swedish-political-system/SKILL.md, etc.). The repo's workflow-architecture tests require these exact strings in a consistent order across all news workflows. Please restore the explicit .github/skills/.../SKILL.md references (in the standard order).
| - **Skills:** `editorial-standards`, `swedish-political-system`, `legislative-monitoring`, `riksdag-regering-mcp`, `language-expertise`, `gh-aw-safe-outputs` (all in `.github/skills/*/SKILL.md`) | |
| - **Skills:** `.github/skills/editorial-standards/SKILL.md`, `.github/skills/swedish-political-system/SKILL.md`, `.github/skills/legislative-monitoring/SKILL.md`, `.github/skills/riksdag-regering-mcp/SKILL.md`, `.github/skills/language-expertise/SKILL.md`, `.github/skills/gh-aw-safe-outputs/SKILL.md` |
|
@copilot apply changes based on the comments in this thread |
- Restore 6 canonical skill file paths in all 10 workflow .md files - Restore 'Riksmöte (Parliamentary Session) Calculation' heading - Add 'HOW SAFE PR CREATION WORKS' header to all workflows - Add 'DO NOT run git push' instruction to all workflows - Add stakeholder-perspectives.md reference to week-ahead and others - Fix threat-analysis.md: corrupted UTF-8, version badge 3.2→3.3, Document Control 3.3 - Fix stakeholder-impact.md: Document Control version 2.2→2.3 - Fix risk-assessment.md: confidence checklist H/M/L → 5-level scale - Align Effective Date badges with Last Updated (2026-06-01) in all files - Align Next Review dates (2026-09-01) across header and Document Control - Fix NEGLIGIBLE Election 2026 consistency in ai-driven-analysis-guide.md Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/27d9edf5-2153-4af8-9d3e-c8a01b16e719 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
|
@copilot apply changes based on the comments in this thread |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
…al bonus, xychart, SWOT confidence, Document Control - political-risk-methodology.md: Fixed intro text to match table bands (>18, 12-18, 6-12, <6 months) - significance-scoring.md: Clarified electoral proximity bonus with time-banded scale (+0.0-+0.5/>12mo, +0.5-+1.0/6-12mo, +1.0-+2.0/<6mo) - ai-driven-analysis-guide.md: Removed xychart from v5.0 key-changes (not defined in guide) - political-swot-framework.md: Clarified VERY LOW content goes in separate Speculative/Monitoring Notes subsection, not active SWOT - significance-scoring.md: Aligned Document Control to Version 2.3, Effective 2026-06-01, Next Review 2026-09-01 Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/57305784-c0af-4e3b-8ac7-aaa7c1b9c962 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
All 5 review comments addressed in commit 97208ce:
All 88 workflow-architecture tests pass. |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
| - [ ] **Election 2026 Implications present:** All 5 dimensions assessed (Electoral Impact, Coalition Scenarios, Voter Salience, Campaign Vulnerability, Policy Legacy) | ||
| - [ ] **5-level confidence applied:** Confidence fields use VERY HIGH/HIGH/MEDIUM/LOW/VERY LOW scale |
There was a problem hiding this comment.
The checklist says the template uses the 5-level confidence scale, but there are still 3-level confidence placeholders elsewhere in this template (e.g., the Executive Summary line still ends with HIGH/MEDIUM/LOW). Update remaining confidence placeholders/fields to VERY HIGH/HIGH/MEDIUM/LOW/VERY LOW (or adjust the checklist if 3-level is still intended).
| - [ ] **Election 2026 Implications present:** All 5 dimensions assessed with evidence and Overall Electoral Significance rating | ||
| - [ ] **Historical Comparison table filled:** Current period compared with prior periods and trend arrows | ||
| - [ ] **5-level confidence applied:** Overall Confidence uses VERY HIGH/HIGH/MEDIUM/LOW/VERY LOW scale |
There was a problem hiding this comment.
This checklist item states the synthesis uses the 5-level confidence scale, but the Narrative Direction section still has a 3-level "Confidence: HIGH / MEDIUM / LOW" field. Align that field with the 5-level scale so confidence labeling is consistent throughout the template.
| - [ ] **Election 2026 Threat Implications present:** All 5 dimensions assessed with overall electoral significance rating | ||
| - [ ] **5-level confidence applied:** Threat severity assessments use the full confidence scale where applicable |
There was a problem hiding this comment.
The checklist says 5-level confidence is applied, but this template still uses H/M/L and HIGH/MEDIUM/LOW confidence placeholders in the ICO profile and overall assessment confidence fields. Either update those fields to the VERY HIGH/HIGH/MEDIUM/LOW/VERY LOW scale, or adjust the checklist wording to match what the template actually requires.
| - [ ] **Election 2026 Stakeholder Effects present:** All 5 dimensions assessed with Voting Bloc Alignment table | ||
| - [ ] **5-level confidence applied:** Stakeholder impact confidence uses the full scale where applicable |
There was a problem hiding this comment.
The checklist says stakeholder impact confidence uses the 5-level scale, but the stakeholder group tables earlier in this template still require "Confidence Level: HIGH / MEDIUM / LOW". Update those table fields to the 5-level scale (VERY HIGH/HIGH/MEDIUM/LOW/VERY LOW) or adjust this checklist item so it doesn't contradict the template fields.
| **📋 Document Owner:** CEO | **📄 Version:** 2.3 | **📅 Last Updated:** 2026-06-01 (UTC) | ||
| **🏢 Owner:** Hack23 AB (Org.nr 5595347807) | **🏷️ Classification:** Public | ||
|
|
||
| > **📌 Template Instructions:** This template is for **per-file** analysis. For each data file downloaded via MCP, the AI agent produces one analysis markdown file stored as `{id}-analysis.md` in the workflow's isolated folder. AI MUST read ALL 6 methodology guides before analyzing. |
There was a problem hiding this comment.
This template instruction requires reading all methodology guides before analysis, but the updated workflow prompts emphasize lazy/on-demand reading of skills/methodology files. To avoid conflicting instructions for agents, align this template with the workflow guidance (e.g., require reading the master guide first and consulting other methodologies as needed).
| Consult as needed — do NOT read all files upfront: | ||
| - **Skills:** `.github/skills/editorial-standards/SKILL.md`, `.github/skills/swedish-political-system/SKILL.md`, `.github/skills/legislative-monitoring/SKILL.md`, `.github/skills/riksdag-regering-mcp/SKILL.md`, `.github/skills/language-expertise/SKILL.md`, `.github/skills/gh-aw-safe-outputs/SKILL.md` | ||
| - **Analysis:** `scripts/prompts/v2/political-analysis.md`, `per-file-intelligence-analysis.md`, `stakeholder-perspectives.md`, `quality-criteria.md` | ||
| - **Methodology:** `analysis/methodologies/ai-driven-analysis-guide.md` (v5.0) + `analysis/templates/per-file-political-intelligence.md` |
There was a problem hiding this comment.
This section says "Consult as needed — do NOT read all files upfront", but the Time Budget above still mandates "Read ALL methodology guides + ALL templates" during the analysis phase. Please make these instructions consistent (either keep the lazy/on-demand guidance or update the Time Budget wording to match).
| - **Methodology:** `analysis/methodologies/ai-driven-analysis-guide.md` (v5.0) + `analysis/templates/per-file-political-intelligence.md` | |
| - **Methodology:** Consult only if needed for this run: `analysis/methodologies/ai-driven-analysis-guide.md` (v5.0) and `analysis/templates/per-file-political-intelligence.md` |
| Consult as needed — do NOT read all files upfront: | ||
| - **Skills:** `.github/skills/editorial-standards/SKILL.md`, `.github/skills/swedish-political-system/SKILL.md`, `.github/skills/legislative-monitoring/SKILL.md`, `.github/skills/riksdag-regering-mcp/SKILL.md`, `.github/skills/language-expertise/SKILL.md`, `.github/skills/gh-aw-safe-outputs/SKILL.md` | ||
| - **Analysis:** `scripts/prompts/v2/political-analysis.md`, `per-file-intelligence-analysis.md`, `quality-criteria.md` | ||
| - **Methodology:** `analysis/methodologies/ai-driven-analysis-guide.md` (v5.0) + `analysis/templates/per-file-political-intelligence.md` |
There was a problem hiding this comment.
This section says "Consult as needed — do NOT read all files upfront", but the Time Budget above still mandates "Read ALL methodology guides + ALL templates" during the analysis phase. Please make these instructions consistent (either keep the lazy/on-demand guidance or update the Time Budget wording to match).
| - **Methodology:** `analysis/methodologies/ai-driven-analysis-guide.md` (v5.0) + `analysis/templates/per-file-political-intelligence.md` | |
| - **Methodology:** consult `analysis/methodologies/ai-driven-analysis-guide.md` (v5.0) and `analysis/templates/per-file-political-intelligence.md` only when needed for the current analysis step; do not read them upfront by default |
| - **Analysis:** `scripts/prompts/v2/political-analysis.md`, `per-file-intelligence-analysis.md`, `quality-criteria.md` | ||
| - **Methodology:** `analysis/methodologies/ai-driven-analysis-guide.md` (v5.0) + `analysis/templates/per-file-political-intelligence.md` |
There was a problem hiding this comment.
This section says "Consult as needed — do NOT read all files upfront", but the time budget/analysis phase elsewhere in the prompt still instructs reading all methodology guides and templates. Please align these to avoid conflicting instructions for the agent.
| - **Analysis:** `scripts/prompts/v2/political-analysis.md`, `per-file-intelligence-analysis.md`, `quality-criteria.md` | |
| - **Methodology:** `analysis/methodologies/ai-driven-analysis-guide.md` (v5.0) + `analysis/templates/per-file-political-intelligence.md` | |
| - **Analysis:** Open only the analysis prompt files required for the current phase/output: `scripts/prompts/v2/political-analysis.md`, `per-file-intelligence-analysis.md`, `quality-criteria.md` | |
| - **Methodology:** If needed for the current deliverable, consult `analysis/methodologies/ai-driven-analysis-guide.md` (v5.0) and use `analysis/templates/per-file-political-intelligence.md` only when producing that analysis format. Do not read methodology guides or templates upfront unless the task requires them. |
| Consult as needed — do NOT read all files upfront: | ||
| - **Skills:** `.github/skills/editorial-standards/SKILL.md`, `.github/skills/swedish-political-system/SKILL.md`, `.github/skills/legislative-monitoring/SKILL.md`, `.github/skills/riksdag-regering-mcp/SKILL.md`, `.github/skills/language-expertise/SKILL.md`, `.github/skills/gh-aw-safe-outputs/SKILL.md` | ||
| - **Analysis:** `scripts/prompts/v2/political-analysis.md`, `per-file-intelligence-analysis.md`, `quality-criteria.md` | ||
| - **Methodology:** `analysis/methodologies/ai-driven-analysis-guide.md` (v5.0) + `analysis/templates/per-file-political-intelligence.md` |
There was a problem hiding this comment.
This section says "Consult as needed — do NOT read all files upfront", but the Time Budget above still mandates "Read ALL methodology guides + ALL templates" during the analysis phase. Please make these instructions consistent (either keep the lazy/on-demand guidance or update the Time Budget wording to match).
| - **Methodology:** `analysis/methodologies/ai-driven-analysis-guide.md` (v5.0) + `analysis/templates/per-file-political-intelligence.md` | |
| - **Methodology (consult only when needed for the current task):** `analysis/methodologies/ai-driven-analysis-guide.md` (v5.0) and `analysis/templates/per-file-political-intelligence.md` |
| Consult as needed — do NOT read all files upfront: | ||
| - **Skills:** `.github/skills/editorial-standards/SKILL.md`, `.github/skills/swedish-political-system/SKILL.md`, `.github/skills/legislative-monitoring/SKILL.md`, `.github/skills/riksdag-regering-mcp/SKILL.md`, `.github/skills/language-expertise/SKILL.md`, `.github/skills/gh-aw-safe-outputs/SKILL.md` | ||
| - **Analysis:** `scripts/prompts/v2/political-analysis.md`, `per-file-intelligence-analysis.md`, `quality-criteria.md` | ||
| - **Methodology:** `analysis/methodologies/ai-driven-analysis-guide.md` (v5.0) + `analysis/templates/per-file-political-intelligence.md` |
There was a problem hiding this comment.
This section says "Consult as needed — do NOT read all files upfront", but the Time Budget earlier in the prompt still mandates "Read ALL methodology guides + ALL templates" during the analysis phase. Please make these instructions consistent so the agent has one clear rule (lazy/on-demand vs. read-all upfront).
| Consult as needed — do NOT read all files upfront: | |
| - **Skills:** `.github/skills/editorial-standards/SKILL.md`, `.github/skills/swedish-political-system/SKILL.md`, `.github/skills/legislative-monitoring/SKILL.md`, `.github/skills/riksdag-regering-mcp/SKILL.md`, `.github/skills/language-expertise/SKILL.md`, `.github/skills/gh-aw-safe-outputs/SKILL.md` | |
| - **Analysis:** `scripts/prompts/v2/political-analysis.md`, `per-file-intelligence-analysis.md`, `quality-criteria.md` | |
| - **Methodology:** `analysis/methodologies/ai-driven-analysis-guide.md` (v5.0) + `analysis/templates/per-file-political-intelligence.md` | |
| Use a mixed loading approach to keep instructions consistent: | |
| - **Read upfront before analysis:** `analysis/methodologies/ai-driven-analysis-guide.md` (v5.0) and `analysis/templates/per-file-political-intelligence.md` | |
| - **Consult as needed:** `.github/skills/editorial-standards/SKILL.md`, `.github/skills/swedish-political-system/SKILL.md`, `.github/skills/legislative-monitoring/SKILL.md`, `.github/skills/riksdag-regering-mcp/SKILL.md`, `.github/skills/language-expertise/SKILL.md`, `.github/skills/gh-aw-safe-outputs/SKILL.md` | |
| - **Consult as needed:** `scripts/prompts/v2/political-analysis.md`, `per-file-intelligence-analysis.md`, `quality-criteria.md` | |
| - Do **not** read unrelated files upfront beyond the mandatory methodology/template files above. |
|
@copilot apply changes based on the comments in this thread |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
…y loading in all workflows Templates (4 files): - per-file-political-intelligence.md: Updated Executive Summary, SWOT tables, Risk Level, Stakeholder Confidence fields from H/M/L to VH/H/M/L/VL 5-level scale; aligned template instruction with lazy loading approach - synthesis-summary.md: Updated Narrative Confidence, Stakeholder Impact, Opposition Activity fields to 5-level - threat-analysis.md: Updated Attack Path, ICO Profile, Assessment Confidence to 5-level - stakeholder-impact.md: Updated all 8 Confidence Level fields to 5-level Workflows (7 files): - news-propositions, committee-reports, interpellations, motions, weekly-review: Time Budget "Read ALL methodology guides + ALL templates" → "Consult as needed"; detailed analysis step updated to read master guide upfront, consult others as needed - news-evening-analysis, realtime-monitor: Same Time Budget fix (table format); realtime-monitor detailed analysis steps also aligned All 88 workflow-architecture tests pass. Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/6ac5e810-bc87-4fbe-9f29-05efa9ed2376 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
All 15 review comments addressed in commit 504d309: Templates — 5-level confidence (4 files):
Workflows — lazy loading consistency (7 files):
All 88 workflow-architecture tests pass. |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
| | Path B | `[#]` | `[1-5]` | `[1-5]` | `[H/M/L]` | `[Y/N]` | | ||
| | Path A | `[#]` | `[1-5]` | `[1-5]` | `[VH/H/M/L/VL]` | `[Y/N]` | | ||
| | Path B | `[#]` | `[1-5]` | `[1-5]` | `[VH/H/M/L/VL]` | `[Y/N]` | | ||
|
|
There was a problem hiding this comment.
The Attack Path Assessment table switches "Political Cost" to [VH/H/M/L/VL], but the template doesn't define what those cost tiers mean (and the 5-level table later is a confidence scale, not cost). Either keep the previous H/M/L cost scale, or add an explicit Political Cost tier definition to avoid ambiguous scoring.
| **Political Cost scale:** `VH = Very High` · `H = High` · `M = Medium` · `L = Low` · `VL = Very Low` | |
| > Rate the expected political cost to the attacker if the path is attempted or exposed (e.g. public backlash, coalition fracture, media scrutiny, loss of legitimacy, sanctions, or electoral damage). |
| - Update `memory/news-generation/last-run-news-weekly-review.json` with date, documents analyzed, quality score | ||
| - Write processed dok_ids to `memory/news-generation/covered-documents/{YYYY-MM-DD}.json` (sharded by date; retain last 7 days) | ||
| - Update `memory/news-generation/translation-status.json` with new articles needing translation | ||
| Uses `memory/news-generation` branch. START: read `memory/news-generation/last-run-news-weekly-review.json` + `covered-documents/{YYYY-MM-DD}.json`. END: update both + `translation-status.json`. Skip already-covered dok_ids. |
There was a problem hiding this comment.
The repo-memory paths are inconsistent: covered-documents/{YYYY-MM-DD}.json and translation-status.json are missing the memory/news-generation/ prefix used elsewhere in this line. This can cause the agent to read/write the wrong files—use full paths for all three files.
| Uses `memory/news-generation` branch. START: read `memory/news-generation/last-run-news-weekly-review.json` + `covered-documents/{YYYY-MM-DD}.json`. END: update both + `translation-status.json`. Skip already-covered dok_ids. | |
| Uses `memory/news-generation` branch. START: read `memory/news-generation/last-run-news-weekly-review.json` + `memory/news-generation/covered-documents/{YYYY-MM-DD}.json`. END: update both + `memory/news-generation/translation-status.json`. Skip already-covered dok_ids. |
| - Cached or stale data | ||
| - AI-generated content without MCP source data | ||
| 1. Call `get_sync_status({})` — retry up to 3× (30s wait between each) | ||
| 2. After 3 failures → `safeoutputs___noop("MCP server unavailable after 3 attempts")` |
There was a problem hiding this comment.
safeoutputs___noop("...") is shown with a string argument, but other workflow docs use an object payload (e.g. safeoutputs___noop({"message": "..."})). If the safe output tool expects a structured object, this example will cause runtime failures—use the object form consistently.
| 2. After 3 failures → `safeoutputs___noop("MCP server unavailable after 3 attempts")` | |
| 2. After 3 failures → `safeoutputs___noop({"message": "MCP server unavailable after 3 attempts"})` |
.github/workflows/news-week-ahead.md
Outdated
| - Update `memory/news-generation/last-run-news-week-ahead.json` with date, documents analyzed, quality score | ||
| - Write processed dok_ids to `memory/news-generation/covered-documents/{YYYY-MM-DD}.json` (sharded by date; retain last 7 days) | ||
| - Update `memory/news-generation/translation-status.json` with new articles needing translation | ||
| Uses `memory/news-generation` branch. START: read `memory/news-generation/last-run-news-week-ahead.json` + `covered-documents/{YYYY-MM-DD}.json`. END: update both + `translation-status.json`. Skip already-covered dok_ids. |
There was a problem hiding this comment.
The repo-memory paths are inconsistent: covered-documents/{YYYY-MM-DD}.json and translation-status.json omit the memory/news-generation/ prefix even though the previous file does include it. Use the full memory/news-generation/... paths to avoid reading/writing the wrong location.
| Uses `memory/news-generation` branch. START: read `memory/news-generation/last-run-news-week-ahead.json` + `covered-documents/{YYYY-MM-DD}.json`. END: update both + `translation-status.json`. Skip already-covered dok_ids. | |
| Uses `memory/news-generation` branch. START: read `memory/news-generation/last-run-news-week-ahead.json` + `memory/news-generation/covered-documents/{YYYY-MM-DD}.json`. END: update both + `memory/news-generation/translation-status.json`. Skip already-covered dok_ids. |
.github/workflows/news-week-ahead.md
Outdated
| - Cached or stale data | ||
| - AI-generated content without MCP source data | ||
| 1. Call `get_sync_status({})` — retry up to 3× (30s wait between each) | ||
| 2. After 3 failures → `safeoutputs___noop("MCP server unavailable after 3 attempts")` |
There was a problem hiding this comment.
safeoutputs___noop("...") is documented with a string argument here, while other prompts/docs use a JSON object payload (e.g. safeoutputs___noop({"message": "..."})). If the tool requires an object, this will fail at runtime—switch to the object form and keep it consistent across workflows.
| 2. After 3 failures → `safeoutputs___noop("MCP server unavailable after 3 attempts")` | |
| 2. After 3 failures → `safeoutputs___noop({"message":"MCP server unavailable after 3 attempts"})` |
| - Update `memory/news-generation/last-run-news-evening-analysis.json` with date, documents analyzed, quality score | ||
| - Write processed dok_ids to `memory/news-generation/covered-documents/{YYYY-MM-DD}.json` (sharded by date; retain last 7 days) | ||
| - Update `memory/news-generation/translation-status.json` with new articles needing translation | ||
| Uses `memory/news-generation` branch. START: read `memory/news-generation/last-run-news-evening-analysis.json` + `covered-documents/{YYYY-MM-DD}.json`. END: update both + `translation-status.json`. Skip already-covered dok_ids. |
There was a problem hiding this comment.
The repo-memory paths omit the memory/news-generation/ prefix for covered-documents/{YYYY-MM-DD}.json and translation-status.json. Use full paths for all referenced memory files so the agent reads/writes the intended locations.
| Uses `memory/news-generation` branch. START: read `memory/news-generation/last-run-news-evening-analysis.json` + `covered-documents/{YYYY-MM-DD}.json`. END: update both + `translation-status.json`. Skip already-covered dok_ids. | |
| Uses `memory/news-generation` branch. START: read `memory/news-generation/last-run-news-evening-analysis.json` + `memory/news-generation/covered-documents/{YYYY-MM-DD}.json`. END: update both + `memory/news-generation/translation-status.json`. Skip already-covered dok_ids. |
| 3. If ALL 3 attempts fail → `safeoutputs___noop` with "MCP server unavailable after 3 connection attempts." | ||
|
|
||
| **ALL article content MUST originate from live MCP data.** | ||
| Call `get_sync_status({})` first; retry up to 3× (30s wait). After 3 failures → `safeoutputs___noop("MCP unavailable")`. All content MUST come from live MCP data. |
There was a problem hiding this comment.
This health gate uses safeoutputs___noop("MCP unavailable") with a string argument, while the safe-output examples elsewhere use an object payload ({"message": ...}). If the tool schema expects an object, this will throw—use the object form consistently.
| Call `get_sync_status({})` first; retry up to 3× (30s wait). After 3 failures → `safeoutputs___noop("MCP unavailable")`. All content MUST come from live MCP data. | |
| Call `get_sync_status({})` first; retry up to 3× (30s wait). After 3 failures → `safeoutputs___noop({"message":"MCP unavailable"})`. All content MUST come from live MCP data. |
| - Update `memory/news-generation/last-run-news-committee-reports.json` with date, documents analyzed, quality score | ||
| - Write processed dok_ids to `memory/news-generation/covered-documents/{YYYY-MM-DD}.json` (sharded by date; retain last 7 days) | ||
| - Update `memory/news-generation/translation-status.json` with new articles needing translation | ||
| Uses `memory/news-generation` branch. START: read `memory/news-generation/last-run-news-committee-reports.json` + `covered-documents/{YYYY-MM-DD}.json`. END: update both + `translation-status.json`. Skip already-covered dok_ids. |
There was a problem hiding this comment.
The repo-memory section abbreviates covered-documents/{YYYY-MM-DD}.json and translation-status.json without the memory/news-generation/ prefix. Since the first file uses the full path, these should too to avoid agent confusion/incorrect file operations.
| Uses `memory/news-generation` branch. START: read `memory/news-generation/last-run-news-committee-reports.json` + `covered-documents/{YYYY-MM-DD}.json`. END: update both + `translation-status.json`. Skip already-covered dok_ids. | |
| Uses `memory/news-generation` branch. START: read `memory/news-generation/last-run-news-committee-reports.json` + `memory/news-generation/covered-documents/{YYYY-MM-DD}.json`. END: update both + `memory/news-generation/translation-status.json`. Skip already-covered dok_ids. |
| - Cached or stale data | ||
| - AI-generated content without MCP source data | ||
| 1. Call `get_sync_status({})` — retry up to 3× (30s wait between each) | ||
| 2. After 3 failures → `safeoutputs___noop("MCP server unavailable after 3 attempts")` |
There was a problem hiding this comment.
The MCP health gate shows safeoutputs___noop("...") with a string argument. Elsewhere safe output examples use safeoutputs___noop({"message": "..."}); if the tool requires an object payload, this will fail. Please update to the structured form.
| 2. After 3 failures → `safeoutputs___noop("MCP server unavailable after 3 attempts")` | |
| 2. After 3 failures → `safeoutputs___noop({"message": "MCP server unavailable after 3 attempts"})` |
| - [ ] **MCP Data Provenance:** All data sources listed; every entry traceable to MCP tool call | ||
| - [ ] **No placeholder text remaining:** Search for `[REQUIRED` — zero hits expected | ||
| - [ ] **Election 2026 SWOT Dimension present:** Section 9 filled with all 5 dimensions and electoral SWOT balance table | ||
| - [ ] **5-level confidence applied:** SWOT entry Confidence columns use the full scale where appropriate |
There was a problem hiding this comment.
This new checklist item requires applying the 5-level confidence scale, but earlier in the same checklist (and the SWOT evidence tables) still use H/M/L placeholders. Please update the earlier checklist item + tables to the 5-level scale as well, so the template guidance is consistent.
|
@copilot apply changes based on the comments in this thread |
… memory paths, noop payloads
Templates (2 files):
- threat-analysis.md: Added Political Cost scale definition (VH/H/M/L/VL) with
description explaining cost categories (backlash, coalition fracture, etc.)
- swot-analysis.md: Updated all SWOT evidence tables H/M/L → VH/H/M/L/VL (26 rows);
MCP Data Provenance table [H/M/L] → [VH/H/M/L/VL]; checklist item aligned
Workflows — repo-memory paths (10 files):
- All 10 news workflows: added `memory/news-generation/` prefix to
`covered-documents/{YYYY-MM-DD}.json` and `translation-status.json`
Workflows — safeoutputs___noop payloads (9 files):
- 8 workflows: `safeoutputs___noop("...")` → `safeoutputs___noop({"message": "..."})`
- evening-analysis: same fix for "MCP unavailable" string form
All 88 workflow-architecture tests pass.
Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/e1a2d67b-3bc3-4073-900b-2da0e5484f6b
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
All 21 review comments addressed in commit 97497d7: Templates (2 files):
Workflows — repo-memory paths (10 files):
Workflows — safeoutputs___noop payloads (9 files):
All 88 workflow-architecture tests pass. |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
analysis/methodologies/ai-driven-analysis-guide.mdv4.2 → v5.0analysis/templates/README.md.mdprompts (11-20% reduction)memory/news-generation/prefix)safeoutputs___noopstring→object form in 9 workflow files.lock.ymlrecompilation (requiresgh aw compile)