prompts/workflows: directive-style rewrite of agentic news instructions#2659
Conversation
…hon3 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🏷️ Automatic Labeling SummaryThis PR has been automatically labeled based on the files changed and PR metadata. Applied Labels: documentation,workflow,ci-cd,size-m,news,agentic-workflow Label Categories
For more information, see |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
…kflows Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
edit tool preference for file writes (cat heredoc fallback, ban python3)edit tool as the primary file-write mechanism across all agentic workflows
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
…4/06/ext prompts Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
edit tool as the primary file-write mechanism across all agentic workflows
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
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 refactors the agentic news prompt modules and news workflow bodies into a more directive, scan-friendly style while aiming to preserve the existing execution contract, and regenerates the compiled lock workflows accordingly (including the established fetch-depth: 0 patch).
Changes:
- Rewrites/condenses multiple
.github/prompts/*.mdmodules into directive-form instructions and adds point-of-use file-write contract reminders. - Updates many
.github/workflows/news-*.mdbodies with a standardized “File-write contract” section and tightens some timing/translation directives. - Regenerates corresponding
.lock.ymlfiles and patchesactions/checkouttofetch-depth: 0.
Reviewed changes
Copilot reviewed 40 out of 40 changed files in this pull request and generated 24 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/news-year-ahead.md | Adds standardized file-write contract section to workflow body. |
| .github/workflows/news-year-ahead.lock.yml | Patches checkout depth to fetch-depth: 0. |
| .github/workflows/news-weekly-review.md | Condenses timing guidance and adds standardized file-write contract section. |
| .github/workflows/news-weekly-review.lock.yml | Patches checkout depth to fetch-depth: 0. |
| .github/workflows/news-week-ahead.md | Condenses timing guidance and adds standardized file-write contract section. |
| .github/workflows/news-week-ahead.lock.yml | Patches checkout depth to fetch-depth: 0. |
| .github/workflows/news-translate.md | Tightens translation step to require per-language edit writes. |
| .github/workflows/news-translate.lock.yml | Patches checkout depth to fetch-depth: 0. |
| .github/workflows/news-realtime-monitor.md | Condenses timing guidance and adds standardized file-write contract section. |
| .github/workflows/news-realtime-monitor.lock.yml | Patches checkout depth to fetch-depth: 0. |
| .github/workflows/news-quarter-ahead.md | Adds standardized file-write contract section to workflow body. |
| .github/workflows/news-quarter-ahead.lock.yml | Patches checkout depth to fetch-depth: 0. |
| .github/workflows/news-propositions.md | Condenses AI-FIRST + file-limit guidance, updates timing paragraph, adds file-write contract section. |
| .github/workflows/news-propositions.lock.yml | Patches checkout depth to fetch-depth: 0. |
| .github/workflows/news-motions.md | Condenses timing paragraph and adds standardized file-write contract section. |
| .github/workflows/news-motions.lock.yml | Patches checkout depth to fetch-depth: 0. |
| .github/workflows/news-monthly-review.md | Condenses timing paragraph and adds standardized file-write contract section. |
| .github/workflows/news-monthly-review.lock.yml | Patches checkout depth to fetch-depth: 0. |
| .github/workflows/news-month-ahead.md | Condenses timing paragraph and adds standardized file-write contract section. |
| .github/workflows/news-month-ahead.lock.yml | Patches checkout depth to fetch-depth: 0. |
| .github/workflows/news-interpellations.md | Condenses timing paragraph and adds standardized file-write contract section. |
| .github/workflows/news-interpellations.lock.yml | Patches checkout depth to fetch-depth: 0. |
| .github/workflows/news-evening-analysis.md | Condenses timing paragraph and adds standardized file-write contract section. |
| .github/workflows/news-evening-analysis.lock.yml | Patches checkout depth to fetch-depth: 0. |
| .github/workflows/news-election-cycle.md | Adds standardized file-write contract section to workflow body. |
| .github/workflows/news-election-cycle.lock.yml | Patches checkout depth to fetch-depth: 0. |
| .github/workflows/news-committee-reports.md | Condenses timing paragraph and adds standardized file-write contract section. |
| .github/workflows/news-committee-reports.lock.yml | Patches checkout depth to fetch-depth: 0. |
| .github/prompts/README.md | Updates module catalogue phrasing and AI-FIRST reference formatting. |
| .github/prompts/ext/tier-c-aggregation.md | Adds explicit edit-only file-write contract reminder for Tier-C extensions. |
| .github/prompts/ext/long-horizon-forecasting.md | Adds explicit edit-only file-write contract reminder for long-horizon extensions. |
| .github/prompts/ext/cycle-rollover.md | Adds explicit edit-only file-write contract reminder for rollover/archival writes. |
| .github/prompts/07-commit-and-pr.md | Directive rewrite of PR/no-op policy, file-budget guard, and deadline enforcement wording. |
| .github/prompts/06-article-generation.md | Directive rewrite of aggregate+render instructions; adds explicit file-write contract reminder. |
| .github/prompts/05-analysis-gate.md | Condenses rerun guidance and post-aggregation Check 12 ordering note. |
| .github/prompts/04-analysis-pipeline.md | Adds point-of-use file-write contract reminder; directive rewrite of improvement-mode steps. |
| .github/prompts/03-data-download.md | Directive rewrite of router/scaffold guidance; clarifies early-scaffold heredoc exception and edit-appending. |
| .github/prompts/02-mcp-access.md | Directive rewrite and tightened tool naming/inventory guidance; IMF CLI section reformatted. |
| .github/prompts/01-bash-and-shell-safety.md | Rewrites bash safety guidance; adds a full file-write hierarchy section and self-check list. |
| .github/prompts/00-base-contract.md | Directive rewrite of non-negotiables, timing, inputs contract, and language/output constraints. |
| For short ASCII writes (< 200 bytes, no special chars), `printf '%s\n' "$CONTENT" > "$TARGET"` is acceptable. `echo "$CONTENT" > file` is not — `echo` mangles backslashes and lines starting with `-`. | ||
|
|
||
| ### Banned for file writes | ||
|
|
| @@ -331,4 +331,8 @@ At the start of every run, the pre-flight check in `03-data-download.md` detects | |||
|
|
|||
| Repeated runs for the same `$ARTICLE_DATE` always use the same analysis folder when `force_generation=false`. | |||
|
|
|||
| ## File-write contract | |||
|
|
||
| ## File-write contract | ||
|
|
||
| > 🛠 **Write every analysis artifact (`analysis/daily/$DATE/$SUB/*.md`, `documents/*.md`, JSON sidecars, `methodology-reflection.md` re-run deltas) with the `edit` tool.** `cat <<'QUOTED_EOF' > file` is a Tier-2 fallback only — ASCII-only, no code fences / Mermaid / `$` / backticks / `EOF` markers, < 200 lines, and only after `edit` has failed for a non-content reason. Banned for `analysis/daily/**` writes: `python3`, `node -e`, `sed -i`, `echo … > file`, `tee file`, unquoted heredocs (`<<EOF`). The aggregator (`scripts/aggregate-analysis.ts`) and renderer (`scripts/render-articles.ts`) are the only writers for `article.md` and `news/*.html`. See [`01-bash-and-shell-safety.md` §File creation & overwrite strategy](../prompts/01-bash-and-shell-safety.md). |
| @@ -331,4 +331,8 @@ At the start of every run, the pre-flight check in `03-data-download.md` detects | |||
|
|
|||
| Repeated runs for the same `$ARTICLE_DATE` always use the same analysis folder when `force_generation=false`. | |||
|
|
|||
| ## File-write contract | |||
|
|
||
| ## File-write contract | ||
|
|
||
| > 🛠 **Write every analysis artifact (`analysis/daily/$DATE/$SUB/*.md`, `documents/*.md`, JSON sidecars, `methodology-reflection.md` re-run deltas) with the `edit` tool.** `cat <<'QUOTED_EOF' > file` is a Tier-2 fallback only — ASCII-only, no code fences / Mermaid / `$` / backticks / `EOF` markers, < 200 lines, and only after `edit` has failed for a non-content reason. Banned for `analysis/daily/**` writes: `python3`, `node -e`, `sed -i`, `echo … > file`, `tee file`, unquoted heredocs (`<<EOF`). The aggregator (`scripts/aggregate-analysis.ts`) and renderer (`scripts/render-articles.ts`) are the only writers for `article.md` and `news/*.html`. See [`01-bash-and-shell-safety.md` §File creation & overwrite strategy](../prompts/01-bash-and-shell-safety.md). |
| @@ -342,4 +342,8 @@ At the start of every run, the pre-flight check in `03-data-download.md` detects | |||
|
|
|||
| Repeated runs for the same `$ARTICLE_DATE` always use the same analysis folder when `force_generation=false`. | |||
|
|
|||
| ## File-write contract | |||
|
|
||
| ## File-write contract | ||
|
|
||
| > 🛠 **Write every analysis artifact (`analysis/daily/$DATE/$SUB/*.md`, `documents/*.md`, JSON sidecars, `methodology-reflection.md` re-run deltas) with the `edit` tool.** `cat <<'QUOTED_EOF' > file` is a Tier-2 fallback only — ASCII-only, no code fences / Mermaid / `$` / backticks / `EOF` markers, < 200 lines, and only after `edit` has failed for a non-content reason. Banned for `analysis/daily/**` writes: `python3`, `node -e`, `sed -i`, `echo … > file`, `tee file`, unquoted heredocs (`<<EOF`). The aggregator (`scripts/aggregate-analysis.ts`) and renderer (`scripts/render-articles.ts`) are the only writers for `article.md` and `news/*.html`. See [`01-bash-and-shell-safety.md` §File creation & overwrite strategy](../prompts/01-bash-and-shell-safety.md). |
|
|
||
| ## File-write contract | ||
|
|
||
| > 🛠 **Write every analysis artifact (`analysis/daily/$DATE/$SUB/*.md`, `documents/*.md`, JSON sidecars, `methodology-reflection.md` re-run deltas) with the `edit` tool.** `cat <<'QUOTED_EOF' > file` is a Tier-2 fallback only — ASCII-only, no code fences / Mermaid / `$` / backticks / `EOF` markers, < 200 lines, and only after `edit` has failed for a non-content reason. Banned for `analysis/daily/**` writes: `python3`, `node -e`, `sed -i`, `echo … > file`, `tee file`, unquoted heredocs (`<<EOF`). The aggregator (`scripts/aggregate-analysis.ts`) and renderer (`scripts/render-articles.ts`) are the only writers for `article.md` and `news/*.html`. See [`01-bash-and-shell-safety.md` §File creation & overwrite strategy](../prompts/01-bash-and-shell-safety.md). |
|
|
||
| ## File-write contract | ||
|
|
||
| > 🛠 **Write every analysis artifact (`analysis/daily/$DATE/$SUB/*.md`, `documents/*.md`, JSON sidecars, `methodology-reflection.md` re-run deltas) with the `edit` tool.** `cat <<'QUOTED_EOF' > file` is a Tier-2 fallback only — ASCII-only, no code fences / Mermaid / `$` / backticks / `EOF` markers, < 200 lines, and only after `edit` has failed for a non-content reason. Banned for `analysis/daily/**` writes: `python3`, `node -e`, `sed -i`, `echo … > file`, `tee file`, unquoted heredocs (`<<EOF`). The aggregator (`scripts/aggregate-analysis.ts`) and renderer (`scripts/render-articles.ts`) are the only writers for `article.md` and `news/*.html`. See [`01-bash-and-shell-safety.md` §File creation & overwrite strategy](../prompts/01-bash-and-shell-safety.md). |
|
|
||
| ## File-write contract | ||
|
|
||
| > 🛠 **Write every analysis artifact (`analysis/daily/$DATE/$SUB/*.md`, `documents/*.md`, JSON sidecars, `methodology-reflection.md` re-run deltas) with the `edit` tool.** `cat <<'QUOTED_EOF' > file` is a Tier-2 fallback only — ASCII-only, no code fences / Mermaid / `$` / backticks / `EOF` markers, < 200 lines, and only after `edit` has failed for a non-content reason. Banned for `analysis/daily/**` writes: `python3`, `node -e`, `sed -i`, `echo … > file`, `tee file`, unquoted heredocs (`<<EOF`). The aggregator (`scripts/aggregate-analysis.ts`) and renderer (`scripts/render-articles.ts`) are the only writers for `article.md` and `news/*.html`. See [`01-bash-and-shell-safety.md` §File creation & overwrite strategy](../prompts/01-bash-and-shell-safety.md). |
…tf allowance per review feedback Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
| | Multiple file writes inside one Python/Node `-e` invocation | Whole tool-call message (with every file body inline) replays each turn → O(n²) token blowup. | | ||
| | `tee "$FILE"` for content writes | Same hazards as `cat >` plus stdout duplication. `tee` is fine for log capture (`… 2>&1 | tee /tmp/pipeline.log`). | | ||
|
|
||
| Self-check before any file-write `bash` call: if the command contains `>`, `>>`, `<<`, `<<<`, `tee`, `python3`, `sed -i`, or `dd`, and the target is under the repo working tree (anything other than `/tmp/`), switch to `edit`. |
| The download step appends to this file (it does **not** overwrite — see | ||
| §Provenance manifest below). If MCP is unreachable from start, the per-document | ||
| table simply remains empty and the MCP-attempts section explains why. | ||
| The download step appends to this file using the `edit` tool (str-replace at the section anchor, or insert before the EOF marker line). See [`01-bash-and-shell-safety.md §File creation & overwrite strategy`](01-bash-and-shell-safety.md). When MCP is unreachable from start, the per-document table stays empty and the MCP-attempts section explains why. |
| 1. **Pass 1 — translate**: Read the source `executive-brief.md` in full. For every language in `TRANSLATION_LANGS`, produce `analysis/daily/$DATE/$SUB/executive-brief_<lang>.md` following the TRANSLATION_GUIDE rules — **write each file with one `edit` tool call per language** (never via `python3`, `bash` heredocs, or shell redirection — see `01-bash-and-shell-safety.md §File creation & overwrite strategy`). Preserve every verbatim block (YAML, HTML comments except `source-sha`, `dok_id` codes, Mermaid DSL bodies, code fences, URLs, file paths, evidence-anchor canonical column values). Translate every always-translate block (prose, headings, list items, table cell text, image alt-text, BLUF, decisions, link text). | ||
| 2. **Pass 2 — read-back & refine**: Read every translation back in full. Verify structural parity (heading / fence / table / Mermaid counts match source ±0). Verify dok_id and URL set equality. Verify no banned English phrases remain in non-English files (`Executive Brief`, `Decisions`, `Confidence`, `BLUF`, …). Tighten tone register for the target language using the per-language guidance in TRANSLATION_GUIDE. For `ar` and `he`, ensure the file starts with `<!-- dir: rtl -->`. | ||
| 3. **Append the source-revision marker**: compute `SRC_SHA=$(git log -1 --format=%H -- <source>)` in the runtime shell. Append `<!-- source-sha: $SRC_SHA -->` as the last non-empty line of every translation file. This is the drift signal future runs use to decide whether to retranslate. | ||
| 4. **Validate**: run `npx tsx scripts/validate-executive-brief-translations.ts --source <source>` (when available) or fall back to the structural sanity checks listed in TRANSLATION_GUIDE §Acceptance checklist. Fix any failures by re-translating the offending language; do not commit a file that fails validation. |
|
|
||
| ## File-write contract (point-of-use reminder) | ||
|
|
||
| > 🛠 **All 23 artifacts on this page use the `edit` tool** — Pass 1 creates, Pass 2 read-back-and-improves, improvement-mode extensions, `pass1/` snapshot copies (`cp` is fine), `documents/{dok_id}-analysis.md`, and `## Re-run delta` appends in `methodology-reflection.md`. Tier-2 fallback (`cat <<'EOF_RAW' > file`) is acceptable only when `edit` has failed for non-content-shape reasons and the content is pure ASCII without code fences / Mermaid / `$` / backticks / `EOF` markers. Mermaid blocks, `ö ä å`, RTL/CJK characters, and non-trivial YAML/JSON sidecars ⇒ `edit` only. Banned for file writes: `python3`, `node -e`, `sed -i`, `echo … > file`, `tee file`, unquoted heredocs (`<<EOF`). See [`01-bash-and-shell-safety.md` §File creation & overwrite strategy](01-bash-and-shell-safety.md) for the full hierarchy. |
| ## What the AI does | ||
|
|
||
| ## What the AI still MUST do | ||
| > 🛠 **File-write contract**: `article.md` is a script-generated projection of upstream `.md` artifacts — fix upstream artifacts (with the `edit` tool) and re-aggregate. The aggregator + renderer (`scripts/aggregate-analysis.ts`, `scripts/render-articles.ts`) are the only writers for `article.md` and `news/*.html`. For any upstream edit between aggregate and render (e.g. last-minute SEO H1/dek tightening in `executive-brief.md`, fixing a stale `dok_id` cross-reference in `cross-reference-map.md`), use the `edit` tool. Banned for `analysis/daily/**` writes: `python3`, `node -e`, `sed -i`, `echo … > file`, `tee file`, unquoted heredocs (`<<EOF`). See [`01-bash-and-shell-safety.md` §File creation & overwrite strategy](01-bash-and-shell-safety.md). |
- 01-bash-and-shell-safety.md: self-check now explicitly exempts the 03-data-download scaffold heredoc - 03-data-download.md: reference actual in-file anchor (## Per-document table heading) instead of non-existent EOF marker line - news-translate.md: step 3 source-sha marker now explicitly requires `edit` tool instead of ambiguous "append" - 04-analysis-pipeline.md: add scaffold exception to file-write contract - 06-article-generation.md: scope ban to "agent-generated content writes" and add scaffold exception Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
| 1. Call `get_sync_status({})`. Retry up to **3 times**, 20 s apart (server is pre-warmed by the CI `steps:` block). | ||
| 2. On third-attempt failure: set `ANALYSIS_DIR=analysis/daily/$ARTICLE_DATE/$SUBFOLDER` and branch on `[ -s "$ANALYSIS_DIR/synthesis-summary.md" ]`: | ||
| - **Prior analysis exists** → route to improvement-mode in [`04-analysis-pipeline.md`](04-analysis-pipeline.md). Extend using on-disk evidence, refresh `article.md` + HTML, PR once. | ||
| - **No prior analysis** → apply the MCP-unreachable no-op rule in [`07-commit-and-pr.md §No-op policy`](07-commit-and-pr.md) and exit. |
| ## Early-scaffold marker (resilience — write **immediately** after pre-flight) | ||
|
|
||
| > 🛟 **Closes the "MCP unreachable from start + no prior analysis" no-op hole.** | ||
| > By writing a tracked-on-disk file *before* the first MCP call, the run is | ||
| > guaranteed to have a non-empty diff to commit even when every MCP attempt | ||
| > fails — turning what was previously a `safeoutputs___noop` into a partial | ||
| > `safeoutputs___create_pull_request` with the failure documented. | ||
| Writing a tracked on-disk file *before* the first MCP call guarantees a non-empty diff even when every MCP attempt fails — turning a would-be `safeoutputs___noop` into a partial `safeoutputs___create_pull_request` with the failure documented. | ||
|
|
||
| Run this **once**, immediately after the pre-flight block above and **before** | ||
| the first `download-parliamentary-data.ts` invocation: | ||
| Run **once**, immediately after the pre-flight block above and **before** the first `download-parliamentary-data.ts` invocation: |
| `news/$ARTICLE_DATE-$SUBFOLDER-$LANG.html` (e.g. `news/2026-04-23-propositions-en.html` … `news/2026-04-23-propositions-zh.html`) | ||
|
|
||
| Every per-type workflow renders the full 14-language set in the same agentic run. The dedicated `news-translate` workflow has been re-scoped: it now produces `executive-brief_<lang>.md` markdown translations of every `analysis/daily/**/executive-brief.md` for the 13 non-English target languages (3 runs/day, default batch 3 sources). It does **not** touch `news/*.html` and does **not** back-fill `article.<lang>.md`. See `.github/workflows/news-translate.md` for the executive-brief translation contract. | ||
| Every per-type workflow renders the full 14-language set in one agentic run. The dedicated `news-translate` workflow is re-scoped to produce `executive-brief_<lang>.md` markdown translations of every `analysis/daily/**/executive-brief.md` for the 13 non-English target languages (3 runs/day, default batch 3 sources). It does not touch `news/*.html` and does not back-fill `article.<lang>.md`. See `.github/workflows/news-translate.md`. |
| 1. **Pass 1 — translate**: Read the source `executive-brief.md` in full. For every language in `TRANSLATION_LANGS`, produce `analysis/daily/$DATE/$SUB/executive-brief_<lang>.md` following the TRANSLATION_GUIDE rules — **write each file with one `edit` tool call per language** (never via `python3`, `bash` heredocs, or shell redirection — see `01-bash-and-shell-safety.md §File creation & overwrite strategy`). Preserve every verbatim block (YAML, HTML comments except `source-sha`, `dok_id` codes, Mermaid DSL bodies, code fences, URLs, file paths, evidence-anchor canonical column values). Translate every always-translate block (prose, headings, list items, table cell text, image alt-text, BLUF, decisions, link text). | ||
| 2. **Pass 2 — read-back & refine**: Read every translation back in full. Verify structural parity (heading / fence / table / Mermaid counts match source ±0). Verify dok_id and URL set equality. Verify no banned English phrases remain in non-English files (`Executive Brief`, `Decisions`, `Confidence`, `BLUF`, …). Tighten tone register for the target language using the per-language guidance in TRANSLATION_GUIDE. For `ar` and `he`, ensure the file starts with `<!-- dir: rtl -->`. | ||
| 3. **Append the source-revision marker**: compute `SRC_SHA=$(git log -1 --format=%H -- <source>)` in the runtime shell. Append `<!-- source-sha: $SRC_SHA -->` as the last non-empty line of every translation file. This is the drift signal future runs use to decide whether to retranslate. | ||
| 3. **Append the source-revision marker**: compute `SRC_SHA=$(git log -1 --format=%H -- <source>)` in the runtime shell. Use the `edit` tool to add or replace the final `<!-- source-sha: $SRC_SHA -->` line at the end of every translation file (consistent with the file-write contract — no `>>` or `echo`). This is the drift signal future runs use to decide whether to retranslate. |
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
| - `status: unavailable` or `data/imf-unavailable.flag` present: inject the standard warning block and use cached IMF / SCB fallback only; never substitute World Bank for macroeconomic claims. | ||
| 5. Pre-warm IMF with one throwaway `weo` call through the CLI (not raw `fetch`): `npx tsx scripts/imf-fetch.ts weo --country SWE --indicator NGDP_RPCH --years 1 >/dev/null 2>&1 || true ; sleep 1`. | ||
| 1. Call `get_sync_status({})`. Retry up to **3 times**, 20 s apart (server is pre-warmed by the CI `steps:` block). | ||
| 2. On third-attempt failure: write the early-scaffold marker per [`03-data-download.md §Early-scaffold marker`](03-data-download.md) (guarantees a non-empty diff even when MCP is totally unreachable). Then set `ANALYSIS_DIR=analysis/daily/$ARTICLE_DATE/$SUBFOLDER` and branch on `[ -s "$ANALYSIS_DIR/synthesis-summary.md" ]`: |
There was a problem hiding this comment.
Fixed in 3521b24 — the third-attempt failure path now runs the 03-data-download.md pre-flight first so IMPROVEMENT_MODE is set before the scaffold heredoc expands it under set -euo pipefail, with an explicit IMPROVEMENT_MODE=false fallback prepend documented when the full pre-flight cannot run.
| `news/$ARTICLE_DATE-$SUBFOLDER-$LANG.html` (e.g. `news/2026-04-23-propositions-en.html` … `news/2026-04-23-propositions-zh.html`) | ||
|
|
||
| Every per-type workflow renders the full 14-language set in the same agentic run. The dedicated `news-translate` workflow has been re-scoped: it now produces `executive-brief_<lang>.md` markdown translations of every `analysis/daily/**/executive-brief.md` for the 13 non-English target languages (3 runs/day, default batch 3 sources). It does **not** touch `news/*.html` and does **not** back-fill `article.<lang>.md`. See `.github/workflows/news-translate.md` for the executive-brief translation contract. | ||
| Every per-type workflow renders the full 14-language set in one agentic run. The dedicated `news-translate` workflow is re-scoped to produce `executive-brief_<lang>.md` markdown translations of every `analysis/daily/**/executive-brief.md` for the 13 non-English target languages (3 runs/day, default batch 3 sources). It does not touch `news/*.html` and does not back-fill `article.<lang>.md`. See `.github/workflows/news-translate.md`. |
There was a problem hiding this comment.
Fixed in 3521b24 — updated to default batch 2 sources (with the run #26008347629 note about the 3→2 reduction) to match the workflow's actual max_briefs default.
| ## Per-document table | ||
| _(populated by the download step)_ | ||
| _(populated by the download step via the \`edit\` tool — never \`cat >>\` and never \`python3\`)_ | ||
| EOF | ||
| echo "✅ scaffold marker written: $SCAFFOLD" | ||
| fi | ||
| ``` | ||
|
|
||
| The download step appends to this file (it does **not** overwrite — see | ||
| §Provenance manifest below). If MCP is unreachable from start, the per-document | ||
| table simply remains empty and the MCP-attempts section explains why. | ||
| The download step appends to this file using the `edit` tool (str-replace at the `## Per-document table` section anchor, or insert under the `_(populated by the download step …)_` placeholder line). See [`01-bash-and-shell-safety.md §File creation & overwrite strategy`](01-bash-and-shell-safety.md). When MCP is unreachable from start, the per-document table stays empty and the MCP-attempts section explains why. |
There was a problem hiding this comment.
Fixed in 3521b24 — reworded the paragraph and the in-scaffold placeholder line to clarify that scripts/download-parliamentary-data rewrites data-download-manifest.md in full via writeManifest() / fs.writeFileSync (citing output-writer.ts), and that edit is only used for post-download agent amendments. The scaffold is now correctly described as the pre-MCP fallback marker.
| | 5 | **AI FIRST — 2 complete iterations minimum**. Pass 1 creates every artifact. Pass 2 reads Pass 1 back and improves every section. | | ||
| | 6 | No psyops, propaganda, or partisan influence operations. | | ||
| | 7 | Complete the task inside the time budget. Trim *scope*, never *quality*. | | ||
| | 8 | **File writes — use `edit`.** `cat <<'QUOTED_EOF'` heredoc is the only fallback. `python3` / `node -e` / `sed -i` are banned for file writes (sole exception: read-only JSON validator in `05-analysis-gate.md`). Full hierarchy → [`01-bash-and-shell-safety.md` §File creation & overwrite strategy](01-bash-and-shell-safety.md). | |
| - **Tier-C aggregation** produces the same 23 artifacts plus depth multipliers, cross-type sibling-folder citations, prior-cycle PIR ingestion, and a 1 500-word article floor — see [`ext/tier-c-aggregation.md`](ext/tier-c-aggregation.md). | ||
| - **Single blocking gate**: [`05-analysis-gate.md`](05-analysis-gate.md) is the only enforcer. No article may be touched until the gate passes. | ||
| - **AI-FIRST rule** (from [`00-base-contract.md`](00-base-contract.md) §Non-negotiable rules #5): minimum 2 complete iterations — Pass 1 creates every artifact, Pass 2 reads Pass 1 back in full and improves every section. | ||
| - **AI-FIRST rule** ([`00-base-contract.md`](00-base-contract.md) §5): minimum 2 complete iterations — Pass 1 creates every artifact, Pass 2 reads Pass 1 back and improves every section. |
There was a problem hiding this comment.
Fixed in 3521b24 — replaced §5 with §Non-negotiable rules #5, which points at the actual heading + rule number rather than a non-existent anchor.
…ST anchor + max_briefs default Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
IMPROVEMENT_MODE(via pre-flight or explicit=false) before invoking the scaffold heredoc, preventingset -uunbound-variable abort.news-translatereference:default batch 3 sources→default batch 2 sources(matches workflow's actualmax_briefsdefault).scripts/download-parliamentary-datarewritesdata-download-manifest.mdin full viawriteManifest()/fs.writeFileSync;editis only for post-download agent amendments. Updated the in-scaffold placeholder line accordingly.03-data-download.mdearly-scaffold unquoted heredoc as the sole exception alongside the read-only JSON validator.§5anchor →§Non-negotiable rules #5for the AI-FIRST rule reference.