You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -264,7 +338,7 @@ Non-blocking for `standard` / `deep` runs; **blocking for `comprehensive` / Tier
264
338
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`).
265
339
266
340
```bash
267
-
# Check 9 — supplementary artifacts (blocking for aggregation types, any Tier-C run, and S5 when run-count >= 2)
341
+
# Check 10 — supplementary artifacts (blocking for aggregation types, any Tier-C run, and S5 when run-count >= 2)
Copy file name to clipboardExpand all lines: analysis/methodologies/ai-driven-analysis-guide.md
+50-1Lines changed: 50 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -209,6 +209,7 @@ Read every file you produced in Steps 3–5. For each one, **improve every secti
209
209
- Add one more named actor (MP, minister, official) to every stakeholder and SWOT entry.
210
210
- Add one more dok_id or vote-record citation to every evidence column that has < 2 citations.
211
211
-**Tag every key finding to a PIR/EEI** from the catalog in `political-style-guide.md`.
212
+
-**Write `pir-status.json`** — every cycle must produce `$ANALYSIS_DIR/pir-status.json` conforming to `schemas/pir-status.schema.json` v1.0 (required fields: `schema_version`, `cycle`, `date`, `subfolder`, `pirs`, `generated_at`). Newly extracted PIRs from `intelligence-assessment.md` default to `status: "open"`; rolled-forward PIRs from a prior cycle preserve their existing status (`open` / `answered` / `superseded` / `deferred` / `cancelled`) and may carry a populated `inherits_from` chain. Open PIRs that are carried forward have their confidence degraded one level (HIGH → MEDIUM, etc.) by `scripts/roll-forward-pirs.ts`; non-open PIRs are preserved unchanged so the historical lineage is never lost. This file is the machine-readable PIR sidecar used for automated roll-forward and CI gate enforcement (Check 9 in `05-analysis-gate.md`).
212
213
- Add Statskontoret evidence to every implementation-capacity or agency-burden claim where a relevant public report/page exists.
213
214
- Verify every macro/fiscal/monetary/external-sector claim is IMF-first, vintage-tagged when projected, and represented in `economic-data.json` when charted.
214
215
- Re-rank the significance scoring if the rewrite reveals a stronger lead.
@@ -579,6 +580,53 @@ Every security-relevant control in Family A maps to **ISO 27001:2022**, **NIST C
579
580
|[`political-threat-framework.md`](political-threat-framework.md)| Attack trees + kill chain + threat taxonomy |
580
581
|[`political-style-guide.md`](political-style-guide.md)| Writing voice, attribution, evidence density |
581
582
583
+
### PIR status sidecar — automated roll-forward
584
+
585
+
Every analysis cycle writes a `pir-status.json` sidecar alongside the 23 required artifacts:
|**Roll-forward script**|`scripts/roll-forward-pirs.ts` — propagates `open` PIRs from the previous cycle to the current cycle, degrading confidence by one level to flag staleness |
594
+
|**CI gate**| Check 9 in `.github/prompts/05-analysis-gate.md` — blocks article generation if `pir-status.json` is absent or structurally invalid |
595
+
596
+
**How to write `pir-status.json` during analysis (Step 7):**
597
+
598
+
```json
599
+
{
600
+
"schema_version": "1.0",
601
+
"cycle": "month-ahead",
602
+
"date": "2026-04-27",
603
+
"subfolder": "month-ahead",
604
+
"generated_at": "2026-04-27T10:00:00Z",
605
+
"inherited_from": null,
606
+
"pirs": [
607
+
{
608
+
"pir_id": "PIR-1",
609
+
"statement": "SD voting discipline on prop. 2025/26:236 (fuel tax)",
610
+
"trigger": "May 2026 chamber vote on HD01FiU48",
611
+
"status": "open",
612
+
"confidence": "HIGH",
613
+
"evidence_refs": ["HD01FiU48"],
614
+
"horizon": "2026-05-15",
615
+
"admiralty_grade": "B2"
616
+
}
617
+
]
618
+
}
619
+
```
620
+
621
+
**Roll-forward usage (next cycle):**
622
+
623
+
```bash
624
+
npx tsx scripts/roll-forward-pirs.ts \
625
+
--date 2026-04-28 --cycle month-ahead
626
+
```
627
+
628
+
---
629
+
582
630
### Templates and platform exemplars
583
631
584
632
| Document | Purpose |
@@ -591,7 +639,8 @@ Every security-relevant control in Family A maps to **ISO 27001:2022**, **NIST C
-**Version:** 6.7 — PIR status sidecar (`pir-status.json`) integration
643
+
-**Key changes in v6.7:** Added mandatory `pir-status.json` sidecar write step to Pass-2 checklist (Step 7); added PIR status sidecar reference section under Related Documents; added roll-forward usage example (`scripts/roll-forward-pirs.ts`) and schema reference (`schemas/pir-status.schema.json`).
595
644
-**Key changes in v6.6:** Step 3 now points at the v1.3 doctype-variant detector (5 extended types: motion-package, fpm, utskottsbetänkande-variants, KU-anmälan, EU-nämnd) and adds Narrative subsection requirement for ≥ L2 per-file artifacts; Step 4 cross-reference-map row links to the 7 atomic edge types in `structural-metadata-methodology.md` v1.3; Step 7 Pass-2 rewrite checklist adds two binding items — Pass-2 Self-Audit Checklist (10 items) and Narrative 6-axis rubric (18/30 floor); DIW section adds worked-example callout to `synthesis-methodology.md` v1.3 (line-by-line scoring + winner/loser rubric) and Sainte-Laguë walkthrough in `electoral-domain-methodology.md` v1.3; Quality Gate Checklist gains rows 11–12.
596
645
-**Key changes in v6.5:** source diversity rule integration (political-style-guide.md v3.1)
597
646
-**Key changes in v6.4:** Updated Step 1 reading list to reference **Source Diversity Rule** in political-style-guide.md v3.1 (multi-source corroboration by claim priority, conflict resolution, worked scenario); added Source Diversity check to Quality Gate Evidence dimension (P0/P1: ≥3 sources required); added source diversity verification to Pass-2 rewrite checklist; added IMF collection tools to referenced Collection Management Matrix.
"description": "Machine-readable Priority Intelligence Requirement (PIR) status sidecar produced by every agentic analysis cycle. Written to `analysis/daily/YYYY-MM-DD/{subfolder}/pir-status.json`. Enables automated PIR roll-forward, cross-cycle gap detection, and CI gate enforcement. Schema v1.0.",
"description": "Schema version — always '1.0' for this release.",
13
+
"enum": ["1.0"]
14
+
},
15
+
"cycle": {
16
+
"type": "string",
17
+
"description": "Analysis cycle type slug (matches the subfolder name convention).",
18
+
"enum": [
19
+
"committeeReports",
20
+
"propositions",
21
+
"motions",
22
+
"interpellations",
23
+
"evening-analysis",
24
+
"realtime-pulse",
25
+
"week-ahead",
26
+
"month-ahead",
27
+
"weekly-review",
28
+
"monthly-review"
29
+
]
30
+
},
31
+
"date": {
32
+
"type": "string",
33
+
"description": "ISO calendar date of this analysis run (YYYY-MM-DD).",
34
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
35
+
},
36
+
"subfolder": {
37
+
"type": "string",
38
+
"description": "Relative subfolder path under `analysis/daily/YYYY-MM-DD/` — typically equal to `cycle`. Cross-field equality is not enforced by the schema (it would require a verbose `oneOf` per cycle); the CI analysis gate (Check 10 in `.github/prompts/05-analysis-gate.md`) and the `roll-forward-pirs.ts` writer enforce `subfolder === cycle`.",
39
+
"minLength": 1
40
+
},
41
+
"generated_at": {
42
+
"type": "string",
43
+
"description": "ISO-8601 timestamp of when this sidecar was generated (UTC).",
44
+
"format": "date-time"
45
+
},
46
+
"inherited_from": {
47
+
"type": ["string", "null"],
48
+
"description": "Source path this file was rolled forward from, e.g. `analysis/daily/2026-04-26/month-ahead/pir-status.json`. Null when this is a freshly authored set (no roll-forward).",
49
+
"default": null
50
+
},
51
+
"pirs": {
52
+
"type": "array",
53
+
"description": "Ordered list of PIRs for this cycle. May be empty for short-event cycles that did not define standing PIRs.",
"description": "Short (≤ 500 chars) summary of the evidence or event that answered this PIR. Populate only when status='answered'.",
91
+
"minLength": 1,
92
+
"maxLength": 500
93
+
},
94
+
"inherits_from": {
95
+
"type": "array",
96
+
"description": "Zero or more `pir_id` references from the previous cycle that this PIR continues or inherits from.",
97
+
"items": {
98
+
"type": "string",
99
+
"pattern": "^PIR-[A-Za-z0-9]+([-][A-Za-z0-9]+)*$"
100
+
},
101
+
"default": []
102
+
},
103
+
"evidence_refs": {
104
+
"type": "array",
105
+
"description": "Riksdag `dok_id` references, primary-source URLs, or named artifacts that provide evidence for the current status assessment. At least one reference is recommended for answered PIRs.",
106
+
"items": {
107
+
"type": "string",
108
+
"minLength": 2
109
+
},
110
+
"default": []
111
+
},
112
+
"horizon": {
113
+
"type": "string",
114
+
"description": "Monitoring horizon for this PIR, expressed as an ISO date (YYYY-MM-DD) or a relative label ('next-session', 'next-week', 'election-day'). Optional.",
115
+
"minLength": 4
116
+
},
117
+
"admiralty_grade": {
118
+
"type": "string",
119
+
"description": "Admiralty Code grade of the best available source for the current status (STANAG 2022). Source reliability A–F + information credibility 1–6.",
0 commit comments