/research:research-queryfrom research
Searches a local research corpus for relevant findings and synthesizes an answer with inline citations to REF sources. Supports tag, title, and full-text search with configurable depth.
Ships in research. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Ask a question against the local research corpus and get a synthesized answer with inline citations.
/research-query "question"<question> (required)A natural language question to answer from the corpus.
--depth (optional)Search depth: quick (tag + title matching only) or thorough (full-text content search). Default: thorough.
--backend (optional)Retrieval backend for the executable source-selection wrapper: fortemi-core or local. Default: fortemi-core.
By default, research-query uses the Fortemi static cache after it is synced
with aiwg index sync; missing, stale, or malformed caches fail with recovery guidance
instead of falling back silently. Use --backend local only for the legacy
local corpus fallback.
--save (optional)Save the synthesized answer as a new artifact in .aiwg/research/synthesis/.
--sources-only (optional)List matching sources without synthesizing an answer.
--include-diagnostics (optional)Include quarantine and generated integrity/artifact scan records in source selection. They are excluded by default because diagnostics are not research evidence. Scan severity or confidence labels never become GRADE evidence quality; only an explicit GRADE declaration or grade tag is accepted.
--max-sources (optional)Maximum number of sources to read and synthesize from. Default: 10.
The executable CLI wrapper aiwg research-query performs deterministic source
selection from synced Fortemi record text/chunks without rereading source files
and can emit JSON for tests and automation. It does not replace the
skill's synthesis responsibilities; agents still write the final answer with
GRADE-aware hedging, contradictions, gaps, and inline REF citations.
Search the local research corpus for relevant sources:
tags: fields in .aiwg/research/findings/REF-*.md for topic matchestitle: frontmatter fields--depth thorough): Search body content of all REF-XXX notes for question terms.aiwg/research/synthesis/ for existing synthesis on the topic.aiwg/research/knowledge/ for related concept notesSearch locations (priority order):
.aiwg/research/findings/REF-*.md # Primary: literature notes
.aiwg/research/synthesis/*.md # Secondary: existing synthesis
.aiwg/research/knowledge/*.md # Tertiary: knowledge base entries
For each matching source (up to --max-sources):
Synthesize a comprehensive answer from the matched sources:
Answer format:
## Answer
[Synthesized answer with inline citations]
Evidence strongly supports that agent orchestration patterns improve
task completion rates by 30-45% compared to single-agent approaches
(REF-012, REF-034). However, this comes with increased latency —
REF-067 measured a 2-3x slowdown for multi-agent coordination on
tasks under 5 minutes. Limited evidence indicates that the breakeven
point is approximately 15 minutes of task complexity (REF-042, GRADE: Low).
### Sources Consulted
| REF | Title | GRADE | Relevance |
|-----|-------|-------|-----------|
| REF-012 | Multi-Agent Orchestration Patterns | High | Direct |
| REF-034 | Agent Coordination Benchmarks | Moderate | Direct |
| REF-067 | Latency Analysis of LLM Pipelines | Moderate | Supporting |
| REF-042 | Cost-Benefit of Agent Architectures | Low | Tangential |
### Evidence Quality
- 1 HIGH, 2 MODERATE, 1 LOW sources
- Overall confidence: MODERATE
### Gaps
- No sources address orchestration in resource-constrained environments
- Missing: longitudinal studies on orchestration pattern stability
### Related Queries
- "What are the latency costs of multi-agent systems?"
- "How does orchestration affect token consumption?"
If --save is specified, write the answer as a synthesis artifact:
.aiwg/research/synthesis/query-<slug>-<date>.md
With frontmatter:
---
type: query-synthesis
question: "<original question>"
date: YYYY-MM-DD
sources: [REF-012, REF-034, REF-067, REF-042]
confidence: moderate
---
| Skill | Purpose | Searches |
|---|---|---|
research-query | Answer questions from corpus | Local corpus only |
research-discover | Find new papers in external databases | External (arXiv, Semantic Scholar) |
research-gap | Identify missing coverage areas | Local corpus (intellectual gaps) |
corpus-health | Check structural integrity | Local corpus (structural health) |
research-cite | Format a citation | Single REF-XXX note |
aiwg index query | Generic artifact search | All .aiwg/ artifacts |
# Ask a question
/research-query "What are the security risks of LLM agents?"
# Quick search (tags and titles only)
/research-query "prompt injection defenses" --depth quick
# Use the Fortemi Core static cache for source selection
aiwg research-query "prompt injection defenses" --sources-only --json
# Just list matching sources
/research-query "multi-agent orchestration" --sources-only
# Save the answer as a synthesis artifact
/research-query "What evidence supports HITL gates?" --save
# Limit sources consulted
/research-query "cost optimization strategies" --max-sources 5
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
research, corpus-search, citation, synthesis, knowledge-retrieval, local-corpus
42 skills in this plugin
/best-practices-auditResearch-grounded validation of a target (file, directory, or topic) against external best practices and vendor docs. Produces a cited, evidence-grounded comparison./citation-backfillRebuild bidirectional citation edges in a research corpus. Scans outgoing citations, computes the inverse map, rewrites incoming tables. Fixes one-directional graphs./corpus-exportPackage corpus subsets as distribution archives. Filter by cluster, topic, REF range, or custom expression; bundles PDFs, analysis, citations, and BibTeX into tar.gz./corpus-index-buildRender research-corpus markdown index views (by-topic, by-year, authors, citation-network, ...) from corpus state. As of/corpus-retrieval-labBenchmark current research-query and direct lexical baselines against experimental vector, BM25, typed concept-graph PPR, and RRF source selection without replacing production retrieval./corpus-snapshotGenerate a corpus snapshot report — computes dimensions, topology, degree distribution, delta from previous. Helps with cluster, chain, and gap analysis sections.npx claudepluginhub jmagly/aiwg --plugin researchOther plugins' skills for the same job