Content OS

Discovery

Find articles worth writing about - source-first crawl plus optional search-first URL discovery.

Vertical: Digital · Status: ✅ Live Back to Digital · workflows index


Trigger

Daily morning cron sweep, plus manual fetch per tenant.

Flow

source crawl (configured sources)
   + search-first discovery (LLM-built queries -> Tavily)
        |
isArticleShapedUrl gate     <- rejects landing/hub pages
        |
extraction cascade: Readability -> Tavily -> Crawl4AI/Apify
        |
record scraperSource per row
        |
dedupe on the canonical URL      <- tracking params, www., fragments normalised
        |
land as enrichmentStatus: pending

The URL gate

isArticleShapedUrl rejects landing and product pages (/savings-account, /blogs) before they ever reach the feed - only date-stamped, id-bearing or 4+-word-slug URLs pass.

Every row also records scraperSource (local | tavily | crawl4ai | apify | rss | html-fallback), so the extractor mix is queryable rather than guessed at.

Agents involved

Query generation is a small OpenAI call, capped at 700 output tokens and pinned to OpenAI - it must not fall through the script provider chain. It, and every Tavily, Apify, GNews and NewsAPI call, is timed and failure-ledgered on the monitor console's Integrations page, and the fetch-run and source-profile backlogs are gauges with a backlog alert.

On the console, the feed reads over a rolling window - Today is the last 24 hours, not the calendar day - with the same count on every surface, saved and score-state filters, and nothing pre-selected downstream.

The Source Profiler (Learning Agent sub-agent) now learns each source rather than crawling it blind: a one-time, verified scrape profile per news source - CSS selectors tested against sampled pages, URL patterns re-selected over the real listing, a separate sample judge that tells an article from a share-price page, and verified patterns promoted to an allowlist. Competitor sources (scrapable blogs/sites) profile through the same path. A ready profile skips feed autodiscovery, overrides the generic link gate, and its hints feed both the enrichment prompt and the Tavily search-query prompt. Three consecutive dry crawls mark a profile stale for automatic re-profiling.

Gaps

Query generation still does not learn from what got queued - the profiler learns sources, not reviewer selections. Falls back to deterministic queries at the configured count when the LLM fails.

Roadmap source

Page 3 - Platform Discovery, Competition Research; page 1 Outside world DATA — see roadmap_ref_extracted.md.

Source: roadmap/workflows/digital/discovery/README.md