Skip to content

Commit 2307ee0

Browse files
Copilotpethers
andauthored
Address review: canonical WEP vocab + gate prose/impl alignment
Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/9d64368a-8f56-4991-84c3-4232798184b3 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
1 parent e570e8f commit 2307ee0

4 files changed

Lines changed: 18 additions & 12 deletions

File tree

.github/prompts/04-analysis-pipeline.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Produced in `analysis/daily/$ARTICLE_DATE/$SUBFOLDER/`. The output set is **stab
7373

7474
> **Fast-path**: If `SKIP_ANALYSIS=true` (set by `03-data-download.md §Pre-flight`), skip all steps 1–5 below and proceed directly to `06-article-generation.md`. The full analysis already exists on disk from a prior run — do not re-run downloads, Pass 1, Pass 2, or the gate.
7575
76-
1. **Read all 10 methodologies first** (one tool call per file; skipping fails the gate via `methodology-reflection.md §evidence` audit).
76+
1. **Read all relevant methodologies first** (the primary methodology guide plus every supporting framework listed above, including `osint-tradecraft-standards.md`; one tool call per file; skipping fails the gate via `methodology-reflection.md §evidence` audit).
7777
2. **Read all 23 templates first** — at minimum open each Family A/B/C/D template before writing its artifact.
7878
3. **Pass 1 — Create** all 23 always-on artifacts + every per-document file. Minimum 20 minutes of real work.
7979
4. **Snapshot Pass-1** — copy every Pass-1 file into `$ANALYSIS_DIR/pass1/` before starting Pass 2: `mkdir -p "$ANALYSIS_DIR/pass1" && cp "$ANALYSIS_DIR"/*.md "$ANALYSIS_DIR/pass1/"`. The `pass1/` directory is the fallback evidence the gate uses when mtime windows are too tight. Do **not** stage `pass1/` in the PR (see `07-commit-and-pr.md`).

