euparliamentmonitor 0.8.53 โ†’ 0.8.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -55,7 +55,7 @@ This repository is the open-source platform behind **[euparliamentmonitor.com](h
55
55
  | ๐Ÿง  **Political Intelligence** | Structured analytic techniques (ACH, SWOT/TOWS, PESTLE, scenario forecasting, devil's-advocate), Admiralty source grading, Words of Estimative Probability (WEP) bands, ICD-203 standards, and a 6-dimension political-threat framework โ€” applied daily to live EP data. |
56
56
  | ๐Ÿ” **Radical Transparency** | Every article links back to the analysis run it was rendered from. Every artifact links to its methodology. Every methodology is published. No black box. |
57
57
  | ๐Ÿ—ณ๏ธ **Democratic Accountability** | Public-data only. GDPR-clean. No personal profiling. Multi-language so a Finnish farmer, a Greek student, and a Polish journalist all get the same intelligence in their own language. |
58
- | ๐Ÿค– **AI-Generated News** | 8 unified gh-aw agentic workflows + 1 translation workflow run autonomously, produce structured analysis, render deterministic HTML, and open publication-ready pull requests for human review. |
58
+ | ๐Ÿค– **AI-Generated News** | 14 unified gh-aw agentic workflows + 1 translation workflow run autonomously, produce structured analysis, render deterministic HTML, and open publication-ready pull requests for human review. |
59
59
 
60
60
  ### Documentation & Reports
61
61
  [![API Docs](https://img.shields.io/badge/API-Documentation-blue?logo=javascript)](https://euparliamentmonitor.com/docs/api/)
@@ -124,7 +124,7 @@ The published site is the audience-facing companion to this npm/TypeScript packa
124
124
  - [Agent Catalog](.github/agents/README.md) โ€” custom Copilot agents (analysis producers / consumers / gh-aw infrastructure)
125
125
  - [Skills Library](.github/skills/README.md) โ€” shared skills (security, compliance, intelligence, gh-aw)
126
126
  - [Prompt Library](.github/prompts/README.md) โ€” 10-file bounded-context prompt set (`00`โ†’`09`) + `npm run lint:prompts` drift-guard
127
- - [Workflows](.github/workflows/README.md) + [WORKFLOWS.md](WORKFLOWS.md) โ€” 9 `news-*.md` agentic workflows (8 unified `news-<type>.md` + `news-translate.md`) + CI workflows
127
+ - [Workflows](.github/workflows/README.md) + [WORKFLOWS.md](WORKFLOWS.md) โ€” 15 `news-*.md` agentic workflows (14 unified `news-<type>.md` covering 14 article types โ€” including the long-horizon `quarter-ahead`/`quarter-in-review`/`year-ahead`/`year-in-review`/`term-outlook`/`election-cycle` set added in 2026-Q2 โ€” plus `news-translate.md`) + CI workflows
128
128
  - [Analysis Chain](analysis/README.md) โ€” 5-stage pipeline (Data โ†’ Analysis โ†’ Completeness Gate โ†’ Article โ†’ Single PR), methodologies, 39 templates, quality thresholds
129
129
 
130
130
  **๐Ÿ”’ ISMS Compliance:**
@@ -136,11 +136,11 @@ The published site is the audience-facing companion to this npm/TypeScript packa
136
136
 
137
137
  **MCP Server Integration**: The project uses the
138
138
  [European-Parliament-MCP-Server](https://github.com/Hack23/European-Parliament-MCP-Server)
139
- v1.2.19 for accessing real EU Parliament data via the Model Context Protocol.
139
+ v1.2.20 for accessing real EU Parliament data via the Model Context Protocol.
140
140
 
141
141
  - **MCP Server Status**: โœ… Fully operational โ€” 60+ EP data tools available
142
142
  (feeds, direct lookups, analytical tools, intelligence correlation)
143
- - **Agentic Workflows**: 9 unified gh-aw markdown workflows โ€” 8 article types (`news-<type>.md`, Stages A โ†’ B โ†’ C โ†’ D โ†’ E in one session) + `news-translate.md` (14-language flush translation) โ€” compiled with
143
+ - **Agentic Workflows**: 15 unified gh-aw markdown workflows โ€” 14 article types (`news-<type>.md`, Stages A โ†’ B โ†’ C โ†’ D โ†’ E in one session) + `news-translate.md` (14-language flush translation) โ€” compiled with
144
144
  `gh-aw v0.69.3` (pin in `.github/workflows/compile-agentic-workflows.yml`) to `.lock.yml` for automated news generation with AI-driven political
145
145
  intelligence analysis. See [`.github/workflows/README.md`](.github/workflows/README.md).
146
146
  - **Analysis-Artifact-Driven Article Pipeline**: Agents author the full
@@ -338,21 +338,27 @@ flowchart LR
338
338
 
339
339
  ## ๐Ÿ“ฐ Live News Streams
340
340
 
341
- **Eight unified gh-aw article workflows** plus a **14-language translation helper** run on precision schedules, autonomously generating *Economist-style* political intelligence and opening publication-ready pull requests. Every workflow follows the same Stage A โ†’ E contract documented in [Article-Generation.md](Article-Generation.md).
341
+ **Fourteen unified gh-aw article workflows** plus a **14-language translation helper** run on precision schedules, autonomously generating *Economist-style* political intelligence and opening publication-ready pull requests. Every workflow follows the same Stage A โ†’ E contract documented in [Article-Generation.md](Article-Generation.md). The single source of truth for every horizon's data window, cadence, mandatory artifacts, stage budgets, scenario depth and electoral overlay is the [`ARTICLE_HORIZONS` registry in `src/config/article-horizons.ts`](src/config/article-horizons.ts).
342
342
 
343
343
  | Workflow | Article Type | Focus |
344
344
  |----------|--------------|-------|
345
345
  | ๐Ÿšจ **[news-breaking.md](.github/workflows/news-breaking.md)** | `breaking` | Rapid-response coverage of significant EP developments. |
346
346
  | ๐Ÿ“‹ **[news-week-ahead.md](.github/workflows/news-week-ahead.md)** | `week-ahead` | Forward calendar, committee agenda, urgency-file outlook. |
347
347
  | ๐Ÿ”ญ **[news-month-ahead.md](.github/workflows/news-month-ahead.md)** | `month-ahead` | 30-day strategic horizon and risk forecast. |
348
+ | ๐ŸŒ **[news-quarter-ahead.md](.github/workflows/news-quarter-ahead.md)** | `quarter-ahead` | 90-day legislative pipeline forecast + presidency-trio overlay. |
349
+ | ๐Ÿ›ฐ๏ธ **[news-year-ahead.md](.github/workflows/news-year-ahead.md)** | `year-ahead` | 12-month strategic outlook with seat-projection sensitivity. |
350
+ | ๐Ÿ—“๏ธ **[news-term-outlook.md](.github/workflows/news-term-outlook.md)** | `term-outlook` | Full EP-term outlook anchored to the next-EP-election week. |
351
+ | ๐Ÿ—ณ๏ธ **[news-election-cycle.md](.github/workflows/news-election-cycle.md)** | `election-cycle` | EP-election span (ยฑ6 mo) โ€” mandate scorecard + seat projection + Spitzenkandidaten arithmetic. |
348
352
  | ๐Ÿ“Š **[news-week-in-review.md](.github/workflows/news-week-in-review.md)** | `week-in-review` | Past-week retrospective intelligence (D-8 โ†’ D-36 reporting window). |
349
353
  | ๐Ÿ“ˆ **[news-month-in-review.md](.github/workflows/news-month-in-review.md)** | `month-in-review` | Monthly retrospective with cross-run continuity analysis. |
354
+ | ๐Ÿ“š **[news-quarter-in-review.md](.github/workflows/news-quarter-in-review.md)** | `quarter-in-review` | Quarterly retrospective with pipeline transit + presidency-trio overlay. |
355
+ | ๐Ÿ“œ **[news-year-in-review.md](.github/workflows/news-year-in-review.md)** | `year-in-review` | Annual retrospective with mandate-fulfilment + term-arc + historical parallels. |
350
356
  | ๐Ÿ›๏ธ **[news-committee-reports.md](.github/workflows/news-committee-reports.md)** | `committee-reports` | Committee activity, rapporteur work, legislative-production analysis. |
351
357
  | โš–๏ธ **[news-motions.md](.github/workflows/news-motions.md)** | `motions` | Plenary motions, resolutions, urgency files, political signals. |
352
358
  | ๐Ÿ“œ **[news-propositions.md](.github/workflows/news-propositions.md)** | `propositions` | Legislative proposals and pipeline analysis. |
353
359
  | ๐ŸŒ **[news-translate.md](.github/workflows/news-translate.md)** | translation helper | 14-language flush translation (manual dispatch only). |
354
360
 
355
- Each unified workflow runs Stages Aโ€“E **in a single 45-minute session** and produces exactly one PR containing both the analysis artifacts and the rendered HTML. The earlier split-pair `news-<type>-analysis.md` + `news-<type>-article.md` layout was retired in the April-2026 aggregator migration. See **[.github/workflows/README.md](.github/workflows/README.md)** for compile / lock-file / safe-output mechanics, and **[WORKFLOWS.md](WORKFLOWS.md)** for the full CI/CD catalog.
361
+ Each unified workflow runs Stages Aโ€“E **in a single 60-minute session** (`engine.mcp.session-timeout: 65m`) and produces exactly one PR containing both the analysis artifacts and the rendered HTML. The earlier split-pair `news-<type>-analysis.md` + `news-<type>-article.md` layout was retired in the April-2026 aggregator migration. See **[.github/workflows/README.md](.github/workflows/README.md)** for compile / lock-file / safe-output mechanics, **[WORKFLOWS.md](WORKFLOWS.md)** for the full CI/CD catalog, and **[Article-Generation.md ยง Forward-looking horizons & election cycle](Article-Generation.md)** for the new long-horizon and electoral pipeline.
356
362
 
357
363
  > ๐Ÿ“š **Prompt Library (`.github/prompts/`)** โ€” 10 bounded-context prompt files (`00-scope-and-ground-rules.md` โ†’ `09-troubleshooting.md`) shared across every workflow. The `npm run lint:prompts` drift-guard fails CI on banned patterns (`checkpoint pr`, `keep-alive`, `heartbeat`, `progressive safe output`, `push_repo_memory`).
358
364
 
@@ -426,7 +432,7 @@ import type { ArticleCategory, LanguageCode } from 'euparliamentmonitor/types';
426
432
 
427
433
  ## ๐Ÿ”Œ Data Sources
428
434
 
429
- **Primary โ€” European Parliament MCP Server** ([Hack23/European-Parliament-MCP-Server](https://github.com/Hack23/European-Parliament-MCP-Server) v1.2.19+, fully operational):
435
+ **Primary โ€” European Parliament MCP Server** ([Hack23/European-Parliament-MCP-Server](https://github.com/Hack23/European-Parliament-MCP-Server) v1.2.20+, fully operational):
430
436
 
431
437
  - ๐Ÿ—ณ๏ธ Plenary sessions, voting records, roll-call votes
432
438
  - ๐Ÿ“œ Adopted texts, motions, resolutions, urgency files
@@ -560,7 +566,7 @@ Six-phase roadmap from current agentic news generation to AGI-enhanced transform
560
566
  timeline
561
567
  title EU Parliament Monitor โ€” AI Evolution Roadmap
562
568
  section Phase 1 (2026)
563
- Agentic News : 8 unified workflows
569
+ Agentic News : 14 unified workflows
564
570
  : 14-language generation
565
571
  : Deterministic aggregator
566
572
  : 51-artifact analysis catalog
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "euparliamentmonitor",
3
- "version": "0.8.53",
3
+ "version": "0.8.54",
4
4
  "type": "module",
5
5
  "description": "European Parliament Intelligence Platform - Monitor political activity with systematic transparency",
6
6
  "main": "scripts/index.js",
@@ -169,7 +169,7 @@
169
169
  "node": ">=25"
170
170
  },
171
171
  "dependencies": {
172
- "european-parliament-mcp-server": "1.2.19",
172
+ "european-parliament-mcp-server": "1.2.20",
173
173
  "markdown-it": "^14.1.1",
174
174
  "markdown-it-anchor": "^9.2.0",
175
175
  "markdown-it-attrs": "^4.3.1",
@@ -17,7 +17,7 @@
17
17
  * originatingDate: string โ€” YYYY-MM-DD
18
18
  * statement: string โ€” The forward-looking statement text
19
19
  * expectedHorizon: string โ€” YYYY-MM-DD or ISO week (e.g. "2026-W18")
20
- * status: "open" | "implemented" | "superseded" | "abandoned"
20
+ * status: "open" | "implemented" | "superseded" | "abandoned" | "resolved" | "stale" | "extended"
21
21
  * lastObservedDate: string โ€” YYYY-MM-DD of last run that touched this entry
22
22
  * evidenceRefs: string[] โ€” EP document IDs or procedure IDs supporting the claim
23
23
  * }
@@ -44,7 +44,10 @@ import path from 'node:path';
44
44
  import process from 'node:process';
45
45
 
46
46
  const REGISTRY_DIR = path.resolve(process.cwd(), 'analysis/forward-statements');
47
- const VALID_STATUSES = /** @type {const} */ (['open', 'implemented', 'superseded', 'abandoned']);
47
+ const VALID_STATUSES = /** @type {const} */ ([
48
+ 'open', 'implemented', 'superseded', 'abandoned',
49
+ 'resolved', 'stale', 'extended',
50
+ ]);
48
51
 
49
52
  // ---------------------------------------------------------------------------
50
53
  // Public helpers (exported for Vitest)
@@ -276,6 +279,52 @@ export function readEntries(opts) {
276
279
  return results;
277
280
  }
278
281
 
282
+ /** Statuses that close out an expired forward statement (all terminal states). */
283
+ const RESOLVED_STATUSES = [
284
+ 'implemented', 'superseded', 'abandoned',
285
+ 'resolved', 'stale', 'extended',
286
+ ];
287
+
288
+ /**
289
+ * Return forward-statement entries whose `expectedHorizon` is before `today`
290
+ * and whose latest status is NOT a terminal state (implemented, superseded,
291
+ * abandoned, resolved, stale, or extended).
292
+ * These are "expired unresolved" entries that Stage B must close out.
293
+ *
294
+ * @param {object} [opts] - Options
295
+ * @param {string} [opts.today] - Override today's date (YYYY-MM-DD); defaults to UTC today
296
+ * @param {string} [opts.registryDir] - Override registry directory (used in tests)
297
+ * @returns {Record<string, unknown>[]} Expired unresolved entries
298
+ */
299
+ export function readExpiredUnresolved(opts) {
300
+ const today = opts?.today ?? new Date().toISOString().slice(0, 10);
301
+ const all = readEntries({ registryDir: opts?.registryDir });
302
+ const expired = [];
303
+ for (const entry of all) {
304
+ if (typeof entry.expectedHorizon !== 'string') {
305
+ process.stderr.write(
306
+ `Skipping forward-statement entry "${entry.id}" with missing expectedHorizon\n`,
307
+ );
308
+ continue;
309
+ }
310
+ let horizon;
311
+ try {
312
+ horizon = normaliseHorizon(/** @type {string} */ (entry.expectedHorizon));
313
+ } catch (error) {
314
+ process.stderr.write(
315
+ `Skipping forward-statement entry "${entry.id}" with invalid expectedHorizon ` +
316
+ `"${entry.expectedHorizon}": ${error instanceof Error ? error.message : String(error)}\n`,
317
+ );
318
+ continue;
319
+ }
320
+ if (horizon >= today) continue;
321
+ const status = typeof entry.status === 'string' ? entry.status : '';
322
+ if (RESOLVED_STATUSES.includes(status)) continue;
323
+ expired.push(entry);
324
+ }
325
+ return expired;
326
+ }
327
+
279
328
  /**
280
329
  * Update an existing entry's status, lastObservedDate, and optionally append
281
330
  * an evidence reference. The update is written as a new JSONL line in the
@@ -441,7 +490,7 @@ export function cli(argv) {
441
490
  '',
442
491
  'Commands:',
443
492
  ' append [--file <path>] Append entries from a JSON array file (or stdin)',
444
- ' read [--status open|implemented|superseded|abandoned]',
493
+ ' read [--status open|implemented|superseded|abandoned|resolved|stale|extended]',
445
494
  ' [--horizon-from YYYY-MM-DD] [--horizon-to YYYY-MM-DD] [--electoral-mode]',
446
495
  ' Read and print matching entries as JSON array',
447
496
  ' update --id <id> --status <status> [--evidence <ref>] [--date YYYY-MM-DD]',