feat(Research): add provider-specific execution guides for researcher agents#1253
Open
Kharsys wants to merge 1 commit into
Open
feat(Research): add provider-specific execution guides for researcher agents#1253Kharsys wants to merge 1 commit into
Kharsys wants to merge 1 commit into
Conversation
… agents Add four execution guides under skills/Research/Workflows/Execution/ that own the wire-format details for the four Researcher agents: - ClaudeExecution.md (built-in WebSearch tool) - GeminiExecution.md (gemini CLI with Google Search grounding) - GrokExecution.md (xAI Chat Completions API with live search) - PerplexityExecution.md (Perplexity Sonar Chat Completions API) Each guide documents the provider call shape, model selection table by research mode (Quick / Standard / Extensive / Deep), citation extraction rules, URL verification via curl, file-based output JSON schema, and a no-silent-fallback policy: a researcher whose provider fails returns a structured error rather than swapping to a different provider. Each Researcher agent now reads its sibling execution guide as the third step of its startup sequence (after voice notification and Context load), so the agent files stay focused on persona, voice, and output format while the wire-format detail lives with the Research skill that delegates to them. The SKILL.md gains an Agent Execution Guides section under Workflow Routing that points to the four guides.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three of the four Researcher agents (Gemini, Grok, Perplexity) currently have no provider-specific call code anywhere in the Research skill or in the agent files. With no API/CLI wire-format defined, each non-Claude agent collapses to the same backend (built-in
WebSearchunder a different persona name), so "multi-model research" via Standard / Extensive mode does not actually exercise multiple models. This PR adds the missing execution layer.What's added
A new directory
Releases/v5.0.0/.claude/skills/Research/Workflows/Execution/with four guides, one per researcher:ClaudeExecution.mddocuments theWebSearchpath (included for parity, no behavior change)GeminiExecution.mddocuments thegeminiCLI invocation with Google Search groundingGrokExecution.mddocuments the xAI Chat Completions API call with live search enabledPerplexityExecution.mddocuments the Perplexity Sonar Chat Completions API callEach guide owns the provider call shape (CLI or
curlwithjq -n --argfor safe user-input escaping), the model selection table mapped to research modes, citation extraction rules, URL verification viacurl, the file-based output JSON schema, and a fallback policy that retries once at a lower model tier then writes a stub error file. Never silently swaps providers.Agent changes
Each of
ClaudeResearcher.md,GeminiResearcher.md,GrokResearcher.md,PerplexityResearcher.mdgains step 3 in its Mandatory Startup Sequence: read the sibling execution guide. Existing persona, voice, output format, Research Philosophy and Research Methodology sections are unchanged. Nothing was removed.SKILL.md change
A new
### Agent Execution Guidessubsection under## Workflow Routingpoints to the four guides and states the no-silent-fallback policy at the skill level.File-based output schema
Each Execution guide documents a shared JSON shape for
${research_dir}/<agent-slug>.json:{ "agent": "claude|gemini|grok|perplexity", "query": "...", "summary": ["..."], "sources": [{ "title": "...", "url": "...", "verified": true }], "confidence": 0.0, "full_findings": "..." }The schema is shared across all four researchers so a downstream synthesis step can cross-reference findings agnostic of which provider produced them. Current upstream Research workflows synthesize inline as text rather than from files; this schema is therefore forward-looking with respect to the merged tree, standardizing the contract for any future file-based synthesizer. If
research_diris not provided by the caller, each researcher returns the same payload inline and skips file writing.Correctness property preserved
A researcher whose provider call fails writes a stub file (
summary: [], error reason infull_findings) rather than substitutingWebSearch. The orchestrator's decision stays explicit: it can surface the gap to the user or substitute a different researcher. Silent substitution would defeat the purpose of multi-model research.Why no OpenAI / GPT researcher
GPT plus web search via the OpenAI Responses API is architecturally similar to the Claude plus
WebSearchpath (LLM-with-search, citation-after-generation). It does not add an orthogonal coverage angle that the existing four researchers do not already cover. Grok contributes live X data and STEM strength; Perplexity contributes retrieval-first architecture with citations bundled into the response; Gemini contributes Google Search grounding. Each is structurally different. If a fifth researcher pointed at GPT-4o/5 is desired later, it can be added with the same Execution-guide pattern.Smoke test recipe
Local setup expects
~/.claude/.envwithXAI_API_KEY,PERPLEXITY_API_KEY, andGEMINI_API_KEYpopulated, plus thegeminiCLI installed (validated against v0.39.1).Expected: response content plus at least one citation URL. Missing-key scenarios should produce auth errors that each agent maps to the stub error file documented in the corresponding execution guide.
Diff stat