Skip to content

feat: pluggable research provider abstraction#1

Open
kirbyremix wants to merge 13 commits intodbmcco:mainfrom
remixpartners:feat/pluggable-research-providers
Open

feat: pluggable research provider abstraction#1
kirbyremix wants to merge 13 commits intodbmcco:mainfrom
remixpartners:feat/pluggable-research-providers

Conversation

@kirbyremix
Copy link

Summary

  • Replaces the hardcoded Perplexity (pp-cli) dependency with a pluggable research provider system, making the tool work out of the box with free/widely-available APIs
  • Fast tier: Claude's built-in WebSearch tool for domain specialist fact-checks (zero config, always available)
  • Deep tier: Gemini Deep Research via a new Python CLI wrapper for Dr. Petrov's comprehensive multi-source analysis
  • Backward compatible: Perplexity remains a config option for existing users — no breaking changes

Key changes

  • New .claude/lib/gemini-research.py — async Gemini Deep Research CLI wrapper with polling, JSON output, and citation extraction
  • New .claude/config.json research block — defines provider types, commands, and tier assignments
  • All 8 specialist prompts updated to use WebSearch or Gemini instead of pp-cli
  • prompts/moderator.md updated with new research flow
  • .claude/RESEARCH_INTEGRATION.md fully rewritten for multi-provider architecture
  • Docs (README.md, QUICKSTART.md, CLAUDE.md) updated with new prerequisites
  • Zero stale pp-cli references in active code

Why this approach

Rather than swapping one vendor lock-in for another, this makes the research layer a first-class abstraction. New providers can be added by defining them in config.json — no prompt surgery needed. The design doc is at docs/plans/2026-02-21-research-provider-abstraction-design.md.

Test plan

  • Verified all specialist prompts reference WebSearch (fast tier) instead of pp-cli
  • Verified researcher prompt references gemini-research.py (deep tier) instead of pp-cli
  • Confirmed zero stale pp-cli references in active code via grep
  • Code review passed (3 issues found and fixed)
  • End-to-end test: gemini-research.py successfully called Gemini Deep Research API, polled for ~7 minutes, and returned structured JSON with 31k-character answer and 31 citations
  • Full scenario run with live specialist consultations (recommended before merge)

🤖 Generated with Claude Code

kirbyremix and others added 13 commits February 21, 2026 14:13
Design doc covers the pluggable provider architecture (two-tier:
WebSearch for fast, Gemini Deep Research for deep). Implementation
plan has 10 incremental tasks with commit-per-task approach.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Provides a drop-in replacement for pp-cli research mode using
Google's Gemini Deep Research API. Returns JSON in the same
format as pp-cli for compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Supports three providers: perplexity (original), websearch (Claude
built-in), and gemini-deep-research. Provider selection is
config-driven to support upstream contribution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace Perplexity pp-cli instructions with Claude WebSearch tool
guidance in all 7 domain/quality specialist prompts. Expert query
formulation guidance preserved. Critical evaluation guidance
unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dr. Anya Petrov now uses .claude/lib/gemini-research.py for
comprehensive multi-source analysis. Expert query formulation
and critical evaluation guidance preserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace pp-cli references with WebSearch (domain specialists)
and Gemini Deep Research (research specialist) throughout
Dr. Wells' moderator instructions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Documents the two-tier model (WebSearch fast + Gemini Deep Research
deep), provider configuration, backward compatibility with
Perplexity, and updated workflow examples.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Users can now choose between Gemini Deep Research (recommended),
Perplexity (original), or Claude WebSearch only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Documents available providers, configuration options, output
format, and how to add new providers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Updated CODEX.md, context_packet template, discovery_transcript
template, and phase-0 implementation notes. Only intentional
backward-compatibility references remain (config.json, provider
docs, Option B in prerequisites).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
I-1: Standardize confidence vocabulary to high/moderate/low
I-2: Restore domain-specific "When to use" examples in all
     6 specialist prompts (were over-genericized)
I-3: Restore contrarian "Challenge the sources themselves"
     instruction

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The script now automatically detects a project-level .venv and re-execs
itself with the correct Python, so google-genai is found without manual
PATH changes. Also adds .venv/ to .gitignore.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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