You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/prompts/00-base-contract.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ You are a **Political Analyst, Intelligence Operative and OSINT Specialist** for
8
8
9
9
| # | Rule |
10
10
|---|------|
11
-
| 1 | Use **only public** primary sources (Riksdagen API, Regeringen, SCB, World Bank, IMF). No hacked, leaked, or private personal data. |
11
+
| 1 | Use **only public** primary sources (Riksdagen API, Regeringen, SCB, Statskontoret, World Bank, IMF). No hacked, leaked, or private personal data. |
12
12
| 2 |**Neutrality**: equal treatment of all parties. Document methodology and uncertainty. |
13
13
| 3 | Every claim cites a primary source: `dok_id`, vote counts, named actor, or source URL. Generic claims are rejected. |
14
14
| 4 | Political opinions are **GDPR Art. 9 special category** → lawful bases 9(2)(e) publicly made, 9(2)(g) substantial public interest. Apply data minimisation and purpose limitation. |
@@ -24,13 +24,14 @@ You are a **Political Analyst, Intelligence Operative and OSINT Specialist** for
Before producing any analysis or article content, the agent MUST have read:
32
33
33
-
1. This module (`00-base-contract.md`) and every imported sibling module for the workflow.
34
+
1. This module (`00-base-contract.md`), every imported sibling module for the workflow, and [`Article-Generation.md`](../../Article-Generation.md) for the end-to-end dissemination contract.
3.[`analysis/methodologies/osint-tradecraft-standards.md`](../../analysis/methodologies/osint-tradecraft-standards.md) — **tradecraft canon**: ICD 203 (9 standards), Admiralty Code (`[A-F][1-6]` → 5-level confidence), WEP / Kent Scale (7 bands with EN + SV phrasing, 4 horizons), SAT catalog (≥ 10 techniques attested in `methodology-reflection.md`), OSINT ethics (GDPR Art. 9 / Offentlighetsprincipen), DIW–Admiralty reconciliation, PIR handoff (standing PIR-1…7 + Tier-C continuity contract). Every evidence citation, every confidence marker, and every `methodology-reflection.md §ICD 203 audit` derives from this document.
36
37
4. Every template file referenced by `04-analysis-pipeline.md` — the **23 always-on artifacts** spanning Family A (Core Synthesis, 9 files incl. `executive-brief.md`), Family B (Structural Metadata, 2 files), Family C (Strategic Extensions — F3EAD Exploit→Analyze, 5 files incl. `methodology-reflection.md` ⭐), Family D (Electoral & Domain Lenses — F3EAD Analyze-continued, 7 files), plus Family E (per-document `{dok_id}-analysis.md`). Tier-C workflows additionally apply the period-scope multipliers and cross-type synthesis rules in `ext/tier-c-aggregation.md` — they do **not** add new files (all 23 are mandatory for every workflow).
-**Firewall egress**: `data.imf.org`, `api.imf.org`, `www.imf.org` (already in every workflow's `network.allowed`).
70
+
-**Statskontoret egress**: `www.statskontoret.se` / `statskontoret.se` are public non-MCP web sources used for agency capacity, state-governance evaluations, implementation feasibility, administrative burden and public-sector efficiency evidence.
70
71
71
72
## Health gate (in-prompt)
72
73
@@ -83,6 +84,7 @@ Run once at workflow start, then proceed — do not loop forever.
83
84
|------|
84
85
| Riksdag tool arguments are documented under [`.github/skills/riksdag-regering-mcp/`](../skills/riksdag-regering-mcp/). |
85
86
|**Economic data is IMF-first**. Only use `get-economic-data` (world-bank MCP) for articles written pre-2026-04-20 or as an explicit legacy fallback — **never** as a primary source in new articles. |
87
+
|**Statskontoret is a public non-MCP source** for Swedish agency governance, administrative capacity, implementation feasibility and public-sector efficiency. Use `web_fetch` / primary URLs where available, cite report title + URL, and record retrieval in `data-download-manifest.md`. |
86
88
| Treat MCP failure mid-run as partial data: continue with what you have, document gaps in `data-download-manifest.md`, never silently drop documents. |
87
89
| Source authority and no-fabrication rule: see `00-base-contract.md` rules 1 + 3. |
Copy file name to clipboardExpand all lines: .github/prompts/03-data-download.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,10 @@ Then `npx tsx scripts/catalog-downloaded-data.ts --pending-only` to produce the
90
90
91
91
For every downloaded document reference, fetch full text when available (`get_dokument_innehall` with `include_full_text: true` on riksdag-regering). Documents without full text are allowed but must be tagged `metadata-only` in the manifest.
92
92
93
+
## Statskontoret enrichment
94
+
95
+
When a document affects an implementing authority, administrative capacity, regulatory burden, governance quality, public-sector efficiency, inspection/audit capacity, or inter-agency coordination, collect at least one relevant public Statskontoret source if available. Use `web_fetch` against `https://www.statskontoret.se/` or `https://statskontoret.se/`, cite the report/page URL, and record it in `data-download-manifest.md` under Cross-Source Enrichment. If no relevant Statskontoret source exists, state `Statskontoret: no directly relevant source found` rather than fabricating agency-capacity evidence.
96
+
93
97
## Lookback fallback
94
98
95
99
If the requested `$ARTICLE_DATE` returns zero documents, loop `DAYS_BACK = 1..7`:
@@ -108,6 +112,7 @@ Always produce `analysis/daily/$ARTICLE_DATE/$SUBFOLDER/data-download-manifest.m
108
112
- Requested date, effective date (after lookback), window used.
-**Read-me-first** → [`analysis/methodologies/artifact-catalog.md`](../../analysis/methodologies/artifact-catalog.md) (single source of truth for every artifact — family, template, depth floor, Mermaid type, MCP data source, gate check) and [`analysis/methodologies/per-artifact-methodologies.md`](../../analysis/methodologies/per-artifact-methodologies.md) (Inputs / Analytic-moves / Evidence-rules / Anti-patterns per artifact). Open these before any framework-specific methodology.
@@ -123,7 +123,7 @@ Aggregation (Tier-C) workflows apply the period-scope multiplier from `ext/tier-
123
123
124
124
## Evidence standard
125
125
126
-
Every analytical claim must cite at least one of: a real `dok_id` (e.g. `H901FiU1`) resolvable via `get_dokument`; a named MP / minister / party with role; vote counts from `get_voteringar`; or a primary-source URL (riksdagen.se, regeringen.se, scb.se, worldbank.org, data.imf.org). Annotate each evidence row with an **Admiralty Code**`[A–F][1–6]`. Apply the **Source Diversity Rule** — P0/P1 claims require ≥ 3 independent sources; single-source claims must be flagged `[unconfirmed]` (Pass-2 improvement target). Generic phrasing without evidence is rejected at the gate (`05-analysis-gate.md` check 4 and its Family-C/D extensions).
126
+
Every analytical claim must cite at least one of: a real `dok_id` (e.g. `H901FiU1`) resolvable via `get_dokument`; a named MP / minister / party with role; vote counts from `get_voteringar`; or a primary-source URL (riksdagen.se, regeringen.se, scb.se, statskontoret.se, worldbank.org, api.imf.org, data.imf.org, www.imf.org). Annotate each evidence row with an **Admiralty Code**`[A–F][1–6]`. Apply the **Source Diversity Rule** — P0/P1 claims require ≥ 3 independent sources; single-source claims must be flagged `[unconfirmed]` (Pass-2 improvement target). Generic phrasing without evidence is rejected at the gate (`05-analysis-gate.md` check 4 and its Family-C/D extensions).
Chart.js specs live in the [Economic Data Contract](../aw/ECONOMIC_DATA_CONTRACT.md) — follow it exactly. Produce at least one economic chart data file (`economic-data.json`) per article that has an economic-context section.
Statskontoret is the Swedish public-management source for agency capacity, administrative burden, governance effectiveness, inter-agency coordination, implementation backlogs and public-sector efficiency. When a document assigns work to an authority or depends on administrative delivery, integrate Statskontoret evidence into `implementation-feasibility.md`, `stakeholder-perspectives.md`, `risk-assessment.md`, `comparative-international.md` and `methodology-reflection.md`. Record source URL, report/page title, publication date, retrieval time and Admiralty grade in `data-download-manifest.md`; cite it as a public URL in analysis rows.
146
+
143
147
Full IMF integration reference: [`analysis/imf/README.md`](../../analysis/imf/README.md) · [`analysis/imf/agentic-integration.md`](../../analysis/imf/agentic-integration.md) (7-step playbook) · [`analysis/imf/data-dictionary.md`](../../analysis/imf/data-dictionary.md).
2.**Per-document coverage (Family E)** — `$ANALYSIS_DIR/documents/` contains one `.md` per `dok_id` listed in `data-download-manifest.md` (metadata-only documents are tagged, not skipped).
19
19
3.**No stubs** — zero occurrences of `AI_MUST_REPLACE`, `[REQUIRED]`, `TODO:`, or `Lorem ipsum` across all artifacts.
20
-
4.**Evidence citations** — `swot-analysis.md` and `significance-scoring.md` contain at least one piece of primary-source evidence per quadrant / ranked item. Accepted evidence patterns: a `dok_id` (e.g. `H901FiU1`, `HD01CU27`) **or** a primary-source URL host (`riksdagen.se`, `regeringen.se`, `scb.se`, `worldbank.org`, `api.imf.org`, `data.imf.org`, `www.imf.org`). Enforced against SWOT `### Strengths/Weaknesses/Opportunities/Threats` sections (bullets + table rows) and significance-scoring bullets **plus** ranking table rows and Mermaid node labels.
20
+
4.**Evidence citations** — `swot-analysis.md` and `significance-scoring.md` contain at least one piece of primary-source evidence per quadrant / ranked item. Accepted evidence patterns: a `dok_id` (e.g. `H901FiU1`, `HD01CU27`) **or** a primary-source URL host (`riksdagen.se`, `regeringen.se`, `scb.se`, `statskontoret.se`, `worldbank.org`, `api.imf.org`, `data.imf.org`, `www.imf.org`). Enforced against SWOT `### Strengths/Weaknesses/Opportunities/Threats` sections (bullets + table rows) and significance-scoring bullets **plus** ranking table rows and Mermaid node labels.
21
21
5.**Mermaid diagrams** — every Family A and Family D synthesis file contains ≥ 1 Mermaid diagram with colour-coded `style` directives (or `themeVariables` / `%%{init …}` block).
22
22
6.**Pass-2 done** — agent has read back each enforced Pass-2 artifact after creation and committed improvements: all Family A, B, C, and D artifacts except `data-download-manifest.md`. (Enforced by file mtime diff: final file mtime > creation time + 3 min, OR two git-history snapshots on disk.)
23
23
7.**Family C structure checks** (extension-quality gate):
Copy file name to clipboardExpand all lines: .github/prompts/06-article-generation.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# 06 — Article Generation (aggregate + render)
2
2
3
-
Articles are **100 % rendered from the analysis artifacts** produced in module `04-analysis-pipeline.md`. No AI-written HTML. No scaffold. No `AI_MUST_REPLACE` markers. The analysis folder is the article — the renderer just turns it into a chrome-wrapped HTML page.
3
+
Articles are **100 % rendered from the analysis artifacts** produced in module `04-analysis-pipeline.md`. No AI-written HTML. No scaffold. No `AI_MUST_REPLACE` markers. The analysis folder is the article — the renderer just turns it into a chrome-wrapped HTML page. Read [`Article-Generation.md`](../../Article-Generation.md) as the end-to-end architecture and UI/UX export map for this phase.
4
4
5
5
## Preconditions
6
6
@@ -123,14 +123,16 @@ All of those checks were artefacts of the old scaffold pipeline. With the aggreg
123
123
124
124
The renderer embeds:
125
125
126
-
-`<title>` = aggregated article title (H1 of `executive-brief.md`).
127
-
-`<meta name="description">` = first paragraph of `executive-brief.md` (≤ 300 chars).
126
+
-`<title>` = aggregated article title (H1 of `executive-brief.md`), rewritten to satisfy [`seo-metadata-contract.md`](seo-metadata-contract.md): 55–70 characters, actor-first, active news verb, no literal date, no boilerplate.
127
+
-`<meta name="description">` = first BLUF paragraph of `executive-brief.md`, rewritten to satisfy [`seo-metadata-contract.md`](seo-metadata-contract.md): 140–200 characters, one complete sentence, concrete actor/number/instrument, no admin metadata.
128
128
-`<link rel="canonical">` + `<link rel="alternate" hreflang="…">` × all requested languages + `x-default`.
129
129
- Open Graph (`og:type=article`), Twitter summary card.
130
130
- JSON-LD `NewsArticle` with `isBasedOn` listing every source `.md` / `.json` artifact on GitHub — the article is self-documenting.
131
131
- Cyberpunk site header with skip-link, nav (Home, Political Intelligence, Sitemap), and language switcher.
132
132
- Footer with: brand, navigation, direct link to `analysis/daily/` and the repo root on GitHub, Apache-2.0 + GDPR Art 9(2)(e,g) notice, client-side Mermaid loader (`js/lib/mermaid-init.mjs`).
133
133
134
+
Before staging, read the generated `article.md` once and verify it reads as a coherent political-intelligence article, not an artifact dump: BLUF first, Key Judgments early, concrete evidence density, IMF-first economic provenance where applicable, Statskontoret agency-capacity evidence where applicable, and source links in every high-impact claim.
135
+
134
136
## Translations
135
137
136
138
Article translation remains a **separate workflow**: `news-translate` consumes published English + Swedish articles and produces the remaining twelve language variants. Per-type analysis workflows must not attempt to render the other twelve languages themselves.
0 commit comments