Classification: Public · Owner: Hack23 AB · Version: 2.0 (2026-04-21)
Ten focused prompt files, one bounded context each, composed by every news-*.md
gh-aw workflow. This replaces the 1,789-line SHARED_PROMPT_PATTERNS.md monolith.
| # | File | Purpose |
|---|---|---|
| 00 | 00-scope-and-ground-rules.md |
Workspace scope, forbidden/allowed edits, neutrality, one-PR rule |
| 01 | 01-data-collection.md |
EP MCP feeds + direct fallbacks, deep-fetch, IMF primary economic + WB non-economic |
| 01a | 01a-data-fanout.md |
Stage-A fan-out helpers — forward-statements registry seed, multi-day foreseen activities, Monday urgency sweep, quarter+ horizon fan-out (imported only by forward-looking / long-horizon workflows) |
| 02 | 02-analysis-protocol.md |
Pipeline, methodologies/templates, mandatory 2-pass |
| 02a | 02a-rerun-merge.md |
Re-run improve/extend rule (same-day folder resume) |
| 03 | 03-analysis-completeness-gate.md |
Agent-side completeness gate over artifacts, IMF evidence, and metadata readiness |
| 04 | 04-article-generation.md |
Deterministic aggregator render, article.md, SEO title/description/keywords contract |
| 05 | 05-analysis-to-article-contract.md |
AI-first artifact contract and read-before-render duties |
| 06 | 06-pr-and-safe-outputs.md |
Single-PR rule, analysis-only fallback, noop diagnostics |
| 07 | 07-mcp-reference.md |
EP / IMF (primary economic) / WB (non-economic) tool tables, parameter corrections, reliability matrix |
| 08 | 08-infrastructure.md |
Required frontmatter, mcp-setup.sh, client env vars |
| 09 | 09-troubleshooting.md |
AWF firewall diagnostic, error→root-cause table |
Every news-*.md except news-translate.md reads prompts in this order:
- 00-scope — before anything else: what you may and may not touch.
- 08-infrastructure — frontmatter you inherited from the workflow.
- Stage A — Data Collection →
01-data-collection.md+07-mcp-reference.md - Stage B — Analysis (2 passes) →
02-analysis-protocol.md - Stage C — Completeness Gate →
03-analysis-completeness-gate.md - Stage D — Deterministic article render → PR →
04-article-generation.md+05-analysis-to-article-contract.md+../../Article-Generation.md→06-pr-and-safe-outputs.md - On error →
09-troubleshooting.md
Every article-generating workflow produces deep political analysis before rendering article output. The chain is:
Stage A · Data Collection (01-data-collection.md + 07-mcp-reference.md)
→ Stage B · Analysis Artifacts (02-analysis-protocol.md)
authoritative protocol: analysis/methodologies/ai-driven-analysis-guide.md (10 steps)
master artifact map: analysis/methodologies/artifact-catalog.md
per-artifact rules: analysis/methodologies/per-artifact-methodologies.md
39 templates: analysis/templates/ (14 agentic-workflow [incl. 6 reusable framework] + 25 per-artifact)
→ Stage C · Completeness Gate (03-analysis-completeness-gate.md)
per-artifact floors: analysis/methodologies/reference-quality-thresholds.json
→ Stage D · Deterministic Article Render (04-article-generation.md + 05-analysis-to-article-contract.md + Article-Generation.md)
Read-Before-Render: agent MUST read every artifact in analysis/daily/<run>/ before invoking the aggregator
artifact → section map: 04-article-generation.md § 7.1 and Article-Generation.md § Templates and Artifact-to-Article Mapping
→ Stage E · Single PR (06-pr-and-safe-outputs.md) — one safeoutputs___create_pull_request call
An article that does not cite a specific analysis/daily/<run>/… artifact for each analytical section fails Stage C and is blocked from PR creation. methodology-reflection.md is the final artifact of every run (after workflow-audit.md).
Every change to .github/workflows/*.md, .github/agents/*.md, or .github/prompts/*.md should be anchored against the upstream gh-aw doc sets:
- Abridged: https://github.github.com/gh-aw/llms-small.txt
- Full: https://github.github.com/gh-aw/llms-full.txt
- Blog series: https://github.github.com/gh-aw/_llms-txt/agentic-workflows.txt
- Repository: https://github.com/github/gh-aw
The pinned gh-aw version for this repo lives in .github/workflows/compile-agentic-workflows.yml.
Every article-generating workflow calls
safeoutputs___create_pull_requestexactly once, at the very end of the run, after all files are written. The only exception isnews-translate.md, which uses multi-call flush withmax-patch-size+ re-calls. Checkpoint PRs, keep-alive heartbeats, and progressive safe outputs are banned and CI-lint-enforced byscripts/lint-prompts.js.
Full rationale: 06-pr-and-safe-outputs.md.
scripts/lint-prompts.js enforces four
rules across every .github/workflows/news-*.md file (news-translate.md is
the single, fully-exempt workflow):
safeoutputs___create_pull_requestappears at most once per workflow.- None of the banned phrases appear:
checkpoint pr,checkpoint-pr,keep-alive,keepalive,keep alive,heartbeat,progressive safe output(case-insensitive). - No
safeoutputs___push_repo_memoryreferences. - Analysis-awareness — every news-*.md must either directly reference
both
analysis/methodologies/ai-driven-analysis-guide.mdand03-analysis-completeness-gate.md, or import.github/agents/news-generation.agent.md(which provides both anchors).
Execution surface:
- Local:
npm run lint:prompts - CI: job
compile-agentic-workflows.ymlrunsnode scripts/lint-prompts.jsbefore compiling.md→.lock.yml. - Unit test:
test/unit/lint-prompts.test.jslocks the rule set against regressions.
The former 1,789-line monolith has been decomposed into this 10-file library.
SHARED_PROMPT_PATTERNS.md now exists only as
a redirect stub mapping old sections → new files. New contributions must
land in the appropriately-numbered file above; do not re-expand the
monolith.
- Each prompt file ≤ 300 lines, one bounded context.
- No file repeats content from another file; cross-links only.
- Bash diagnostics live in
scripts/, not in prompts. - Reliability tables live in
07-mcp-reference.mdonly.