Module: Validation/EveningAnalysis

INTELLIGENCE OPERATIVE PERSPECTIVE

This validator ensures that evening analysis articles meet the rigorous standards for political intelligence assessment publications. Evening analysis represents the platform's highest-depth analytical product - synthesizing parliamentary events, historical context, international comparisons, and forward-looking assessments into a comprehensive intelligence briefing format.

STRUCTURAL VALIDATION FRAMEWORK: Evening analysis articles must demonstrate the Five Editorial Pillars structure:

  1. Event Summary (What happened today?)

    • Factual description of parliamentary developments
    • Primary source citations (votes, speeches, documents)
    • Timeline reconstruction for complex events Intelligence value: Baseline facts for deeper analysis
  2. Contextual Analysis (Why does it matter?)

    • Connection to broader policy debates
    • Historical precedent analysis
    • Trend identification and pattern recognition Intelligence value: Understanding significance and intent
  3. Party Perspectives (What do stakeholders want?)

    • Documented positions from all major parties (8+ Swedish parties)
    • Identified beneficiaries and losers
    • Coalition impact assessment Intelligence value: Political implications and next moves
  4. International Context (How does Sweden compare?)

    • Cross-country policy comparisons
    • International precedent cases
    • EU/Nordic policy alignment Intelligence value: Assessing Swedish positioning
  5. Forward-Looking Assessment (What happens next?)

    • Predicted political outcomes
    • Implementation timeline
    • Risk/opportunity assessment Intelligence value: Anticipating developments

ANALYTICAL DEPTH METRICS:

  • Analytical Score (0.0-1.0): Depth of political analysis 0.0 = Surface-level description only 0.5 = Analysis of immediate implications 1.0 = Deep structural analysis with multiple perspectives

  • Historical Context (0-3 scale): Depth of historical research 0 = No historical references 1 = Recent historical analogs (past 5 years) 2 = Longer historical perspective (past 20 years) 3 = Deep historical comparison with long-term trends

VALIDATION CHECKLIST:

  • Pillar Structure: All 5 pillars present and substantive (100+ words each)
  • Party Coverage: ≥5 of 8 major parties represented
  • Source Density: ≥10 distinct MCP tool citations
  • International Comparison: ≥2 countries referenced
  • Forward Assessment: Explicit predictions or risk assessment present
  • Quality Score: Combined metrics ≥80/100

INTELLIGENCE QUALITY STANDARDS:

  • Claim Backing: Every assertion requires source citation
  • Alternative Analysis: Presents competing interpretations
  • Confidence Assessment: Distinguishes high-confidence from speculative analysis
  • Uncertainty Acknowledgment: Notes gaps in available intelligence
  • Update Tracking: Links to previous analysis on same topic

OPERATIONAL DEPLOYMENT:

  1. Automated pre-publication validation (exit code 1 = block)
  2. Editorial dashboard metric display
  3. Trend analysis over time (improvement tracking)
  4. Comparative analysis across article types
  5. Reporter performance analytics

MACHINE LEARNING INTEGRATION:

  • Trains future content generation models on validated quality
  • Enables anomaly detection (unusually brief/shallow analysis)
  • Supports recommendation of historical references
  • Optimizes party perspective selection

GDPR COMPLIANCE ASPECTS:

  • Member quotes tracked and linked to source documents
  • Personal data mentions counted and logged
  • Consent validation for sensitive content
  • Processing audit trail for each article
Version:
  • 2.1.0
Since:
  • 2024-09-01
Author:
  • Hack23 AB (Intelligence Analysis & Quality Assurance)
License:
  • Apache-2.0
Source:
See:
  • EDITORIAL_STANDARDS.md (Five Pillars Structure)
  • scripts/editorial-pillars.js (Pillar Detection Engine)
  • news/2026-02-13-evening-analysis-*.html (Example Articles)
  • Issue #156 (Quality Gate Enhancement)

Methods

(inner) calculateAnalyticalDepth()

Calculate analytical depth score (0.0-1.0)

Source:

(inner) calculateQualityScore()

Calculate overall quality score (0.0-1.0)

Source:

(inner) countPartyPerspectives()

Count party perspectives (using shared party-variants module)

Source:

(inner) countWords()

Count words in section

Source:

(inner) detectHistoricalContext()

Detect historical context (0-3 scale)

Source:

(inner) extractLeadParagraph()

Extract lead paragraph

Source:

(inner) extractSection()

Extract section content by heading

Source:

(inner) extractSections()

Extract sections from article (with multi-language support)

Source:

(inner) hasForwardLooking()

Check for forward-looking content

Source:

(inner) hasInternationalComparison()

Detect international comparison

Source:

(inner) parseArticle()

Parse HTML article

Source:

(inner) printValidation()

Print validation results

Source:

(inner) validateEveningAnalysis()

Main validation function

Source:

(inner) validateSources()

Validate sources

Source:

(inner) validateStructure()

Validate structure of article

Source: