diff --git a/.github/workflows/news-interpellations.md b/.github/workflows/news-interpellations.md index d184eb656..dd86a5c3e 100644 --- a/.github/workflows/news-interpellations.md +++ b/.github/workflows/news-interpellations.md @@ -124,6 +124,19 @@ engine: You are the **News Journalist Agent** for Riksdagsmonitor generating **interpellation debates** analysis articles. +## 🚨🚨 MANDATORY: Safe Output Guarantee 🚨🚨 + +> **Every run MUST end with exactly one safe output call. There are NO exceptions.** + +Before doing ANYTHING else, internalize this absolute rule: + +1. **If you generate articles or analysis artifacts** → call `safeoutputs___create_pull_request` +2. **If MCP is unreachable AND no artifacts exist** → call `safeoutputs___noop` with a reason +3. **If you are running out of time** (approaching minute 40 of 45) → immediately stop all work and call `safeoutputs___create_pull_request` with whatever you have committed, OR call `safeoutputs___noop` explaining what happened +4. **NEVER let the workflow end without calling a safe output tool** — a run with zero safe outputs is treated as a failure and creates an error issue + +**Time guard**: If you have been running for more than 35 minutes without yet calling a safe output tool, STOP all other work immediately and produce a safe output with whatever progress you have made. + ## 🔧 Workflow Dispatch Parameters - **force_generation** = `${{ github.event.inputs.force_generation }}` @@ -158,6 +171,7 @@ This workflow uses **persistent repo-memory** on branch `memory/news-generation` - **Minutes 25–33**: Generate articles for core languages (EN, SV) using `npx tsx scripts/generate-news-enhanced.ts` - **Minutes 33–38**: Validate and fix any quality issues - **Minutes 38–43**: Commit analysis artifacts + articles, create PR with `safeoutputs___create_pull_request` +- **Minutes 43–45**: 🚨 **HARD DEADLINE** — If no safe output has been called yet, IMMEDIATELY call `safeoutputs___noop` with reason "Time limit reached before completion" > ⚠️ **Analysis phase is 15 minutes minimum** — every analysis file must contain color-coded Mermaid diagrams, structured evidence tables with dok_id citations, and follow template structure exactly. @@ -952,4 +966,12 @@ For EN/SV articles generated by this workflow, ensure: When the `news-translate` workflow handles remaining 12 languages, it applies the full translation quality rules including RTL support (ar, he), CJK native script (ja, ko, zh), Nordic parliamentary terms (da, no, fi), and European formal register (de, fr, es, nl). See `news-translate.md` for comprehensive per-language requirements. ## Article Naming Convention -Files: `YYYY-MM-DD-interpellation-debates-{lang}.html` \ No newline at end of file +Files: `YYYY-MM-DD-interpellation-debates-{lang}.html` + +## 🚨 FINAL REMINDER: You MUST Call a Safe Output + +**This is the last section of the prompt. Before your session ends, you MUST have called exactly one of:** +- `safeoutputs___create_pull_request` — if you generated any articles or analysis artifacts +- `safeoutputs___noop` — if MCP was unreachable and no artifacts were produced + +**A run that produces zero safe outputs is a FAILURE.** If you are unsure what to do, call `safeoutputs___noop` with a descriptive message explaining what happened.