Skip to content

Improve AI analysis prompts, methodology guides & templates (v5.0)#1659

Merged
pethers merged 8 commits intomainfrom
copilot/improve-ai-analysis-prompts
Apr 10, 2026
Merged

Improve AI analysis prompts, methodology guides & templates (v5.0)#1659
pethers merged 8 commits intomainfrom
copilot/improve-ai-analysis-prompts

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

  • Upgrade analysis/methodologies/ai-driven-analysis-guide.md v4.2 → v5.0
  • Update methodology guides (classification, risk, style, SWOT, threat, README)
  • Add Election 2026 implications section to all 8 analysis templates
  • Add 5-level confidence scale to all templates
  • Add historical comparison tables to synthesis template
  • Improve per-file-political-intelligence.md
  • Update analysis/templates/README.md
  • Streamline 10 news workflow .md prompts (11-20% reduction)
  • Fix review feedback round 1: restore canonical skill paths, headings, metadata
  • Fix review feedback round 2: 5 remaining inconsistencies
  • Fix review feedback round 3: 15 comments (5-level confidence, lazy loading)
  • Fix review feedback round 4: 21 comments
    • Add Political Cost scale definition to threat-analysis.md
    • Update swot-analysis.md H/M/L → VH/H/M/L/VL in evidence tables + checklist
    • Fix repo-memory paths in 10 workflow files (add memory/news-generation/ prefix)
    • Fix safeoutputs___noop string→object form in 9 workflow files
  • All 88 workflow-architecture tests pass
  • .lock.yml recompilation (requires gh aw compile)

@github-actions github-actions bot added the size-xs Extra small change (< 10 lines) label Apr 10, 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

@github-actions github-actions bot added documentation Documentation updates workflow GitHub Actions workflows ci-cd CI/CD pipeline changes news News articles and content generation agentic-workflow Agentic workflow changes size-xl Extra large change (> 1000 lines) labels Apr 10, 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

Copilot AI changed the title [WIP] Improve AI analysis prompts and methodology guides Improve AI analysis prompts, methodology guides & templates (v5.0) Apr 10, 2026
Copilot AI requested a review from pethers April 10, 2026 10:03
@pethers pethers marked this pull request as ready for review April 10, 2026 10:16
Copilot AI review requested due to automatic review settings April 10, 2026 10:16
@pethers pethers requested review from Copilot and removed request for Copilot April 10, 2026 11:29
@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

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-*.md prompts by centralizing repeated guidance into SHARED_PROMPT_PATTERNS.md references.

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.

Comment on lines 14 to 20
<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
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Comment on lines 442 to +447
**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
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@@ -414,7 +453,8 @@ quadrantChart
**Document Control:**
- **Template Path:** `/analysis/templates/stakeholder-impact.md`
- **Version:** 2.2
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
- **Version:** 2.2
- **Version:** 2.3

Copilot uses AI. Check for mistakes.
- [ ] **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
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
- [ ] **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

Copilot uses AI. Check for mistakes.
Comment on lines +14 to 20
<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
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Branch: `news/content/{YYYY-MM-DD}/evening-analysis`. `safeoutputs___create_pull_request` handles this automatically.

## Step 5: Commit & Create PR

Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
### HOW SAFE PR CREATION WORKS

Copilot uses AI. Check for mistakes.
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`)
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
- **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 uses AI. Check for mistakes.
```

## 📅 Riksmöte (Parliamentary Session) Calculation
## 📅 Riksmöte Calculation
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
## 📅 Riksmöte Calculation
## 📅 Riksmöte (Parliamentary Session) Calculation

Copilot uses AI. Check for mistakes.
Comment on lines +321 to 323
> `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.


Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
> `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.

Copilot uses AI. Check for mistakes.
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`)
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
- **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 uses AI. Check for mistakes.
@pethers
Copy link
Copy Markdown
Member

pethers commented Apr 10, 2026

@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>
@pethers
Copy link
Copy Markdown
Member

pethers commented Apr 10, 2026

@copilot apply changes based on the comments in this thread

@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

…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>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 10, 2026

@copilot apply changes based on the comments in this thread

All 5 review comments addressed in commit 97208ce:

  1. political-risk-methodology.md: Fixed intro text from "in the 12 months before" to "based on distance to" to match all 4 table bands (>18, 12–18, 6–12, <6 months)
  2. significance-scoring.md: Replaced inconsistent "+1.0 max bonus" with time-banded scale: >12mo = +0.0–+0.5, 6–12mo = +0.5–+1.0, <6mo = +1.0–+2.0
  3. ai-driven-analysis-guide.md: Removed xychart from v5.0 key-changes (not defined anywhere in the guide)
  4. political-swot-framework.md: Clarified VERY LOW content is not permitted as active SWOT entry — must go in a separate "Speculative / Monitoring Notes" subsection
  5. significance-scoring.md: Aligned Document Control to Version 2.3, Effective 2026-06-01, Next Review 2026-09-01

All 88 workflow-architecture tests pass.

@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 26 out of 26 changed files in this pull request and generated 15 comments.

Comment on lines +389 to +390
- [ ] **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
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Comment on lines +364 to +366
- [ ] **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
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +436 to +437
- [ ] **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
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +438 to +439
- [ ] **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
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines 19 to 22
**📋 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.
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
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`
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
- **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`

Copilot uses AI. Check for mistakes.
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`
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
- **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

Copilot uses AI. Check for mistakes.
Comment on lines +203 to +204
- **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`
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
- **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.

Copilot uses AI. Check for mistakes.
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`
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
- **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`

Copilot uses AI. Check for mistakes.
Comment on lines +196 to +199
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`
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
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 uses AI. Check for mistakes.
@pethers
Copy link
Copy Markdown
Member

pethers commented Apr 10, 2026

@copilot apply changes based on the comments in this thread

@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

…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>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 10, 2026

@copilot apply changes based on the comments in this thread

All 15 review comments addressed in commit 504d309:

Templates — 5-level confidence (4 files):

  • per-file-political-intelligence.md: Executive Summary [HIGH/MEDIUM/LOW][VERY HIGH/HIGH/MEDIUM/LOW/VERY LOW]; SWOT tables H/M/LVH/H/M/L/VL; Overall Risk Level added NEGLIGIBLE; Stakeholder Confidence H/M/LVH/H/M/L/VL; template instruction aligned with lazy loading
  • synthesis-summary.md: Narrative Confidence → 5-level; Stakeholder Impact → VH/H/M/L/VL/N; Opposition Activity → VH/H/M/L/VL
  • threat-analysis.md: Attack Path Political Cost → VH/H/M/L/VL; ICO Profile → 5-level; Assessment Confidence → 5-level
  • stakeholder-impact.md: All 8 Confidence Level fields → VERY HIGH / HIGH / MEDIUM / LOW / VERY LOW

Workflows — lazy loading consistency (7 files):

  • propositions, committee-reports, interpellations, motions, weekly-review: Time Budget "Read ALL methodology guides + ALL templates" → "Consult methodology guides + templates as needed"; detailed analysis step now reads master guide + per-file template upfront, consults others on-demand
  • evening-analysis, realtime-monitor: Same Time Budget fix (table format); realtime-monitor detailed analysis steps fully aligned

All 88 workflow-architecture tests pass.

@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 26 out of 26 changed files in this pull request and generated 21 comments.

| 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]` |

Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
**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).

Copilot uses AI. Check for mistakes.
- 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.
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
- 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")`
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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"})`

Copilot uses AI. Check for mistakes.
- 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.
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
- 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")`
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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"})`

Copilot uses AI. Check for mistakes.
- 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.
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
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.
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
- 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.
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
- 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")`
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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"})`

Copilot uses AI. Check for mistakes.
- [ ] **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
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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 uses AI. Check for mistakes.
@pethers
Copy link
Copy Markdown
Member

pethers commented Apr 10, 2026

@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>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 10, 2026

@copilot apply changes based on the comments in this thread

All 21 review comments addressed in commit 97497d7:

Templates (2 files):

  • threat-analysis.md: Added Political Cost scale definition (VH=Very High through VL=Very Low) with description of cost categories
  • swot-analysis.md: Updated all evidence tables H/M/L → VH/H/M/L/VL (26 rows + MCP Provenance table + checklist item)

Workflows — repo-memory paths (10 files):

  • Added memory/news-generation/ prefix to covered-documents/{YYYY-MM-DD}.json and translation-status.json in all 10 news workflows

Workflows — safeoutputs___noop payloads (9 files):

  • Converted safeoutputs___noop("...") string form → safeoutputs___noop({"message": "..."}) object form in all 9 affected workflows

All 88 workflow-architecture tests pass.

@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

Copilot AI changed the title Improve AI analysis prompts, methodology guides & templates (v5.0) Improve AI analysis prompts, methodology guides &amp; templates (v5.0) Apr 10, 2026
@pethers pethers merged commit ef3893e into main Apr 10, 2026
12 checks passed
@pethers pethers deleted the copilot/improve-ai-analysis-prompts branch April 10, 2026 15:51
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 size-xl Extra large change (> 1000 lines) size-xs Extra small change (< 10 lines) workflow GitHub Actions workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve AI Analysis Prompts, Methodology Guides & Templates (analysis/ + workflow .md)

3 participants