.github/prompts/05-analysis-gate.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ This is the **only** gate separating analysis from article generation. If it fai
1818
3. **No stubs** — zero occurrences of `AI_MUST_REPLACE`, `[REQUIRED]`, `TODO:`, or `Lorem ipsum` across all artifacts.
1919
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.
2020
5. **Mermaid diagrams** — every Family A and Family D synthesis file contains ≥ 1 Mermaid diagram with colour-coded `style` directives (or `themeVariables` / `%%{init …}` block).
21-
6. **Pass-2 done** — agent has read each Family A + C core artifact back after creation and committed improvements. (Enforced by file mtime diff: final file mtime > creation time + 3 min, OR two git-history snapshots on disk.)
21+
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.)
2222
7. **Family C structure checks** (extension-quality gate):
2323
- `executive-brief.md` contains a `## 🎯 BLUF` section **and** a `## 🧭 3 Decisions` (or `Decisions This Brief Supports`) section.
24-
- `intelligence-assessment.md` declares **≥ 3 Key Judgments** with confidence labels (`HIGH`, `MEDIUM`, `LOW`, `VERY HIGH`, `VERY LOW`) and references at least one PIR.
24+
- `intelligence-assessment.md` declares **≥ 3 Key Judgments** (enforced structurally by `Key Judgment` / `KJ-*` header count ≥ 3) each carrying at least one confidence label (`VERY HIGH`, `HIGH`, `MEDIUM`, `LOW`, `VERY LOW`) — the confidence-label presence is audited by the implementation's `grep -cE '(VERY HIGH|HIGH|MEDIUM|LOW|VERY LOW)'` check on the same file — and the file references at least one PIR.
2525
- `scenario-analysis.md` declares **≥ 3 distinct scenarios** (headers matching `Scenario` count ≥ 3).
2626
- `comparative-international.md` declares a comparator set or **≥ 2 comparator rows** (structural check, see Tier-C gate).
2727
- `devils-advocate.md` declares **≥ 3 competing hypotheses** (headers matching `Hypothesis`/`H1`/`H2`/`H3` count ≥ 3, ACH-style).
@@ -53,7 +53,9 @@ FAMILY_D=(election-2026-analysis.md voter-segmentation.md coalition-mathematics.
5353
REQ=("${FAMILY_A[@]}" "${FAMILY_B[@]}" "${FAMILY_C[@]}" "${FAMILY_D[@]}")
5454
SYNTHESIS=(synthesis-summary.md swot-analysis.md risk-assessment.md threat-analysis.md \
5555
stakeholder-perspectives.md significance-scoring.md classification-results.md \
56-
cross-reference-map.md executive-brief.md coalition-mathematics.md \
56+
cross-reference-map.md executive-brief.md election-2026-analysis.md \
57+
voter-segmentation.md coalition-mathematics.md historical-parallels.md \
58+
media-framing-analysis.md implementation-feasibility.md \
5759
forward-indicators.md)
5860
DOK_RE='[Hh][A-Za-z0-9]{3,}[0-9]+'
5961
EVIDENCE_RE='[Hh][A-Za-z0-9]{3,}[0-9]+|riksdagen\.se|regeringen\.se|scb\.se|worldbank\.org|data\.imf\.org'
@@ -173,6 +175,8 @@ fi
173175
if [ -s "$ANALYSIS_DIR/intelligence-assessment.md" ]; then
174176
KJ=$(grep -cE '(Key[[:space:]]+Judgment|KJ-?[0-9]+)' "$ANALYSIS_DIR/intelligence-assessment.md" || true)
175177
[ "${KJ:-0}" -ge 3 ] || { echo "❌ intelligence-assessment.md: fewer than 3 Key Judgments (found ${KJ:-0})"; FAIL=1; }
178+
CONF=$(grep -cE '(VERY[[:space:]]+HIGH|VERY[[:space:]]+LOW|\bHIGH\b|\bMEDIUM\b|\bLOW\b)' "$ANALYSIS_DIR/intelligence-assessment.md" || true)
179+
[ "${CONF:-0}" -ge 3 ] || { echo "❌ intelligence-assessment.md: fewer than 3 confidence labels (VERY HIGH/HIGH/MEDIUM/LOW/VERY LOW) — found ${CONF:-0}"; FAIL=1; }
176180
grep -qE 'PIR' "$ANALYSIS_DIR/intelligence-assessment.md" \
177181
|| { echo "❌ intelligence-assessment.md: no PIR reference"; FAIL=1; }
178182
fi

.github/prompts/ext/tier-c-aggregation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ FAIL=0
7070
7171
# Tier-C additive check 1 — cross-reference-map.md cites ≥ 1 sibling folder under analysis/daily/
7272
if [ -s "$ANALYSIS_DIR/cross-reference-map.md" ]; then
73-
grep -qE 'analysis/daily/[0-9]{4}-[0-9]{2}-[0-9]{2}/[A-Za-z_-]+' "$ANALYSIS_DIR/cross-reference-map.md" \
73+
grep -qE 'analysis/daily/[0-9]{4}-[0-9]{2}-[0-9]{2}/[A-Za-z0-9_-]+' "$ANALYSIS_DIR/cross-reference-map.md" \
7474
|| { echo "❌ tier-c: cross-reference-map.md missing sibling-folder citations (expected analysis/daily/<date>/<type>)"; FAIL=1; }
7575
fi
7676

analysis/methodologies/osint-tradecraft-standards.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,17 @@ Professional intelligence analysis uses a **calibrated probabilistic vocabulary*
246246

247247
### 3.1 The Seven Bands
248248

249+
Canonical seven-band vocabulary matches [`political-style-guide.md §Confidence Scale`](political-style-guide.md)**do not substitute synonyms** (e.g. "probable", "highly probable", "almost no chance") in analytic conclusions.
250+
249251
| Band | English phrase | Swedish equivalent (for SV articles) | Numeric range | Indicative usage |
250252
|:---:|---|---|:---:|---|
251-
| **1** | **Almost no chance** / *remote* | *Så gott som utesluten* | 1 – 5 % | "There is almost no chance V will vote to support the government's defence-budget proposition." |
252-
| **2** | **Very unlikely** / *highly improbable* | *Mycket osannolikt* | 5 – 20 % | "A split within SD over migration policy before the 2026 election is very unlikely given the party's current whip discipline." |
253-
| **3** | **Unlikely** / *improbable* | *Osannolikt* | 20 – 45 % | "Unilateral Regeringskansliet blocking of an EU-initiated trilogue is unlikely, given Sweden's Council commitments." |
254-
| **4** | **Roughly even chance** | *Ungefär lika sannolikt som inte* | 45 – 55 % | "There is a roughly even chance that C and L will split over budget priorities in Q3." |
255-
| **5** | **Likely** / *probable* | *Sannolikt* | 55 – 80 % | "The M–KD compromise on the Wind-Power Revenue Act (HD03239) will likely survive the chamber vote." |
256-
| **6** | **Very likely** / *highly probable* | *Mycket sannolikt* | 80 – 95 % | "Very likely the budget discharge will pass on first chamber vote." |
257-
| **7** | **Almost certain** / *nearly certain* | *Så gott som säkert* | 95 – 99 % | "Extra amendment budget FiU48 is almost certain to be adopted this plenary." |
253+
| **1** | **Remote** | *Så gott som utesluten* | 1 – 7 % | "V voting to support the government's defence-budget proposition is remote." |
254+
| **2** | **Very unlikely** | *Mycket osannolikt* | 10 – 20 % | "A split within SD over migration policy before the 2026 election is very unlikely given the party's current whip discipline." |
255+
| **3** | **Unlikely** | *Osannolikt* | 20 – 37 % | "Unilateral Regeringskansliet blocking of an EU-initiated trilogue is unlikely, given Sweden's Council commitments." |
256+
| **4** | **Roughly even** | *Ungefär lika sannolikt som inte* | 45 – 55 % | "There is a roughly even chance that C and L will split over budget priorities in Q3." |
257+
| **5** | **Likely** | *Sannolikt* | 63 – 80 % | "The M–KD compromise on the Wind-Power Revenue Act (HD03239) will likely survive the chamber vote." |
258+
| **6** | **Very likely** | *Mycket sannolikt* | 80 – 90 % | "Very likely the budget discharge will pass on first chamber vote." |
259+
| **7** | **Almost certain** | *Så gott som säkert* | 93 – 99 % | "Extra amendment budget FiU48 is almost certain to be adopted this plenary." |
258260

259261
### 3.2 Banned Terms in Analytic Conclusions
260262

0 commit comments

Comments
 (0)