diff --git a/.github/prompts/04-analysis-pipeline.md b/.github/prompts/04-analysis-pipeline.md index 9511c63c58..668fa4e41b 100644 --- a/.github/prompts/04-analysis-pipeline.md +++ b/.github/prompts/04-analysis-pipeline.md @@ -4,9 +4,37 @@ Analysis is the **primary product**. Articles are derived from analysis. Never w Authoritative methodology & templates: +- **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. - Methodology → [`analysis/methodologies/ai-driven-analysis-guide.md`](../../analysis/methodologies/ai-driven-analysis-guide.md) (DIW weighting, tier depths, Pass 1/Pass 2 rules, F3EAD mapping) +- Indicator maps → [`worldbank-indicator-mapping.md`](../../analysis/methodologies/worldbank-indicator-mapping.md) (non-economic: social, health, education, environment, defence, agriculture, innovation, governance) + [`imf-indicator-mapping.md`](../../analysis/methodologies/imf-indicator-mapping.md) (**authoritative** for all economic / fiscal / trade / monetary context with vintage-tagged WEO forecasts) +- Depth floors → [`reference-quality-thresholds.json`](../../analysis/methodologies/reference-quality-thresholds.json) (per-article-type × per-artifact line floors + tradecraft signals consumed by Pass-2 self-audit) - Supporting frameworks → [`political-classification-guide.md`](../../analysis/methodologies/political-classification-guide.md), [`political-swot-framework.md`](../../analysis/methodologies/political-swot-framework.md), [`political-risk-methodology.md`](../../analysis/methodologies/political-risk-methodology.md), [`political-threat-framework.md`](../../analysis/methodologies/political-threat-framework.md), [`synthesis-methodology.md`](../../analysis/methodologies/synthesis-methodology.md), [`strategic-extensions-methodology.md`](../../analysis/methodologies/strategic-extensions-methodology.md), [`electoral-domain-methodology.md`](../../analysis/methodologies/electoral-domain-methodology.md), [`structural-metadata-methodology.md`](../../analysis/methodologies/structural-metadata-methodology.md), [`per-document-methodology.md`](../../analysis/methodologies/per-document-methodology.md), [`political-style-guide.md`](../../analysis/methodologies/political-style-guide.md), [`osint-tradecraft-standards.md`](../../analysis/methodologies/osint-tradecraft-standards.md) — **tradecraft canon: ICD 203 + Admiralty + WEP + SAT catalog + OSINT ethics + DIW alignment + PIR handoff** -- Templates → [`analysis/templates/*.md`](../../analysis/templates/) (one file per artifact — 23 always-on + per-document) +- Templates → [`analysis/templates/*.md`](../../analysis/templates/) (one file per artifact — 23 always-on + per-document + 7 operational supplementary) + +**Operational supplementary artifacts** — 7 enrichment templates that strengthen the AI-FIRST quality loop, cross-run memory, and MCP health auditability. **Recommended** for every `deep` run; **mandatory** for every `comprehensive` / Tier-C aggregation run; enforced by [`05-analysis-gate.md §Supplementary checks`](05-analysis-gate.md): + +| Template | When to produce | Feeds | +|----------|-----------------|-------| +| [`analysis-index.md`](../../analysis/templates/analysis-index.md) | always for `deep`/`comprehensive` | downstream reviewers | +| [`reference-analysis-quality.md`](../../analysis/templates/reference-analysis-quality.md) | `comprehensive`; operationalises AI-FIRST | Pass-2 self-audit | +| [`mcp-reliability-audit.md`](../../analysis/templates/mcp-reliability-audit.md) | `comprehensive` or any MCP degradation | incident follow-up | +| [`workflow-audit.md`](../../analysis/templates/workflow-audit.md) | `comprehensive` | 11-principle compliance | +| [`cross-run-diff.md`](../../analysis/templates/cross-run-diff.md) | any article type with ≥ 2 runs | Bayesian update | +| [`cross-session-intelligence.md`](../../analysis/templates/cross-session-intelligence.md) | `weekly-review`, `monthly-review`, quarterly | session narrative | +| [`session-baseline.md`](../../analysis/templates/session-baseline.md) | any aggregation workflow | calendar + roster fact layer | + +These are **not counted in the 23 mandatory artifacts** — the 23-artifact contract is unchanged. + +**Analytical supplementary artifacts** — 4 optional deep-dive templates mapped to frameworks explicitly listed in the intelligence-operative agent's "Core Expertise" that previously had no template. **Never blocking** in `05-analysis-gate.md` and **never replace** a core artifact. Produce when the trigger condition applies; otherwise skip. See [`analytical-supplementary-methodology.md`](../../analysis/methodologies/analytical-supplementary-methodology.md) for composition rules and per-template analytic moves. + +| Template | Produce when | Pairs with | +|----------|--------------|-----------| +| [`pestle-analysis.md`](../../analysis/templates/pestle-analysis.md) | event crosses ≥ 2 PESTLE dimensions | `swot-analysis.md`, `risk-assessment.md`, `scenario-analysis.md` | +| [`political-stride-assessment.md`](../../analysis/templates/political-stride-assessment.md) | election-adjacent / integrity incident / disinfo / critical-infra vote | `threat-analysis.md`, `risk-assessment.md` Institutional/Corruption | +| [`wildcards-blackswans.md`](../../analysis/templates/wildcards-blackswans.md) | long-horizon forecasting (`monthly-review`, election year) | `scenario-analysis.md`, `forward-indicators.md` | +| [`quantitative-swot.md`](../../analysis/templates/quantitative-swot.md) | decision memo needing scored ranking | `swot-analysis.md`, `significance-scoring.md`, `executive-brief.md` | + +These are **not counted in the 23 mandatory artifacts** and **not counted in the 7 operational supplementary** — the contract is unchanged. Agents ignoring them still produce valid output. ## Role boundary diff --git a/.github/prompts/05-analysis-gate.md b/.github/prompts/05-analysis-gate.md index 0e95793fa9..626937c4a4 100644 --- a/.github/prompts/05-analysis-gate.md +++ b/.github/prompts/05-analysis-gate.md @@ -6,6 +6,7 @@ This is the **only** gate separating analysis from article generation. If it fai - `$ANALYSIS_DIR = analysis/daily/$ARTICLE_DATE/$SUBFOLDER` - 23 required artifacts (Families A + B + C + D from `04-analysis-pipeline.md`) + per-document Family E. +- Authoritative reference — [`analysis/methodologies/artifact-catalog.md`](../../analysis/methodologies/artifact-catalog.md) (single source of truth for every artifact), [`analysis/methodologies/per-artifact-methodologies.md`](../../analysis/methodologies/per-artifact-methodologies.md) (per-artifact Inputs / Analytic-moves / Evidence-rules / Anti-patterns), [`analysis/methodologies/reference-quality-thresholds.json`](../../analysis/methodologies/reference-quality-thresholds.json) (per-article-type line floors + tradecraft signals). ## Checks (all must pass) @@ -16,7 +17,7 @@ This is the **only** gate separating analysis from article generation. If it fai - **Family D (7)** — `election-2026-analysis.md`, `voter-segmentation.md`, `coalition-mathematics.md`, `historical-parallels.md`, `media-framing-analysis.md`, `implementation-feasibility.md`, `forward-indicators.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). 3. **No stubs** — zero occurrences of `AI_MUST_REPLACE`, `[REQUIRED]`, `TODO:`, or `Lorem ipsum` across all artifacts. -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`, `data.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. +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. 5. **Mermaid diagrams** — every Family A and Family D synthesis file contains ≥ 1 Mermaid diagram with colour-coded `style` directives (or `themeVariables` / `%%{init …}` block). 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.) 7. **Family C structure checks** (extension-quality gate): @@ -58,7 +59,7 @@ SYNTHESIS=(synthesis-summary.md swot-analysis.md risk-assessment.md threat-analy media-framing-analysis.md implementation-feasibility.md \ forward-indicators.md) DOK_RE='[Hh][A-Za-z0-9]{3,}[0-9]+' -EVIDENCE_RE='[Hh][A-Za-z0-9]{3,}[0-9]+|riksdagen\.se|regeringen\.se|scb\.se|worldbank\.org|data\.imf\.org' +EVIDENCE_RE='[Hh][A-Za-z0-9]{3,}[0-9]+|riksdagen\.se|regeringen\.se|scb\.se|worldbank\.org|api\.imf\.org|data\.imf\.org|www\.imf\.org' FAIL=0 # Check 1 — artifact existence (all 23) @@ -232,3 +233,46 @@ Exit code 0 = pass, non-zero = fail with per-check report. Precondition for chec ## Deduplication note If today's article HTML already exists under `news/` **and** `force_generation=false`, skip article generation but still run analysis and still commit. The PR label is `analysis-only`. There is still exactly one PR call. + +## Supplementary checks + +Non-blocking for `standard` / `deep` runs; **blocking for `comprehensive` / Tier-C aggregation runs**. These checks consume the 7 operational supplementary artifacts defined in [`analysis/templates/README.md §Operational Supplementary`](../../analysis/templates/README.md) and catalogued in [`analysis/methodologies/artifact-catalog.md §Operational Supplementary`](../../analysis/methodologies/artifact-catalog.md#-operational-supplementary-artifacts-7). + +| S# | File | Blocking when | Methodology §link | +|:--:|------|---------------|-------------------| +| S1 | `analysis-index.md` | `comprehensive` | [`per-artifact-methodologies.md#analysis-index`](../../analysis/methodologies/per-artifact-methodologies.md#analysis-index) | +| S2 | `reference-analysis-quality.md` | `comprehensive` | [`per-artifact-methodologies.md#reference-analysis-quality`](../../analysis/methodologies/per-artifact-methodologies.md#reference-analysis-quality) | +| S3 | `mcp-reliability-audit.md` | `comprehensive`, or any run with ≥ 1 MCP endpoint failure | [`per-artifact-methodologies.md#mcp-reliability-audit`](../../analysis/methodologies/per-artifact-methodologies.md#mcp-reliability-audit) | +| S4 | `workflow-audit.md` | `comprehensive` | [`per-artifact-methodologies.md#workflow-audit`](../../analysis/methodologies/per-artifact-methodologies.md#workflow-audit) | +| S5 | `cross-run-diff.md` | any article type with ≥ 2 production runs | [`per-artifact-methodologies.md#cross-run-diff`](../../analysis/methodologies/per-artifact-methodologies.md#cross-run-diff) | +| S6 | `cross-session-intelligence.md` | `weekly-review`, `monthly-review` (the aggregation article types the probe detects) | [`per-artifact-methodologies.md#cross-session-intelligence`](../../analysis/methodologies/per-artifact-methodologies.md#cross-session-intelligence) | +| S7 | `session-baseline.md` | `weekly-review`, `monthly-review` (the aggregation article types the probe detects) | [`per-artifact-methodologies.md#session-baseline`](../../analysis/methodologies/per-artifact-methodologies.md#session-baseline) | + +Inline bash probe — append to the main block after `FAIL=0` bookkeeping completes. Supplementary artifacts have **three independent blocking triggers**, not a single tier-only rule: **aggregation article types** (`weekly-review`, `monthly-review`) require the aggregation artifacts; any run whose **tier** is `comprehensive` (the Tier-C run mode) requires the Tier-C supplementary set; and `cross-run-diff.md` is blocking whenever the workflow has **≥ 2 production runs** of the same article type, including `standard` and `deep` runs. `ARTICLE_TYPE` encodes the workflow family; `ANALYSIS_TIER` (when set) encodes the depth tier (`standard` | `deep` | `comprehensive`); `ANALYSIS_RUN_COUNT` (when set) is the numeric count of runs for the same article-generation cycle (if unset or non-numeric, treated as `1`). + +```bash +# Check 9 — supplementary artifacts (blocking for aggregation types, any Tier-C run, and S5 when run-count >= 2) +IS_AGGREGATION=0 +IS_TIER_C=0 +IS_MULTI_RUN=0 +RUN_COUNT=1 +[[ "${ARTICLE_TYPE:-}" =~ ^(weekly-review|monthly-review)$ ]] && IS_AGGREGATION=1 +[[ "${ANALYSIS_TIER:-standard}" == "comprehensive" ]] && IS_TIER_C=1 +[[ "${ANALYSIS_RUN_COUNT:-}" =~ ^[0-9]+$ ]] && RUN_COUNT="${ANALYSIS_RUN_COUNT}" +(( RUN_COUNT >= 2 )) && IS_MULTI_RUN=1 +if (( IS_AGGREGATION == 1 || IS_TIER_C == 1 || IS_MULTI_RUN == 1 )); then + SUPP=() + if (( IS_AGGREGATION == 1 || IS_TIER_C == 1 )); then + SUPP+=(analysis-index.md reference-analysis-quality.md mcp-reliability-audit.md workflow-audit.md) + fi + (( IS_AGGREGATION == 1 )) && SUPP+=(cross-session-intelligence.md session-baseline.md) + (( IS_MULTI_RUN == 1 )) && SUPP+=(cross-run-diff.md) + for f in "${SUPP[@]}"; do + [ -s "$ANALYSIS_DIR/$f" ] || { echo "❌ supplementary missing (agg=$IS_AGGREGATION tier-c=$IS_TIER_C multi-run=$IS_MULTI_RUN): $f"; FAIL=1; } + done +fi +``` + +Depth floors for S1–S7 are configured under `thresholds.breaking.*` / per-type sections in [`reference-quality-thresholds.json`](../../analysis/methodologies/reference-quality-thresholds.json); when a floor is absent the `defaults.supplementaryFloor` (120 lines) applies. + +**Pass-2 quality audit — recommendation, not enforced in the bash probe** — the bash check above does **not** parse `reference-analysis-quality.md §5`. When the artifact is produced, agents SHOULD re-read its `§5 Overall Benchmark Judgement` total and trigger another Pass-2 iteration if the score is below **7.0/10** before invoking this gate. This is a non-enforced self-discipline rule (no blocking logic); an enforced numeric-floor check would require adding a YAML/JSON score block to the template and a dedicated parser, which is deferred to a follow-up change. diff --git a/.github/prompts/README.md b/.github/prompts/README.md index ce120e49c1..145c778f36 100644 --- a/.github/prompts/README.md +++ b/.github/prompts/README.md @@ -21,9 +21,14 @@ This directory is the **single source of truth** for how GitHub Agentic Workflow - Source repo: - GitHub CLI: - **Analysis artifact contract** (the "deep political analysis" product that every news workflow must produce *before* writing a single article sentence): + - **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, MCP, gate check) and [`analysis/methodologies/per-artifact-methodologies.md`](../../analysis/methodologies/per-artifact-methodologies.md) (Inputs / Analytic-moves / Evidence-rules / Anti-patterns per artifact) - Methodology → [`analysis/methodologies/ai-driven-analysis-guide.md`](../../analysis/methodologies/ai-driven-analysis-guide.md) - - Templates → [`analysis/templates/`](../../analysis/templates/) (one file per artifact) + - Indicator maps → [`worldbank-indicator-mapping.md`](../../analysis/methodologies/worldbank-indicator-mapping.md) (non-economic WB) + [`imf-indicator-mapping.md`](../../analysis/methodologies/imf-indicator-mapping.md) (authoritative IMF for all economic context) + - Depth floors → [`reference-quality-thresholds.json`](../../analysis/methodologies/reference-quality-thresholds.json) (per-article-type × per-artifact line floors, tradecraft signals) + - Templates → [`analysis/templates/`](../../analysis/templates/) (one file per artifact — 23 always-on + per-document + 7 operational supplementary) - **23 required artifacts** (every workflow, produced in `analysis/daily/$ARTICLE_DATE/$SUBFOLDER/`): Family A Core Synthesis — `README.md`, `executive-brief.md`, `synthesis-summary.md`, `significance-scoring.md`, `classification-results.md`, `swot-analysis.md`, `risk-assessment.md`, `threat-analysis.md`, `stakeholder-perspectives.md`; Family B Structural Metadata — `data-download-manifest.md`, `cross-reference-map.md`; Family C Strategic Extensions (F3EAD Exploit→Analyze) — `scenario-analysis.md`, `comparative-international.md`, `devils-advocate.md`, `intelligence-assessment.md`, `methodology-reflection.md` ⭐; Family D Electoral & Domain Lenses — `election-2026-analysis.md`, `voter-segmentation.md`, `coalition-mathematics.md`, `historical-parallels.md`, `media-framing-analysis.md`, `implementation-feasibility.md`, `forward-indicators.md`. Plus Family E per-document `documents/{dok_id}-analysis.md`. Full definitions in [`04-analysis-pipeline.md`](04-analysis-pipeline.md). + - **7 operational supplementary artifacts** (not counted in the 23; recommended for `deep`, mandatory for `comprehensive` / Tier-C): `analysis-index.md`, `reference-analysis-quality.md`, `mcp-reliability-audit.md`, `workflow-audit.md`, `cross-run-diff.md`, `cross-session-intelligence.md`, `session-baseline.md`. + - **4 analytical supplementary artifacts** (never blocking, optional deep-dives): `pestle-analysis.md`, `political-stride-assessment.md`, `wildcards-blackswans.md`, `quantitative-swot.md`. Full rules in [`analytical-supplementary-methodology.md`](../../analysis/methodologies/analytical-supplementary-methodology.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. diff --git a/analysis/methodologies/README.md b/analysis/methodologies/README.md index 4273534de7..bc2a1a3c78 100644 --- a/analysis/methodologies/README.md +++ b/analysis/methodologies/README.md @@ -11,13 +11,13 @@

Owner - Version + Version Effective Date Classification

-**📋 Document Owner:** CEO | **📄 Version:** 4.2 | **📅 Last Updated:** 2026-06-01 (UTC) -**🔄 Review Cycle:** Quarterly | **⏰ Next Review:** 2026-06-30 +**📋 Document Owner:** CEO | **📄 Version:** 4.3 | **📅 Last Updated:** 2026-04-23 (UTC) +**🔄 Review Cycle:** Quarterly | **⏰ Next Review:** 2026-07-23 **🏢 Owner:** Hack23 AB (Org.nr 5595347807) | **🏷️ Classification:** Public --- @@ -321,6 +321,35 @@ graph TB ## 📖 Methodology Catalog +### 🗂️ Reference & Meta Methodologies (v4.3 — Added 2026-04-23) + +| Document | Purpose | Consumers | +|----------|---------|-----------| +| [`artifact-catalog.md`](artifact-catalog.md) | **Single source of truth** for every markdown artifact produced by a news workflow (23 core + 7 supplementary + N per-document). One row per artifact naming methodology, template, line floor, Mermaid type, MCP data source and gate check. | All agents, `.github/prompts/04-analysis-pipeline.md`, `05-analysis-gate.md` | +| [`per-artifact-methodologies.md`](per-artifact-methodologies.md) | Per-artifact **Inputs / Analytic-moves / Evidence-rules / Anti-patterns** reference. One §section per artifact — read only the sections needed for the current run. | All agents writing artifacts | +| [`worldbank-indicator-mapping.md`](worldbank-indicator-mapping.md) | Article-type → non-economic World Bank indicator codes (social, health, education, environment, defence, agriculture, innovation, governance). Wave-2 WB↔IMF split. | `comparative-international.md`, `voter-segmentation.md`, `implementation-feasibility.md`, `session-baseline.md` | +| [`imf-indicator-mapping.md`](imf-indicator-mapping.md) | Article-type → IMF WEO/IFS/BOP/FM/GFS codes — **authoritative source** for all economic context (macro / fiscal / trade / monetary / exchange rates). Vintage-tagged forecasts, T+5. | Every artifact with economic-context obligations | +| [`reference-quality-thresholds.json`](reference-quality-thresholds.json) | Per-article-type × per-artifact **minimum line-count floors** enforced by [`05-analysis-gate.md`](../../.github/prompts/05-analysis-gate.md) Check 3. Additive tradecraft signals (WEP / Admiralty / ICD 203 / SATs / DIW / neutrality) consumed by Pass-2 self-audit. | Gate, `reference-analysis-quality.md`, Pass-2 validators | + +These five files are the **meta-layer** — read them before opening any framework-specific methodology. They define *what* is produced, *how* it is measured, and *where* the data comes from. + +### 🔭 Analytical Supplementary Methodology (v1.1 — Added 2026-04-23) + +| Document | Purpose | Templates governed | +|----------|---------|--------------------| +| [`analytical-supplementary-methodology.md`](analytical-supplementary-methodology.md) | Rules for **optional deep-dive analytical templates** that augment the 23 core artifacts with specialised lenses. Non-blocking in `05-analysis-gate.md`. Defines composition rules (DIW weight vector, evidence citations, Forward-Indicator feed, TTP mapping) and per-template analytic moves. | `pestle-analysis.md` · `political-stride-assessment.md` · `wildcards-blackswans.md` · `quantitative-swot.md` | + +**When to produce:** + +- **PESTLE** — event crosses ≥ 2 macro dimensions (policy with economic spill-over, tech regulation with EU exposure, etc.) +- **STRIDE-political** — election-adjacent events, integrity incidents, disinformation spikes, critical-infrastructure votes +- **Wildcards & Black-Swans** — long-horizon forecasting (`monthly-review`, election-year aggregation) +- **Quantitative SWOT** — decision-oriented memos requiring scored ranking (coalition negotiations, party strategy) + +These templates **never replace** a core artifact — they always pair with and cite the canonical artifact they extend. + +--- + ### 🤖 AI-Driven Analysis Guide — `ai-driven-analysis-guide.md` | Attribute | Value | diff --git a/analysis/methodologies/analytical-supplementary-methodology.md b/analysis/methodologies/analytical-supplementary-methodology.md new file mode 100644 index 0000000000..d5cbc62167 --- /dev/null +++ b/analysis/methodologies/analytical-supplementary-methodology.md @@ -0,0 +1,132 @@ +# Analytical Supplementary Methodology + +**Version:** v1.1 · **Effective date:** 2026-04-23 · **Owner:** Intelligence Operative role · **Review cycle:** Quarterly + +> **Scope.** Governs the **Analytical Supplementary** family of optional deep-dive templates that can be produced alongside the 23 mandatory artifacts. These templates are **never** required by [`05-analysis-gate.md`](../../.github/prompts/05-analysis-gate.md) and **never** replace a core artifact — they **augment** the core set with specialised analytic lenses when a run's scope warrants it. +> +> Sister documents: +> - [`ai-driven-analysis-guide.md`](ai-driven-analysis-guide.md) — master methodology with DIW weighting, F3EAD, Pass 1/2 rules +> - [`artifact-catalog.md`](artifact-catalog.md) — the row-per-artifact single source of truth (adds Analytical Supplementary section) +> - [`per-artifact-methodologies.md`](per-artifact-methodologies.md) — per-artifact Inputs / Analytic-moves / Evidence-rules / Anti-patterns +> - [`reference-quality-thresholds.json`](reference-quality-thresholds.json) — depth floors (defaults apply to Analytical Supplementary) + +## 🎯 Purpose + +Provide Riksdagsmonitor analysts with rigorously defined optional deep-dive templates that map 1-to-1 to analytical frameworks explicitly listed in the intelligence-operative agent's "Core Expertise" and "Analytical Frameworks" sections but that were not previously templated: + +- **PESTLE** — macro-environment scan (political, economic, social, technological, legal, environmental) +- **STRIDE-political** — adapted STRIDE threat model for political/electoral/institutional surfaces +- **Wildcards & Black-Swans** — low-probability / high-impact tail complementing `scenario-analysis.md` +- **Quantitative SWOT** — numerical DIW × confidence × leverage scoring on top of narrative SWOT + +## 📦 Outputs (4 templates) + +| ID | Template | Pairs with | Triggered when | +|----|----------|-----------|----------------| +| AS-1 | [`pestle-analysis.md`](../templates/pestle-analysis.md) | `swot-analysis.md`, `risk-assessment.md`, `scenario-analysis.md` | event crosses ≥ 2 PESTLE dimensions | +| AS-2 | [`political-stride-assessment.md`](../templates/political-stride-assessment.md) | `threat-analysis.md`, `risk-assessment.md` (Institutional/Corruption) | election-adjacent, integrity incident, disinfo spike, critical-infra vote | +| AS-3 | [`wildcards-blackswans.md`](../templates/wildcards-blackswans.md) | `scenario-analysis.md`, `forward-indicators.md` | long-horizon forecasting (`monthly-review`, election-year aggregation) | +| AS-4 | [`quantitative-swot.md`](../templates/quantitative-swot.md) | `swot-analysis.md`, `significance-scoring.md`, `executive-brief.md` | decision memo requiring scored ranking | + +## 🧭 When NOT to produce + +- Do **not** use an Analytical Supplementary template as a substitute for a missing core artifact. The gate will still fail. +- Do **not** proliferate templates for a "standard" daily morning run with ≤ 3 documents — the core 23 are enough. +- If **all four** apply, prioritise **PESTLE + Quantitative SWOT** for policy analysis; **STRIDE-political + Wildcards** for security/integrity analysis. + +## 🪢 Composition rules + +### Rule 1 — Single DIW weight vector + +`quantitative-swot.md` **MUST** use the same weight vector as `significance-scoring.md`: + +``` +w_D = 0.35 (Decision relevance) +w_I = 0.25 (Information novelty) +w_W = 0.20 (Wave / momentum) +w_S = 0.20 (Stakeholder reach) +``` + +### Rule 2 — Every cell cites primary evidence + +PESTLE / STRIDE / Wildcard / QSWOT cells that carry an assertion **MUST** cite a `dok_id`, primary URL host (`riksdagen.se`, `regeringen.se`, `scb.se`, `data.imf.org`, `worldbank.org`, `eur-lex.europa.eu`, known myndighets domain), or named source. Same rule as `swot-analysis.md` (gate check 4 when embedded in that file). + +### Rule 3 — PESTLE / Wildcards feed Forward-Indicators + +Every PESTLE indicator row or Wildcard trigger indicator **MUST** surface in at least one horizon section of [`forward-indicators.md`](../templates/forward-indicators.md) with a dated trigger (contributes to check 8 floor of ≥ 10 dated indicators). + +### Rule 4 — STRIDE-political maps to `threat-analysis.md` TTPs + +Every STRIDE row with likelihood × impact ≥ 12 **MUST** appear in the canonical MITRE-style TTP mapping of [`threat-analysis.md`](../templates/threat-analysis.md). STRIDE adds adversary-model structure; `threat-analysis.md` remains the canonical kill-chain file. + +### Rule 5 — Quantitative SWOT never replaces narrative SWOT + +`swot-analysis.md` remains the Pass-2-enforced narrative artifact. `quantitative-swot.md` is read-alongside. Top-3 scored items surface in `executive-brief.md § 3 Decisions`. + +## 🔬 Per-template analytic moves + +### PESTLE + +- Scope declaration (trigger event, horizon, unit of analysis, primary sources). +- 6 dimension tables (P/E/S/T/L/Env) with ≥ 4 rows each; factor, current state, direction, evidence, impact, WEP. +- Economic rows **MUST** use IMF WEO vintages per [`imf-indicator-mapping.md`](imf-indicator-mapping.md). +- Social/environmental rows use SCB / World Bank per [`worldbank-indicator-mapping.md`](worldbank-indicator-mapping.md). +- Cross-dimension interactions (≥ 3) with direction + magnitude + magnitude rationale. +- PIR feedback row per active PIR. +- Key judgement per dimension (1–3 sentences, WEP-tagged). + +### STRIDE-political + +- Scope declaration (entity, trust boundary, time horizon, adversary model). +- 6 dimension tables (S/T/R/I/D/E) with ≥ 3 rows each; vector, target, L (1–5), I (1–5), existing mitigation, residual risk, evidence. +- ≥ 2 Mermaid attack trees (goal → vectors → sub-vectors, colour-coded). +- MITRE-style TTP mapping table with tactic, political-adaptation technique, cross-link to `threat-analysis.md`. +- Recommended controls mapped to **ISO 27001:2022** + **NIST CSF 2.0** + **CIS Controls v8.1**. +- PIR feedback row per active PIR. + +### Wildcards & Black-Swans + +- Horizon + domain filter declaration. +- ICD-203-aligned definitions (wildcard = low-probability / high-impact event in the WEP `Unlikely` to `Remote` range, ≈ 5–37 % per [`political-style-guide.md`](political-style-guide.md#-words-of-estimative-probability-wep--odni-confidence-overlay); black-swan = extreme-tail event outside current priors, typically < 5 %, with a plausible causal chain once surfaced). +- Wildcard register ≥ 8 events across domains (political / economic / security / social / technological / environmental / cross / external). +- Black-swan candidates ≥ 3 with "why under-weighted" + ≤ 4-step plausible causal chain. +- ≥ 2 Mermaid cascading consequence trees (event → 1st → 2nd → 3rd-order → mitigation lever, colour-coded). +- Early-warning indicator table feeding `forward-indicators.md`. +- Resilience assessment across 5 dimensions (institutional, fiscal, coalition, information-integrity, alliance) with gap + recommendation. + +### Quantitative SWOT + +- Scope + perspective declaration. +- Scoring rubric: `I ∈ [-5, +5]`, `C ∈ [0.2, 0.95]` (WEP-mapped), `L ∈ [0.1, 1.0]`, `T ∈ [0.3, 1.0]`; weights `w_D/w_I/w_W/w_S` matching significance-scoring. +- 4 scored tables (S / W / O / T) with ≥ 3 items each, each row citing evidence. +- Composite metrics: net position, SW-balance, OT-balance, high-confidence share. +- TOWS 2 × 2 with ≥ 1 action per quadrant, each citing item IDs. +- Sensitivity analysis with ≥ 3 parameter flips. +- Mermaid `xychart-beta` composite score bar diagram. + +## 📏 Depth floors (line counts) + +| Template | Standard | Deep | Comprehensive / Tier-C | +|----------|----------|------|------------------------| +| `pestle-analysis.md` | 100 | 150 | 220 | +| `political-stride-assessment.md` | 110 | 160 | 240 | +| `wildcards-blackswans.md` | 110 | 160 | 240 | +| `quantitative-swot.md` | 110 | 160 | 240 | + +Floors apply **only** when the template is produced. Not producing them is never a failure. + +## 🛡 Tradecraft compliance + +All four templates inherit [`osint-tradecraft-standards.md`](osint-tradecraft-standards.md): + +- **Admiralty A–F × 1–6** source-reliability grading in evidence columns +- **WEP** bands for every estimative claim +- **ICD 203** standards of analytic tradecraft (objectivity, independence, timeliness, sources cited, uncertainties conveyed, distinguish underlying vs. analytic, relevance, logical argumentation, consistency, accurate judgements of change) +- **SAT catalog** linkage — PESTLE is SAT itself; STRIDE-political draws on Red-Team and Threat-Trees; Wildcards uses Foresight + Alternative-Futures; QSWOT uses Weighted-Ranking + Sensitivity + +## 🔗 Cross-links + +- [`artifact-catalog.md § Analytical Supplementary`](artifact-catalog.md#-analytical-supplementary-artifacts-4) — single-source-of-truth row per template +- [`per-artifact-methodologies.md § Analytical Supplementary`](per-artifact-methodologies.md#analytical-supplementary) — per-artifact how-to +- [`reference-quality-thresholds.json`](reference-quality-thresholds.json) — `thresholds.analyticalSupplementary.*` +- [`.github/prompts/04-analysis-pipeline.md §Analytical Supplementary`](../../.github/prompts/04-analysis-pipeline.md) — optional deep-dive pointer diff --git a/analysis/methodologies/artifact-catalog.md b/analysis/methodologies/artifact-catalog.md new file mode 100644 index 0000000000..b83264ec84 --- /dev/null +++ b/analysis/methodologies/artifact-catalog.md @@ -0,0 +1,232 @@ + + + +

+ Hack23 Logo +

+ +

🗂️ Analysis Artifact Catalog — Riksdagsmonitor

+ +

+ 📊 Single Source of Truth for Every Markdown Artifact Produced by an Agentic News Workflow
+ 🎯 One row per artifact · Methodology + Template + Depth Floor + Mermaid Type + MCP Data Sources +

+ +

+ Owner + Version + Effective Date + Classification +

+ +**📋 Document Owner:** CEO | **📄 Version:** 1.1 | **📅 Last Updated:** 2026-04-23 (UTC) +**🔄 Review Cycle:** Quarterly | **⏰ Next Review:** 2026-07-31 +**🏢 Owner:** Hack23 AB (Org.nr 5595347807) | **🏷️ Classification:** Public + +--- + +## 🎯 Purpose + +This catalog is the **authoritative index** into every markdown artifact an agentic news workflow produces under `analysis/daily/$ARTICLE_DATE/$SUBFOLDER/`. For every artifact it names: + +- the **family** (A / B / C / D / E) and whether it is a **core always-on** artifact or an **operational supplementary** enrichment, +- the **methodology** the AI agent applies when writing it, +- the **template** that defines output shape, +- the **minimum line floor** from [`reference-quality-thresholds.json`](reference-quality-thresholds.json), +- the **mandatory color-coded Mermaid diagram** type, +- the **`riksdag-regering` MCP tools** feeding it, and +- the **gate check** from [`.github/prompts/05-analysis-gate.md`](../../.github/prompts/05-analysis-gate.md) that enforces it. + +Agents MUST read this catalog once at the start of every run, before opening any other methodology or template. It is referenced from [`ai-driven-analysis-guide.md`](ai-driven-analysis-guide.md#-output-matrix--every-file-every-family), [`.github/prompts/04-analysis-pipeline.md`](../../.github/prompts/04-analysis-pipeline.md) and [`.github/prompts/05-analysis-gate.md`](../../.github/prompts/05-analysis-gate.md). + +--- + +## 🗺️ Artifact Group Overview + +```mermaid +%%{init: {"theme":"dark","themeVariables":{"primaryColor":"#1565C0","primaryTextColor":"#ffffff","primaryBorderColor":"#0A3F7F","lineColor":"#90CAF9","secondaryColor":"#2E7D32","secondaryTextColor":"#ffffff","tertiaryColor":"#FF9800","tertiaryTextColor":"#000000","mainBkg":"#1565C0","secondBkg":"#2E7D32","tertiaryBkg":"#FF9800","noteBkgColor":"#FFC107","noteTextColor":"#000000","errorBkgColor":"#D32F2F","fontFamily":"Inter, Helvetica, Arial, sans-serif"}}}%% +flowchart LR + subgraph INPUT["📥 Run Root"] + R["analysis/daily/$ARTICLE_DATE/$SUBFOLDER/"] + end + subgraph CORE["🧠 Core Always-On — 23 artifacts"] + A["Family A — Synthesis (9)"] + B["Family B — Structural (2)"] + C["Family C — Strategic (5)"] + D["Family D — Electoral/Domain (7)"] + end + subgraph E["📑 Family E — Per-document (N)"] + E1["documents/{dok_id}-analysis.md"] + end + subgraph SUPP["🛰️ Operational Supplementary"] + S1["analysis-index.md"] + S2["reference-analysis-quality.md"] + S3["mcp-reliability-audit.md"] + S4["workflow-audit.md"] + S5["cross-run-diff.md"] + S6["cross-session-intelligence.md"] + S7["session-baseline.md"] + end + R --> CORE + R --> E + R --> SUPP + CORE --> GATE["🚦 05-analysis-gate.md"] + SUPP -. enrichment .-> GATE + + style CORE fill:#1565C0,color:#ffffff + style E fill:#2E7D32,color:#ffffff + style SUPP fill:#FF9800,color:#000000 + style GATE fill:#D32F2F,color:#ffffff +``` + +- **Core always-on (23)** — every run produces all 23, depth varies by tier (L1 / L2 / L2+ / L3) per the DIW Output Matrix. Missing any core artifact fails the gate. +- **Family E** — one per `dok_id` in the manifest; count is `N = |manifest|`. Low-weight items may be clustered. +- **Operational supplementary (7)** — enrichment artifacts that strengthen the AI-FIRST loop. They are **recommended** for `deep` and **mandatory** for `comprehensive` (Tier-C aggregation). They are not counted in the 23-artifact mandatory set but feed the self-correction, cross-run memory, and MCP health audit. + +--- + +## 📘 Family A — Core Synthesis (9 artifacts · F3EAD: EXPLOIT → ANALYZE) + +| # | Canonical filename | Methodology §link | Template | Line floor (breaking) | Mermaid | Primary MCP tool | +|:-:|--------------------|-------------------|----------|:---------------------:|---------|------------------| +| 1 | `README.md` | [`synthesis-methodology.md`](synthesis-methodology.md) | [`templates/README.md § Folder README`](../templates/README.md) | 40 | — | run-internal | +| 2 | `executive-brief.md` | [`synthesis-methodology.md`](synthesis-methodology.md#executive-brief) | [`executive-brief.md`](../templates/executive-brief.md) | 90 | flowchart | `search_dokument` + all | +| 3 | `synthesis-summary.md` | [`synthesis-methodology.md`](synthesis-methodology.md) | [`synthesis-summary.md`](../templates/synthesis-summary.md) | 205 | mindmap | `search_dokument` + all | +| 4 | `significance-scoring.md` | [`synthesis-methodology.md`](synthesis-methodology.md#-diw-weighting) | [`significance-scoring.md`](../templates/significance-scoring.md) | 150 | flowchart rank | `search_dokument`, `search_anforanden` | +| 5 | `classification-results.md` | [`political-classification-guide.md`](political-classification-guide.md) | [`political-classification.md`](../templates/political-classification.md) | 140 | flowchart | `get_dokument` | +| 6 | `swot-analysis.md` | [`political-swot-framework.md`](political-swot-framework.md) | [`swot-analysis.md`](../templates/swot-analysis.md) | 160 | quadrantChart | `get_voteringar`, `search_anforanden` | +| 7 | `risk-assessment.md` | [`political-risk-methodology.md`](political-risk-methodology.md) | [`risk-assessment.md`](../templates/risk-assessment.md) | 180 | flowchart L×I | `search_dokument`, `get_betankanden` | +| 8 | `threat-analysis.md` | [`political-threat-framework.md`](political-threat-framework.md) | [`threat-analysis.md`](../templates/threat-analysis.md) | 180 | attack-tree | `search_anforanden`, `get_voteringar` | +| 9 | `stakeholder-perspectives.md` | [`synthesis-methodology.md`](synthesis-methodology.md#stakeholder-lenses) | [`stakeholder-impact.md`](../templates/stakeholder-impact.md) | 220 | graph TB | `search_ledamoter`, `get_ledamot` | + +**Filename variant** — canonical `stakeholder-perspectives.md` ← template `stakeholder-impact.md`; canonical `classification-results.md` ← template `political-classification.md`. + +--- + +## 📗 Family B — Structural Metadata (2 artifacts) + +| # | Canonical filename | Methodology §link | Template | Line floor | Mermaid | Primary source | +|:-:|--------------------|-------------------|----------|:---------:|---------|----------------| +| 10 | `data-download-manifest.md` | [`structural-metadata-methodology.md`](structural-metadata-methodology.md) | [`data-download-manifest.md`](../templates/data-download-manifest.md) | 60 | pie / bar | scripts in `03-data-download.md` | +| 11 | `cross-reference-map.md` | [`structural-metadata-methodology.md`](structural-metadata-methodology.md#tier-c-extensions) | [`cross-reference-map.md`](../templates/cross-reference-map.md) | 110 | graph LR | sibling folders under `$ARTICLE_DATE` | + +Family B is scaffolded by scripts (no analytical prose) — agents only annotate confidence and data-depth tags. + +--- + +## 📙 Family C — Strategic Extensions (5 artifacts · F3EAD: ANALYZE continued) + +| # | Canonical filename | Methodology §link | Template | Line floor | Mermaid | Primary MCP tool | +|:-:|--------------------|-------------------|----------|:---------:|---------|------------------| +| 12 | `scenario-analysis.md` | [`strategic-extensions-methodology.md`](strategic-extensions-methodology.md#scenarios) | [`scenario-analysis.md`](../templates/scenario-analysis.md) | 180 | flowchart + prob | `search_voteringar`, `search_dokument` | +| 13 | `comparative-international.md` | [`strategic-extensions-methodology.md`](strategic-extensions-methodology.md#comparative) | [`comparative-international.md`](../templates/comparative-international.md) | 150 | graph LR Nordic/EU | world-bank, scb, IMF | +| 14 | `devils-advocate.md` | [`strategic-extensions-methodology.md`](strategic-extensions-methodology.md#ach) | [`devils-advocate.md`](../templates/devils-advocate.md) | 160 | matrix (ACH) | cross-MCP | +| 15 | `intelligence-assessment.md` | [`strategic-extensions-methodology.md`](strategic-extensions-methodology.md#key-judgments) | [`intelligence-assessment.md`](../templates/intelligence-assessment.md) | 160 | flowchart KJs | synthesis layer | +| 16 ⭐ | `methodology-reflection.md` | [`osint-tradecraft-standards.md`](osint-tradecraft-standards.md#self-audit) | [`methodology-reflection.md`](../templates/methodology-reflection.md) | 200 | flowchart audit | run-internal | + +⭐ `methodology-reflection.md` is the **self-audit gate**: evidence sufficiency, confidence distribution, source diversity, party-neutrality arithmetic, ICD 203 compliance, ≥ 3 concrete improvements for next run. + +--- + +## 📕 Family D — Electoral & Domain Lenses (7 artifacts) + +| # | Canonical filename | Methodology §link | Template | Line floor | Mermaid | Primary MCP tool | +|:-:|--------------------|-------------------|----------|:---------:|---------|------------------| +| 17 | `election-2026-analysis.md` | [`electoral-domain-methodology.md`](electoral-domain-methodology.md#election-2026) | [`election-2026-analysis.md`](../templates/election-2026-analysis.md) | 150 | bar + coalition | `search_voteringar`, SCB polls | +| 18 | `voter-segmentation.md` | [`electoral-domain-methodology.md`](electoral-domain-methodology.md#segmentation) | [`voter-segmentation.md`](../templates/voter-segmentation.md) | 140 | graph TB segments | SCB demographics | +| 19 | `coalition-mathematics.md` | [`electoral-domain-methodology.md`](electoral-domain-methodology.md#sainte-lague) | [`coalition-mathematics.md`](../templates/coalition-mathematics.md) | 135 | flowchart seats | `search_voteringar` | +| 20 | `historical-parallels.md` | [`electoral-domain-methodology.md`](electoral-domain-methodology.md#precedents) | [`historical-parallels.md`](../templates/historical-parallels.md) | 130 | timeline | historical archive | +| 21 | `media-framing-analysis.md` | [`electoral-domain-methodology.md`](electoral-domain-methodology.md#framing) | [`media-framing-analysis.md`](../templates/media-framing-analysis.md) | 140 | graph quadrants | external press (OSINT) | +| 22 | `implementation-feasibility.md` | [`electoral-domain-methodology.md`](electoral-domain-methodology.md#delivery) | [`implementation-feasibility.md`](../templates/implementation-feasibility.md) | 140 | flowchart risk | `search_dokument` (myndigheter) | +| 23 | `forward-indicators.md` | [`electoral-domain-methodology.md`](electoral-domain-methodology.md#indicators) | [`forward-indicators.md`](../templates/forward-indicators.md) | 150 | gantt 4-horizon | mixed | + +**Filename variants** — `historical-parallels.md` ↔ `historical-baseline.md`; `comparative-international.md` ↔ `international-comparative.md`; `election-2026-analysis.md` ↔ `election-2026-implications.md`. All map to a single template + methodology section per [`ai-driven-analysis-guide.md` §Filename variants](ai-driven-analysis-guide.md#-filename-variants-all-map-to-one-template--one-methodology-section). + +--- + +## 📒 Family E — Per-Document (N artifacts) + +One file per `dok_id` in `data-download-manifest.md`, written under `documents/{dok_id}-analysis.md` using [`per-file-political-intelligence.md`](../templates/per-file-political-intelligence.md) at the depth tier matching the document's DIW score (L1 Surface / L2 Strategic / L2+ Priority / L3 Intelligence-grade). + +- Cluster files — `{cluster}-cluster-analysis.md` collapse related low-weight items (e.g. 12 procedural committee notices → one cluster analysis). +- Methodology: [`per-document-methodology.md`](per-document-methodology.md). +- Per-file floor is adaptive: `max(DIW tier floor, --min-lines)`. See [`reference-quality-thresholds.json`](reference-quality-thresholds.json) §`defaults.perDocumentFloorByTier`. + +--- + +## 🛰️ Operational Supplementary Artifacts (7) + +These artifacts **are not counted in the 23-artifact mandatory set** but strengthen quality, cross-run memory, MCP health and workflow-self-audit. They are: + +- **Recommended** for every `deep` run. +- **Mandatory** for every `comprehensive` (Tier-C aggregation) run. +- Enforced by [`05-analysis-gate.md` §Supplementary checks](../../.github/prompts/05-analysis-gate.md#supplementary-checks) when present; for non-Tier-C runs, absence generally does **not** fail the gate. +- **Exception:** `S5` / `cross-run-diff.md` becomes gate-required whenever `ANALYSIS_RUN_COUNT >= 2` (same article type), including `standard` and `deep` runs — the gate treats multi-run comparison as a required supplementary check independent of tier. + +| # | Canonical filename | Methodology §link | Template | Line floor | Purpose | +|:-:|--------------------|-------------------|----------|:---------:|---------| +| S1 | `analysis-index.md` | [`per-artifact-methodologies.md#analysis-index`](per-artifact-methodologies.md#analysis-index) | [`analysis-index.md`](../templates/analysis-index.md) | 120 | Read-me-first index naming every artifact in the run + recommended reading order | +| S2 | `reference-analysis-quality.md` | [`per-artifact-methodologies.md#reference-analysis-quality`](per-artifact-methodologies.md#reference-analysis-quality) | [`reference-analysis-quality.md`](../templates/reference-analysis-quality.md) | 120 | Per-run self-score vs reference benchmark; Pass-2 action list | +| S3 | `mcp-reliability-audit.md` | [`per-artifact-methodologies.md#mcp-reliability-audit`](per-artifact-methodologies.md#mcp-reliability-audit) | [`mcp-reliability-audit.md`](../templates/mcp-reliability-audit.md) | 150 | Endpoint-by-endpoint `riksdag-regering` / `scb` / `world-bank` / IMF health record | +| S4 | `workflow-audit.md` | [`per-artifact-methodologies.md#workflow-audit`](per-artifact-methodologies.md#workflow-audit) | [`workflow-audit.md`](../templates/workflow-audit.md) | 120 | Prompt-module-by-module self-audit: which phases ran, where rules slipped | +| S5 | `cross-run-diff.md` | [`per-artifact-methodologies.md#cross-run-diff`](per-artifact-methodologies.md#cross-run-diff) | [`cross-run-diff.md`](../templates/cross-run-diff.md) | 130 | Bayesian delta vs previous run of **same** article type | +| S6 | `cross-session-intelligence.md` | [`per-artifact-methodologies.md#cross-session-intelligence`](per-artifact-methodologies.md#cross-session-intelligence) | [`cross-session-intelligence.md`](../templates/cross-session-intelligence.md) | 140 | Session-over-session progression (week / month / quarter aggregation) | +| S7 | `session-baseline.md` | [`per-artifact-methodologies.md#session-baseline`](per-artifact-methodologies.md#session-baseline) | [`session-baseline.md`](../templates/session-baseline.md) | 140 | Calendar + adopted-texts + votering roster for the period | + +--- + +## 🔭 Analytical Supplementary Artifacts (4) + +Optional deep-dive templates mapped to analytical frameworks explicitly listed in the intelligence-operative agent's Core Expertise but previously untemplated. **Never replace** a core artifact and **never blocking** in `05-analysis-gate.md`. Full production rules: [`analytical-supplementary-methodology.md`](analytical-supplementary-methodology.md). + +| # | Canonical filename | Methodology §link | Template | Line floor (standard / deep / comp) | Trigger | +|:-:|--------------------|-------------------|----------|:----------------------------------:|---------| +| AS1 | `pestle-analysis.md` | [`analytical-supplementary-methodology.md#pestle`](analytical-supplementary-methodology.md#pestle) | [`pestle-analysis.md`](../templates/pestle-analysis.md) | 100 / 150 / 220 | event crosses ≥ 2 PESTLE dimensions | +| AS2 | `political-stride-assessment.md` | [`analytical-supplementary-methodology.md#stride-political`](analytical-supplementary-methodology.md#stride-political) | [`political-stride-assessment.md`](../templates/political-stride-assessment.md) | 110 / 160 / 240 | election-adjacent · integrity incident · disinfo spike · critical-infra vote | +| AS3 | `wildcards-blackswans.md` | [`analytical-supplementary-methodology.md#wildcards--black-swans`](analytical-supplementary-methodology.md#wildcards--black-swans) | [`wildcards-blackswans.md`](../templates/wildcards-blackswans.md) | 110 / 160 / 240 | long-horizon forecasting (`monthly-review`, election-year aggregation) | +| AS4 | `quantitative-swot.md` | [`analytical-supplementary-methodology.md#quantitative-swot`](analytical-supplementary-methodology.md#quantitative-swot) | [`quantitative-swot.md`](../templates/quantitative-swot.md) | 110 / 160 / 240 | decision memo requiring scored ranking | + +--- + +## 🧠 MCP Data Source Inventory + +| Server | Transport | Key tools | Feeds artifacts | +|--------|-----------|-----------|-----------------| +| `riksdag-regering` | HTTP | `search_ledamoter`, `get_ledamot`, `search_dokument`, `get_dokument`, `search_anforanden`, `search_voteringar`, `get_voteringar`, `get_calendar_events`, `get_betankanden`, `get_propositioner`, `get_motioner`, `get_fragor`, `get_interpellationer` | 1–11, 14, 17–23, E-files | +| `scb` | local PxWeb v2 | table-search + query | 13, 17–19, 22, S7 | +| `world-bank` | local | get-social/health/education/environment | 13, 22, S7 | +| IMF (`tsx scripts/imf-fetch.ts`) | CLI | WEO + SDMX 3.0 passthrough | 13, 17, 22, S7 | +| `github` | HTTP Insiders | full toolset | PR creation (module 07) | +| `filesystem` / `memory` / `sequential-thinking` / `playwright` | local | helpers | cross-cutting | + +See [`.github/copilot-mcp.json`](../../.github/copilot-mcp.json) for the canonical definition and [`02-mcp-access.md`](../../.github/prompts/02-mcp-access.md) for access rules. + +--- + +## 🚦 Gate-Check Mapping (to `05-analysis-gate.md`) + +| Gate check | Artifacts audited | +|------------|-------------------| +| Check 1 — 23-artifact presence | 1–23 | +| Check 2 — Family-E per-`dok_id` coverage | E files | +| Check 3 — Depth floor per tier | 1–23 + E (via `reference-quality-thresholds.json`) | +| Check 4 — Evidence citations (dok_id, vote counts, named actors, Admiralty grade) | All prose | +| Check 5 — Mermaid diagram presence (color-coded) | 1–23 where row specifies Mermaid | +| Check 6 — WEP probability + time horizon | 2, 7, 8, 12, 15, S5, S6 | +| Check 7 — Party-neutrality arithmetic | 2, 6, 7, 9, 17–23 | +| Check 8 — `methodology-reflection.md` ICD 203 audit | 16 (⭐) | +| Check 9 — Supplementary (Tier-C only) | S1–S7 | +| Check 10 — Analytical Supplementary (never blocking) | AS1–AS4 when present: cell-evidence, Mermaid, ≥ N rows per rubric | + +--- + +## 🔄 Maintenance + +- When an artifact is **added, renamed, or removed**, update: this catalog, [`reference-quality-thresholds.json`](reference-quality-thresholds.json), [`per-artifact-methodologies.md`](per-artifact-methodologies.md), the template README, and [`.github/prompts/04-analysis-pipeline.md`](../../.github/prompts/04-analysis-pipeline.md). All five must stay in lock-step. +- When a **methodology section** materially changes, increment the methodology's minor version and note it here under "Changelog". +- The **depth floor benchmark** is re-calibrated every quarter from the best-performing production run of the preceding quarter (the "reference run"). See [`reference-quality-thresholds.json` §referenceBenchmark`](reference-quality-thresholds.json). + +## 📜 Changelog + +- **v1.1 (2026-04-23)** — Added Analytical Supplementary Artifacts (4): `pestle-analysis.md`, `political-stride-assessment.md`, `wildcards-blackswans.md`, `quantitative-swot.md`. Linked to new [`analytical-supplementary-methodology.md`](analytical-supplementary-methodology.md). Non-blocking. +- **v1.0 (2026-04-23)** — Initial Riksdagsmonitor catalog extracted and adapted from EU Parliament Monitor `artifact-catalog.md` v1.0. 23 core artifacts + 7 supplementary + N per-document; aligned with [`ai-driven-analysis-guide.md`](ai-driven-analysis-guide.md) v4.2. diff --git a/analysis/methodologies/imf-indicator-mapping.md b/analysis/methodologies/imf-indicator-mapping.md new file mode 100644 index 0000000000..98d1264cb9 --- /dev/null +++ b/analysis/methodologies/imf-indicator-mapping.md @@ -0,0 +1,112 @@ +# IMF Indicator → Article Type Mapping (Riksdagsmonitor) + +**Purpose** — canonical reference mapping Riksdagsmonitor news workflow article types to the most-relevant IMF indicators sourced from **WEO**, **Fiscal Monitor**, **IFS**, **BOP**, **ER**, and **PCPS** via the local TypeScript IMF client at `scripts/imf-fetch.ts` (SDMX 3.0 base URL `https://api.imf.org/external/sdmx/3.0`, Datamapper JSON base URL `https://www.imf.org/external/datamapper/api/v1` — see `scripts/imf-client.ts`). + +**Data access** — no dedicated MCP server; the agent invokes `tsx scripts/imf-fetch.ts …` from `bash` with egress limited to `api.imf.org` and `www.imf.org` (see [`.github/prompts/01-bash-and-shell-safety.md`](../../.github/prompts/01-bash-and-shell-safety.md) and the network allowlist in [`.github/workflows/`](../../.github/workflows/) agentic frontmatter). + +**Wave-2 scope (April 2026)** — IMF is the **authoritative source** for **all** economic context: macro / fiscal / trade / monetary / exchange-rate / debt. Social / demographic / health / education / environment / defence / agriculture / innovation / governance indicators remain on World Bank — see [`worldbank-indicator-mapping.md`](worldbank-indicator-mapping.md). + +**Why IMF over WB for economics** + +- IMF WEO publishes **April + October each year** with full actuals + 5-year forecasts (T+5). +- IMF aggregate codes `EU`, `EA`, `G7`, `G20` are accepted by the IMF API whereas WB's `EUU`, `EMU` are rejected by the IMF endpoint. +- IMF provides a single `"IMF, World Economic Outlook, April 2026"` provenance line with no vintage patching. + +**Enforcement** — the evidence-host regex in [`.github/prompts/05-analysis-gate.md`](../../.github/prompts/05-analysis-gate.md) Check 4 accepts **any** of `api.imf.org`, `data.imf.org`, or `www.imf.org` as a primary-source URL host alongside `worldbank.org`; IMF citations alone are sufficient to pass. + +--- + +## 1. IMF Dataflow Catalogue (subset) + +| Dataflow | Scope | Typical series | +|----------|-------|----------------| +| `WEO` | Macro + fiscal, annual, +5y forecasts | NGDP_RPCH, PCPIPCH, LUR, GGXWDG_NGDP, GGXCNL_NGDP, BCA_NGDPD | +| `FM` | Fiscal Monitor, semi-annual | G_XWDG_G01_GDP_PT, G_XCNL_G01_GDP_PT | +| `IFS` | International Financial Statistics (monthly) | FIR (policy rate), EXR (exchange rate), PCPI (CPI), LUR | +| `BOP` | Balance of Payments | Current account components | +| `ER` | Exchange rates | Nominal & real effective | +| `DOTS` | Direction of Trade | Bilateral trade flows | +| `GFS` | Government Finance Statistics | Debt, revenue, expenditure by function | +| `PCPS` | Primary Commodity Prices | Energy / metals / agriculture | + +--- + +## 2. Sweden + Aggregates + +| Purpose | IMF code | Notes | +|---------|----------|-------| +| Sweden | `SWE` | ISO-3 | +| EU | `EU` | IMF aggregate (≠ WB `EUU`) | +| Euro area | `EA` | IMF aggregate (≠ WB `EMU`) | +| G7 | `G7` | | +| G20 | `G20` | | +| Nordic baseline | `DNK`, `FIN`, `NOR`, `ISL` | fetched alongside SWE for comparative-international | + +--- + +## 3. Article-Type → Indicator Map + +| Article type | WEO indicators (annual) | IFS (monthly, if in-period) | Notes | +|--------------|-------------------------|-----------------------------|-------| +| `propositions` (budget / finance) | NGDP_RPCH, PCPIPCH, LUR, GGXWDG_NGDP, GGXCNL_NGDP | FIR (Riksbank policy rate), EXR (SEK/EUR) | pair with Fiscal Monitor series when available | +| `propositions` (trade / arbetsmarknad) | BCA_NGDPD, TX_RPCH, TM_RPCH | — | cite DOTS if EU counterparties discussed | +| `motions` (ekonomi) | NGDP_RPCH, PCPIPCH, LUR | — | | +| `committee-reports` (FiU) | full WEO + Fiscal Monitor | FIR, EXR, PCPI | required for any FiU analysis | +| `committee-reports` (NU, SkU) | NGDP_RPCH, LUR + sectoral | — | — | +| `interpellations` (macro) | PCPIPCH, LUR | FIR | — | +| `evening-analysis` | WEO delta since previous publication | FIR + EXR if rate decision day | — | +| `realtime-monitor` | — (usually non-economic) | FIR, EXR if Riksbank / ECB news | — | +| `week-ahead` / `month-ahead` | forecast tables | calendar of Riksbank decisions | — | +| `weekly-review` / `monthly-review` | period-over-period WEO + Fiscal Monitor | FIR, EXR, PCPI trend | pair with `session-baseline.md` | + +--- + +## 4. Citation Pattern + +Every IMF figure cited in an artifact must appear as: + +```text +IMF, "{series name}" ({dataflow/series code}), Sweden, {period}, +{"IMF, World Economic Outlook, April 2026" | "IFS via scripts/imf-fetch.ts"}. +Admiralty: A1 (IMF WEO) / A2 (IFS). +``` + +Example: + +```text +IMF, "General government net lending/borrowing, percent of GDP" +(WEO/GGXCNL_NGDP), Sweden, 2026 (forecast), IMF World Economic Outlook, +April 2026. Admiralty: A1. +``` + +--- + +## 5. Forecast Handling + +IMF WEO forecasts carry a **vintage tag** (April vs October). When forecasts are cited: + +- Always include the vintage in the citation (`WEO April 2026` / `WEO October 2026`). +- When comparing runs, ensure both runs cite the same vintage **or** explicitly note the vintage change in [`cross-run-diff.md`](../templates/cross-run-diff.md). +- Forecasts ≥ T+3 require a confidence-in-evidence caveat in prose; WEP band mandatory. + +--- + +## 6. Economic Data Contract + +Chart.js specifications for any chart fed by IMF data live in [`../../.github/aw/ECONOMIC_DATA_CONTRACT.md`](../../.github/aw/ECONOMIC_DATA_CONTRACT.md). Follow the contract exactly — `economic-data.json` under the run folder is the source of truth the static site consumes. + +--- + +## 7. Anti-Patterns (gate failures) + +- Mixing IMF `EU` aggregate with WB `EUU` in the same chart. +- Citing a forecast value without vintage. +- Forecast series beyond T+5 (out of WEO horizon). +- Missing Admiralty grade. +- Combining WEO annual with IFS monthly on the same time-axis without resampling annotation. + +--- + +## 8. Changelog + +- **v1.0 (2026-04-23)** — Initial Riksdagsmonitor IMF mapping; adapted from EU Parliament Monitor `imf-indicator-mapping.md` under the Wave-2 WB↔IMF split. diff --git a/analysis/methodologies/per-artifact-methodologies.md b/analysis/methodologies/per-artifact-methodologies.md new file mode 100644 index 0000000000..5a6e7c6d82 --- /dev/null +++ b/analysis/methodologies/per-artifact-methodologies.md @@ -0,0 +1,365 @@ + + + +

