@@ -462,6 +462,9 @@ Branch: `news/content/{YYYY-MM-DD}/{article-type}` (e.g. `news/content/2026-03-2
462462# CRITICAL: Stage ONLY today's new articles (EN/SV), NOT all existing news/
463463# Staging news/*motions*.html would include 360+ existing files, many of which
464464# may have been modified by auto-fix scripts, causing E003 (>100 files) PR failure.
465+ # 🚫 DO NOT add `analysis/data/` anywhere — it contains 200+ MCP response cache files
466+ # (documents/{motions,interpellations,committeeReports,propositions,questions,speeches}/)
467+ # populated by download-parliamentary-data.ts. Only run the `git add` lines shown below.
465468git add " news/$ARTICLE_DATE -opposition-motions-en.html" 2> /dev/null || true
466469git add " news/$ARTICLE_DATE -opposition-motions-sv.html" 2> /dev/null || true
467470git add news/metadata/ 2> /dev/null || true
473476# With --limit 50, documents/ alone can contain 100+ files (50 JSON + 50 analysis.md).
474477git add " analysis/daily/$ARTICLE_DATE /$ANALYSIS_SUBFOLDER " /* .md 2> /dev/null || true
475478git add " analysis/daily/$ARTICLE_DATE /$ANALYSIS_SUBFOLDER " /* .json 2> /dev/null || true
479+ # 🚨 HARD UNSTAGE: NEVER commit analysis/data/ — it is an MCP response cache populated by
480+ # download-parliamentary-data.ts (6 doc types × ~40 files = 240+ files). It must stay local.
481+ # Committing it caused E003 "received 258 files" in run 24653843681 (PR #1867). Only
482+ # news-realtime-monitor stages analysis/data/ intentionally; news-motions never should.
483+ # 🚫 DO NOT run `git add analysis/data/...` anywhere in this workflow.
484+ git reset HEAD -- analysis/data/ 2> /dev/null || true
476485# Enforce safe-outputs 100-file PR limit (AWF-safe: no $(...) — write to temp file + read back)
477486git diff --cached --name-only > /tmp/staged_files.txt
478487awk ' END{print NR}' /tmp/staged_files.txt > /tmp/staged_count.txt
0 commit comments