Media & Document Verification

Timeline Builder

Skip to main content
< All Topics
Print

Timeline Builder

Build dated, source-cited timelines through conversational intake, web research, event extraction, and Cool Timelines Pro publishing.

Workflow


Phase 1  Intake ──► Phase 2  Research ──► Phase 3  Extract
  │                                           │
  └─ user refines scope ◄── Phase 4  Review ◄─┘
                                 │
                           Phase 5  Publish ──► Phase 6  Frontmatter

Phase 1: Intake and Scoping

Accept the user’s request and resolve it into structured parameters:

Parameter Question to resolve Default
Subject Who or what is this timeline about? (required)
Scope Date range, geographic focus, topical focus? All available dates
Source strategy Existing KB document, web research, or both? See decision tree
Timeline type accountability, legislative, legal, general? Infer from category
Output target Which KB document gets the timeline frontmatter? Existing doc or new

Decision tree

  • User names a KB slug → load that document as primary source, supplement with web research if dates are sparse.
  • User names a topic without a KB doc → research-first mode via Tavily.
  • User says both → merge KB body + fresh web research.

If the request is ambiguous, ask one clarifying question before proceeding.

PU category → timeline type mapping

KB category Timeline type Extraction focus
convicted-and-indicted accountability Indictments, convictions, sentences, appeals
trump-family-and-associates accountability Business deals, appointments, investigations
trump-administration accountability Official actions, firings, EOs, scandals
federal-legislators accountability Votes, statements, committee actions
state-legislators accountability State-level actions, elections, legal
political-operatives accountability Campaign activities, investigations, connections
media-figures accountability Statements, lawsuits, retractions, platform actions
voting legislative Registration deadlines, law changes, court rulings
legal legal Court decisions, EOs, enforcement actions
All others general Key developments, policy changes, incidents

Phase 2: Web Research

Compose with Tavily to gather date-bearing source material.

  1. Run tvly search queries targeting the subject + date-bearing keywords (e.g., “Stephen Miller immigration policy timeline 2017-2026”)
  2. For each promising result, run tvly extract to pull full article content
  3. For deep topics, run tvly research for a comprehensive synthesis
  4. Capture published_date from every result (per the Publication Date Rule in patriot-content-authoring)
  5. Store results in a structured intermediate format

For accountability subjects add searches for:

  • "{subject}" indictment OR conviction OR investigation OR resignation
  • "{subject}" executive order OR appointment OR fired OR sanctions

If published_date cannot be determined, record "[publication date not available]".


Phase 3: Event Extraction

Use Claude to extract structured timeline events from all gathered material.

Event schema


{
  "events": [
    {
      "date": "MM/DD/YYYY",
      "title": "Short event title (10 words max)",
      "description": "One-paragraph summary with source attribution",
      "source_url": "https://...",
      "source_name": "Publication name",
      "source_date": "Month Day, Year",
      "confidence": "high|medium|low"
    }
  ],
  "subject_name": "Full name or topic",
  "date_range": "YYYY – YYYY",
  "timeline_type": "accountability|legislative|legal|general"
}

Confidence tiers

Tier Definition Examples
high Primary source or official record Court filings, government press releases, executive orders
medium Credible secondary reporting AP, Reuters, NYT, WaPo, ProPublica
low Single-source reporting or inferred date Blog posts, social media, estimated dates

Extraction rules

  • Extract only events with specific, determinable dates
  • Use the first of the month if only month+year is known
  • Cite the source for every event
  • Order chronologically, earliest first
  • Minimum 3 events, maximum 30 events
  • Deduplicate events appearing in multiple sources (keep highest-confidence version)

Phase 4: User Review

Present extracted events for review before publishing:


Timeline: {subject_name} ({date_range})
Type: {timeline_type}
Events: {count}

 1. [MM/DD/YYYY] {title}
    {description}
    Source: {source_name}, {source_date}. {source_url}
    Confidence: {confidence}

The user may:

  • Approve → proceed to Phase 5
  • Edit an event (date, title, description)
  • Remove an event
  • Add an event manually
  • Request more research on a gap
  • Change scope (“extend to 2026”, “focus only on legal actions”)

Loop back to Phase 2 or 3 as needed until the user approves.


Phase 5: Publish to Cool Timelines Pro

Once approved, publish to WordPress using the existing timeline infrastructure.

Every event date must be in Cool Timelines Pro format: MM/DD/YYYY 12:00 am.

Using WPTimelineClient:

  1. ensure_story_category("PU: {title}", "pu-{slug}") — create/find category
  2. create_story() per event — with title, content, date_str, category_ids, story_order
  3. build_shortcode() — generate the [cool-timeline] shortcode

Phase 6: Store in Frontmatter

Update the target KB document’s YAML frontmatter:


timeline_shortcode: "[cool-timeline category=\"pu-{slug}\" ...]"
timeline_story_ids: [11422, 11424, 11425]
timeline_category: "pu-{slug}"

These fields are:

  • Protected during normal editor saves (doc_service.py)
  • Injected into WordPress post content at publish time (pu_publish.py)
  • Not part of the content hash (timeline changes alone do not trigger republish)

After writing frontmatter, run pu_publish.py --apply --only {slug} to push.


Composed skills

Skill Role
tavily-search Web search for date-bearing events
tavily-extract Full article content from promising URLs
tavily-research Deep synthesis for complex multi-year topics
patriot-content-authoring Publication date rule, frontmatter conventions
accountability-profile-verification Source citation standards for accountability timelines
fact-checking Verify extracted events when confidence is low
patriot-sanity-check Final proportionality and accuracy check

Guardrails

  • Apply patriot-private-citizen-inclusion-gate before building timelines for any individual.
  • Apply patriot-sanity-check on the final event list before publishing.
  • Never include events sourced solely from social media without corroboration.
  • Events tagged confidence: low must be flagged to the user during review.
Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
Please Share Your Feedback
How Can We Improve This Article?
Table of Contents