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 |
…ements in SHARED_PROMPT_PATTERNS, ai-driven-analysis-guide, and news-realtime-monitor Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/d9709bf9-e994-4bc9-9bc5-1d498d61da9c Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
…sis_depth default to deep, quality gate enforcement Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/d9709bf9-e994-4bc9-9bc5-1d498d61da9c Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
…1452 quality failures Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/d9709bf9-e994-4bc9-9bc5-1d498d61da9c Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
There was a problem hiding this comment.
Pull request overview
This PR strengthens the agentic news-analysis workflow guidance to prevent low-quality “plain prose” outputs by requiring longer analysis time, deeper default analysis depth, template compliance, and a pre-commit quality gate.
Changes:
- Added anti-pattern warnings to all analysis templates and expanded the AI-driven analysis methodology with mandatory quality requirements and good/bad examples.
- Updated news workflows to default
analysis_depthtodeepand restructured time budgets to reserve explicit analysis time. - Introduced a reusable “quality gate” bash check in
SHARED_PROMPT_PATTERNS.mdintended to block committing non-compliant analysis artifacts.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
analysis/templates/threat-analysis.md |
Adds anti-pattern warning requiring structured evidence, Mermaid, and template compliance. |
analysis/templates/synthesis-summary.md |
Adds anti-pattern warning to enforce template-structured synthesis output. |
analysis/templates/swot-analysis.md |
Adds detailed anti-pattern warning and points to SWOT.md exemplar. |
analysis/templates/stakeholder-impact.md |
Adds anti-pattern warning to prevent plain-prose stakeholder output. |
analysis/templates/significance-scoring.md |
Adds anti-pattern warning emphasizing tables/diagrams/evidence. |
analysis/templates/risk-assessment.md |
Adds anti-pattern warning to enforce structured risk output. |
analysis/templates/political-classification.md |
Adds anti-pattern warning to enforce classification template compliance. |
analysis/templates/per-file-political-intelligence.md |
Adds anti-pattern warning for per-file analyses. |
analysis/methodologies/ai-driven-analysis-guide.md |
Adds “Mandatory Quality Requirements” and expands bad-vs-good examples. |
.github/workflows/news-weekly-review.md |
Sets default depth to deep, reworks time budget, and reinforces quality requirements. |
.github/workflows/news-week-ahead.md |
Sets default depth to deep, reworks time budget, and updates depth gate table. |
.github/workflows/news-realtime-monitor.md |
Sets default depth to deep, reworks phases to allocate 15 min analysis, and strengthens instructions. |
.github/workflows/news-propositions.md |
Sets default depth to deep, reworks time budget, and updates depth gate table. |
.github/workflows/news-motions.md |
Sets default depth to deep, reworks time budget, and updates depth gate table. |
.github/workflows/news-monthly-review.md |
Reworks time budget and updates depth gate table/requirements. |
.github/workflows/news-month-ahead.md |
Sets default depth to deep, reworks time budget, and updates depth gate table. |
.github/workflows/news-interpellations.md |
Sets default depth to deep, reworks time budget, and updates depth gate table. |
.github/workflows/news-evening-analysis.md |
Sets default depth to deep, reworks phases for 15 min analysis, and updates depth gate table. |
.github/workflows/news-committee-reports.md |
Sets default depth to deep, reworks time budget, and updates depth gate table. |
.github/workflows/news-article-generator.md |
Sets default depth to deep, reworks phases for 15 min analysis, and updates depth gate table. |
.github/workflows/SHARED_PROMPT_PATTERNS.md |
Updates shared depth gate defaults and adds the reusable quality-gate bash check. |
| description: 'Analysis depth for AI iterations (standard=1-2 iterations, deep=2-3 iterations, comprehensive=3+ iterations). Controls SWOT complexity, stakeholder count, and dashboard charts.' | ||
| required: false | ||
| default: standard | ||
| default: deep |
There was a problem hiding this comment.
This workflow source .md sets analysis_depth default to deep, but the compiled .lock.yml still has analysis_depth.default: standard (so GitHub Actions will keep using standard). Regenerate and commit the updated lock file via gh aw compile so the new default (and any other frontmatter changes) actually take effect.
| default: deep | |
| default: standard |
| | S1 | Coalition maintains working majority — AU10 vote showed standard party alignment with SD support | AU10 vote record (dok_id: H901AU10) | H | H | 2026-03-30 | | ||
| | S2 | Strong legislative output — 20+ propositions in March covering criminal justice and defense | Prop 2025/26:227, 213, 210 (criminal justice), Prop 2025/26:205 (food stockpile) | H | M | 2026-03-30 | | ||
|
|
||
| ### ⚠️ Weaknesses — Government Coalition | ||
|
|
||
| | # | Weakness Statement | Evidence (dok_id) | Confidence | Impact | Entry Date | | ||
| |---|-------------------|-------------------|:----------:|:------:|:----------:| | ||
| | W1 | MP Marléne Lund Kopparklint leaving M party group signals internal dissent — narrows parliamentary arithmetic | Riksdag MP registry, party group change notice | H | M | 2026-03-30 | | ||
| | W2 | Minister Andreas Carlson (KD) under KU scrutiny for Lantmäteriet security failures — G7-8 complaint dockets | KU hearing agenda, dockets G7, G8 | H | H | 2026-03-30 | |
There was a problem hiding this comment.
This guide states confidence labels should be [HIGH]/[MEDIUM]/[LOW], but the “GOOD” example evidence tables use H/M (e.g., | ... | H | H |). Either update the requirement wording to allow H/M/L in tables (and define the mapping), or update the example to use the same confidence-label format the guide mandates.
| | S1 | Coalition maintains working majority — AU10 vote showed standard party alignment with SD support | AU10 vote record (dok_id: H901AU10) | H | H | 2026-03-30 | | |
| | S2 | Strong legislative output — 20+ propositions in March covering criminal justice and defense | Prop 2025/26:227, 213, 210 (criminal justice), Prop 2025/26:205 (food stockpile) | H | M | 2026-03-30 | | |
| ### ⚠️ Weaknesses — Government Coalition | |
| | # | Weakness Statement | Evidence (dok_id) | Confidence | Impact | Entry Date | | |
| |---|-------------------|-------------------|:----------:|:------:|:----------:| | |
| | W1 | MP Marléne Lund Kopparklint leaving M party group signals internal dissent — narrows parliamentary arithmetic | Riksdag MP registry, party group change notice | H | M | 2026-03-30 | | |
| | W2 | Minister Andreas Carlson (KD) under KU scrutiny for Lantmäteriet security failures — G7-8 complaint dockets | KU hearing agenda, dockets G7, G8 | H | H | 2026-03-30 | | |
| | S1 | Coalition maintains working majority — AU10 vote showed standard party alignment with SD support | AU10 vote record (dok_id: H901AU10) | [HIGH] | [HIGH] | 2026-03-30 | | |
| | S2 | Strong legislative output — 20+ propositions in March covering criminal justice and defense | Prop 2025/26:227, 213, 210 (criminal justice), Prop 2025/26:205 (food stockpile) | [HIGH] | [MEDIUM] | 2026-03-30 | | |
| ### ⚠️ Weaknesses — Government Coalition | |
| | # | Weakness Statement | Evidence (dok_id) | Confidence | Impact | Entry Date | | |
| |---|-------------------|-------------------|:----------:|:------:|:----------:| | |
| | W1 | MP Marléne Lund Kopparklint leaving M party group signals internal dissent — narrows parliamentary arithmetic | Riksdag MP registry, party group change notice | [HIGH] | [MEDIUM] | 2026-03-30 | | |
| | W2 | Minister Andreas Carlson (KD) under KU scrutiny for Lantmäteriet security failures — G7-8 complaint dockets | KU hearing agenda, dockets G7, G8 | [HIGH] | [HIGH] | 2026-03-30 | |
| description: 'Analysis depth for AI iterations (standard=1-2 iterations, deep=2-3 iterations, comprehensive=3+ iterations). Controls SWOT complexity, stakeholder count, and dashboard charts.' | ||
| required: false | ||
| default: standard | ||
| default: deep |
There was a problem hiding this comment.
This workflow source .md sets analysis_depth default to deep, but the compiled .lock.yml still has analysis_depth.default: standard (so GitHub Actions will keep using standard). Regenerate and commit the updated lock file via gh aw compile so the new default (and any other frontmatter changes) actually take effect.
| default: deep | |
| default: standard |
| description: 'Analysis depth for AI iterations (standard=1-2 iterations, deep=2-3 iterations, comprehensive=3+ iterations). Controls SWOT complexity, stakeholder count, and dashboard charts.' | ||
| required: false | ||
| default: standard | ||
| default: deep |
There was a problem hiding this comment.
This workflow source .md sets analysis_depth default to deep, but the compiled .lock.yml still has analysis_depth.default: standard (so GitHub Actions will keep using standard). Regenerate and commit the updated lock file via gh aw compile so the new default (and any other frontmatter changes) actually take effect.
| default: deep | |
| default: standard |
| analysis_depth: | ||
| description: 'Analysis depth for AI iterations (standard=1-2 iterations, deep=2-3 iterations, comprehensive=3+ iterations). Controls SWOT complexity, stakeholder count, and dashboard charts.' | ||
| description: 'Analysis depth for AI iterations (standard=1-2 iterations, deep=2-3 iterations, comprehensive=3+ iterations). Controls SWOT complexity, stakeholder count, and dashboard charts. Default: deep (minimum 15 min analysis, Mermaid diagrams required).' | ||
| required: false | ||
| default: standard | ||
| default: deep |
There was a problem hiding this comment.
This workflow source .md sets analysis_depth default to deep, but the compiled .lock.yml still has analysis_depth.default: standard (so GitHub Actions will keep using standard). Regenerate and commit the updated lock file via gh aw compile so the new default (and any other frontmatter changes) actually take effect.
| description: 'Analysis depth for AI iterations (standard=1-2 iterations, deep=2-3 iterations, comprehensive=3+ iterations). Controls SWOT complexity, stakeholder count, and dashboard charts.' | ||
| required: false | ||
| default: standard | ||
| default: deep |
There was a problem hiding this comment.
This workflow source .md sets analysis_depth default to deep, but the compiled .lock.yml still has analysis_depth.default: standard (so GitHub Actions will keep using standard). Regenerate and commit the updated lock file via gh aw compile so the new default (and any other frontmatter changes) actually take effect.
| default: deep | |
| default: standard |
| description: 'Analysis depth for AI iterations (standard=1-2 iterations, deep=2-3 iterations, comprehensive=3+ iterations). Controls SWOT complexity, stakeholder count, and dashboard charts.' | ||
| required: false | ||
| default: standard | ||
| default: deep |
There was a problem hiding this comment.
This workflow source .md sets analysis_depth default to deep, but the compiled .lock.yml still has analysis_depth.default: standard (so GitHub Actions will keep using standard). Regenerate and commit the updated lock file via gh aw compile so the new default (and any other frontmatter changes) actually take effect.
| default: deep | |
| default: standard |
| # Check 3: No [REQUIRED] placeholders remaining | ||
| for f in "$ANALYSIS_DIR"/*.md; do | ||
| [ ! -f "$f" ] && continue | ||
| REQ_COUNT=$(grep -c '\[REQUIRED\]' "$f" 2>/dev/null || echo 0) | ||
| if [ "$REQ_COUNT" -gt 0 ]; then | ||
| echo "❌ FAIL: $f has $REQ_COUNT unfilled [REQUIRED] placeholders" | ||
| QUALITY_PASS=false | ||
| fi |
There was a problem hiding this comment.
Quality requirements mention zero placeholders, but the quality gate only checks for [REQUIRED] and never flags remaining [OPTIONAL] placeholders. Consider adding a corresponding [OPTIONAL] check so the gate enforces the stated “No placeholders” rule consistently.
| # Check 3: No [REQUIRED] placeholders remaining | |
| for f in "$ANALYSIS_DIR"/*.md; do | |
| [ ! -f "$f" ] && continue | |
| REQ_COUNT=$(grep -c '\[REQUIRED\]' "$f" 2>/dev/null || echo 0) | |
| if [ "$REQ_COUNT" -gt 0 ]; then | |
| echo "❌ FAIL: $f has $REQ_COUNT unfilled [REQUIRED] placeholders" | |
| QUALITY_PASS=false | |
| fi | |
| # Check 3: No [REQUIRED] or [OPTIONAL] placeholders remaining | |
| for f in "$ANALYSIS_DIR"/*.md; do | |
| [ ! -f "$f" ] && continue | |
| REQ_COUNT=$(grep -c '\[REQUIRED\]' "$f" 2>/dev/null || echo 0) | |
| OPT_COUNT=$(grep -c '\[OPTIONAL\]' "$f" 2>/dev/null || echo 0) | |
| if [ "$REQ_COUNT" -gt 0 ]; then | |
| echo "❌ FAIL: $f has $REQ_COUNT unfilled [REQUIRED] placeholders" | |
| QUALITY_PASS=false | |
| fi | |
| if [ "$OPT_COUNT" -gt 0 ]; then | |
| echo "❌ FAIL: $f has $OPT_COUNT unfilled [OPTIONAL] placeholders" | |
| QUALITY_PASS=false | |
| fi |
| description: 'Analysis depth for AI iterations (standard=1-2 iterations, deep=2-3 iterations, comprehensive=3+ iterations). Controls SWOT complexity, stakeholder count, and dashboard charts.' | ||
| required: false | ||
| default: standard | ||
| default: deep |
There was a problem hiding this comment.
This workflow source .md sets analysis_depth default to deep, but the compiled .lock.yml still has analysis_depth.default: standard (so GitHub Actions will keep using standard). Regenerate and commit the updated lock file via gh aw compile so the new default (and any other frontmatter changes) actually take effect.
| default: deep | |
| default: standard |
| description: 'Analysis depth for AI iterations (standard=1-2 iterations, deep=2-3 iterations, comprehensive=3+ iterations). Controls SWOT complexity, stakeholder count, and dashboard charts.' | ||
| required: false | ||
| default: standard | ||
| default: deep |
There was a problem hiding this comment.
This workflow source .md sets analysis_depth default to deep, but the compiled .lock.yml still has analysis_depth.default: standard (so GitHub Actions will keep using standard). Regenerate and commit the updated lock file via gh aw compile so the new default (and any other frontmatter changes) actually take effect.
| default: deep | |
| default: standard |
PR #1452 produced plain-prose SWOT analysis with no structured tables, no Mermaid diagrams, no dok_id citations, and no template structure. Root cause: workflows allocated only 10 min for analysis, defaulted to
standarddepth (1-2 iterations), and had no blocking quality gate.SHARED_PROMPT_PATTERNS.md
styledirectives, or contain[REQUIRED]placeholdersstandard→deepai-driven-analysis-guide.md (v1.0 → v1.1)
All 11 news workflows
analysis_depthdefault:standard→deepacross all workflowsAll 8 analysis templates
Example quality gate check added to SHARED_PROMPT_PATTERNS:
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.