Single Python script (scripts/run.py) with sequential steps. No agent framework — just Anthropic API calls with structured prompts. Prompts live in prompts/*.md and are loaded at runtime for easy iteration.
Fetches 16 RSS feeds via feedparser. Deduplicates by URL and content hash. Stores new headlines in SQLite.
Prompt: prompts/filter.md
Bulk filters ~100-300 headlines down to top 20 structural trends. Rejects breaking news, one-off events, political actions, price movements. Includes trend-level dedup via active cluster list.
Applies time decay (-3 points/day) to scored headlines. Expires those below threshold.
Prompt: prompts/score.md
Scores headlines on trend strength, relatability, novelty, and company mapping. Assigns trend_cluster labels and suggests tickers. Context-aware: sees recent tickers and clusters to avoid repetition.
Prompt: prompts/write.md
Selects top 3 candidates with diversity constraints (no trend/ticker overlap). Writes sequentially — each article sees the previous ones. Produces markdown articles with company picks and sources.
| Step | Model | Why |
|---|---|---|
| Filter | Haiku 4.5 | Cheap bulk filtering, doesn't need deep judgment |
| Score | Opus 4.6 | Editorial judgment on ticker quality, trend classification |
| Write | Opus 4.6 | Prose quality, style adherence, context handling |