NewsAPI + Challenge Tone + Expiry Policy (WI-2)

Context

Wire up live news content pipeline with challenge tone in AI prompts and 30-day expiry for news-derived facts.

Challenges

Challenge 2.1: Challenge Tone in AI Prompts

Requirement: AI extraction and generation use canonical challenge voice. Acceptance Criteria:

  • CHALLENGE_TONE_PREFIX constant in packages/ai/src/fact-engine.ts
  • Injected into extractFactsFromStory() system prompt
  • Injected into generateEvergreenFacts() system prompt Evaluation: PASS

Challenge 2.2: 30-Day Expiry Policy

Requirement: News-derived facts expire after 30 days. Acceptance Criteria:

  • insertFactRecord accepts expiresAt parameter
  • News-extracted facts get expires_at = now + 30d
  • Expiry enforced in archive-content cron Evaluation: PASS

Challenge 2.3: High-Engagement Promotion

Requirement: Facts with 50+ interactions auto-promote to enduring. Acceptance Criteria:

  • promoteHighEngagementFacts query function exists
  • Called from archive-content cron
  • Sets expires_at = null for high-engagement facts Evaluation: PASS

Challenge 2.4: Extract Facts Handler Updated

Requirement: Fact extraction handler wires tone prefix. Acceptance Criteria:

  • apps/worker-facts/src/handlers/extract-facts.ts uses tone prefix Evaluation: PASS

Evaluation Summary

ChallengeResult
2.1 Challenge Tone in AIPASS
2.2 30-Day ExpiryPASS
2.3 High-Engagement PromotionPASS
2.4 Extract HandlerPASS

Score: 4/4 PASS