Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/prompts/03-data-download.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ npx tsx scripts/download-parliamentary-data.ts \
2>&1 | tee /tmp/pipeline-output.log
```

File-budget constraint: safe-outputs `create_pull_request` hard-caps at **100 files** (E003). With 23 core artifacts + README + article.md + per-document analyses + HTML + JSON, `--limit 20` keeps the total under 80. Cap document-type workflows at `--limit 20`. Aggregation workflows may use `--limit 30` because they produce fewer per-document files.
File-budget constraint: safe-outputs `create_pull_request` hard-caps at **200 files** (E003). With 23 core artifacts + README + article.md + per-document analyses + HTML + JSON, `--limit 20` keeps the total well under 180. Cap document-type workflows at `--limit 20`. Aggregation workflows may use `--limit 30` because they produce fewer per-document files.

**Aggregation** workflows (evening-analysis, week-ahead, month-ahead, weekly-review, monthly-review, realtime-monitor):

Expand Down
22 changes: 11 additions & 11 deletions .github/prompts/07-commit-and-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,31 +55,31 @@ The dedicated **`news-translate`** workflow owns markdown translation only: each
| Rendered articles (all 14 languages) | `news/$ARTICLE_DATE-$SUBFOLDER-{en,sv,da,no,fi,de,fr,es,nl,ar,he,ja,ko,zh}.html` |
| News-translate executive-brief translations (only from `news-translate.md`) | `analysis/daily/$ARTICLE_DATE/$SUBFOLDER/executive-brief_<lang>.md` |

Stage `documents/*.md` selectively — keep the total ≤ 90 files (see step 2). Skip `analysis/daily/**/pass1/` entirely; it is a local gate-evidence snapshot (`04-analysis-pipeline.md`), not a deliverable.
Stage `documents/*.md` selectively — keep the total ≤ 180 files (see step 2). Skip `analysis/daily/**/pass1/` entirely; it is a local gate-evidence snapshot (`04-analysis-pipeline.md`), not a deliverable.

2. **100-file guard (non-negotiable).** Run this snippet before calling safeoutputs. The safe-outputs handler hard-rejects PRs with > 100 files (E003); the guard uses a 90-file threshold to leave headroom for metadata the handler may add.
2. **200-file guard (non-negotiable).** Run this snippet before calling safeoutputs. The safe-outputs handler hard-rejects PRs with > 200 files (E003); the guard uses a 180-file threshold to leave headroom for metadata the handler may add.

```bash
set -euo pipefail
STAGED_COUNT=$(git diff --cached --name-only | wc -l | tr -d '[:space:]')
echo "📊 Staged file count: $STAGED_COUNT (limit: 90)"
if [ "$STAGED_COUNT" -gt 90 ]; then
echo "⚠️ OVER FILE BUDGET ($STAGED_COUNT > 90). Unstaging documents/ ..."
echo "📊 Staged file count: $STAGED_COUNT (limit: 180)"
if [ "$STAGED_COUNT" -gt 180 ]; then
echo "⚠️ OVER FILE BUDGET ($STAGED_COUNT > 180). Unstaging documents/ ..."
git reset HEAD -- "analysis/daily/$ARTICLE_DATE/$SUBFOLDER/documents/" 2>/dev/null || true
STAGED_COUNT=$(git diff --cached --name-only | wc -l | tr -d '[:space:]')
echo "📊 After unstaging documents/: $STAGED_COUNT files"
if [ "$STAGED_COUNT" -gt 90 ]; then
echo "❌ STILL OVER BUDGET ($STAGED_COUNT > 90). Unstaging all JSON files..."
if [ "$STAGED_COUNT" -gt 180 ]; then
echo "❌ STILL OVER BUDGET ($STAGED_COUNT > 180). Unstaging all JSON files..."
git diff --cached --name-only | grep '\.json$' | xargs -r git reset HEAD -- || true
STAGED_COUNT=$(git diff --cached --name-only | wc -l | tr -d '[:space:]')
echo "📊 After unstaging JSON: $STAGED_COUNT files"
fi
if [ "$STAGED_COUNT" -gt 90 ]; then
echo "❌ FATAL: Cannot reduce staged files below 90 (currently $STAGED_COUNT). Aborting."
if [ "$STAGED_COUNT" -gt 180 ]; then
echo "❌ FATAL: Cannot reduce staged files below 180 (currently $STAGED_COUNT). Aborting."
exit 1
fi
fi
echo "✅ File budget OK: $STAGED_COUNT ≤ 90"
echo "✅ File budget OK: $STAGED_COUNT ≤ 180"
```

Skipping this step makes `create_pull_request` fail with E003 and wastes the run.
Expand Down Expand Up @@ -195,7 +195,7 @@ Use the template below verbatim, replacing `$…` placeholders with run-observab
| Longest evidence chain | $LONGEST_CHAIN_LEN hops |
| Executive-brief languages produced | $BRIEF_LANG_COUNT / 14 |
| Dashboard charts rendered | $CHART_COUNT |
| Files staged | $STAGED_FILE_COUNT / 90 |
| Files staged | $STAGED_FILE_COUNT / 180 |

## 🧠 Analysis artifacts

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/news-committee-reports.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ on:
required: false
default: deep

# Full git history needed by safe_outputs Checkout so the agent's git bundle can
# apply cleanly even when main advances during the agent run. gh-aw v0.76.0 honours
# `checkout.fetch-depth` for safe_outputs PR/push Checkouts (see compiler_safe_outputs_steps.go).
# Shallow checkout (fetch-depth: 1) for fast safe_outputs Checkout. The prerequisite step
# fetches GITHUB_SHA on demand for bundle-apply, making full-history clones unnecessary.
# gh-aw v0.76.0+ honours `checkout.fetch-depth` (see compiler_safe_outputs_steps.go).
checkout:
fetch-depth: 0
fetch-depth: 1

permissions:
contents: read
Expand Down Expand Up @@ -255,7 +255,7 @@ safe-outputs:
# GitHub raw content
- raw.githubusercontent.com
max-patch-size: 10240
max-patch-files: 100
max-patch-files: 200
create-pull-request:
labels: [agentic-news, analysis-data]
draft: false
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/news-election-cycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ on:
required: false
default: comprehensive

# Full git history needed by safe_outputs Checkout so the agent's git bundle can
# apply cleanly even when main advances during the agent run. gh-aw v0.76.0 honours
# `checkout.fetch-depth` for safe_outputs PR/push Checkouts (see compiler_safe_outputs_steps.go).
# Shallow checkout (fetch-depth: 1) for fast safe_outputs Checkout. The prerequisite step
# fetches GITHUB_SHA on demand for bundle-apply, making full-history clones unnecessary.
# gh-aw v0.76.0+ honours `checkout.fetch-depth` (see compiler_safe_outputs_steps.go).
checkout:
fetch-depth: 0
fetch-depth: 1

permissions:
contents: read
Expand Down Expand Up @@ -265,7 +265,7 @@ safe-outputs:
# GitHub raw content
- raw.githubusercontent.com
max-patch-size: 10240
max-patch-files: 100
max-patch-files: 200
create-pull-request:
labels: [agentic-news, analysis-data, long-horizon, forward-look, election-cycle]
draft: false
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/news-evening-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ on:
required: false
default: '12'

# Full git history needed by safe_outputs Checkout so the agent's git bundle can
# apply cleanly even when main advances during the agent run. gh-aw v0.76.0 honours
# `checkout.fetch-depth` for safe_outputs PR/push Checkouts (see compiler_safe_outputs_steps.go).
# Shallow checkout (fetch-depth: 1) for fast safe_outputs Checkout. The prerequisite step
# fetches GITHUB_SHA on demand for bundle-apply, making full-history clones unnecessary.
# gh-aw v0.76.0+ honours `checkout.fetch-depth` (see compiler_safe_outputs_steps.go).
checkout:
fetch-depth: 0
fetch-depth: 1

permissions:
contents: read
Expand Down Expand Up @@ -263,7 +263,7 @@ safe-outputs:
# GitHub raw content
- raw.githubusercontent.com
max-patch-size: 10240
max-patch-files: 100
max-patch-files: 200
create-pull-request:
labels: [agentic-news, analysis-data]
draft: false
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/news-interpellations.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ on:
required: false
default: deep

# Full git history needed by safe_outputs Checkout so the agent's git bundle can
# apply cleanly even when main advances during the agent run. gh-aw v0.76.0 honours
# `checkout.fetch-depth` for safe_outputs PR/push Checkouts (see compiler_safe_outputs_steps.go).
# Shallow checkout (fetch-depth: 1) for fast safe_outputs Checkout. The prerequisite step
# fetches GITHUB_SHA on demand for bundle-apply, making full-history clones unnecessary.
# gh-aw v0.76.0+ honours `checkout.fetch-depth` (see compiler_safe_outputs_steps.go).
checkout:
fetch-depth: 0
fetch-depth: 1

permissions:
contents: read
Expand Down Expand Up @@ -255,7 +255,7 @@ safe-outputs:
# GitHub raw content
- raw.githubusercontent.com
max-patch-size: 10240
max-patch-files: 100
max-patch-files: 200
create-pull-request:
labels: [agentic-news, analysis-data]
draft: false
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/news-month-ahead.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ on:
required: false
default: deep

# Full git history needed by safe_outputs Checkout so the agent's git bundle can
# apply cleanly even when main advances during the agent run. gh-aw v0.76.0 honours
# `checkout.fetch-depth` for safe_outputs PR/push Checkouts (see compiler_safe_outputs_steps.go).
# Shallow checkout (fetch-depth: 1) for fast safe_outputs Checkout. The prerequisite step
# fetches GITHUB_SHA on demand for bundle-apply, making full-history clones unnecessary.
# gh-aw v0.76.0+ honours `checkout.fetch-depth` (see compiler_safe_outputs_steps.go).
checkout:
fetch-depth: 0
fetch-depth: 1

permissions:
contents: read
Expand Down Expand Up @@ -258,7 +258,7 @@ safe-outputs:
# GitHub raw content
- raw.githubusercontent.com
max-patch-size: 10240
max-patch-files: 100
max-patch-files: 200
create-pull-request:
labels: [agentic-news, analysis-data]
draft: false
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/news-monthly-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ on:
required: false
default: deep

# Full git history needed by safe_outputs Checkout so the agent's git bundle can
# apply cleanly even when main advances during the agent run. gh-aw v0.76.0 honours
# `checkout.fetch-depth` for safe_outputs PR/push Checkouts (see compiler_safe_outputs_steps.go).
# Shallow checkout (fetch-depth: 1) for fast safe_outputs Checkout. The prerequisite step
# fetches GITHUB_SHA on demand for bundle-apply, making full-history clones unnecessary.
# gh-aw v0.76.0+ honours `checkout.fetch-depth` (see compiler_safe_outputs_steps.go).
checkout:
fetch-depth: 0
fetch-depth: 1

permissions:
contents: read
Expand Down Expand Up @@ -257,7 +257,7 @@ safe-outputs:
# GitHub raw content
- raw.githubusercontent.com
max-patch-size: 10240
max-patch-files: 100
max-patch-files: 200
create-pull-request:
labels: [agentic-news, analysis-data]
draft: false
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/news-motions.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ on:
required: false
default: deep

# Full git history needed by safe_outputs Checkout so the agent's git bundle can
# apply cleanly even when main advances during the agent run. gh-aw v0.76.0 honours
# `checkout.fetch-depth` for safe_outputs PR/push Checkouts (see compiler_safe_outputs_steps.go).
# Shallow checkout (fetch-depth: 1) for fast safe_outputs Checkout. The prerequisite step
# fetches GITHUB_SHA on demand for bundle-apply, making full-history clones unnecessary.
# gh-aw v0.76.0+ honours `checkout.fetch-depth` (see compiler_safe_outputs_steps.go).
checkout:
fetch-depth: 0
fetch-depth: 1

permissions:
contents: read
Expand Down Expand Up @@ -255,7 +255,7 @@ safe-outputs:
# GitHub raw content
- raw.githubusercontent.com
max-patch-size: 10240
max-patch-files: 100
max-patch-files: 200
create-pull-request:
labels: [agentic-news, analysis-data]
draft: false
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/news-propositions.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ on:
required: false
default: deep

# Full git history needed by safe_outputs Checkout so the agent's git bundle can
# apply cleanly even when main advances during the agent run. gh-aw v0.76.0 honours
# `checkout.fetch-depth` for safe_outputs PR/push Checkouts (see compiler_safe_outputs_steps.go).
# Shallow checkout (fetch-depth: 1) for fast safe_outputs Checkout. The prerequisite step
# fetches GITHUB_SHA on demand for bundle-apply, making full-history clones unnecessary.
# gh-aw v0.76.0+ honours `checkout.fetch-depth` (see compiler_safe_outputs_steps.go).
checkout:
fetch-depth: 0
fetch-depth: 1

permissions:
contents: read
Expand Down Expand Up @@ -255,7 +255,7 @@ safe-outputs:
# GitHub raw content
- raw.githubusercontent.com
max-patch-size: 10240
max-patch-files: 100
max-patch-files: 200
create-pull-request:
labels: [agentic-news, analysis-data]
draft: false
Expand Down Expand Up @@ -301,9 +301,9 @@ Generates deep political intelligence analysis **and** renders the HTML article

> 🟡 **Plan to call `safeoutputs___create_pull_request` by agent minute 42 (hard deadline 45)** to reserve job-level headroom for setup variance and the safe-outputs runner. See `00-base-contract.md §Session timing` and `07-commit-and-pr.md §Deadline enforcement`.
>
> **AI-FIRST target**: Pass 2 is mandatory. Complete agent-phase analysis/rendering by agent minute 40 so the PR opens before the agent-minute-45 cutoff. Compress scope before skipping iterations — keep `--limit 10` for document-type workflows (well under the 100-file PR cap given 14 HTML take 14 slots) while keeping 1:1 per-document coverage for every `dok_id` in the manifest (`05-analysis-gate.md` check 2). Scheduled runs use `analysis_depth=deep`; reserve `comprehensive` for manual `workflow_dispatch` backfills.
> **AI-FIRST target**: Pass 2 is mandatory. Complete agent-phase analysis/rendering by agent minute 40 so the PR opens before the agent-minute-45 cutoff. Compress scope before skipping iterations — keep `--limit 10` for document-type workflows (well under the 200-file PR cap given 14 HTML take 14 slots) while keeping 1:1 per-document coverage for every `dok_id` in the manifest (`05-analysis-gate.md` check 2). Scheduled runs use `analysis_depth=deep`; reserve `comprehensive` for manual `workflow_dispatch` backfills.
>
> ⚠️ **HARD FILE LIMIT (100 files)**: the safe-outputs handler hard-rejects PRs with > 100 files (E003). Run the 100-file guard from `07-commit-and-pr.md` before calling `safeoutputs___create_pull_request`. Budget: 23 core artifacts + README + article.md + ≤ 10 per-document analyses + 14 HTML + pir-status.json ≈ 50 files. Cap downloads at 10 documents when rendering all 14 languages. When staged > 90, unstage `documents/` first then JSON files until under budget.
> ⚠️ **HARD FILE LIMIT (200 files)**: the safe-outputs handler hard-rejects PRs with > 200 files (E003). Run the 200-file guard from `07-commit-and-pr.md` before calling `safeoutputs___create_pull_request`. Budget: 23 core artifacts + README + article.md + ≤ 10 per-document analyses + 14 HTML + pir-status.json ≈ 50 files. Cap downloads at 10 documents when rendering all 14 languages. When staged > 180, unstage `documents/` first then JSON files until under budget.

**Single run** (produces all 23 analysis artifacts + aggregated article.md + 14 HTML files, target ~42 agent minutes in a 60-min job):

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/news-quarter-ahead.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ on:
required: false
default: deep

# Full git history needed by safe_outputs Checkout so the agent's git bundle can
# apply cleanly even when main advances during the agent run. gh-aw v0.76.0 honours
# `checkout.fetch-depth` for safe_outputs PR/push Checkouts (see compiler_safe_outputs_steps.go).
# Shallow checkout (fetch-depth: 1) for fast safe_outputs Checkout. The prerequisite step
# fetches GITHUB_SHA on demand for bundle-apply, making full-history clones unnecessary.
# gh-aw v0.76.0+ honours `checkout.fetch-depth` (see compiler_safe_outputs_steps.go).
checkout:
fetch-depth: 0
fetch-depth: 1

permissions:
contents: read
Expand Down Expand Up @@ -258,7 +258,7 @@ safe-outputs:
# GitHub raw content
- raw.githubusercontent.com
max-patch-size: 10240
max-patch-files: 100
max-patch-files: 200
create-pull-request:
labels: [agentic-news, analysis-data, long-horizon, forward-look]
draft: false
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/news-realtime-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ on:
required: false
default: deep

# Full git history needed by safe_outputs Checkout so the agent's git bundle can
# apply cleanly even when main advances during the agent run. gh-aw v0.76.0 honours
# `checkout.fetch-depth` for safe_outputs PR/push Checkouts (see compiler_safe_outputs_steps.go).
# Shallow checkout (fetch-depth: 1) for fast safe_outputs Checkout. The prerequisite step
# fetches GITHUB_SHA on demand for bundle-apply, making full-history clones unnecessary.
# gh-aw v0.76.0+ honours `checkout.fetch-depth` (see compiler_safe_outputs_steps.go).
checkout:
fetch-depth: 0
fetch-depth: 1

permissions:
contents: read
Expand Down Expand Up @@ -267,7 +267,7 @@ safe-outputs:
# GitHub raw content
- raw.githubusercontent.com
max-patch-size: 10240
max-patch-files: 100
max-patch-files: 200
create-pull-request:
labels: [agentic-news, analysis-data]
draft: false
Expand Down
Loading
Loading