Research
Delegate all research to a sub-agent. The primary agent receives a synthesized result, not raw search output.
When to Delegate
Delegate any research task that:
- Requires 2+ searches or source lookups
- Is exploratory (unknown territory, open-ended questions)
- Spans multiple systems (workspace KB + BQ, codebase + Jira, etc.)
- Would accumulate significant raw output inline
Single targeted lookups (one grep, one file read, one known query) can run inline.
Sub-agent Type
- Explore — read-only search across filesystem, workspace KB, grep, BQ queries. Use for most research.
- general-purpose — when research requires writing intermediate files, running scripts, or multi-step computation.
Research Protocol (Brief the Sub-agent)
The sub-agent should work through these sources in order, stopping when it has sufficient confidence:
- Workspace KB —
mcp__qmd__querytool (not theqmdCLI — a shared daemon backs this MCP server; invoking the CLI directly spawns a separate process and defeats it) — prior analyses, domain docs, BQ data dictionary, strategy, headcount, customer context - Codebase — Glob/Grep/Read — source of truth for implementation details
- BigQuery —
mcp__bigquery__query— live warehouse data; alwaysdry_runfirst - Jira —
mcp__jira__jira_issues_searchJQL — ticket status, project decisions, delivery context - Web —
mcp__kagi__kagi_search_fetch(search) /mcp__kagi__kagi_extract(full-page content) — external docs, standards, anything not internal. Fall back tomcp__codex__codexonly for multi-step research Kagi's two tools can't cover alone.
Sub-agent Briefing Template
Every Agent tool call for research must include:
Context: [What the overall question is and why it matters — 1-2 sentences]
Question: [The specific research question to answer]
Sources: [Which layers of the research protocol to check, in order]
Output: Synthesized summary — findings, gaps, and confidence level. Under 300 words unless the question demands more detail. No raw search output.
Output Contract
The sub-agent returns a synthesized summary. The primary agent then:
- Reads the summary (not the raw search transcripts)
- Surfaces the findings to the user
- Proceeds with the task informed by the research
If the sub-agent reports gaps or uncertainty, surface those explicitly before proceeding.