+ Hack23 Logo +

+ +

📘 Per-Artifact Methodologies — Riksdagsmonitor

+ +

+ 🔬 How the AI Agent Writes Each of the 23 Core + 7 Supplementary Artifacts
+ 🎯 One §section per artifact · Inputs · Analytic moves · Evidence rules · Anti-patterns +

+ +

+ Owner + Version + Effective Date + Classification +

+ +**📋 Document Owner:** CEO | **📄 Version:** 1.1 | **📅 Last Updated:** 2026-04-23 (UTC) +**🔄 Review Cycle:** Quarterly | **⏰ Next Review:** 2026-07-31 +**🏢 Owner:** Hack23 AB (Org.nr 5595347807) | **🏷️ Classification:** Public + +--- + +## 🎯 Purpose + +For every artifact listed in [`artifact-catalog.md`](artifact-catalog.md), this document answers **four questions** the AI agent must answer before writing a single paragraph: + +1. **Inputs** — which MCP tools, sibling artifacts, and methodology sections feed this artifact? +2. **Analytic moves** — what structured analytic techniques (SATs) must be applied, and in what order? +3. **Evidence rules** — what citations, Admiralty grades, WEP bands, and neutrality constraints are required? +4. **Anti-patterns** — what shallow / first-pass behaviours cause this artifact to fail Pass-2 or the gate? + +This file is referenced from [`ai-driven-analysis-guide.md §Per-artifact methodology index`](ai-driven-analysis-guide.md#-per-artifact-methodology-index) and [`artifact-catalog.md §Methodology §link column`](artifact-catalog.md). **Read the catalog first, then open only the sections you need for the current run.** + +--- + +## 📑 Index + +### Family A — Core Synthesis (9) +- [§ README](#readme) +- [§ executive-brief](#executive-brief) +- [§ synthesis-summary](#synthesis-summary) ⭐ +- [§ significance-scoring](#significance-scoring) +- [§ classification-results](#classification-results) +- [§ swot-analysis](#swot-analysis) +- [§ risk-assessment](#risk-assessment) +- [§ threat-analysis](#threat-analysis) +- [§ stakeholder-perspectives](#stakeholder-perspectives) + +### Family B — Structural Metadata (2) +- [§ data-download-manifest](#data-download-manifest) +- [§ cross-reference-map](#cross-reference-map) + +### Family E — Per-Document (N, separate template) +- [§ per-file-analysis](#per-file-analysis) — produced under `documents/{dok_id}-analysis.md`; validated separately by gate Check 2, not part of the 23 core set + +### Family C — Strategic Extensions +- [§ scenario-analysis](#scenario-analysis) +- [§ comparative-international](#comparative-international) +- [§ devils-advocate](#devils-advocate) +- [§ intelligence-assessment](#intelligence-assessment) +- [§ methodology-reflection](#methodology-reflection) ⭐ + +### Family D — Electoral & Domain +- [§ election-2026-analysis](#election-2026-analysis) +- [§ voter-segmentation](#voter-segmentation) +- [§ coalition-mathematics](#coalition-mathematics) +- [§ historical-parallels](#historical-parallels) +- [§ media-framing-analysis](#media-framing-analysis) +- [§ implementation-feasibility](#implementation-feasibility) +- [§ forward-indicators](#forward-indicators) + +### Operational Supplementary +- [§ analysis-index](#analysis-index) +- [§ reference-analysis-quality](#reference-analysis-quality) +- [§ mcp-reliability-audit](#mcp-reliability-audit) +- [§ workflow-audit](#workflow-audit) +- [§ cross-run-diff](#cross-run-diff) +- [§ cross-session-intelligence](#cross-session-intelligence) +- [§ session-baseline](#session-baseline) + +--- + +## Family A — Core Synthesis + +### synthesis-summary ⭐ + +**Inputs** — all Family A peers (`significance-scoring`, `classification-results`, `swot`, `risk`, `threat`, `stakeholder-perspectives`) + `cross-reference-map`. +**Analytic moves** — (1) BLUF paragraph (ICD 203) stating the single most-important judgement with WEP band and horizon; (2) 3–7 Key Judgments each with confidence grade; (3) mindmap of policy clusters; (4) party-neutrality arithmetic table; (5) dissenting view (≥ 1 alternative hypothesis from `devils-advocate`). +**Evidence rules** — every KJ cites ≥ 2 independent sources (Source Diversity Rule); WEP band + horizon on every forecast; Admiralty grades listed in a footer table. +**Anti-patterns** — "intelligence theatre" (dramatic prose without numeric anchor); missing BLUF; treating one party as villain/hero. + +### cross-reference-map + +**Inputs** — `data-download-manifest.md`; sibling folders under `$ARTICLE_DATE`. +**Analytic moves** — (1) policy clusters (thematic grouping of `dok_id`s); (2) legislative chains (proposition → betänkande → beslut → följdlag); (3) coordinated-activity patterns (co-signed motions, party-block anföranden); (4) Tier-C sibling-folder citations. +**Evidence rules** — every edge in the map cites `dok_id` pair or MP pair; no speculative links. +**Anti-patterns** — treating co-occurrence of keywords as coordination; uni-directional chains labelled as bi-directional. + +### significance-scoring + +**Inputs** — `data-download-manifest.md` (all `dok_id`s); `get_dokument` for abstract/metadata; historical DIW calibration table. +**Analytic moves** — (1) assign **D**emocratic impact (0–10), **I**mpact breadth (0–10), **W**indow / urgency (0–10) per DIW; (2) rank and bucket into L1 / L2 / L2+ / L3; (3) sensitivity analysis (±2 on each axis → does tier change?); (4) Mermaid rank diagram. +**Evidence rules** — DIW justification sentence per item citing `dok_id`; minimum spread (not all items in one tier). +**Anti-patterns** — inflation ("everything is L3"); uniform scoring; no sensitivity check. + +### classification-results + +**Inputs** — [`political-classification-guide.md`](political-classification-guide.md) (7-dimension framework); `get_dokument`. +**Analytic moves** — per item: (1) dimension 1–7 scores; (2) priority tier (P0–P3); (3) retention class; (4) access class; (5) aggregation note (Tier-C). +**Evidence rules** — numeric scores with 1-line justification; priority tier ties back to DIW. +**Anti-patterns** — classification drift (same item different scores across runs without justification). + +### swot-analysis + +**Inputs** — `search_anforanden`, `get_voteringar`, sibling Family A artifacts. +**Analytic moves** — (1) S/W/O/T with evidence rows (each row: claim + `dok_id` + Admiralty); (2) TOWS matrix (SO, ST, WO, WT strategies); (3) cross-SWOT comparison against prior run's SWOT (link from `cross-run-diff.md` when present). +**Evidence rules** — ≥ 3 items per quadrant; balanced across parties (neutrality arithmetic); no empty quadrant. +**Anti-patterns** — SWOT as adjective-bag; weaknesses only of opposition, strengths only of government (neutrality failure). + +### risk-assessment + +**Inputs** — `search_dokument`, `get_betankanden`, sibling `threat-analysis`. +**Analytic moves** — (1) 5-dimension register (Electoral / Policy / Institutional / Corruption / External); (2) L × I score; (3) cascading chain diagram (upstream cause → event → downstream impact); (4) posterior probabilities via Bayesian update from prior run; (5) WEP band per risk. +**Evidence rules** — every risk row has `dok_id` or vote count; Admiralty grade on external sources. +**Anti-patterns** — doubling risk count without new evidence; no L × I scoring; no cascade. + +### threat-analysis + +**Inputs** — `search_anforanden`, `get_voteringar`, OSINT framing sources. +**Analytic moves** — (1) Political Threat Taxonomy mapping per [`political-threat-framework.md`](political-threat-framework.md); (2) attack tree (root threat → sub-goals → leaves); (3) kill chain; (4) MITRE-style TTP mapping; (5) WEP band per leaf. +**Evidence rules** — TTPs reference public actor statements, no private data; attack-tree leaves cite `dok_id` or news URL with Admiralty. +**Anti-patterns** — criminalising normal political behaviour; unsourced "operation" labels. + +### stakeholder-perspectives + +**Inputs** — `search_ledamoter`, `get_ledamot`, `search_anforanden`, party programmes. +**Analytic moves** — (1) 6-lens matrix (Government / Opposition / Civil society / Business / Media / EU/external); (2) named actor per lens with role and `intressent_id`; (3) influence network diagram (nodes + edges labelled with power/interest/position); (4) **neutrality arithmetic** — equal treatment of all 8 Riksdag parties (S, M, SD, V, MP, C, L, KD) verified by table. +**Evidence rules** — named MP + `intressent_id` for every Riksdag actor; speech or vote citation. +**Anti-patterns** — "voters" as undifferentiated block; one party missing from the matrix. + +--- + +## Family B — Structural Metadata + +### data-download-manifest + +**Inputs** — output of scripts in `03-data-download.md`. +**Analytic moves** — (AI role is minimal here) (1) annotate data-depth tag (API / scraped / cached); (2) flag retrieval anomalies; (3) verify every `dok_id` resolves via `get_dokument`. +**Evidence rules** — every row: `dok_id`, source URL, retrieval timestamp, data-depth tag. +**Anti-patterns** — `AI_MUST_REPLACE` left in; rows without retrieval time. + +--- + +## Family C — Strategic Extensions + +### scenario-analysis + +**Inputs** — all Family A; political calendar; `get_calendar_events`. +**Analytic moves** — (1) ≥ 3 distinct scenarios (status-quo, shock, opportunity); (2) probabilities summing 100%; (3) leading indicator per scenario (what to watch); (4) decision tree from trigger → scenario. +**Evidence rules** — WEP band + horizon on each scenario; historical precedent citation on each. +**Anti-patterns** — probabilities summing to 120% or 70%; scenarios that are re-phrasings of each other. + +### comparative-international + +**Inputs** — world-bank MCP, IMF CLI, SCB, peer-country press. +**Analytic moves** — (1) ≥ 2 comparator jurisdictions (Nordic baseline + EU or global); (2) Outside-In analysis (what would this look like to a Finnish / Danish / EU observer?); (3) quantitative table of ≥ 3 indicators. +**Evidence rules** — indicator code (e.g. `SE.XPD.TOTL.GD.ZS`) + source URL per row; year stamp. +**Anti-patterns** — Swedish exceptionalism; comparator chosen only to confirm prior. + +### devils-advocate + +**Inputs** — draft `synthesis-summary` (Pass 1). +**Analytic moves** — (1) ≥ 3 competing hypotheses; (2) ACH matrix (evidence × hypothesis, consistent / inconsistent); (3) Red-Team challenge paragraph; (4) rejected alternatives logged with reason. +**Evidence rules** — evidence cells reference `dok_id` or speech ID; ACH matrix complete. +**Anti-patterns** — straw-man alternatives; only one hypothesis surviving without rejection log. + +### intelligence-assessment + +**Inputs** — all Family A + Family C peers. +**Analytic moves** — (1) 3–7 Key Judgments with confidence labels (ICD 203); (2) Priority Intelligence Requirements (PIRs) for next cycle; (3) Key Assumptions Check (KAC); (4) handoff to next-run memory. +**Evidence rules** — WEP + horizon + Admiralty per KJ. +**Anti-patterns** — KJs without confidence labels; PIRs phrased as questions already answered. + +### methodology-reflection ⭐ + +**Inputs** — every other artifact produced in the run. +**Analytic moves** — (1) Evidence sufficiency audit (min source count per claim); (2) confidence distribution histogram; (3) source diversity ratio; (4) **party-neutrality arithmetic** (word count per party ± 15% of expected share); (5) **ICD 203 compliance audit** (BLUF, WEP, confidence labels, KAC); (6) ≥ 10 SATs documented; (7) ≥ 3 concrete methodology improvements for next run. +**Evidence rules** — every audit row quantitative; improvements must be actionable in next run. +**Anti-patterns** — "went well" with no numbers; improvements that require code changes outside the agent's scope. + +--- + +## Family D — Electoral & Domain + +### election-2026-analysis + +**Inputs** — `search_voteringar` (recent voting coalition evidence), SCB opinion polls, historical seat table. +**Analytic moves** — (1) seat-projection delta vs prior run; (2) coalition viability table (M+KD+L+SD, S+MP+V+C, etc.); (3) Sainte-Laguë redistribution if poll shift > 2 pp. +**Evidence rules** — poll source + date; WEP band on seat projections. +**Anti-patterns** — wishful-thinking coalitions that never held; outdated polls. +**Post-election** — section converts to "post-2026 context" retrospective. + +### voter-segmentation + +**Inputs** — SCB demographics, electoral geography, issue polling. +**Analytic moves** — (1) demographic / regional / ideological segments; (2) baseline segment positions (for procedural / no-bill days, this is the "nothing changed" baseline); (3) shift vector per segment if an event is present. +**Evidence rules** — segment size from SCB; issue position from named poll. +**Anti-patterns** — segments invented for narrative; "the youth" as a monolith. + +### coalition-mathematics + +**Inputs** — current 349-seat map; `search_voteringar` for realised coalitions. +**Analytic moves** — (1) pivotal-vote table (Shapley-Shubik–style); (2) Sainte-Laguë scenarios at ±1 / ±2 pp poll shifts; (3) majority sensitivity (who can flip the floor?). +**Evidence rules** — seat counts from Riksdagen.se; vote counts from `get_voteringar`. +**Anti-patterns** — ignoring Sverigedemokraterna's role under Tidö-agreement; treating passive tolerance as active coalition. + +### historical-parallels + +**Inputs** — historical Riksdag archive, academic sources. +**Analytic moves** — (1) ≥ 1 named precedent ≤ 40 years (or "no-precedent" finding with reasoning); (2) similarity score (0–1); (3) lesson-learned paragraph. +**Evidence rules** — precedent cited with year, dok/propositionsnummer if applicable. +**Anti-patterns** — vague analogy ("like the 90s crisis") without citation. + +### media-framing-analysis + +**Inputs** — per-party framing, press-quadrant (DN/SvD/Aftonbladet/Expressen/SVT/public), platform framing (X, TikTok). +**Analytic moves** — (1) quadrant diagram; (2) longitudinal frame record (is the frame shifting?); (3) counter-framing space. +**Evidence rules** — headline or tweet URL + Admiralty. +**Anti-patterns** — one paper stands for all media; no longitudinal entry. + +### implementation-feasibility + +**Inputs** — relevant myndighet (agency) capacity, budget, IT, regulatory, workforce. +**Analytic moves** — (1) delivery-risk view per dimension; (2) backlog audit (for no-bill days); (3) timeline with critical path. +**Evidence rules** — myndighet citation + budget appropriation; regulatory CV. +**Anti-patterns** — "easy to implement" without citing capacity data. + +### forward-indicators + +**Inputs** — political calendar, bill pipeline, poll cadence, economic releases. +**Analytic moves** — (1) ≥ 10 dated indicators across 4 horizons (72 h / week / month / election); (2) leading / coincident / lagging tag; (3) threshold that would move the KJ. +**Evidence rules** — each indicator dated + sourced. +**Anti-patterns** — indicators without thresholds; all indicators lagging. + +--- + +## Family E — Per-Document (separate template; not part of the 23 core set) + +### per-file-analysis + +Per-document analyses are produced under `documents/{dok_id}-analysis.md`, one file per downloaded Riksdag document. They are validated separately by gate Check 2 (Family-E per-document check) and are **not** counted in the 23-row core inventory. + +**Inputs** — `get_dokument`, `search_dokument`; paired `dok_id` entry in `data-download-manifest.md`; DIW tier from `significance-scoring.md` Pass 1. +**Analytic moves** — (1) Read full document text; (2) classify along 7 dimensions per [`political-classification-guide.md`](political-classification-guide.md); (3) extract 3–7 named actors, ≥ 2 stakeholder lenses; (4) tag PIR/EEI; (5) apply depth per tier (L1 / L2 / L2+ / L3). +**Evidence rules** — every claim cites `dok_id` + paragraph marker; Admiralty grade per external citation; WEP band on forecast sentences; no generic phrases ("*this may*", "*could lead to*") without a WEP band. +**Anti-patterns** — summarising the document's own abstract; single-source claims without `[unconfirmed]` flag; skipping stakeholder identification on L2+ items. + +--- + +## Operational Supplementary + +### analysis-index + +**Inputs** — the run directory itself (filesystem scan at end of Pass 2). +**Analytic moves** — (1) enumerate every artifact with path and line count; (2) production stage diagram; (3) recommended reading order for article generator; (4) MCP success/fail summary (linking to `mcp-reliability-audit`). +**Evidence rules** — every row matches an on-disk file; no hallucinated paths. +**Anti-patterns** — index out of sync with disk; missing supplementary files. + +### reference-analysis-quality + +**Inputs** — `reference-quality-thresholds.json`; per-artifact line counts; tradecraft signals. +**Analytic moves** — (1) per-artifact table (floor, actual, delta, status); (2) tradecraft audit (WEP presence, Admiralty, ICD 203, SATs); (3) Pass-2 action list with 1-line rationale each; (4) overall benchmark-met judgement. +**Evidence rules** — numeric, reproducible (`wc -l` is the reference counter). +**Anti-patterns** — claiming benchmark met without table; no Pass-2 actions when status is ⚠️ or ❌. + +### mcp-reliability-audit + +**Inputs** — run log of every MCP call (riksdag-regering, scb, world-bank, IMF, github, playwright). +**Analytic moves** — (1) endpoint scoreboard; (2) fallback record (when cached / SKIP_ANALYSIS / retry); (3) latency percentiles; (4) open tickets / known issues carried into next run. +**Evidence rules** — tool name, call count, success/fail, mean latency. +**Anti-patterns** — "looked fine" without numbers; no record of failed calls. + +### workflow-audit + +**Inputs** — phase-checkpoint log (`phase-04-pass1`, `phase-04-pass2`); prompt modules touched; wall-clock timing. +**Analytic moves** — (1) module-by-module execution summary; (2) rule compliance audit against [`ai-driven-analysis-guide.md`](ai-driven-analysis-guide.md) core principles; (3) deviations and their cause; (4) time-budget vs actual. +**Evidence rules** — timestamps, phase labels; compliance grade per rule (✅ / ⚠️ / ❌). +**Anti-patterns** — compliance 100% with no evidence; skipping Pass-2 and not flagging it. + +### cross-run-diff + +**Inputs** — current run's `synthesis-summary` + prior run of **same article type**. +**Analytic moves** — (1) prior-run KJ list with prior WEP bands; (2) new evidence for each KJ; (3) Bayesian update (prior × likelihood → posterior) with numeric deltas; (4) changed scenarios. +**Evidence rules** — every posterior cites new `dok_id`(s) or vote(s); WEP band updated; Admiralty on external. +**Anti-patterns** — posterior = prior (no update); no explanation of shift. + +### cross-session-intelligence + +**Inputs** — ≥ 2 sibling runs' `synthesis-summary` within the aggregation period. +**Analytic moves** — (1) session overview table; (2) progression diagram (timeline); (3) momentum/maturation narrative; (4) crystallisation-moment identification. +**Evidence rules** — each session cited with date + dok / vote count; narrative grounded in at least 3 concrete events. +**Anti-patterns** — "week was busy" without counts; ignoring sessions that contradict the narrative. + +### session-baseline + +**Inputs** — `get_calendar_events`, `get_betankanden`, `get_propositioner`, `search_voteringar` over the period. +**Analytic moves** — (1) session calendar (dates, sitting days, location); (2) adopted-texts roster with `dok_id`; (3) votering count and outcome summary; (4) link to per-file analyses in sibling folders. +**Evidence rules** — every row has source; no estimates. +**Anti-patterns** — missing sessions; approximate counts ("about 15 bills"). + +--- + +## Analytical Supplementary + +Optional deep-dive templates. Full production rules in [`analytical-supplementary-methodology.md`](analytical-supplementary-methodology.md). Non-blocking in `05-analysis-gate.md`. + +### pestle-analysis + +**Inputs** — scoped event / bill / decision, horizon, primary sources (riksdagen.se, regeringen.se, scb.se, IMF WEO vintage per [`imf-indicator-mapping.md`](imf-indicator-mapping.md), WB codes per [`worldbank-indicator-mapping.md`](worldbank-indicator-mapping.md), EUR-Lex for EU instruments). +**Analytic moves** — (1) scope declaration (trigger, horizon, unit, sources); (2) 6 dimension tables (P/E/S/T/L/Env) each with ≥ 4 rows covering factor, current state, direction, evidence, impact, WEP; (3) economic rows tagged with IMF vintage; (4) ≥ 3 cross-dimension interactions (direction + magnitude + rationale); (5) key judgement per dimension (WEP-tagged); (6) PIR feedback row. +**Evidence rules** — every row cites a `dok_id` or primary-source host; economic rows cite IMF indicator code + vintage; WB rows cite indicator code. +**Anti-patterns** — dimension rows without evidence; skipping the cross-dimension interaction table (the value add); mixing vintages across economic rows; stating "trend" without a dated reference point. + +### political-stride-assessment + +**Inputs** — scoped entity (party / committee / agency / electoral component), trust boundary, adversary model, relevant `threat-analysis.md` kill-chain and `risk-assessment.md` Institutional/Corruption rows. +**Analytic moves** — (1) scope + adversary-model declaration; (2) 6 dimension tables (Spoofing / Tampering / Repudiation / Information-disclosure / Denial / Elevation) with ≥ 3 rows each carrying vector, target, L, I, existing mitigation, residual risk, evidence; (3) ≥ 2 Mermaid colour-coded attack trees; (4) MITRE-style TTP mapping table with political adaptations; (5) control mapping to ISO 27001 · NIST CSF 2.0 · CIS Controls v8.1; (6) PIR feedback. +**Evidence rules** — every STRIDE row cites evidence (incident log, historical parallel, named actor, `dok_id`); every L × I ≥ 12 row also appears in `threat-analysis.md` TTPs. +**Anti-patterns** — applying STRIDE verbatim without political adaptation; missing residual-risk column; no Mermaid attack tree; omitting the ISMS control map. + +### wildcards--black-swans + +**Inputs** — `scenario-analysis.md` anchor, historical-parallels register, long-horizon elicitation, external-shock indicators (IMF risk outlook, NATO briefs, MSB reports). +**Analytic moves** — (1) horizon + domain filter; (2) ICD-203-aligned definitions (wildcard in WEP `Unlikely`…`Remote` ≈ 5–37 % per [`political-style-guide.md`](political-style-guide.md#-words-of-estimative-probability-wep--odni-confidence-overlay); black-swan < 5 % with plausible chain); (3) wildcard register ≥ 8 events across domains with trigger indicator + lead time + impact vectors + existing counter-measures; (4) ≥ 3 black-swan candidates each with "why under-weighted" + ≤ 4-step plausible causal chain; (5) ≥ 2 Mermaid colour-coded cascading consequence trees; (6) early-warning indicator table feeding `forward-indicators.md`; (7) resilience assessment across 5 dimensions (institutional / fiscal / coalition / info-integrity / alliance). +**Evidence rules** — every wildcard row cites a historical analogue OR expert source; every early-warning indicator includes data source + threshold; resilience rows cite fiscal buffer via IMF GGXWDG_NGDP. +**Anti-patterns** — treating the register as doomsaying without causal chains; no early-warning indicators (the actionable column); confusing high-probability risks with wildcards; omitting resilience assessment. + +### quantitative-swot + +**Inputs** — `swot-analysis.md` narrative content, `significance-scoring.md` weight vector (`w_D=0.35, w_I=0.25, w_W=0.20, w_S=0.20`). +**Analytic moves** — (1) scope + perspective declaration; (2) scoring rubric documentation (`I ∈ [-5,+5]`, `C ∈ [0.2,0.95]` WEP-mapped, `L ∈ [0.1,1.0]`, `T ∈ [0.3,1.0]`); (3) 4 scored tables (S / W / O / T) with ≥ 3 evidence-citing items each; (4) composite metrics (net position, SW-balance, OT-balance, high-confidence share); (5) TOWS 2 × 2 with ≥ 1 action per quadrant citing item IDs; (6) ≥ 3 sensitivity analyses; (7) Mermaid `xychart-beta` composite-score bar chart. +**Evidence rules** — every scored item cites evidence matching `swot-analysis.md`; confidence `C` must correspond to declared WEP band; top-3 composite items appear in `executive-brief.md § 3 Decisions`. +**Anti-patterns** — inventing items not in narrative SWOT; picking scores to justify a pre-decided ranking; omitting sensitivity analysis; TOWS quadrants without item-ID citations. + +--- + +## 🔗 Related Documentation + +- [`artifact-catalog.md`](artifact-catalog.md) — single row per artifact (this file's companion index) +- [`ai-driven-analysis-guide.md`](ai-driven-analysis-guide.md) — DIW weighting, tier depths, Pass 1/2 rules +- [`osint-tradecraft-standards.md`](osint-tradecraft-standards.md) — ICD 203, Admiralty, WEP, SATs +- [`reference-quality-thresholds.json`](reference-quality-thresholds.json) — numeric floors +- [`.github/prompts/04-analysis-pipeline.md`](../../.github/prompts/04-analysis-pipeline.md) — execution order +- [`.github/prompts/05-analysis-gate.md`](../../.github/prompts/05-analysis-gate.md) — enforcement +- Templates — one per artifact under [`../templates/`](../templates/) + +## 📜 Changelog + +- **v1.1 (2026-04-23)** — Added Analytical Supplementary section (pestle-analysis · political-stride-assessment · wildcards--black-swans · quantitative-swot) aligned with [`analytical-supplementary-methodology.md`](analytical-supplementary-methodology.md). +- **v1.0 (2026-04-23)** — Initial Riksdagsmonitor per-artifact methodology reference; adapted from EU Parliament Monitor `per-artifact-methodologies.md` v1.0 to the Riksdag 23-artifact catalog. diff --git a/analysis/methodologies/reference-quality-thresholds.json b/analysis/methodologies/reference-quality-thresholds.json new file mode 100644 index 0000000000..af636e0024 --- /dev/null +++ b/analysis/methodologies/reference-quality-thresholds.json @@ -0,0 +1,243 @@ +{ + "version": "1.1", + "effectiveDate": "2026-04-23", + "description": "Per-artifact minimum line-count floors used to enforce Rule 22 (Per-Artifact Depth Floors) of analysis/methodologies/ai-driven-analysis-guide.md for Riksdagsmonitor agentic news workflows. Values are calibrated to the DIW Output Matrix and the Riksdag 23-artifact catalog (see artifact-catalog.md). A file below its threshold MUST trigger a Pass-2 rewrite; it MUST NOT be shipped with a '[truncated]' or 'AI_MUST_REPLACE' note. When an articleType entry is absent the gate falls back to the default floor. When a per-artifact entry is present the effective floor is max(perArtifact, default), so the default can only raise, never lower, a configured floor.", + "tradecraftQualitySignals": { + "note": "ADDITIVE quality signals — NOT enforced by the line-count validator. They represent content-quality expectations that the Pass-2 self-audit in methodology-reflection.md must check. Every probabilistic artifact MUST also comply with osint-tradecraft-standards.md: (1) WEP band + time horizon on every headline judgement, (2) Admiralty grade on every external source, (3) confidence-in-evidence tracked separately from WEP probability, (4) >= 10 SATs applied per run (attested in methodology-reflection.md §Evidence audit). Non-compliant artifacts trigger a Pass-2 rewrite even if the line-count floor is met.", + "wepBandRequired": [ + "synthesis-summary.md", + "scenario-analysis.md", + "threat-analysis.md", + "risk-assessment.md", + "intelligence-assessment.md", + "forward-indicators.md", + "cross-run-diff.md", + "cross-session-intelligence.md" + ], + "admiraltyGradeRequired": [ + "synthesis-summary.md", + "scenario-analysis.md", + "threat-analysis.md", + "risk-assessment.md", + "intelligence-assessment.md", + "devils-advocate.md", + "comparative-international.md", + "cross-run-diff.md" + ], + "icd203BlufRequired": [ + "synthesis-summary.md", + "intelligence-assessment.md", + "methodology-reflection.md" + ], + "satDocumentationRequired": [ + "methodology-reflection.md", + "devils-advocate.md" + ], + "diwScoreRequired": [ + "significance-scoring.md", + "documents/{dok_id}-analysis.md" + ], + "partyNeutralityArithmeticRequired": [ + "synthesis-summary.md", + "swot-analysis.md", + "risk-assessment.md", + "stakeholder-perspectives.md", + "media-framing-analysis.md", + "voter-segmentation.md", + "coalition-mathematics.md" + ] + }, + "referenceBenchmark": { + "description": "Gold-standard reference run used to calibrate depth floors. Re-selected quarterly from the highest-scoring production run of the preceding quarter as measured by reference-analysis-quality.md.", + "runDir": "analysis/daily/[TBD-reference-benchmark]/", + "runId": "[TBD]", + "date": "2026-Q2-benchmark-pending", + "nextCalibration": "2026-07-31" + }, + "toleranceRule": "All floors derived from the benchmark are rounded down to the nearest 5 lines with a 10% tolerance applied, to tolerate minor variation while still rejecting thin output.", + "defaults": { + "description": "Fallback floors applied when an articleType or perArtifact entry is absent.", + "coreArtifactFloor": 120, + "perDocumentFloorByTier": { + "L1_surface": 40, + "L2_strategic": 80, + "L2_plus_priority": 140, + "L3_intelligence_grade": 220 + }, + "clusterFloor": 100, + "supplementaryFloor": 120 + }, + "thresholds": { + "breaking": { + "synthesis-summary.md": 205, + "cross-reference-map.md": 110, + "significance-scoring.md": 150, + "classification-results.md": 140, + "swot-analysis.md": 160, + "risk-assessment.md": 180, + "threat-analysis.md": 180, + "stakeholder-perspectives.md": 220, + "data-download-manifest.md": 60, + "scenario-analysis.md": 180, + "comparative-international.md": 150, + "devils-advocate.md": 160, + "intelligence-assessment.md": 160, + "methodology-reflection.md": 200, + "election-2026-analysis.md": 150, + "voter-segmentation.md": 140, + "coalition-mathematics.md": 135, + "historical-parallels.md": 130, + "media-framing-analysis.md": 140, + "implementation-feasibility.md": 140, + "forward-indicators.md": 150, + "analysis-index.md": 120, + "reference-analysis-quality.md": 120, + "mcp-reliability-audit.md": 150, + "workflow-audit.md": 120, + "cross-run-diff.md": 130, + "cross-session-intelligence.md": 140, + "session-baseline.md": 140 + }, + "evening-analysis": { + "synthesis-summary.md": 220, + "risk-assessment.md": 200, + "threat-analysis.md": 200, + "stakeholder-perspectives.md": 240, + "forward-indicators.md": 170, + "methodology-reflection.md": 210 + }, + "realtime-monitor": { + "synthesis-summary.md": 170, + "risk-assessment.md": 150, + "threat-analysis.md": 150, + "stakeholder-perspectives.md": 190, + "forward-indicators.md": 140, + "methodology-reflection.md": 180 + }, + "propositions": { + "synthesis-summary.md": 230, + "classification-results.md": 160, + "swot-analysis.md": 180, + "risk-assessment.md": 210, + "implementation-feasibility.md": 170, + "stakeholder-perspectives.md": 250, + "methodology-reflection.md": 215 + }, + "motions": { + "synthesis-summary.md": 220, + "significance-scoring.md": 170, + "classification-results.md": 155, + "swot-analysis.md": 175, + "stakeholder-perspectives.md": 240, + "comparative-international.md": 160, + "methodology-reflection.md": 210 + }, + "committee-reports": { + "synthesis-summary.md": 215, + "swot-analysis.md": 170, + "risk-assessment.md": 195, + "implementation-feasibility.md": 165, + "stakeholder-perspectives.md": 235, + "methodology-reflection.md": 205 + }, + "interpellations": { + "synthesis-summary.md": 205, + "swot-analysis.md": 160, + "threat-analysis.md": 180, + "stakeholder-perspectives.md": 220, + "media-framing-analysis.md": 160, + "methodology-reflection.md": 200 + }, + "week-ahead": { + "synthesis-summary.md": 200, + "forward-indicators.md": 170, + "methodology-reflection.md": 195 + }, + "month-ahead": { + "synthesis-summary.md": 230, + "forward-indicators.md": 200, + "scenario-analysis.md": 200, + "methodology-reflection.md": 215 + }, + "weekly-review": { + "synthesis-summary.md": 240, + "cross-session-intelligence.md": 180, + "session-baseline.md": 170, + "cross-run-diff.md": 160, + "methodology-reflection.md": 220 + }, + "monthly-review": { + "synthesis-summary.md": 260, + "cross-session-intelligence.md": 220, + "session-baseline.md": 200, + "cross-run-diff.md": 180, + "comparative-international.md": 180, + "methodology-reflection.md": 235 + }, + "analyticalSupplementary": { + "_comment": "Analytical supplementary templates — never blocking. Floors apply only when the template is produced. Sister-methodology: analytical-supplementary-methodology.md.", + "pestle-analysis.md": { + "standard": 100, + "deep": 150, + "comprehensive": 220, + "rowFloor": { + "dimensionTables": 4, + "crossInteractions": 3 + } + }, + "political-stride-assessment.md": { + "standard": 110, + "deep": 160, + "comprehensive": 240, + "rowFloor": { + "stridePerDimension": 3, + "attackTrees": 2, + "ttpRows": 5 + } + }, + "wildcards-blackswans.md": { + "standard": 110, + "deep": 160, + "comprehensive": 240, + "rowFloor": { + "wildcards": 8, + "blackSwans": 3, + "consequenceTrees": 2, + "resilienceDimensions": 5 + } + }, + "quantitative-swot.md": { + "standard": 110, + "deep": 160, + "comprehensive": 240, + "rowFloor": { + "perQuadrant": 3, + "sensitivityRuns": 3, + "towsActionsPerQuadrant": 1 + } + } + } + }, + "tierCMultipliers": { + "description": "Tier-C aggregation workflows apply these period-scope multipliers on top of the base thresholds. See ext/tier-c-aggregation.md.", + "week-aggregation": 1.15, + "month-aggregation": 1.35, + "quarter-aggregation": 1.6 + }, + "enforcement": { + "gateChecks": [ + "Check 3 in .github/prompts/05-analysis-gate.md consumes thresholds[articleType][artifact] with fallback to defaults.coreArtifactFloor.", + "A file below floor MUST be returned to Pass 2 via the phase-04-pass2 checkpoint.", + "Family-E per-document files use defaults.perDocumentFloorByTier keyed by the file's DIW tier tag in significance-scoring.md.", + "Supplementary artifacts (S1–S7) use defaults.supplementaryFloor unless listed explicitly per articleType." + ], + "waivers": "Thresholds may be waived only by the CEO (document owner) via a merged PR updating this file. Ad-hoc waivers in commit messages are rejected." + }, + "meta": { + "version": "1.1", + "lastUpdated": "2026-04-23", + "changelog": [ + "v1.1 (2026-04-23) — Added analyticalSupplementary section (pestle-analysis · political-stride-assessment · wildcards-blackswans · quantitative-swot); non-blocking." + ] + } +} diff --git a/analysis/methodologies/worldbank-indicator-mapping.md b/analysis/methodologies/worldbank-indicator-mapping.md new file mode 100644 index 0000000000..f31ff6597d --- /dev/null +++ b/analysis/methodologies/worldbank-indicator-mapping.md @@ -0,0 +1,86 @@ +# World Bank Indicator → Article Type Mapping (Riksdagsmonitor) + +**Purpose** — canonical reference that maps Riksdagsmonitor news workflow article types to the most-relevant **non-economic** World Bank Open Data indicators used in `comparative-international.md`, `voter-segmentation.md`, `implementation-feasibility.md` and the `session-baseline.md` domain tables. + +**Data access** — via the `world-bank` MCP server (local container) using `get-social-data`, `get-health-data`, `get-education-data`, and the raw-REST passthrough for environment / defence / agriculture / innovation / governance codes. See [`.github/copilot-mcp.json`](../../.github/copilot-mcp.json) and [`.github/prompts/02-mcp-access.md`](../../.github/prompts/02-mcp-access.md). + +**Wave-2 scope (April 2026)** — World Bank is the **authoritative source** for social / demographics / health / education / environment / defence / agriculture / innovation / governance indicators only. All **economic / monetary / fiscal / trade** context (GDP, inflation, unemployment, FDI, fiscal balance, debt, monetary, exchange rates) is sourced from IMF — see [`imf-indicator-mapping.md`](imf-indicator-mapping.md) and [`analysis/imf/`](../imf/). Legacy WB economic codes below remain valid for pre-Wave-2 articles, but **new articles must use the IMF counterpart**. + +**Enforcement** — the gate check in [`.github/prompts/05-analysis-gate.md`](../../.github/prompts/05-analysis-gate.md) Check 4 currently verifies that `swot-analysis.md` and `significance-scoring.md` include primary-source evidence (a `dok_id` or an allowed primary-source URL host — `riksdagen.se`, `regeringen.se`, `scb.se`, `worldbank.org`, `api.imf.org`, `data.imf.org`, `www.imf.org`). It does **not** currently enforce a separate economic-context dimension or validate WB-only vs IMF-only sourcing by dimension; treat the Wave-2 source split above as **methodology guidance** unless and until the gate is expanded. + +--- + +## 1. Retained WB Domains + +| Domain | Primary tool | Example indicator codes | Typical article types | +|--------|--------------|-------------------------|-----------------------| +| Social / demographics | `get-social-data` + raw `SP.POP.*` | `SP.POP.TOTL`, `SP.DYN.LE00.IN`, `SP.DYN.CBRT.IN`, `SP.DYN.CDRT.IN`, `IT.NET.USER.ZS` | committee-reports (SoU), evening-analysis, month-ahead | +| Health | `get-health-data` | `SH.XPD.CHEX.GD.ZS`, `SH.MED.PHYS.ZS`, `SH.MED.BEDS.ZS`, `SH.IMM.MEAS`, `SH.DYN.AIDS.ZS`, `SH.STA.MALN.ZS`, `SH.TBS.INCD` | committee-reports (SoU, Sjukvård), propositions | +| Education | `get-education-data` | `SE.ADT.LITR.ZS`, `SE.PRM.ENRR`, `SE.PRM.CMPT.ZS`, `SE.PRM.TCHR`, `SE.XPD.TOTL.GD.ZS` | committee-reports (UbU), motions on skola | +| Environment | raw `EN.*`, `EG.FEC.RNEW.ZS` | `EN.ATM.CO2E.PC`, `EG.FEC.RNEW.ZS`, `AG.LND.FRST.ZS`, `ER.H2O.FWTL.ZS` | committee-reports (MjU, NU), evening-analysis | +| Defence | raw `MS.MIL.*` | `MS.MIL.XPND.GD.ZS`, `MS.MIL.TOTL.P1` | committee-reports (FöU), propositions on försvar | +| Agriculture | raw `AG.*`, `NV.AGR.TOTL.ZS` | `AG.PRD.CREL.MT`, `AG.LND.ARBL.ZS`, `NV.AGR.TOTL.ZS` | committee-reports (MJU), motions on landsbygd | +| Innovation | raw `GB.XPD.RSDV.GD.ZS`, `IT.NET.USER.ZS` | `GB.XPD.RSDV.GD.ZS`, `IT.NET.USER.ZS`, `IP.PAT.RESD` | committee-reports (UbU, NU), propositions on forskning | +| Governance | raw `SG.*`, `IC.*` | `SG.GEN.PARL.ZS`, `IC.BUS.EASE.XQ`, WGI via [`governance.worldbank.org`](https://governance.worldbank.org) | intelligence-assessment, methodology-reflection | + +--- + +## 2. Sweden Country Code & Regional Aggregates + +| Purpose | Code | Notes | +|---------|------|-------| +| Sweden | `SWE` | ISO-3 | +| EU (World Bank aggregate) | `EUU` | accepted by `world-bank` MCP | +| Euro area | `EMU` | accepted by WB (Sweden is non-Euro) | +| Nordic baseline (manual) | `DNK`, `FIN`, `NOR`, `ISL` | fetched in parallel for comparative-international | +| OECD | `OED` | WB aggregate | +| High income | `HIC` | income-level aggregate | + +> **Note on IMF aggregates** — use `EU`, `EA`, `G7`, `G20` instead of `EUU`/`EMU` when calling IMF; the two MCPs use incompatible aggregate codes. + +--- + +## 3. Article-Type → Domain Map + +| Article type | Required WB domains | Optional | +|--------------|---------------------|----------| +| `propositions` | — (economic → IMF) | health, education, environment per committee | +| `motions` | social, innovation | environment, defence | +| `committee-reports` | domain of the committee (UbU→education, MjU→environment, SoU→health, FöU→defence) | demographics | +| `interpellations` | — | social (when demographic framing present) | +| `evening-analysis` | social, health (if day's theme warrants) | governance | +| `realtime-monitor` | — | whatever the breaking topic demands | +| `week-ahead` / `month-ahead` | — (forward-looking) | social baseline | +| `weekly-review` / `monthly-review` | social, health, education, environment trend lines | innovation | + +--- + +## 4. Citation Pattern + +Every WB figure cited in an artifact must appear as: + +```text +World Bank, "{indicator name}" ({indicator code}), Sweden, {year}, {URL or "WDI via world-bank MCP"}. Admiralty: B2. +``` + +Example: + +```text +World Bank, "Total health expenditure (% of GDP)" (SH.XPD.CHEX.GD.ZS), +Sweden, 2023, WDI via world-bank MCP. Admiralty: B2. +``` + +--- + +## 5. Anti-Patterns (gate failures) + +- Citing the raw indicator code without the human-readable name. +- Quoting a single year without trend context (min. 5-year series). +- Using `SWE` alongside a non-matching regional aggregate (e.g. mixing `EUU` with an IMF `EU` figure for the same chart). +- Failing to flag indicators with known data quality issues (Sweden's `SH.DYN.AIDS.ZS` is aggregated to suppress small counts — annotate). + +--- + +## 6. Changelog + +- **v1.0 (2026-04-23)** — Initial Riksdagsmonitor mapping; adapted from EU Parliament Monitor `worldbank-indicator-mapping.md` Wave-2 scope. diff --git a/analysis/templates/README.md b/analysis/templates/README.md index ebf5383e51..07f8fafe6d 100644 --- a/analysis/templates/README.md +++ b/analysis/templates/README.md @@ -409,6 +409,41 @@ Templates are grouped by the **output family** defined in [`ai-driven-analysis-g | E1 | `documents/${dok_id}-analysis.md` | [per-file-political-intelligence.md](per-file-political-intelligence.md) | Deep per-document analysis (tiers L1–L3) | | E2 | `documents/${cluster}-cluster-analysis.md` | [per-file-political-intelligence.md § Cluster](per-file-political-intelligence.md) | Cluster-level synthesis for grouped documents | +### 🛰️ Operational Supplementary — Not Counted in the 23 (Added v2.4, 2026-04-23) + +> **Purpose** — Enrichment artifacts that strengthen the AI-FIRST quality loop, cross-run memory, and MCP health auditability. **Recommended** for every `deep` run; **mandatory** for every `comprehensive` (Tier-C aggregation) run. For non-Tier-C runs these artifacts are generally non-blocking; **exception:** `cross-run-diff.md` (S5) is gate-required whenever `ANALYSIS_RUN_COUNT >= 2` (same article type), including `standard` and `deep` runs. Each artifact is consumed by [`.github/prompts/05-analysis-gate.md §Supplementary checks`](../../.github/prompts/05-analysis-gate.md#supplementary-checks) when present. +> +> **Methodology index** — [`per-artifact-methodologies.md`](../methodologies/per-artifact-methodologies.md) §§ analysis-index · reference-analysis-quality · mcp-reliability-audit · workflow-audit · cross-run-diff · cross-session-intelligence · session-baseline. +> **Catalog row** — [`artifact-catalog.md §Operational Supplementary`](../methodologies/artifact-catalog.md#-operational-supplementary-artifacts-7). + +| # | File | Template | Purpose | Typical article types | +|:-:|------|----------|---------|----------------------| +| S1 | `analysis-index.md` | [analysis-index.md](analysis-index.md) | Read-me-first run navigator: artifact inventory, MCP summary, recommended reading order, gate outcome | All `deep` + `comprehensive` | +| S2 | `reference-analysis-quality.md` | [reference-analysis-quality.md](reference-analysis-quality.md) | Per-run self-score vs reference benchmark + Pass-2 action list — operationalises the AI-FIRST principle | All `comprehensive` | +| S3 | `mcp-reliability-audit.md` | [mcp-reliability-audit.md](mcp-reliability-audit.md) | Endpoint-by-endpoint health record for `riksdag-regering` / `scb` / `world-bank` / IMF with latency, freshness, failure incidents, cache usage | All `comprehensive`; any `deep` run with MCP degradation | +| S4 | `workflow-audit.md` | [workflow-audit.md](workflow-audit.md) | Prompt-module-by-module self-audit of the 7-module pipeline; 11-principle compliance table | All `comprehensive` | +| S5 | `cross-run-diff.md` | [cross-run-diff.md](cross-run-diff.md) | Bayesian delta vs prior run of the **same** article type — posterior WEP bands, scenario-probability shifts, risk-register deltas | Any article type with ≥ 2 runs | +| S6 | `cross-session-intelligence.md` | [cross-session-intelligence.md](cross-session-intelligence.md) | **Session-over-session** narrative (week / month / quarter aggregation) — momentum, crystallisation moments, vote-discipline time-series | `weekly-review`, `monthly-review`, `motions` (quarterly) | +| S7 | `session-baseline.md` | [session-baseline.md](session-baseline.md) | Calendar + adopted-texts + voterings roster for the period — data-dense reference every narrative artifact points back to | `weekly-review`, `monthly-review`, `propositions`, `motions` (aggregation) | + +Line floors for S1–S7 are configured in [`reference-quality-thresholds.json`](../methodologies/reference-quality-thresholds.json) and apply to `comprehensive` runs. + +### 🔭 Analytical Supplementary — Optional Deep-Dive (Added v2.5, 2026-04-23) + +> **Purpose** — Optional deep-dive analytical templates mapped to frameworks explicitly listed in the intelligence-operative agent's "Core Expertise" and "Analytical Frameworks" sections. **Never replace** a core artifact and **never blocking** in `05-analysis-gate.md`. Pair with and cite the canonical artifact they extend. +> +> **Methodology** — [`analytical-supplementary-methodology.md`](../methodologies/analytical-supplementary-methodology.md) (composition rules, evidence rules, per-template analytic moves). +> **Catalog row** — [`artifact-catalog.md §Analytical Supplementary`](../methodologies/artifact-catalog.md#-analytical-supplementary-artifacts-4). + +| # | File | Template | Purpose | Trigger | +|:-:|------|----------|---------|---------| +| AS1 | `pestle-analysis.md` | [pestle-analysis.md](pestle-analysis.md) | Macro-environment scan (Political/Economic/Social/Technological/Legal/Environmental) with IMF-vintage economic rows, ≥ 3 cross-dimension interactions, key judgement per dimension | event crosses ≥ 2 PESTLE dimensions | +| AS2 | `political-stride-assessment.md` | [political-stride-assessment.md](political-stride-assessment.md) | STRIDE applied to political/electoral/institutional surfaces — 6 dimension tables, ≥ 2 Mermaid attack trees, MITRE-style TTP map, ISMS control map (ISO 27001 · NIST CSF 2.0 · CIS v8.1) | election-adjacent · integrity incident · disinfo spike · critical-infra vote | +| AS3 | `wildcards-blackswans.md` | [wildcards-blackswans.md](wildcards-blackswans.md) | Tail of `scenario-analysis.md` — wildcard register (≥ 8), black-swan candidates (≥ 3) with plausible causal chains, cascading consequence trees, resilience assessment | long-horizon forecasting (`monthly-review`, election-year aggregation) | +| AS4 | `quantitative-swot.md` | [quantitative-swot.md](quantitative-swot.md) | Numerical SWOT scoring using same DIW weight vector as `significance-scoring.md`; TOWS matrix with scored action rankings; sensitivity analysis | decision memo requiring scored ranking | + +Line floors for AS1–AS4 live in `reference-quality-thresholds.json § thresholds.analyticalSupplementary`; apply **only when the template is produced**. Non-production is never a gate failure. + ### Workflow → Family Map | Workflow | Family A | Family B | Family C | Family D | Family E | diff --git a/analysis/templates/analysis-index.md b/analysis/templates/analysis-index.md new file mode 100644 index 0000000000..9578d27afb --- /dev/null +++ b/analysis/templates/analysis-index.md @@ -0,0 +1,188 @@ + + + +# 📑 Analysis Index Template — Run Artifact Navigator + +> **📌 Template Instructions** — Copy to `analysis/daily/$ARTICLE_DATE/$SUBFOLDER/analysis-index.md`. Produced at the end of Pass 2 (after every other artifact is finalised) as the read-me-first index of the run. See [`per-artifact-methodologies.md §analysis-index`](../methodologies/per-artifact-methodologies.md#analysis-index). + +> **🎯 Purpose** — Comprehensive directory of every artifact in this run with recommended reading order for the article generator, downstream reviewers and the next same-type run. Answers: *"what exists in this run and what should I read first?"* + +## 🔄 Tradecraft Context + +- **Workflow role** — Final navigation layer for the run; produced at the end of Pass 2 after all required artifacts are complete, reviewed and internally consistent. +- **Primary users** — Article generator, human reviewers, later same-type runs, and audit/compliance readers needing a single entry point into the full analysis set. +- **Why it matters** — Reduces retrieval errors, makes reading order explicit, surfaces degraded or missing artifacts, and provides the canonical map of what evidence existed before any article text was written. +- **Tradecraft rule** — Do not introduce new claims here. Summarise and link the run's completed artifacts; point readers to the authoritative source artifact for each major finding. +- **AI-FIRST requirement** — Complete only after both passes finish: Pass 1 creates the artifact set; Pass 2 re-reads, improves, validates consistency, then assembles this index as the read-me-first navigator. + +--- + +## 📋 Document Metadata + +| Field | Value | +|-------|-------| +| **Report ID** | `[REQUIRED: AI-YYYY-MM-DD-runNN]` | +| **Run Date** | `[REQUIRED: YYYY-MM-DD]` | +| **Article Type** | `[REQUIRED: breaking / evening / weekly / monthly / motions / propositions / committee-reports / interpellations / week-ahead / month-ahead / realtime-monitor]` | +| **Run Number** | `[REQUIRED: runNN]` | +| **Run Directory** | `[REQUIRED: analysis/daily/YYYY-MM-DD/{type}-runNN/]` | +| **Runtime Duration** | `[REQUIRED: HH:MM:SS]` | +| **Pass 1 Completed** | `[REQUIRED: ✅ / ❌]` | +| **Pass 2 Completed** | `[REQUIRED: ✅ / ❌]` | +| **Data Sources Attempted** | `[REQUIRED: count of MCP tool invocations]` | +| **Data Sources Succeeded** | `[REQUIRED: count]` | +| **Confidence** | `[REQUIRED: HIGH 🟢 / MEDIUM 🟡 / LOW 🔴]` | + +--- + +## 1️⃣ Run Summary + +**Article type** — `[REQUIRED]` +**Run ID** — `[REQUIRED: {type}-run{N}]` +**Date** — `[REQUIRED: YYYY-MM-DD]` +**Wall-clock runtime** — `[REQUIRED]` +**Completion status** — `[REQUIRED: ✅ Complete / ⚠️ Degraded / ❌ Incomplete]` +**Gate status** — `[REQUIRED: ✅ PASSED / ❌ FAILED — reasons listed below]` + +> One-paragraph (3–5 sentences) narrative summary of what this run produced, the dominant finding, and any degradation notes. Cite the single most-important artifact. + +--- + +## 2️⃣ Production Stage Diagram + +```mermaid +%%{init: {"theme":"dark","themeVariables":{"primaryColor":"#1565C0","primaryTextColor":"#ffffff","lineColor":"#90CAF9","secondaryColor":"#2E7D32","tertiaryColor":"#FF9800","fontFamily":"Inter, Helvetica, Arial, sans-serif"}}}%% +flowchart LR + P03["03 — data download"] --> P04P1["04 — Pass 1 create"] + P04P1 --> P04P2["04 — Pass 2 improve"] + P04P2 --> P05["05 — gate"] + P05 --> P06["06 — article"] + P06 --> P07["07 — commit & PR"] + + classDef ok fill:#2E7D32,color:#ffffff + classDef warn fill:#FF9800,color:#000000 + classDef fail fill:#D32F2F,color:#ffffff + class P03,P04P1,P04P2,P05,P06,P07 ok +``` + +Annotate each node ✅ / ⚠️ / ❌ based on actual execution. + +--- + +## 3️⃣ Artifact Inventory — Core Always-On (23) + +| # | Family | Canonical filename | On-disk path | Lines | Floor | Status | +|:-:|:------:|--------------------|--------------|:-----:|:-----:|:------:| +| 1 | A | `README.md` | `README.md` | `[#]` | `[floor]` | `[✅/⚠️/❌]` | +| 2 | A | `executive-brief.md` | `executive-brief.md` | `[#]` | `[floor]` | `[…]` | +| 3 | A | `synthesis-summary.md` | `synthesis-summary.md` | `[#]` | `[floor]` | `[…]` | +| 4 | A | `significance-scoring.md` | `significance-scoring.md` | `[#]` | `[floor]` | `[…]` | +| 5 | A | `classification-results.md` | `classification-results.md` | `[#]` | `[floor]` | `[…]` | +| 6 | A | `swot-analysis.md` | `swot-analysis.md` | `[#]` | `[floor]` | `[…]` | +| 7 | A | `risk-assessment.md` | `risk-assessment.md` | `[#]` | `[floor]` | `[…]` | +| 8 | A | `threat-analysis.md` | `threat-analysis.md` | `[#]` | `[floor]` | `[…]` | +| 9 | A | `stakeholder-perspectives.md` | `stakeholder-perspectives.md` | `[#]` | `[floor]` | `[…]` | +| 10 | B | `data-download-manifest.md` | `data-download-manifest.md` | `[#]` | `[floor]` | `[…]` | +| 11 | B | `cross-reference-map.md` | `cross-reference-map.md` | `[#]` | `[floor]` | `[…]` | +| 12 | C | `scenario-analysis.md` | `scenario-analysis.md` | `[#]` | `[floor]` | `[…]` | +| 13 | C | `comparative-international.md` | `comparative-international.md` | `[#]` | `[floor]` | `[…]` | +| 14 | C | `devils-advocate.md` | `devils-advocate.md` | `[#]` | `[floor]` | `[…]` | +| 15 | C | `intelligence-assessment.md` | `intelligence-assessment.md` | `[#]` | `[floor]` | `[…]` | +| 16 ⭐ | C | `methodology-reflection.md` | `methodology-reflection.md` | `[#]` | `[floor]` | `[…]` | +| 17 | D | `election-2026-analysis.md` | `election-2026-analysis.md` | `[#]` | `[floor]` | `[…]` | +| 18 | D | `voter-segmentation.md` | `voter-segmentation.md` | `[#]` | `[floor]` | `[…]` | +| 19 | D | `coalition-mathematics.md` | `coalition-mathematics.md` | `[#]` | `[floor]` | `[…]` | +| 20 | D | `historical-parallels.md` | `historical-parallels.md` | `[#]` | `[floor]` | `[…]` | +| 21 | D | `media-framing-analysis.md` | `media-framing-analysis.md` | `[#]` | `[floor]` | `[…]` | +| 22 | D | `implementation-feasibility.md` | `implementation-feasibility.md` | `[#]` | `[floor]` | `[…]` | +| 23 | D | `forward-indicators.md` | `forward-indicators.md` | `[#]` | `[floor]` | `[…]` | + +Floors from [`reference-quality-thresholds.json`](../methodologies/reference-quality-thresholds.json). + +> **Notes on the 23-artifact core** — `cross-reference-map.md` is a single artifact; Tier-C adds sibling-folder citations *inside* the same file (do **not** create a second file). Per-document analyses live under `documents/{dok_id}-analysis.md` (Family E template, validated by gate Check 2) and are **not** counted in this 23-row core inventory. + +--- + +## 4️⃣ Artifact Inventory — Operational Supplementary (present in this run) + +| # | Filename | Produced? | Lines | Floor | Notes | +|:-:|----------|:---------:|:-----:|:-----:|-------| +| S1 | `analysis-index.md` (this file) | ✅ | `[#]` | 120 | — | +| S2 | `reference-analysis-quality.md` | `[✅/❌]` | `[#]` | 120 | Mandatory for `comprehensive` | +| S3 | `mcp-reliability-audit.md` | `[✅/❌]` | `[#]` | 150 | Mandatory for `comprehensive` | +| S4 | `workflow-audit.md` | `[✅/❌]` | `[#]` | 120 | Mandatory for `comprehensive` | +| S5 | `cross-run-diff.md` | `[✅/N/A]` | `[#]` | 130 | N/A if first run | +| S6 | `cross-session-intelligence.md` | `[✅/N/A]` | `[#]` | 140 | N/A unless aggregation workflow | +| S7 | `session-baseline.md` | `[✅/N/A]` | `[#]` | 140 | N/A unless aggregation workflow | + +--- + +## 5️⃣ Family-E Per-Document Files + +| `dok_id` | Path | DIW tier | Lines | Floor | Cluster? | +|----------|------|:--------:|:-----:|:-----:|:--------:| +| `[REQUIRED]` | `documents/[dok_id]-analysis.md` | `[L1/L2/L2+/L3]` | `[#]` | `[floor]` | `[y/n]` | + +Total Family-E files: `[#]`. Clusters: `[#]`. + +--- + +## 6️⃣ Recommended Reading Order + +For the **article generator** (module 06): + +1. `synthesis-summary.md` — BLUF and Key Judgments. +2. `significance-scoring.md` — tier-sorted headline items. +3. `stakeholder-perspectives.md` — quote sources. +4. `risk-assessment.md` + `threat-analysis.md` — for risk/conflict framing. +5. `forward-indicators.md` — closing "what to watch" section. +6. `methodology-reflection.md` — confidence + caveats for byline. + +For a **downstream reviewer** (humans + next-run agent): + +1. This index. +2. `methodology-reflection.md` + `reference-analysis-quality.md` (if present). +3. `cross-run-diff.md` (if present) — what changed since last run. +4. `synthesis-summary.md`. +5. Any artifact flagged ⚠️ in §3 or §4. + +--- + +## 7️⃣ MCP & Data Source Summary + +| Server / tool | Calls | Succeeded | Failed | Mean latency | Notes | +|---------------|:-----:|:---------:|:------:|:------------:|-------| +| `riksdag-regering` | `[#]` | `[#]` | `[#]` | `[ms]` | — | +| `scb` | `[#]` | `[#]` | `[#]` | `[ms]` | — | +| `world-bank` | `[#]` | `[#]` | `[#]` | `[ms]` | — | +| IMF (`tsx scripts/imf-fetch.ts`) | `[#]` | `[#]` | `[#]` | `[ms]` | — | +| `github` | `[#]` | `[#]` | `[#]` | `[ms]` | module 07 only | + +Full detail — see [`mcp-reliability-audit.md`](mcp-reliability-audit.md) when present. + +--- + +## 8️⃣ Gate Outcome + +**Gate result** — `[REQUIRED: ✅ PASSED / ❌ FAILED]` +**Failing checks** — `[REQUIRED: list or "none"]` +**Waivers applied** — `[REQUIRED: list or "none"]` + +If `❌ FAILED`, the article MUST NOT be published. See [`05-analysis-gate.md`](../../.github/prompts/05-analysis-gate.md) outcome rules. + +--- + +## 9️⃣ Changelog for This Run + +- `[REQUIRED]` 1-line summary of what improved vs Pass 1 (link to `cross-run-diff.md` for run-over-run delta). +- `[REQUIRED]` Any MCP degradations and their mitigations. +- `[REQUIRED]` Any methodology deviations (e.g. waiver approved) and the human approver. + +--- + +## 🔗 Cross-References + +- Methodology: [`../methodologies/per-artifact-methodologies.md#analysis-index`](../methodologies/per-artifact-methodologies.md#analysis-index) +- Catalog: [`../methodologies/artifact-catalog.md`](../methodologies/artifact-catalog.md) +- Thresholds: [`../methodologies/reference-quality-thresholds.json`](../methodologies/reference-quality-thresholds.json) +- Gate: [`../../.github/prompts/05-analysis-gate.md`](../../.github/prompts/05-analysis-gate.md) diff --git a/analysis/templates/cross-run-diff.md b/analysis/templates/cross-run-diff.md new file mode 100644 index 0000000000..87e888d1c1 --- /dev/null +++ b/analysis/templates/cross-run-diff.md @@ -0,0 +1,161 @@ + + + +# 🔄 Cross-Run Diff Template — Bayesian Delta Analysis + +> **📌 Template Instructions** — Copy to `analysis/daily/$ARTICLE_DATE/$SUBFOLDER/cross-run-diff.md`. Bayesian delta vs. the previous run of the **same article type**: what changed in data and assessment. See [`per-artifact-methodologies.md §cross-run-diff`](../methodologies/per-artifact-methodologies.md#cross-run-diff). N/A when this is the first ever run of its type. + +> **🎯 Purpose** — Track evolution of political assessment across runs. For each prior-run finding, apply Bayesian update based on new evidence to produce a posterior assessment with an explicit WEP band shift. + +## 🔄 Tradecraft Context + +- **Artifact role** — Compares the current run against the immediately previous run of the **same article type** to identify material changes in evidence, assessment, and confidence. +- **When to use** — Required for every non-initial run. If this is the first ever run for the article type, mark this artifact `N/A` and state that no prior baseline exists. +- **Primary inputs** — Current-run core artifacts, prior-run core artifacts, prior `synthesis-summary.md`, prior `reference-analysis-quality.md`, and any newly surfaced source evidence that materially changes the posterior judgement. +- **Analytical standard** — Use explicit Bayesian-style updating: identify what changed, explain whether each change strengthens, weakens, or leaves unchanged the prior assessment, and record any resulting WEP band movement with concise justification. +- **Output requirement** — Focus only on deltas that matter for editorial judgement, risk framing, or confidence. Do not restate unchanged background unless needed to explain a shift. + +--- + +## 📋 Document Metadata + +| Field | Value | +|-------|-------| +| **Report ID** | `[REQUIRED: XRD-YYYY-MM-DD-runNN]` | +| **Current Run** | `[REQUIRED: {type}-run{N}, YYYY-MM-DD]` | +| **Prior Run** | `[REQUIRED: {type}-run{N-1}, YYYY-MM-DD]` | +| **Days Between Runs** | `[REQUIRED: #]` | +| **Confidence in Delta** | `[REQUIRED: 🟢 / 🟡 / 🔴]` | + +--- + +## 1️⃣ Prior-Run Header + +**Prior run directory** — `[REQUIRED: analysis/daily/YYYY-MM-DD/{type}-run{N-1}/]` +**Prior run date** — `[REQUIRED]` +**Prior run gate status** — `[REQUIRED: ✅ PASSED / ❌ FAILED]` + +**Key findings from prior `synthesis-summary.md`**: + +1. `[REQUIRED: 1-line prior finding + its WEP band]` +2. `[REQUIRED]` +3. `[REQUIRED]` +4. `[REQUIRED]` +5. `[REQUIRED]` + +**Prior scores** (carry forward from prior `reference-analysis-quality.md §Overall judgement`): + +| Metric | Prior value | +|--------|:-----------:| +| Weighted quality score | `[#/10]` | +| Reliability score (MCP) | `[#]` | +| Coverage (core artifacts) | `[#]/23` | +| P0 claims | `[#]` | +| Admiralty A-rated sources | `[#]` | + +--- + +## 2️⃣ New Evidence Since Prior Run + +| Evidence ID | Source | Date | Artifact affected | Admiralty | +|-------------|--------|:----:|-------------------|:---------:| +| `[dok_id / vote ID / URL]` | `[riksdag-regering / scb / IMF / press]` | `[YYYY-MM-DD]` | `[current run artifact]` | `[A1/…]` | + +Minimum — ≥ 3 new evidence rows when days-between ≥ 3; ≥ 1 otherwise. Zero new evidence on a multi-day gap → flag prior run's stability claim. + +--- + +## 3️⃣ Bayesian Update — Key Judgments + +For each prior KJ, apply `posterior ∝ prior × likelihood(new evidence | KJ)` and state the new WEP band. + +### KJ 1 — `[REQUIRED: prior KJ headline]` + +- **Prior WEP** — `[e.g. Likely (55-70%), 6-month horizon]` +- **New evidence** — `[list evidence IDs from §2 that bear on this KJ]` +- **Likelihood assessment** — `[does new evidence confirm / disconfirm / condition?]` +- **Posterior WEP** — `[e.g. Very Likely (70-85%), 6-month horizon]` +- **Shift rationale** — `[2-3 sentences naming the evidence and its Admiralty]` + +(Repeat for each prior KJ.) + +--- + +## 4️⃣ Scenario Probability Shifts + +| Scenario (from prior `scenario-analysis.md`) | Prior P | Posterior P | Δ | Trigger evidence | +|----------------------------------------------|:-------:|:-----------:|:-:|------------------| +| `[REQUIRED]` | `[%]` | `[%]` | `[±%]` | `[evidence ID]` | +| `[REQUIRED]` | `[%]` | `[%]` | `[±%]` | `[evidence ID]` | +| `[REQUIRED]` | `[%]` | `[%]` | `[±%]` | `[evidence ID]` | + +Sum of posteriors must equal 100%. + +--- + +## 5️⃣ Risk & Threat Register Deltas + +| Prior row | Prior L×I | Posterior L×I | Δ | New row? | +|-----------|:---------:|:-------------:|:-:|:--------:| +| `[REQUIRED]` | `[score]` | `[score]` | `[±]` | `[n]` | + +Rows added this run: `[#]`. Rows retired: `[#]` (with justification). + +--- + +## 6️⃣ Stakeholder Position Changes + +| Actor | Prior position | Posterior position | Evidence | +|-------|----------------|--------------------|----------| +| `[REQUIRED: MP + intressent_id / party / myndighet]` | `[support/oppose/ambiguous]` | `[…]` | `[speech ID / vote ID]` | + +--- + +## 7️⃣ Framing Evolution + +Cross-reference the longitudinal frame record in `media-framing-analysis.md`: + +- **Prior dominant frame** — `[REQUIRED]` +- **Current dominant frame** — `[REQUIRED]` +- **Shift driver** — `[data / political / external event]` +- **Counter-frame status** — `[emerging / stable / absorbed]` + +--- + +## 8️⃣ Methodology Drift Check + +Any methodology or template version changes between the two runs? List them and their impact on comparability: + +| Change | Prior version | Current version | Comparability impact | +|--------|:-------------:|:---------------:|----------------------| +| `[REQUIRED]` | `[vX.Y]` | `[vX.Y]` | `[none / rescored / incomparable]` | + +If comparability is `incomparable`, downgrade overall diff confidence to 🔴 and flag in `methodology-reflection.md`. + +--- + +## 9️⃣ Summary Table + +| Dimension | Prior | Current | Δ | Direction | +|-----------|:-----:|:-------:|:-:|:---------:| +| Quality score | `[#/10]` | `[#/10]` | `[±]` | `[↑/↓/=]` | +| KJ count | `[#]` | `[#]` | `[±]` | `[…]` | +| P0 claims | `[#]` | `[#]` | `[±]` | `[…]` | +| Admiralty A-rated | `[#]` | `[#]` | `[±]` | `[…]` | +| Scenario entropy | `[#]` | `[#]` | `[±]` | `[…]` | +| Top risk L×I | `[#]` | `[#]` | `[±]` | `[…]` | + +--- + +## 🔟 Headline Posterior BLUF + +One paragraph (3–5 sentences) summarising the single largest shift in assessment, with WEP band + horizon + Admiralty of the triggering evidence. This paragraph feeds directly into the next `synthesis-summary.md` BLUF. + +--- + +## 🔗 Cross-References + +- Methodology: [`../methodologies/per-artifact-methodologies.md#cross-run-diff`](../methodologies/per-artifact-methodologies.md#cross-run-diff) +- Prior synthesis: `[REQUIRED: link to prior run's synthesis-summary.md]` +- Current synthesis: [`synthesis-summary.md`](synthesis-summary.md) +- SAT canon: [`../methodologies/osint-tradecraft-standards.md`](../methodologies/osint-tradecraft-standards.md) diff --git a/analysis/templates/cross-session-intelligence.md b/analysis/templates/cross-session-intelligence.md new file mode 100644 index 0000000000..4531425894 --- /dev/null +++ b/analysis/templates/cross-session-intelligence.md @@ -0,0 +1,131 @@ + + + +# 🔄 Cross-Session Intelligence Template — Riksmöte Progression + +> **📌 Template Instructions** — Copy to `analysis/daily/$ARTICLE_DATE/$SUBFOLDER/cross-session-intelligence.md`. Used by `weekly-review`, `monthly-review`, and quarterly aggregation runs. See [`per-artifact-methodologies.md §cross-session-intelligence`](../methodologies/per-artifact-methodologies.md#cross-session-intelligence). + +> **🎯 Purpose** — Narrate the progression of parliamentary politics **across Riksdag sessions** within a period (week / month / quarter). Distinct from [`cross-run-diff.md`](cross-run-diff.md) (which is cross-run of the *same* article type on consecutive days). This file is the **session-over-session** story: how the political programme matured, where momentum accelerated, which session was the crystallisation moment. + +## 🔄 Tradecraft Context + +- **Primary analytical question** — How did the political agenda, coalition geometry, and substantive legislative momentum evolve across the sessions in scope, and which sitting functioned as the decisive crystallisation point? +- **Scope discipline** — Compare **sessions within the same review period** (week / month / quarter) and the same riksmöte. This template is for **cross-session progression**, not consecutive-day same-artifact change tracking (that belongs in `cross-run-diff.md`). +- **Required evidence base** — Ground every progression claim in traceable parliamentary evidence: `dok_id`, proposition / betänkande references, vote outcomes, committee handling, party statements, speaker interventions, dated session markers. +- **Analytical method** — Identify the baseline session, track each subsequent acceleration / stall / reversal, separate procedural movement from substantive political change, distinguish noise from durable agenda-setting. +- **Output standard** — Explain *what changed, when it changed, why that session mattered,* and *what the progression implies for the next period*. + +--- + +## 📋 Document Metadata + +| Field | Value | +|-------|-------| +| **Report ID** | `[REQUIRED: CSI-YYYY-MM-DD-runNN]` | +| **Period Covered** | `[REQUIRED: e.g. Week 17 2026, Apr 2026, Q2 2026]` | +| **Sessions in Scope** | `[REQUIRED: ≥ 2 plenary sittings]` | +| **Riksmöte** | `[REQUIRED: e.g. 2025/26]` | +| **Confidence** | `[REQUIRED: 🟢 / 🟡 / 🔴]` | + +--- + +## 1️⃣ Session Overview + +| Session | Dates | Sitting days | Kammaren / utskott fokus | Antagna texter | Voteringar | Tema | +|---------|-------|:------------:|--------------------------|:--------------:|:----------:|------| +| `[REQUIRED]` | `[REQUIRED]` | `[#]` | `[Kammaren / FiU / …]` | `[#]` | `[#]` | `[REQUIRED: 1-line theme]` | +| `[REQUIRED]` | `[REQUIRED]` | `[#]` | `[…]` | `[#]` | `[#]` | `[…]` | +| `[REQUIRED]` | `[REQUIRED]` | `[#]` | `[…]` | `[#]` | `[#]` | `[…]` | + +**Period totals** — `[# sitting days]`, `[# antagna betänkanden / propositioner]`, `[# voteringar]`, `[# anföranden]`, `[# interpellationer]`. + +--- + +## 2️⃣ Progression Diagram + +```mermaid +%%{init: {"theme":"dark","themeVariables":{"primaryColor":"#1565C0","primaryTextColor":"#ffffff","lineColor":"#90CAF9","secondaryColor":"#2E7D32","tertiaryColor":"#FF9800","fontFamily":"Inter, Helvetica, Arial, sans-serif"}}}%% +timeline + title Riksdag progression — period in scope + Session 1 : Key dok / vote : Party position shift (if any) + Session 2 : Key dok / vote : Momentum indicator + Session 3 : Crystallisation moment : Cascade event +``` + +Replace placeholders with actual dok_id / MP / vote references. + +--- + +## 3️⃣ Momentum Narrative + +One page (≥ 15 lines) narrating the arc of the period. Required beats: + +1. **Opening stance** — where positions sat at the start of the period. +2. **Inflection points** — the specific session, debate, or vote that shifted momentum (cite `dok_id` and vote tally). +3. **Peak** — the crystallisation moment (name it). +4. **Trailing indicators** — what stabilised or rebounded after the peak. +5. **Close** — where positions stand at period end. + +Every named actor must come with role + `intressent_id` (for MPs) or myndighet name. + +--- + +## 4️⃣ Cross-Session Cluster Map + +Identify policy clusters that span ≥ 2 sessions in the period: + +| Cluster | Sessions touched | Key dok_ids | Lead MPs / parties | Stage progression | +|---------|:----------------:|-------------|--------------------|-------------------| +| `[REQUIRED: e.g. klimat / försvar / sjukvård]` | `[list]` | `[dok_ids]` | `[MPs / parties]` | `[motion → utskott → kammaren → beslut]` | + +--- + +## 5️⃣ Vote-Discipline Time-Series + +| Party | Session 1 discipline % | Session 2 % | Session 3 % | Δ | +|-------|:----------------------:|:-----------:|:-----------:|:-:| +| S | `[%]` | `[%]` | `[%]` | `[±]` | +| M | `[%]` | `[%]` | `[%]` | `[±]` | +| SD | `[%]` | `[%]` | `[%]` | `[±]` | +| V | `[%]` | `[%]` | `[%]` | `[±]` | +| MP | `[%]` | `[%]` | `[%]` | `[±]` | +| C | `[%]` | `[%]` | `[%]` | `[±]` | +| L | `[%]` | `[%]` | `[%]` | `[±]` | +| KD | `[%]` | `[%]` | `[%]` | `[±]` | + +Discipline definition — % of party MPs voting with majority of their party caucus. + +--- + +## 6️⃣ Coalition Formation Events + +| Session | Coalition tried | Issue | Outcome | Pivotal MPs | +|---------|-----------------|-------|---------|-------------| +| `[REQUIRED]` | `[e.g. M+KD+L+SD]` | `[dok_id + 1-line]` | `[won / lost / abstained-block]` | `[MPs + intressent_id]` | + +--- + +## 7️⃣ Momentum Indicators (for next period's forward-indicators.md) + +- **Accelerating issue** — `[REQUIRED]` (cite sessions) +- **Decelerating issue** — `[REQUIRED]` +- **Dormant-but-primed** — `[REQUIRED]` (e.g. a motion withdrawn but refileable) +- **External trigger watched** — `[REQUIRED]` (e.g. EU council vote, Riksbank decision) + +--- + +## 8️⃣ Period Quality Check + +- All sessions in `session-baseline.md` covered — `[✅/❌]`. +- ≥ 2 independent data sources per session — `[✅/❌]`. +- Party-neutrality arithmetic across sessions — `[✅/❌]` (see `reference-analysis-quality §4`). +- Narrative does not favour any party — `[✅/❌]` (self-audit in `methodology-reflection.md`). + +--- + +## 🔗 Cross-References + +- Methodology: [`../methodologies/per-artifact-methodologies.md#cross-session-intelligence`](../methodologies/per-artifact-methodologies.md#cross-session-intelligence) +- Baseline: [`session-baseline.md`](session-baseline.md) +- Prior aggregation runs: `[REQUIRED: list siblings in analysis/daily/…]` +- Data source: `get_calendar_events`, `search_voteringar`, `search_dokument`, `search_anforanden` diff --git a/analysis/templates/mcp-reliability-audit.md b/analysis/templates/mcp-reliability-audit.md new file mode 100644 index 0000000000..ece0742133 --- /dev/null +++ b/analysis/templates/mcp-reliability-audit.md @@ -0,0 +1,164 @@ + + + +# 🛰️ MCP Reliability Audit Template — Endpoint Health & Data Freshness + +> **📌 Template Instructions** — Copy to `analysis/daily/$ARTICLE_DATE/$SUBFOLDER/mcp-reliability-audit.md`. Endpoint-by-endpoint record of MCP server availability and data freshness during the run. See [`per-artifact-methodologies.md §mcp-reliability-audit`](../methodologies/per-artifact-methodologies.md#mcp-reliability-audit). + +> **🎯 Purpose** — Comprehensive MCP server health assessment. Tracks which endpoints succeeded, which failed, which were degraded, and what workarounds were applied. First-class operational artifact — if a downstream reader doubts an analytical claim, this is the file that proves the underlying data call actually returned fresh truth. + +## 🔄 Tradecraft Context + +- **Why this artifact exists** — Documents MCP/server reliability during the run so analytical conclusions can be traced back to verified data access; distinguishes fresh primary-source retrieval, degraded retrieval, and fallback/manual substitution; creates an auditable record of outages, latency, stale data, and workaround decisions that may affect confidence. +- **How to use during the run** — Update immediately after meaningful MCP/API access attempts, not retrospectively from memory. Record both successes and failures (partial responses, stale payloads, timeout behaviour, retries). When fallbacks are used, name the fallback source and link the affected downstream artifacts. +- **Minimum tradecraft standard** — Every endpoint relied upon for analysis must appear here with enough detail for another operator to reproduce or challenge the evidence chain. Reliability judgements must be evidence-based (timestamps, error modes, freshness signals, operational impact). If significant degradation occurred, downstream analysis must explicitly reduce confidence or scope claims accordingly. + +--- + +## 📋 Document Metadata + +| Field | Value | +|-------|-------| +| **Report ID** | `[REQUIRED: MCP-YYYY-MM-DD-runNN]` | +| **Run Date** | `[REQUIRED: YYYY-MM-DD]` | +| **Endpoints Attempted** | `[REQUIRED: #]` | +| **Endpoints Succeeded** | `[REQUIRED: #]` | +| **Reliability Score (0-100)** | `[REQUIRED: (succeeded / attempted) × 100]` | +| **Overall Status** | `[REQUIRED: ✅ Full / ⚠️ Degraded / 🔴 Unavailable]` | +| **Fallback Activated** | `[REQUIRED: yes / no — if yes, which]` | + +--- + +## 1️⃣ Endpoint Scoreboard + +```mermaid +%%{init: {"theme":"dark","themeVariables":{"primaryColor":"#1565C0","primaryTextColor":"#ffffff","lineColor":"#90CAF9","secondaryColor":"#2E7D32","tertiaryColor":"#FF9800","fontFamily":"Inter, Helvetica, Arial, sans-serif"}}}%% +flowchart LR + RR[riksdag-regering] --> RR1[search_ledamoter] + RR --> RR2[search_dokument] + RR --> RR3[search_anforanden] + RR --> RR4[search_voteringar] + RR --> RR5[get_calendar_events] + SCB[scb] --> SCB1[table query] + WB[world-bank] --> WB1[get-social-data] + WB --> WB2[get-health-data] + IMF[IMF] --> IMF1[scripts/imf-fetch.ts] + + classDef ok fill:#2E7D32,color:#ffffff + classDef deg fill:#FF9800,color:#000000 + classDef fail fill:#D32F2F,color:#ffffff +``` + +Annotate each leaf node ✅ / ⚠️ / ❌ based on the table below. + +--- + +## 2️⃣ `riksdag-regering` MCP (HTTP — primary) + +| Tool | Calls | Succeeded | Failed | Mean latency | Max latency | Notes | +|------|:-----:|:---------:|:------:|:------------:|:-----------:|-------| +| `search_ledamoter` | `[#]` | `[#]` | `[#]` | `[ms]` | `[ms]` | — | +| `get_ledamot` | `[#]` | `[#]` | `[#]` | `[ms]` | `[ms]` | — | +| `search_dokument` | `[#]` | `[#]` | `[#]` | `[ms]` | `[ms]` | — | +| `get_dokument` | `[#]` | `[#]` | `[#]` | `[ms]` | `[ms]` | — | +| `search_anforanden` | `[#]` | `[#]` | `[#]` | `[ms]` | `[ms]` | — | +| `search_voteringar` | `[#]` | `[#]` | `[#]` | `[ms]` | `[ms]` | — | +| `get_voteringar` | `[#]` | `[#]` | `[#]` | `[ms]` | `[ms]` | — | +| `get_calendar_events` | `[#]` | `[#]` | `[#]` | `[ms]` | `[ms]` | — | +| `get_betankanden` | `[#]` | `[#]` | `[#]` | `[ms]` | `[ms]` | — | +| `get_propositioner` | `[#]` | `[#]` | `[#]` | `[ms]` | `[ms]` | — | +| `get_motioner` | `[#]` | `[#]` | `[#]` | `[ms]` | `[ms]` | — | +| `get_fragor` | `[#]` | `[#]` | `[#]` | `[ms]` | `[ms]` | — | +| `get_interpellationer` | `[#]` | `[#]` | `[#]` | `[ms]` | `[ms]` | — | +| `search_regering` | `[#]` | `[#]` | `[#]` | `[ms]` | `[ms]` | — | +| `get_regering_document` | `[#]` | `[#]` | `[#]` | `[ms]` | `[ms]` | — | + +**Data freshness** — latest `dok_id` timestamp observed: `[REQUIRED: YYYY-MM-DDTHH:MM:SSZ]`. Expected lag from publication ≤ 60 min — `[✅/⚠️/❌]`. + +--- + +## 3️⃣ `scb` MCP (PxWeb v2 — local container) + +| Call | Table | Succeeded | Latency | Notes | +|------|-------|:---------:|:-------:|-------| +| `[REQUIRED]` | `[table ID]` | `[✅/❌]` | `[ms]` | `[…]` | + +--- + +## 4️⃣ `world-bank` MCP (local container) + +| Tool / code | Indicator | Country | Year range | Succeeded | Notes | +|-------------|-----------|:-------:|:----------:|:---------:|-------| +| `get-social-data` | `[SP.POP.TOTL]` | `SWE` | `[2019-2024]` | `[✅/❌]` | — | + +Wave-2 reminder — economic codes should **not** be fetched here; use IMF. + +--- + +## 5️⃣ IMF (`tsx scripts/imf-fetch.ts` — CLI, no MCP) + +| Invocation | Dataflow / series | Country | Vintage | Succeeded | Notes | +|------------|-------------------|:-------:|:-------:|:---------:|-------| +| `[REQUIRED]` | `WEO/NGDP_RPCH` | `SWE` | `WEO April 2026` | `[✅/❌]` | — | + +--- + +## 6️⃣ `github` MCP (Insiders HTTP — used only in module 07) + +| Call | Result | Notes | +|------|:------:|-------| +| `assign_copilot_to_issue` | `[✅/❌]` | — | +| `create_pull_request_with_copilot` | `[✅/❌]` | — | + +--- + +## 7️⃣ Failure Analysis + +For each failed or degraded call, document: + +### Incident 1 — `[endpoint name]` + +**Time** — `[YYYY-MM-DDTHH:MM:SSZ]` +**Error** — `[HTTP status / timeout / parse error / empty payload]` +**Retry attempts** — `[#]` +**Workaround** — `[cache / SKIP_ANALYSIS / alternative MCP / manual]` +**Impact on analysis** — `[which artifact, which claim, which confidence downgrade]` +**Follow-up** — `[issue link or "none, transient"]` + +(Repeat for each incident.) + +--- + +## 8️⃣ Cache Usage + +| Artifact | Used cache? | Cache age | Reason | +|----------|:-----------:|:---------:|--------| +| `[REQUIRED]` | `[y/n]` | `[h]` | `[live MCP down / rate limit / cold start]` | + +Cache policy — see [`.github/prompts/03-data-download.md §Pre-flight`](../../.github/prompts/03-data-download.md). Any Pass-2 run using cache age > 24 h must downgrade affected artifacts to 🟡 confidence. + +--- + +## 9️⃣ Known Issues Carried Forward + +- `[REQUIRED]` 1-line description + tracking ID / URL / "none". + +--- + +## 🔟 Reliability Trend (rolling 7-run window) + +| Run | Date | Reliability Score | Notes | +|-----|------|:-----------------:|-------| +| `[run-7]` | `[date]` | `[#]` | — | +| … | … | … | — | +| **This run** | `[date]` | `[#]` | — | + +Trend diagnosis — `[improving / stable / degrading]`. + +--- + +## 🔗 Cross-References + +- Methodology: [`../methodologies/per-artifact-methodologies.md#mcp-reliability-audit`](../methodologies/per-artifact-methodologies.md#mcp-reliability-audit) +- MCP access: [`../../.github/prompts/02-mcp-access.md`](../../.github/prompts/02-mcp-access.md) +- MCP configuration: [`../../.github/copilot-mcp.json`](../../.github/copilot-mcp.json) diff --git a/analysis/templates/pestle-analysis.md b/analysis/templates/pestle-analysis.md new file mode 100644 index 0000000000..f48faf4903 --- /dev/null +++ b/analysis/templates/pestle-analysis.md @@ -0,0 +1,144 @@ + + + +# PESTLE Analysis — {{ARTICLE_TYPE}} · {{ARTICLE_DATE}} + +> **Analytical supplementary (optional).** Produce when a bill, scandal, budget cycle, election-adjacent event, or external shock crosses **two or more** PESTLE dimensions. Pairs with `swot-analysis.md` (external factors → Opportunities/Threats), `risk-assessment.md` (External dimension rows), and `scenario-analysis.md` (driver framework). +> +> **Methodology** → [`analysis/methodologies/analytical-supplementary-methodology.md § PESTLE`](../methodologies/analytical-supplementary-methodology.md#pestle). +> **Not counted in the 23 core artifacts.** Non-blocking in `05-analysis-gate.md`. + +## 🔄 Tradecraft Context + +- **Artifact class** — Analytical supplementary (optional, never blocking) +- **Use when** — A bill, scandal, budget cycle, election-adjacent event, or external shock crosses **two or more** PESTLE dimensions +- **Pairs with** — `swot-analysis.md` (external factors → Opportunities/Threats), `risk-assessment.md` (External dimension rows), and `scenario-analysis.md` (driver framework) +- **Methodology** — [`analytical-supplementary-methodology.md § PESTLE`](../methodologies/analytical-supplementary-methodology.md#pestle) +- **Workflow status** — Not counted in the 23 core artifacts; non-blocking in [`05-analysis-gate.md`](../../.github/prompts/05-analysis-gate.md) + +## 📋 Scope declaration + +- **Trigger event / decision** — [dok_id(s), bill name, or event that prompted the scan] +- **Time horizon** — [short ≤ 6 m / medium 6–24 m / long 2–10 y] +- **Unit of analysis** — [policy domain / party / coalition / institution] +- **Primary sources consulted** — [riksdagen.se, regeringen.se, scb.se, IMF WEO vintage, World Bank indicator codes, myndigheter] + +--- + +## 🏛️ Political (P) + +| Factor | Current state | Direction (↑/↓/→) | Evidence | Impact on scoped entity | WEP† | +|--------|---------------|-------------------|----------|------------------------|------| +| Government composition & majority stability | | | riksdagen.se / vote dok_id | | | +| Opposition positioning | | | motion dok_id × n | | | +| Coalition arithmetic shift | | | voteringar dok_id | | | +| Parliamentary committee balance | | | betänkande dok_id | | | +| EU / NATO / Nordic council pressure | | | regeringen.se / COM doc | | | + +**Key judgement (P)** — [1–3 sentences, WEP-tagged] + +--- + +## 💰 Economic (E) + +> **Authoritative source → IMF** ([`imf-indicator-mapping.md`](../methodologies/imf-indicator-mapping.md)). World Bank only for non-economic residue ([`worldbank-indicator-mapping.md`](../methodologies/worldbank-indicator-mapping.md)). + +| Factor | Latest value | Forecast vintage | Delta vs prior vintage | Implication | WEP† | +|--------|--------------|------------------|-----------------------|-------------|------| +| GDP growth (IMF WEO NGDP_RPCH) | | | | | | +| Inflation CPI (IMF WEO PCPIPCH) | | | | | | +| Unemployment (IMF WEO LUR) | | | | | | +| Fiscal balance % GDP (IMF WEO GGXCNL_NGDP) | | | | | | +| Current account % GDP (IMF WEO BCA_NGDPD) | | | | | | +| Policy-rate path (Riksbank) | | | | | | + +**Key judgement (E)** — [WEP-tagged, link to coalition-mathematics fiscal capacity] + +--- + +## 👥 Social (S) + +| Factor | SCB / WB code | Latest value | Trend (5 y) | Political salience (1–5) | Evidence | +|--------|---------------|--------------|-------------|-------------------------|----------| +| Population & demographic shift | SCB BE0101 / WB SP.POP.TOTL | | | | | +| Urban / rural divergence | SCB BE0101 | | | | | +| Migration & integration | SCB BE0101J | | | | | +| Income inequality (Gini) | WB SI.POV.GINI | | | | | +| Trust in institutions | SOM Institute survey | | | | | +| Labour market participation | SCB AM0401 | | | | | + +**Key judgement (S)** — [voter-segmentation tie-in] + +--- + +## 🔬 Technological (T) + +| Factor | State | Rate of change | Policy response gap | Evidence | WEP† | +|--------|-------|----------------|--------------------|----------|------| +| AI governance (EU AI Act transposition) | | | | regeringen.se prop | | +| Cybersecurity / MSB posture | | | | MSB rapport | | +| Digital public infrastructure (eID, 1177) | | | | myndigheter | | +| Defence-tech / dual-use | | | | FMV, FOI | | +| R&D intensity (WB GB.XPD.RSDV.GD.ZS) | | | | WB | | + +**Key judgement (T)** — [threat-analysis kill-chain / implementation-feasibility tie-in] + +--- + +## 🌿 Legal (L) + +| Factor | Instrument | Status | Binding on Sweden | Compliance gap | Evidence | +|--------|-----------|--------|-------------------|----------------|----------| +| Primary legislation in flight | prop. / motion | | | | dok_id | +| EU regulation / directive | COM / CELEX | | yes/no | | EUR-Lex | +| Constitutional (grundlag) | | | | | KU-betänkande | +| Judicial review / JO granskning | | | | | JO-beslut | +| International treaty | | | | | UD-dok | + +**Key judgement (L)** — [classification-results legal dimension tie-in] + +--- + +## 🌍 Environmental (E) + +| Factor | Indicator / source | Latest value | Trajectory vs target | Political leverage | Evidence | +|--------|-------------------|--------------|----------------------|-------------------|----------| +| Climate target (net-zero 2045) | Naturvårdsverket | | | | | +| Energy mix & security | SvK / EI | | | | | +| Biodiversity / water | SLU / SMHI | | | | | +| CO₂ emissions per capita (WB EN.ATM.CO2E.PC) | WB | | | | | +| EU ETS / CBAM exposure | EUR-Lex | | | | | + +**Key judgement (Env)** — [forward-indicators / risk-assessment external tie-in] + +--- + +## 🔀 Cross-dimension interactions (≥ 3) + +| Interaction | Direction | Magnitude (1–5) | Evidence | Feeds artifact | +|------------|-----------|-----------------|----------|----------------| +| e.g. E × S | e.g. inflation ↑ → trust in government ↓ | | | swot Threats + risk External | +| | | | | | +| | | | | | + +## 🎯 PIR feedback + +| PIR | Addressed by dimension(s) | Gap | Action | +|-----|--------------------------|-----|--------| +| PIR-1 | | | | + +--- + +## 🔗 Cross-links + +- [`swot-analysis.md`](swot-analysis.md) — external Opportunities/Threats rows cite rows here +- [`risk-assessment.md`](risk-assessment.md) — External dimension uses PESTLE P/E/Env +- [`scenario-analysis.md`](scenario-analysis.md) — drivers matrix consumes PESTLE columns +- [`forward-indicators.md`](forward-indicators.md) — dated indicators per dimension +- [`intelligence-assessment.md`](intelligence-assessment.md) — Key Judgements cite PESTLE cells + +† WEP = [Words-of-Estimative-Probability](../methodologies/osint-tradecraft-standards.md#wep) confidence band. + +--- + +**Template version:** v1.0 · **Last updated:** 2026-04-23 diff --git a/analysis/templates/political-stride-assessment.md b/analysis/templates/political-stride-assessment.md new file mode 100644 index 0000000000..5cc2c4b146 --- /dev/null +++ b/analysis/templates/political-stride-assessment.md @@ -0,0 +1,138 @@ + + + +# Political STRIDE Assessment — {{ARTICLE_TYPE}} · {{ARTICLE_DATE}} + +> **Analytical supplementary (optional).** STRIDE adapted to **political, electoral and institutional** threat surfaces. Produce for election-adjacent events, integrity incidents, disinformation spikes, critical-infrastructure votes, or any scoped entity where the adversary model matters. Pairs with `threat-analysis.md` (kill chain / MITRE mapping) and `risk-assessment.md` (Institutional + Corruption dimensions). +> +> **Methodology** → [`analysis/methodologies/analytical-supplementary-methodology.md § STRIDE-political`](../methodologies/analytical-supplementary-methodology.md#stride-political). +> **Not counted in the 23 core artifacts.** Non-blocking in `05-analysis-gate.md`. + +## 🔄 Tradecraft Context + +- **Artifact class** — Analytical supplementary (optional, never blocking) +- **Use when** — Election-adjacent events, integrity incidents, disinformation spikes, critical-infrastructure votes, or any scoped entity where the adversary model matters +- **Pairs with** — `threat-analysis.md` (kill chain / MITRE mapping), `risk-assessment.md` (Institutional + Corruption dimensions) +- **Methodology** — [`analytical-supplementary-methodology.md § STRIDE-political`](../methodologies/analytical-supplementary-methodology.md#stride-political) +- **Workflow status** — Not counted in the 23 core artifacts; non-blocking in [`05-analysis-gate.md`](../../.github/prompts/05-analysis-gate.md) + +## 📋 Scope declaration + +- **Entity under assessment** — [party / coalition / Riksdag committee / government agency / electoral system component] +- **Trust boundary** — [define: voter ↔ ballot, MP ↔ vote-casting system, minister ↔ decision record, citizen ↔ FOI channel] +- **Time horizon** — [pre-election / governing cycle / post-event] +- **Adversary model** — [nation-state / domestic actor / insider / organised crime / bad-faith opposition] + +--- + +## 🎭 STRIDE × Political dimensions + +### S — Spoofing of political identity + +| Vector | Target | Likelihood (1–5) | Impact (1–5) | Mitigation (existing) | Residual risk | Evidence | +|--------|--------|------------------|--------------|----------------------|--------------|----------| +| Impersonation of MP on social media | | | | platform-integrity | | | +| Fake press release (domain clone) | | | | HSTS + brand policing | | | +| AI-generated voice of party leader | | | | detection + rapid rebuttal | | | +| Ghost-candidate registration | | | | Valmyndigheten controls | | | + +### T — Tampering with political evidence / process + +| Vector | Target | Likelihood | Impact | Mitigation | Residual | Evidence | +|--------|--------|-----------|--------|-----------|---------|----------| +| Altering Riksdag vote record | voteringar API | | | RA + audit log | | | +| Editing betänkande draft | committee staff | | | version control | | | +| Ballot tampering | valdag | | | manual paper-trail | | | +| Voter-roll modification | Skatteverket | | | PuL + audit | | | + +### R — Repudiation of political decision + +| Vector | Example | Likelihood | Impact | Mitigation | Residual | Evidence | +|--------|---------|-----------|--------|-----------|---------|----------| +| MP denies registered vote | | | | protokoll H-nummer | | | +| Minister denies written pledge | | | | protokoll + digital dok | | | +| Party denies campaign commitment | | | | manifesto archive | | | +| Agency denies FOI response | | | | offentlighetsprincipen | | | + +### I — Information disclosure (political secrecy violations) + +| Vector | Data class | Likelihood | Impact | Mitigation | Residual | Evidence | +|--------|-----------|-----------|--------|-----------|---------|----------| +| Leaked draft legislation | | | | sekretess-klass | | | +| Unauthorised committee minutes | | | | KU granskning | | | +| Campaign donor list leak | | | | transparency register | | | +| Intelligence briefing exposure | | | | MUST / Säpo controls | | | + +### D — Denial of democratic function + +| Vector | Target | Likelihood | Impact | Mitigation | Residual | Evidence | +|--------|--------|-----------|--------|-----------|---------|----------| +| DDoS on voting-day infra | val.se | | | CDN + MSB | | | +| Filibuster beyond norm | kammaren | | | talmannen | | | +| Parliamentary paralysis (no-confidence loop) | | | | Regeringsformen 6:5 | | | +| Disinfo saturation crowd-out | media space | | | fact-check orgs | | | + +### E — Elevation of political privilege + +| Vector | Example | Likelihood | Impact | Mitigation | Residual | Evidence | +|--------|---------|-----------|--------|-----------|---------|----------| +| Proxy-voting abuse | kammaren | | | närvaro-kontroll | | | +| Committee-chair unilateral action | utskott | | | reglemente | | | +| Minister bypassing remiss | regeringen | | | lagrådet | | | +| Capture of regulator (myndighets-styrning) | myndighet | | | instruktion + JO | | | + +--- + +## 🌀 Attack trees (≥ 2) + +```mermaid +%%{init: {'theme':'dark'}}%% +graph TD + Goal[Goal: e.g. Discredit party X before election] + Goal --> S1[Spoof] --> S1a[Deepfake leader] + Goal --> T1[Tamper] --> T1a[Edit Wikipedia] + Goal --> I1[Info-disclose] --> I1a[Leak internal memo] + style Goal fill:#ff006e,color:#fff + style S1 fill:#00d9ff,color:#000 + style T1 fill:#ffbe0b,color:#000 + style I1 fill:#00d9ff,color:#000 +``` + +## 🔗 MITRE ATT&CK style TTP mapping (political adaptation) + +| Tactic | Technique (political adaptation) | Observed / assessed | Cross-link | +|--------|----------------------------------|--------------------|------------| +| Reconnaissance | OSINT profiling of MPs | | threat-analysis.md | +| Resource development | Domain typosquat | | | +| Initial access | Social-engineering staffer | | | +| Execution | Publish fabricated document | | | +| Persistence | Infiltrate party youth wing | | | +| Defence evasion | Cut-out accounts | | | +| Collection | Scrape Riksdag email leak | | | +| Exfiltration | Dark-web posting | | | +| Impact | Drop vote share / coalition collapse | | | + +## 🎯 PIR feedback + +| PIR | Covered dimension(s) | Gap | Action | +|-----|--------------------|-----|--------| +| PIR-1 | | | | + +## 🛡 Recommended controls (mapped to Hack23 ISMS + NIST CSF 2.0) + +| Control | Dimension(s) | Framework map | Owner | Priority | +|---------|--------------|---------------|-------|----------| +| | | ISO 27001:A.5.x · NIST PR.AC | | | + +--- + +## 🔗 Cross-links + +- [`threat-analysis.md`](threat-analysis.md) — deeper kill-chain + MITRE canonical mapping +- [`risk-assessment.md`](risk-assessment.md) — Institutional + Corruption dimensions +- [`stakeholder-impact.md`](stakeholder-impact.md) — adversary / defender actor mapping +- [`scenario-analysis.md`](scenario-analysis.md) — worst-case threat realisation path + +--- + +**Template version:** v1.0 · **Last updated:** 2026-04-23 diff --git a/analysis/templates/quantitative-swot.md b/analysis/templates/quantitative-swot.md new file mode 100644 index 0000000000..8ac691cc4b --- /dev/null +++ b/analysis/templates/quantitative-swot.md @@ -0,0 +1,138 @@ + + + +# Quantitative SWOT — {{ARTICLE_TYPE}} · {{ARTICLE_DATE}} + +> **Analytical supplementary (optional).** Numerical extension of [`swot-analysis.md`](swot-analysis.md). Produce when decision-makers need a scored ranking (e.g., coalition negotiation prep, party strategy memo, election forecasting). Applies **DIW weighting × confidence × leverage** to every SWOT item. Pairs with `significance-scoring.md` (same weight vector) and `executive-brief.md` (top-3 surfacing). +> +> **Methodology** → [`analysis/methodologies/analytical-supplementary-methodology.md § Quantitative SWOT`](../methodologies/analytical-supplementary-methodology.md#quantitative-swot). +> **Not counted in the 23 core artifacts.** Non-blocking in `05-analysis-gate.md`. + +## 🔄 Tradecraft Context + +- **Artifact class** — Analytical supplementary (optional, never blocking) +- **Use when** — Decision-makers need a numerically ranked SWOT (coalition negotiation prep, party strategy memo, election forecasting) +- **Pairs with** — `swot-analysis.md` (qualitative source), `significance-scoring.md` (shared DIW weight vector), `executive-brief.md` (top-3 surfacing) +- **Methodology** — [`analytical-supplementary-methodology.md § Quantitative SWOT`](../methodologies/analytical-supplementary-methodology.md#quantitative-swot) +- **Workflow status** — Not counted in the 23 core artifacts; non-blocking in [`05-analysis-gate.md`](../../.github/prompts/05-analysis-gate.md) + +## 📋 Scope & scoring rubric + +- **Entity** — [party / coalition / bill / policy domain] +- **Perspective** — [party-internal / opposition / national-interest / voter-segment] +- **Weight vector (sums to 1.0)** — mirror `significance-scoring.md`: + - `w_D` Decision relevance (0.35) · `w_I` Information novelty (0.25) · `w_W` Wave/momentum (0.20) · `w_S` Stakeholder reach (0.20) +- **Score scales** — impact `I ∈ [-5, +5]` (signed), confidence `C ∈ [0.2, 0.95]` WEP-mapped, leverage `L ∈ [0.1, 1.0]` (how much entity can influence it), time-decay `T ∈ [0.3, 1.0]` (decays over horizon). + +**Composite score** — for each item: + +``` +score = I × C × L × T × (w_D·dRel + w_I·iNov + w_W·wMom + w_S·sReach) +``` + +where `dRel, iNov, wMom, sReach ∈ [0, 1]`. + +Strengths & Opportunities use `+I`. Weaknesses & Threats use `-I` (resulting score is negative). + +--- + +## 💪 Strengths (scored) + +| ID | Item | Evidence (dok_id / URL) | I | C | L | T | dRel | iNov | wMom | sReach | Score | WEP† | +|----|------|------------------------|---|---|---|---|------|------|------|--------|-------|------| +| S1 | | | +4 | 0.85 | 0.70 | 0.9 | 0.9 | 0.5 | 0.6 | 0.8 | | Very likely | +| S2 | | | | | | | | | | | | | +| S3 | | | | | | | | | | | | | + +**Strength total (Σ)** — `+X.XX` + +## ⚠️ Weaknesses (scored) + +| ID | Item | Evidence | I (negative) | C | L | T | dRel | iNov | wMom | sReach | Score | WEP† | +|----|------|----------|--------------|---|---|---|------|------|------|--------|-------|------| +| W1 | | | -3 | 0.85 | 0.60 | 0.7 | 0.9 | 0.4 | 0.5 | 0.7 | | Very likely | +| W2 | | | | | | | | | | | | | +| W3 | | | | | | | | | | | | | + +**Weakness total (Σ)** — `-X.XX` + +## 🌱 Opportunities (scored) + +| ID | Item | Evidence | I | C | L | T | dRel | iNov | wMom | sReach | Score | WEP† | +|----|------|----------|---|---|---|---|------|------|------|--------|-------|------| +| O1 | | | | | | | | | | | | | +| O2 | | | | | | | | | | | | | +| O3 | | | | | | | | | | | | | + +**Opportunity total (Σ)** — `+X.XX` + +## 🌩 Threats (scored) + +| ID | Item | Evidence | I (negative) | C | L | T | dRel | iNov | wMom | sReach | Score | WEP† | +|----|------|----------|--------------|---|---|---|------|------|------|--------|-------|------| +| T1 | | | | | | | | | | | | | +| T2 | | | | | | | | | | | | | +| T3 | | | | | | | | | | | | | + +**Threat total (Σ)** — `-X.XX` + +--- + +## 🎯 Composite SWOT position + +| Metric | Value | Interpretation | +|--------|-------|----------------| +| Net position `(Σ S + Σ O) + (Σ W + Σ T)` | | `> 0` favourable, `< 0` unfavourable | +| SW balance `(Σ S) / (Σ S + |Σ W|)` | | `> 0.6` internally strong | +| OT balance `(Σ O) / (Σ O + |Σ T|)` | | `> 0.6` externally favourable | +| High-confidence portion (items with `C ≥ 0.80`) | | share of total |low-confidence dominance is a red flag | + +## 📊 TOWS matrix (top actionable 2 × 2) + +| | Opportunities | Threats | +|-|---------------|---------| +| **Strengths** | SO — leverage actions | ST — defensive actions | +| **Weaknesses** | WO — shoring-up actions | WT — retreat / hedge actions | + +Populate ≥ 1 action per quadrant, each citing the numeric IDs above. + +## 📈 Sensitivity analysis + +| Parameter flipped | New net position | Δ vs baseline | Robustness note | +|-------------------|------------------|---------------|-----------------| +| Worst-case `C` on top Threat | | | | +| `T = 1.0` (full horizon) on Strengths | | | | +| Weight set `w_D = 0.5` (decision-dominant) | | | | + +## 🧭 Mermaid ranked diagram + +```mermaid +%%{init: {'theme':'dark'}}%% +xychart-beta + title "Quantitative SWOT — composite score" + x-axis ["S1", "S2", "S3", "O1", "O2", "W1", "W2", "T1", "T2"] + y-axis "Score" -5 --> 5 + bar [3.2, 2.1, 1.8, 2.5, 1.4, -2.0, -1.2, -2.8, -1.9] +``` + +## 🎯 PIR feedback + +| PIR | Top-3 items addressing | Gap | Action | +|-----|-----------------------|-----|--------| +| PIR-1 | | | | + +--- + +## 🔗 Cross-links + +- [`swot-analysis.md`](swot-analysis.md) — narrative SWOT; this file adds quantitative spine +- [`significance-scoring.md`](significance-scoring.md) — shares weight vector +- [`executive-brief.md`](executive-brief.md) — surfaces top-3 scored items +- [`risk-assessment.md`](risk-assessment.md) — Threats rows ≥ `|score|` threshold become risk-register entries +- [`scenario-analysis.md`](scenario-analysis.md) — scenarios tied to WT / SO quadrants + +† WEP = [Words-of-Estimative-Probability](../methodologies/osint-tradecraft-standards.md#wep) confidence band. + +--- + +**Template version:** v1.0 · **Last updated:** 2026-04-23 diff --git a/analysis/templates/reference-analysis-quality.md b/analysis/templates/reference-analysis-quality.md new file mode 100644 index 0000000000..7a44942058 --- /dev/null +++ b/analysis/templates/reference-analysis-quality.md @@ -0,0 +1,165 @@ + + + +# 📏 Reference Analysis Quality Template — Benchmark Self-Score + +> **📌 Template Instructions** — Copy to `analysis/daily/$ARTICLE_DATE/$SUBFOLDER/reference-analysis-quality.md`. Self-score the current run against the reference benchmark (see `referenceBenchmark` in [`reference-quality-thresholds.json`](../methodologies/reference-quality-thresholds.json)). See [`per-artifact-methodologies.md §reference-analysis-quality`](../methodologies/per-artifact-methodologies.md#reference-analysis-quality). + +> **🎯 Purpose** — Mandatory quality audit (for `comprehensive` / Tier-C runs; recommended otherwise). Compares current run to the gold-standard reference and emits a concrete Pass-2 action list. This is the single artifact that operationalises the AI-FIRST principle. + +## 🔄 Tradecraft Context + +- **Workflow stage** — Complete after Pass 1 artifact production and before final article drafting or Pass 2 sign-off. +- **Primary use** — Measure the current run against the repository reference benchmark and identify concrete improvement work required to meet AI-FIRST quality expectations. +- **Analyst task** — Use evidence from the current run only; compare depth, completeness, specificity, cross-referencing, and actionability against the benchmark defined in [`reference-quality-thresholds.json`](../methodologies/reference-quality-thresholds.json). +- **Output requirement** — Record clear benchmark gaps, explain why they matter, and produce a prioritised Pass-2 remediation list that can be executed immediately. +- **Quality rule** — Do not mark the run as benchmark-met unless the artifact set demonstrates comparable analytical depth and operational usefulness to the reference run. + +--- + +## 📋 Document Metadata + +| Field | Value | +|-------|-------| +| **Report ID** | `[REQUIRED: RAQ-YYYY-MM-DD-runNN]` | +| **Current Run** | `[REQUIRED: {type}-run{N}, YYYY-MM-DD]` | +| **Reference Benchmark** | `[REQUIRED: e.g. breaking-runXXX, YYYY-MM-DD — from thresholds JSON]` | +| **Pass Number** | `[REQUIRED: Pass 1 / Pass 2]` | +| **Overall Benchmark Met** | `[REQUIRED: ✅ Yes / ⚠️ Partial / ❌ No]` | +| **Confidence** | `[REQUIRED: 🟢 / 🟡 / 🔴]` | + +--- + +## 1️⃣ Per-Artifact Line Count vs. Depth Floor + +| Artifact (run-relative) | Floor | Actual | Δ | Status | +|-------------------------|:-----:|:------:|:-:|:------:| +| `README.md` | `[#]` | `[#]` | `[±#]` | `[✅/⚠️/❌]` | +| `executive-brief.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `synthesis-summary.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `significance-scoring.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `classification-results.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `swot-analysis.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `risk-assessment.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `threat-analysis.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `stakeholder-perspectives.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `cross-reference-map.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `data-download-manifest.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `scenario-analysis.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `comparative-international.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `devils-advocate.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `intelligence-assessment.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `methodology-reflection.md` ⭐ | `[#]` | `[#]` | `[±#]` | `[…]` | +| `election-2026-analysis.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `voter-segmentation.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `coalition-mathematics.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `historical-parallels.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `media-framing-analysis.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `implementation-feasibility.md` | `[#]` | `[#]` | `[±#]` | `[…]` | +| `forward-indicators.md` | `[#]` | `[#]` | `[±#]` | `[…]` | + +**Core coverage** — `[#]` / 23 at or above floor (target: 23/23). Authoritative contract: [`artifact-catalog.md`](../methodologies/artifact-catalog.md) + [`.github/prompts/04-analysis-pipeline.md`](../../.github/prompts/04-analysis-pipeline.md) (Family A/B/C/D = 9+2+5+7 = 23). Floors from [`reference-quality-thresholds.json`](../methodologies/reference-quality-thresholds.json). + +### Supplementary (if present) + +| Artifact | Floor | Actual | Status | +|----------|:-----:|:------:|:------:| +| `analysis-index.md` | 120 | `[#]` | `[…]` | +| `mcp-reliability-audit.md` | 150 | `[#]` | `[…]` | +| `workflow-audit.md` | 120 | `[#]` | `[…]` | +| `cross-run-diff.md` | 130 | `[#]` | `[…]` | +| `cross-session-intelligence.md` | 140 | `[#]` | `[…]` | +| `session-baseline.md` | 140 | `[#]` | `[…]` | + +--- + +## 2️⃣ Tradecraft Signal Audit (from `tradecraftQualitySignals`) + +| Signal | Applies to | Observed | Gap | +|--------|-----------|:--------:|-----| +| WEP band + horizon on headline judgements | `synthesis-summary`, `scenario-analysis`, `threat-analysis`, `risk-assessment`, `intelligence-assessment`, `forward-indicators`, `cross-run-diff`, `cross-session-intelligence` | `[✅/⚠️/❌]` | `[list artifacts missing WEP]` | +| Admiralty grade on external sources | `synthesis-summary`, `scenario-analysis`, `threat-analysis`, `risk-assessment`, `intelligence-assessment`, `devils-advocate`, `comparative-international`, `cross-run-diff` | `[…]` | `[…]` | +| ICD 203 BLUF + confidence labels | `synthesis-summary`, `intelligence-assessment`, `methodology-reflection` | `[…]` | `[…]` | +| ≥ 10 SATs documented | `methodology-reflection`, `devils-advocate` | `[…]` | `[…]` | +| DIW scores present | `significance-scoring`, Family-E files | `[…]` | `[…]` | +| Party-neutrality arithmetic | `synthesis-summary`, `swot`, `risk`, `stakeholder-perspectives`, `media-framing`, `voter-segmentation`, `coalition-mathematics` | `[…]` | `[…]` | + +--- + +## 3️⃣ Evidence Quality Distribution + +| Admiralty grade | Count | % of sources | +|-----------------|:-----:|:------------:| +| A-1 / A-2 | `[#]` | `[%]` | +| B-1 / B-2 | `[#]` | `[%]` | +| C / D | `[#]` | `[%]` | +| E / F | `[#]` | `[%]` | + +**Source Diversity Rule** — `[REQUIRED: % of P0/P1 claims backed by ≥ 3 independent sources]` (target: 100%). +**`[unconfirmed]` flags** — `[#]` (acceptable if ≤ 10% of total claims). + +--- + +## 4️⃣ Party-Neutrality Arithmetic + +| Party | Expected share (seats) | Observed share (word count) | Δ | Status | +|-------|:---------------------:|:---------------------------:|:-:|:------:| +| S | `[%]` | `[%]` | `[±%]` | `[✅/⚠️/❌]` | +| M | `[%]` | `[%]` | `[±%]` | `[…]` | +| SD | `[%]` | `[%]` | `[±%]` | `[…]` | +| V | `[%]` | `[%]` | `[±%]` | `[…]` | +| MP | `[%]` | `[%]` | `[±%]` | `[…]` | +| C | `[%]` | `[%]` | `[±%]` | `[…]` | +| L | `[%]` | `[%]` | `[±%]` | `[…]` | +| KD | `[%]` | `[%]` | `[±%]` | `[…]` | + +Tolerance — ± 15 pp of seat share. Failure → mandatory Pass-2 rewrite of offending artifacts. + +--- + +## 5️⃣ Overall Benchmark Judgement + +| Gate | Weight | Score (0–10) | Weighted | +|------|:------:|:------------:|:--------:| +| Coverage (23/23 core) | 0.25 | `[#]` | `[#]` | +| Depth floors met | 0.20 | `[#]` | `[#]` | +| Tradecraft signals | 0.20 | `[#]` | `[#]` | +| Evidence quality | 0.15 | `[#]` | `[#]` | +| Neutrality | 0.10 | `[#]` | `[#]` | +| Supplementary completeness | 0.10 | `[#]` | `[#]` | +| **Total** | 1.00 | | `[#/10]` | + +Minimum to pass the quality gate: **7.0/10**. Pass-2 is mandatory until the score is ≥ 7.0. + +--- + +## 6️⃣ Pass-2 Action List + +Numbered, concrete, executable. Each action must name the artifact, the gap and the fix. + +1. `[REQUIRED]` e.g. "`risk-assessment.md` — line count 140 vs floor 180: expand the Institutional dimension with 3 more rows citing `dok_id` from `data-download-manifest.md §FiU`." +2. `[REQUIRED]` +3. `[REQUIRED]` +4. (add as many as needed) + +--- + +## 7️⃣ Comparison to Reference Run + +| Metric | Reference | This run | Delta | +|--------|:---------:|:--------:|:-----:| +| Total artifacts | `[#]` | `[#]` | `[±#]` | +| Total lines | `[#]` | `[#]` | `[±#]` | +| P0/P1 claim count | `[#]` | `[#]` | `[±#]` | +| Admiralty A-rated sources | `[#]` | `[#]` | `[±#]` | +| SAT diversity | `[#]` | `[#]` | `[±#]` | +| Runtime (min) | `[#]` | `[#]` | `[±#]` | + +--- + +## 🔗 Cross-References + +- Methodology: [`../methodologies/per-artifact-methodologies.md#reference-analysis-quality`](../methodologies/per-artifact-methodologies.md#reference-analysis-quality) +- Thresholds: [`../methodologies/reference-quality-thresholds.json`](../methodologies/reference-quality-thresholds.json) +- Catalog: [`../methodologies/artifact-catalog.md`](../methodologies/artifact-catalog.md) +- Gate: [`../../.github/prompts/05-analysis-gate.md`](../../.github/prompts/05-analysis-gate.md) diff --git a/analysis/templates/session-baseline.md b/analysis/templates/session-baseline.md new file mode 100644 index 0000000000..cebb90f005 --- /dev/null +++ b/analysis/templates/session-baseline.md @@ -0,0 +1,143 @@ + + + +# 📆 Session Baseline Template — Kammarens Kalender & Antagna Texter + +> **📌 Template Instructions** — Copy to `analysis/daily/$ARTICLE_DATE/$SUBFOLDER/session-baseline.md`. Used by `weekly-review`, `monthly-review`, `motions` (quarterly aggregation), `propositions` and any aggregation workflow. See [`per-artifact-methodologies.md §session-baseline`](../methodologies/per-artifact-methodologies.md#session-baseline). + +> **🎯 Purpose** — The comprehensive, structured fact layer of *which Riksdag plenary sittings and committee sessions took place during the period, how long they sat, and which texts they adopted*. Distinct from [`historical-parallels.md`](historical-parallels.md) (metric trending). This is the **calendar + roster** — data-dense, low-prose — that every other artifact in the run points back to. + +## 🔄 Tradecraft Context + +- Use this artifact to establish the factual session baseline for the covered period before drawing analytical conclusions in other artifacts. +- Keep content source-grounded, structured, and low-inference: prioritise dates, durations, adopted texts, counts, chairing/session metadata over narrative prose. +- Where multiple sittings or committee sessions occurred, record each discretely so downstream artifacts can cite this file as the canonical calendar/roster reference. +- If source material is incomplete or ambiguous, note the gap explicitly rather than inferring missing details. + +--- + +## 📋 Run Context + +| Field | Value | +|-------|-------| +| **Date** | `[REQUIRED: YYYY-MM-DD]` | +| **Run ID** | `[REQUIRED: {type}-run{N}]` | +| **Analysis Directory** | `[REQUIRED: analysis/daily/YYYY-MM-DD/{type}-run{N}/]` | +| **Article Type** | `[REQUIRED]` | +| **Riksmöte** | `[REQUIRED: e.g. 2025/26]` | +| **Period Covered** | `[REQUIRED: e.g. Week 17 (20-26 April 2026)]` | + +--- + +## 1️⃣ Kammaren (Plenary Sittings) + +### Sitting 1 — `[REQUIRED: date]` + +| Field | Detail | +|-------|--------| +| Datum | `[REQUIRED: YYYY-MM-DD]` | +| Plats | `Riksdagshuset, Stockholm` | +| Starttid / sluttid | `[REQUIRED: HH:MM–HH:MM]` | +| Antagna betänkanden | `[REQUIRED: #]` | +| Voteringar (roll-call) | `[REQUIRED: #]` | +| Anföranden | `[REQUIRED: #]` | +| Huvudtema | `[REQUIRED: 1-line]` | +| Talman (chair) | `[REQUIRED: name]` | + +(Repeat §1 block for each sitting in the period.) + +--- + +## 2️⃣ Utskott (Committee) Sessions + +| Utskott | Datum | Tid | Dagordning | Antagna betänkanden | Ordförande | +|---------|:-----:|:---:|------------|:-------------------:|------------| +| `[REQUIRED: e.g. FiU]` | `[YYYY-MM-DD]` | `[HH:MM]` | `[1-line]` | `[#]` | `[name + intressent_id]` | + +--- + +## 3️⃣ Adopted Texts Roster + +| `dok_id` | Title | Typ | Föredragande / utskott | Voteringsresultat | Länk | +|----------|-------|:---:|------------------------|:-----------------:|------| +| `[REQUIRED: e.g. H901FiU1]` | `[REQUIRED]` | `[bet / prop / mot]` | `[MP + intressent_id / utskott]` | `[Ja/Nej/Avstår]` | `[URL on riksdagen.se]` | + +All rows must resolve via `get_dokument` (see [`mcp-reliability-audit.md`](mcp-reliability-audit.md)). + +--- + +## 4️⃣ Votering Summary + +### Top 10 by salience + +| # | Voteringsnummer | Beteckning | Ämne | Resultat (J–N–A–F) | Party-block pattern | +|:-:|:---------------:|:----------:|------|:------------------:|---------------------| +| 1 | `[REQUIRED]` | `[REQUIRED]` | `[REQUIRED]` | `[#–#–#–#]` | `[e.g. Tidö vs S+V+MP+C]` | + +### Discipline matrix (by party) + +| Party | Votes cast | Discipline % | Break-aways (MP count) | +|-------|:----------:|:------------:|:----------------------:| +| S | `[#]` | `[%]` | `[#]` | +| M | `[#]` | `[%]` | `[#]` | +| SD | `[#]` | `[%]` | `[#]` | +| V | `[#]` | `[%]` | `[#]` | +| MP | `[#]` | `[%]` | `[#]` | +| C | `[#]` | `[%]` | `[#]` | +| L | `[#]` | `[%]` | `[#]` | +| KD | `[#]` | `[%]` | `[#]` | + +--- + +## 5️⃣ Interpellationer & Frågor + +| Typ | Avsändare | Mottagare (minister) | Ämne | Status | Datum | +|-----|-----------|----------------------|------|:------:|:-----:| +| `[interpellation / skriftlig fråga]` | `[MP + intressent_id + party]` | `[minister + department]` | `[1-line]` | `[ställd / besvarad / utgår]` | `[YYYY-MM-DD]` | + +--- + +## 6️⃣ Regeringens Aktivitet under Perioden + +| Datum | Dokumenttyp | Titel | Departement | Länk | +|:-----:|:-----------:|-------|:-----------:|------| +| `[REQUIRED]` | `[prop / skr / SOU / Ds / remiss]` | `[REQUIRED]` | `[e.g. Fi / Ju / UD]` | `[regeringen.se URL]` | + +Populated from `search_regering` / `get_regering_document`. + +--- + +## 7️⃣ Data Source Coverage + +| Source | Rows contributed | Freshness | Notes | +|--------|:----------------:|:---------:|-------| +| `search_dokument` | `[#]` | `[ts]` | — | +| `get_calendar_events` | `[#]` | `[ts]` | — | +| `search_voteringar` | `[#]` | `[ts]` | — | +| `search_anforanden` | `[#]` | `[ts]` | — | +| `get_betankanden` | `[#]` | `[ts]` | — | +| `get_propositioner` | `[#]` | `[ts]` | — | +| `get_motioner` | `[#]` | `[ts]` | — | +| `get_fragor` / `get_interpellationer` | `[#]` | `[ts]` | — | +| `search_regering` | `[#]` | `[ts]` | — | + +Any source returning zero rows when it shouldn't → flag in `mcp-reliability-audit.md §Failure analysis`. + +--- + +## 8️⃣ Data Quality Checklist + +- [ ] Every `dok_id` in §3 resolves via `get_dokument`. +- [ ] Every MP reference carries an `intressent_id`. +- [ ] Every vote row sums correctly (`J + N + A + F = total`). +- [ ] Every `regeringen.se` URL returns HTTP 200 (spot-check 5 random). +- [ ] Period totals in §1 equal the sum across sitting blocks (arithmetic check). +- [ ] No row is an estimate (numeric fields have exact counts). + +--- + +## 🔗 Cross-References + +- Methodology: [`../methodologies/per-artifact-methodologies.md#session-baseline`](../methodologies/per-artifact-methodologies.md#session-baseline) +- Pair with: [`cross-session-intelligence.md`](cross-session-intelligence.md) (narrative) + [`historical-parallels.md`](historical-parallels.md) (trend) +- Source tools: `riksdag-regering` MCP (see [`../../.github/prompts/02-mcp-access.md`](../../.github/prompts/02-mcp-access.md)) diff --git a/analysis/templates/wildcards-blackswans.md b/analysis/templates/wildcards-blackswans.md new file mode 100644 index 0000000000..eb09e52ee3 --- /dev/null +++ b/analysis/templates/wildcards-blackswans.md @@ -0,0 +1,104 @@ + + + +# Wildcards & Black-Swan Events — {{ARTICLE_TYPE}} · {{ARTICLE_DATE}} + +> **Analytical supplementary (optional).** Captures low-probability / high-impact events that sit **outside** the 3–5 main scenarios in `scenario-analysis.md`. Useful for long-horizon forecasting (`monthly-review`), election-year aggregations, and any topic where cascading consequences are plausible. Pairs with `scenario-analysis.md` (adds tail), `risk-assessment.md` (extends posterior tail), and `forward-indicators.md` (early-warning triggers). +> +> **Methodology** → [`analysis/methodologies/analytical-supplementary-methodology.md § Wildcards & Black-Swans`](../methodologies/analytical-supplementary-methodology.md#wildcards--black-swans). +> **Not counted in the 23 core artifacts.** Non-blocking in `05-analysis-gate.md`. + +## 🔄 Tradecraft Context + +- **Artifact class** — Analytical supplementary (optional, never blocking) +- **Use when** — Long-horizon forecasting (`monthly-review`), election-year aggregations, or any topic where cascading consequences of tail events are plausible +- **Pairs with** — `scenario-analysis.md` (adds tail beyond 3–5 main scenarios), `risk-assessment.md` (extends posterior tail), `forward-indicators.md` (early-warning triggers) +- **Methodology** — [`analytical-supplementary-methodology.md § Wildcards & Black-Swans`](../methodologies/analytical-supplementary-methodology.md#wildcards--black-swans) +- **Workflow status** — Not counted in the 23 core artifacts; non-blocking in [`05-analysis-gate.md`](../../.github/prompts/05-analysis-gate.md) + +## 📋 Scope + +- **Horizon** — [3 m / 6 m / 12 m / 24 m / to-2030] +- **Domain filter** — [political / economic / security / social / technological / environmental — all] +- **Source set** — [open-source red-teaming, historical analogues, expert elicitation, scenario-analysis.md anchor] + +## 🔑 Definitions (ICD 203-aligned) + +- **Wildcard** — plausible low-probability event (WEP `Unlikely` to `Remote`, ≈ 5–37 %, per [`political-style-guide.md`](../methodologies/political-style-guide.md#-words-of-estimative-probability-wep--odni-confidence-overlay)) with material impact on the political system. +- **Black-swan (in Taleb sense)** — an event outside the current model's probability distribution, recognisable only in hindsight. We document **candidate black-swans** — extreme-tail events our current priors would rate `Remote` or lower (typically < 5 %) but where a plausible causal chain exists. + +--- + +## 📅 Wildcard register (≥ 8) + +| ID | Event | Domain | Prior WEP | Trigger indicator | Lead time | Impact vector(s) | Counter-measures already in place | +|----|-------|--------|-----------|-------------------|-----------|------------------|-----------------------------------| +| W1 | | Political | Very unlikely (≈ 15 %) | | | coalition / fiscal | | +| W2 | | Economic | | | | | | +| W3 | | Security | | | | | | +| W4 | | Social | | | | | | +| W5 | | Technological | | | | | | +| W6 | | Environmental | | | | | | +| W7 | | Cross-domain | | | | | | +| W8 | | External (geo) | | | | | | + +## 🦢 Black-swan candidates (≥ 3) + +| ID | Event | Why current models under-weight it | Minimum plausible causal chain (≤ 4 steps) | Early-warning signal | Recovery lead time | +|----|-------|-----------------------------------|--------------------------------------------|---------------------|--------------------| +| BS1 | | | | | | +| BS2 | | | | | | +| BS3 | | | | | | + +## ⛓ Cascading consequence trees (pick ≥ 2 from the registers) + +```mermaid +%%{init: {'theme':'dark'}}%% +flowchart LR + E[Wildcard event]:::event + E --> A1[1st-order]:::first + A1 --> A2[2nd-order]:::second + A2 --> A3[3rd-order]:::third + A3 --> MIT[Mitigation lever]:::mit + classDef event fill:#ff006e,color:#fff,stroke:#fff + classDef first fill:#00d9ff,color:#000 + classDef second fill:#ffbe0b,color:#000 + classDef third fill:#8338ec,color:#fff + classDef mit fill:#06d6a0,color:#000 +``` + +## 🧭 Early-warning indicators (feed `forward-indicators.md`) + +| Wildcard ID | Indicator | Data source | Threshold | Lead time | Owner | +|-------------|-----------|-------------|-----------|-----------|-------| +| W1 | | riksdagen.se / regeringen.se / scb.se / IMF / WB / myndighet | | | | + +## 🛡 Resilience assessment + +| Resilience dimension | Current state (1–5) | Evidence | Gap | Recommendation | +|---------------------|---------------------|----------|-----|----------------| +| Institutional redundancy | | | | | +| Fiscal buffer | | | | IMF GGXWDG_NGDP vintage | +| Coalition flexibility | | | | coalition-mathematics | +| Information-integrity resilience | | | | media-framing + STRIDE | +| External alliance depth | | | | NATO / EU / Nordic | + +## 🎯 PIR feedback + +| PIR | Addressed by wildcard(s) | Gap | Action | +|-----|--------------------------|-----|--------| +| PIR-1 | | | | + +--- + +## 🔗 Cross-links + +- [`scenario-analysis.md`](scenario-analysis.md) — main scenarios; this file extends the long tail +- [`risk-assessment.md`](risk-assessment.md) — tail-risk register rows cite wildcard IDs +- [`forward-indicators.md`](forward-indicators.md) — trigger indicators here populate ≥ 1 horizon section +- [`historical-parallels.md`](historical-parallels.md) — analogue events used as priors +- [`devils-advocate.md`](devils-advocate.md) — hypothesis cluster for "current consensus mis-prices tail" + +--- + +**Template version:** v1.0 · **Last updated:** 2026-04-23 diff --git a/analysis/templates/workflow-audit.md b/analysis/templates/workflow-audit.md new file mode 100644 index 0000000000..d06a48a2a9 --- /dev/null +++ b/analysis/templates/workflow-audit.md @@ -0,0 +1,174 @@ + + + +# ⚙️ Workflow Audit Template — Agentic Run Self-Assessment + +> **📌 Template Instructions** — Copy to `analysis/daily/$ARTICLE_DATE/$SUBFOLDER/workflow-audit.md`. Produced at the end of Pass 2 as a structured self-audit of how the 7-module prompt pipeline was executed. See [`per-artifact-methodologies.md §workflow-audit`](../methodologies/per-artifact-methodologies.md#workflow-audit). + +> **🎯 Purpose** — Transparent record of workflow execution: which phases ran, which MCP tools were called, which rules of [`ai-driven-analysis-guide.md`](../methodologies/ai-driven-analysis-guide.md) were satisfied, and where the run fell short. Combined with [`reference-analysis-quality.md`](reference-analysis-quality.md) it is the two-artifact pair that answers "was this a good run?". + +## 🔄 Tradecraft Context + +This artifact is produced at the end of **Pass 2** to verify that the workflow followed the repository's full analysis contract before article publication. It documents **actual execution**, not intentions: prompt modules run, MCP/tool usage, validation gates reached, deviations from standard procedure, and whether the required **AI FIRST** second-pass improvement was genuinely completed. + +Use this template as an evidence-backed self-audit of tradecraft quality. Record where the run met the required methodology, where shortcuts or skips occurred, and what risks those deviations introduce for analytical completeness, reproducibility, or policy compliance. If fast paths, partial runs, or fallback behaviours were used, state them explicitly and assess their impact. + +--- + +## 📋 Document Metadata + +```yaml +articleType: [REQUIRED] +runId: [REQUIRED] +date: [REQUIRED: YYYY-MM-DD] +analysisPhase: workflow-audit +confidenceLevel: [REQUIRED: HIGH / MEDIUM / LOW] +rulesAudited: [REQUIRED: integer] +complianceRate: [REQUIRED: 0-100] +passTwoCompleted: [REQUIRED: true/false] +``` + +![Confidence](https://img.shields.io/badge/Confidence-%5Blevel%5D-555) +![Compliance](https://img.shields.io/badge/Compliance-%5B%25%5D-informational) + +--- + +## 1️⃣ Prompt Module Execution Summary + +```mermaid +%%{init: {"theme":"dark","themeVariables":{"primaryColor":"#1565C0","primaryTextColor":"#ffffff","lineColor":"#90CAF9","secondaryColor":"#2E7D32","tertiaryColor":"#FF9800","fontFamily":"Inter, Helvetica, Arial, sans-serif"}}}%% +flowchart LR + M00["00 — base contract"] --> M01["01 — bash & shell"] + M01 --> M02["02 — MCP access"] + M02 --> M03["03 — data download"] + M03 --> M04["04 — analysis pipeline (Pass 1 + Pass 2)"] + M04 --> M05["05 — analysis gate"] + M05 --> M06["06 — article generation"] + M06 --> M07["07 — commit & PR"] +``` + +Annotate each node ✅ / ⚠️ / ❌. + +| Module | Status | Wall-clock | Notes | +|--------|:------:|:----------:|-------| +| `00-base-contract.md` | `[…]` | `[min]` | — | +| `01-bash-and-shell-safety.md` | `[…]` | `[min]` | — | +| `02-mcp-access.md` | `[…]` | `[min]` | — | +| `03-data-download.md` | `[…]` | `[min]` | fast-path `SKIP_ANALYSIS` = `[true/false]` | +| `04-analysis-pipeline.md — Pass 1` | `[…]` | `[min]` | floor `[standard 15 / deep 20 / comprehensive 25]` | +| `04-analysis-pipeline.md — Pass 2` | `[…]` | `[min]` | floor `[standard 7 / deep 10 / comprehensive 12]` | +| `05-analysis-gate.md` | `[…]` | `[min]` | — | +| `06-article-generation.md` | `[…]` | `[min]` | — | +| `07-commit-and-pr.md` | `[…]` | `[min]` | — | + +**Total runtime** — `[HH:MM:SS]`. Under 45 min → insufficient iteration (AI-FIRST violation). Over 70 min → likely infinite loop, investigate. + +--- + +## 2️⃣ Phase-Checkpoint Log + +| Checkpoint label | Time | Artifacts snapshotted | Recovery used? | +|------------------|------|-----------------------|:--------------:| +| `phase-04-pass1` | `[ts]` | `[#]` | `[y/n]` | +| `phase-04-pass2` | `[ts]` | `[#]` | `[y/n]` | +| `phase-05-gate` | `[ts]` | — | `[y/n]` | +| `phase-06-article` | `[ts]` | — | `[y/n]` | +| `phase-07-commit` | `[ts]` | — | `[y/n]` | + +Missing checkpoint → ⚠️ flag, document cause. + +--- + +## 3️⃣ Core-Principle Compliance Audit + +Audit against the 11 core principles of [`ai-driven-analysis-guide.md`](../methodologies/ai-driven-analysis-guide.md). Mark ✅ / ⚠️ / ❌ with evidence. + +| # | Principle | Status | Evidence | +|:-:|-----------|:------:|----------| +| 1 | Read all methodologies before writing | `[…]` | `[one tool call per file logged]` | +| 2 | Read all 23 templates before writing | `[…]` | `[…]` | +| 3 | Pass 1 produces all 23 artifacts | `[…]` | `[manifest of files created]` | +| 4 | Pass-1 snapshot copied to `pass1/` | `[…]` | `[ls pass1/ output]` | +| 5 | Pass 2 improves every artifact | `[…]` | `[diff summary from cross-run-diff if same-type]` | +| 6 | Evidence standard (dok_id / vote / named actor / URL + Admiralty) | `[…]` | `[spot-check table below]` | +| 7 | WEP + horizon on every forecast | `[…]` | `[sample]` | +| 8 | Party-neutrality arithmetic done | `[…]` | `[reference-analysis-quality §4]` | +| 9 | ≥ 10 SATs applied | `[…]` | `[methodology-reflection §SATs]` | +| 10 | `methodology-reflection.md` ICD 203 audit complete | `[…]` | `[link]` | +| 11 | DIW tiering coherent (L1/L2/L2+/L3) | `[…]` | `[significance-scoring §rank]` | + +### Evidence spot-check (Principle 6) + +Pick 5 random P0/P1 claims from `synthesis-summary.md`. Each must resolve: + +| # | Claim (1 line) | dok_id / vote / actor | Admiralty | ✅/❌ | +|:-:|---------------|-----------------------|:---------:|:----:| +| 1 | `[REQUIRED]` | `[REQUIRED]` | `[A1/B2/…]` | `[…]` | +| 2 | … | … | … | … | +| 3 | … | … | … | … | +| 4 | … | … | … | … | +| 5 | … | … | … | … | + +**Compliance rate** — `[#]/11` = `[%]` (target: 100%). + +--- + +## 4️⃣ Deviations & Causes + +For every ⚠️ or ❌ above, document: + +### Deviation 1 + +**Principle / module** — `[REQUIRED]` +**What happened** — `[1-sentence fact]` +**Cause** — `[data / time / MCP / prompt-ambiguity / human-waiver]` +**Mitigation in this run** — `[REQUIRED]` +**Next-run follow-up** — `[concrete action]` + +(Repeat for each deviation.) + +--- + +## 5️⃣ Time-Budget Attribution + +| Module | Target | Actual | Variance | Verdict | +|--------|:------:|:------:|:--------:|:-------:| +| 03 — download | 3 min | `[min]` | `[±]` | `[…]` | +| 04 — Pass 1 | ≥ 20 min | `[min]` | `[±]` | `[…]` | +| 04 — Pass 2 | ≥ 10 min | `[min]` | `[±]` | `[…]` | +| 05 — gate | 2 min | `[min]` | `[±]` | `[…]` | +| 06 — article | 10 min | `[min]` | `[±]` | `[…]` | +| 07 — commit | 2 min | `[min]` | `[±]` | `[…]` | + +AI-FIRST enforcement — Pass 2 < target ⇒ automatic ❌ on this row even if artifacts pass the line-count floor. + +--- + +## 6️⃣ Tool-Call Histogram + +Top 10 tools by call count: + +| Rank | Tool | Calls | Avg latency | Notes | +|:----:|------|:-----:|:-----------:|-------| +| 1 | `[REQUIRED]` | `[#]` | `[ms]` | — | +| … | … | … | … | — | + +Any tool with > 50 calls → flag potential inefficiency. + +--- + +## 7️⃣ Next-Run Action List + +1. `[REQUIRED — concrete action executable by next run]` +2. `[REQUIRED]` +3. `[REQUIRED]` + +These flow into the next run's `methodology-reflection.md §Improvements` section. + +--- + +## 🔗 Cross-References + +- Methodology: [`../methodologies/per-artifact-methodologies.md#workflow-audit`](../methodologies/per-artifact-methodologies.md#workflow-audit) +- Core principles: [`../methodologies/ai-driven-analysis-guide.md`](../methodologies/ai-driven-analysis-guide.md) +- Prompt modules: [`../../.github/prompts/`](../../.github/prompts/)