Skip to content

feat: Phase 1 discovery adapters — Reddit, Dev.to, Stack Overflow, GitHub Discussions#9

Merged
bradygaster merged 2 commits intomainfrom
squad/phase1-adapters
Mar 12, 2026
Merged

feat: Phase 1 discovery adapters — Reddit, Dev.to, Stack Overflow, GitHub Discussions#9
bradygaster merged 2 commits intomainfrom
squad/phase1-adapters

Conversation

@bradygaster
Copy link
Owner

Phase 1 Source Expansion

Adds 4 new discovery adapters to the SourceAdapter/SourceRegistry architecture from PR #8, dramatically expanding ACCES coverage from ~32% to an estimated ~65% of Aspire community conversation.

New Adapters

Adapter Source Auth Signal Types
RedditSourceAdapter r/dotnet, r/csharp, r/programming, r/aspnetcore None (public JSON API) Confusion, complaints, adoption stories
DevToSourceAdapter Tag search: dotnetaspire, aspire, dotnet None (public REST API) Blog articles with engagement metrics
StackOverflowSourceAdapter Tagged questions via SE API v2.3 Optional API key Documentation gaps, confusion patterns
GitHubDiscussionsSourceAdapter dotnet/aspire discussions via GraphQL GITHUB_TOKEN Feature requests, community Q&A

Architecture

All adapters implement the \SourceAdapter\ interface and are registered in \createDefaultRegistry(). The registry runs them in parallel with graceful degradation — if any adapter fails, others continue.

Zero New Dependencies

All adapters use Node.js built-in \ etch\ and existing @octokit/rest. No new npm packages.

Issues Closed

Closes #2 (Dev.to), closes #4 (GitHub Discussions), closes #6 (Reddit), closes #7 (Stack Overflow)

Files Changed

  • \src/discovery/adapters/reddit.ts\ — NEW
  • \src/discovery/adapters/devto.ts\ — NEW
  • \src/discovery/adapters/stackoverflow.ts\ — NEW
  • \src/discovery/adapters/discussions.ts\ — NEW
  • \src/discovery/adapters/index.ts\ — Updated to register all 4 adapters

… GitHub Discussions)

New adapters implementing the SourceAdapter pattern from #1:

- RedditSourceAdapter (#6): Fetches from r/dotnet, r/csharp, r/programming,
  r/aspnetcore via public JSON API with rate limiting
- DevToSourceAdapter (#2): Tag-based article search with pagination,
  cross-tag deduplication, and engagement metrics
- StackOverflowSourceAdapter (#7): Stack Exchange API v2.3 with gzip
  decompression, optional API key, unanswered question detection
- GitHubDiscussionsSourceAdapter (#4): GraphQL-based dotnet/aspire
  discussions with pagination and signal inference

All adapters registered in createDefaultRegistry(). Zero new
dependencies — uses Node.js built-in fetch and existing @octokit/rest.

Closes #2, closes #4, closes #6, closes #7

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bradygaster
Copy link
Owner Author

Pattern Compliance Review PASSED

All 4 new adapters correctly implement the SourceAdapter pattern:

✅ Required Properties:

eddit.ts:
ame='reddit', displayName='Reddit', channel='reddit'

  • devto.ts:
    ame='devto', displayName='Dev.to', channel='devto'
  • stackoverflow.ts:
    ame='stackoverflow', displayName='Stack Overflow', channel='stackoverflow'
  • discussions.ts:
    ame='github-discussions', displayName='GitHub Discussions', channel='github'

✅ Required Methods:

  • All implement �alidate() returning AdapterValidation
  • All implement discover(state: RunState) returning DiscoveryResult[]

✅ Registration:

  • All 4 adapters properly registered in createDefaultRegistry()

Pattern implementation is consistent and follows the established SourceAdapter contract.

- Stack Overflow: handle both gzip and plain JSON responses by checking
  Content-Encoding header with fallback try/catch
- GitHub Discussions: check for GraphQL errors before accessing data,
  handle response.data.data nesting correctly
- Dev.to: handle 429 rate limit responses with Retry-After header support

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bradygaster bradygaster merged commit 686f872 into main Mar 12, 2026
2 checks passed
@bradygaster bradygaster deleted the squad/phase1-adapters branch March 12, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant