Skip to content

feat: add Twitter/X social research providers#2

Merged
dobosmarton merged 2 commits intomainfrom
feat/twitter-social-research-providers
Feb 16, 2026
Merged

feat: add Twitter/X social research providers#2
dobosmarton merged 2 commits intomainfrom
feat/twitter-social-research-providers

Conversation

@dobosmarton
Copy link
Copy Markdown
Owner

Summary

  • Add SocialData provider for direct Twitter/X search via SocialData.tools API — full tweet text, engagement metrics (likes, retweets, replies, views), and author info
  • Extend Serper provider with search_twitter() method for Twitter results via Google SERP, including author extraction from x.com/twitter.com URLs
  • Add include_twitter flag to CollectionConfig for opt-in activation of social signal collection
  • Extend ResearchSession and ResearchCollector with twitter result accumulation, dedup, and cross-provider merge logic
  • Add CLAUDE.md with project strategy, architecture decisions, and implementation roadmap

New components

Component Path Description
SocialDataClient verdandi/clients/socialdata.py httpx client with mock fallback when API key is missing
SocialDataProvider verdandi/providers/socialdata.py ResearchProviderPort implementation with cached collection
Serper Twitter verdandi/clients/serper.py search_twitter() + _extract_twitter_author()

Test plan

  • TestSocialDataClient — API response parsing, mock fallback, empty/malformed data handling
  • TestSerperClient.test_search_twitter_parses_response — fixture-based response parsing
  • TestSerperClient.test_extract_twitter_author — URL pattern extraction for x.com and twitter.com
  • TestSocialDataProvider — full provider lifecycle with cached collection
  • TestSerperProvider — extended with twitter collection assertions
  • TestResearchCollector — twitter merge logic across providers
  • Test fixtures: serper_twitter.json, socialdata_search.json

Add CLAUDE.md with full project strategy, stack decisions,
architecture overview, and implementation roadmap.
Add two new research sources for Twitter/X social signals:

- SocialDataClient: full Twitter search via SocialData.tools API
  with tweet text, engagement metrics, and author info
- SerperClient.search_twitter(): Twitter results via Google SERP
  with author extraction from x.com/twitter.com URLs
- SocialDataProvider: ResearchProviderPort implementation with
  cached collection and mock fallback
- SerperProvider: extended to collect Twitter discussions
- ResearchSession: twitter_results accumulation and dedup
- CollectionConfig: include_twitter flag for opt-in activation
- ResearchCollector: twitter merge logic across providers

Includes test fixtures and full test coverage for both providers.
@dobosmarton dobosmarton merged commit 0d71a7a into main Feb 16, 2026
3 checks passed
@dobosmarton dobosmarton deleted the feat/twitter-social-research-providers branch February 16, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant