research-query
Search the local research corpus, read matching findings, and synthesize an answer with inline citations to REF-XXX sources. The "query" operation for the research pipeline.
What this skill does
# Research Query Ask a question against the local research corpus and get a synthesized answer with inline citations. ## Triggers - "what does the research say about X?" - "query the corpus for X" - "search research for X" - "what evidence do we have for X?" - "research query X" - `/research-query "question"` ## Parameters ### `<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`. ### `--save` (optional) Save the synthesized answer as a new artifact in `.aiwg/research/synthesis/`. ### `--sources-only` (optional) List matching sources without synthesizing an answer. ### `--max-sources` (optional) Maximum number of sources to read and synthesize from. Default: 10. ## Execution Flow ### Phase 1: Corpus Search Search the local research corpus for relevant sources: 1. **Tag-based search**: Grep frontmatter `tags:` fields in `.aiwg/research/findings/REF-*.md` for topic matches 2. **Title search**: Match question keywords against `title:` frontmatter fields 3. **Full-text search** (if `--depth thorough`): Search body content of all REF-XXX notes for question terms 4. **Synthesis search**: Also check `.aiwg/research/synthesis/` for existing synthesis on the topic 5. **Knowledge search**: Check `.aiwg/research/knowledge/` for related concept notes **Search 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 ``` ### Phase 2: Source Reading For each matching source (up to `--max-sources`): 1. Read the full content of the REF-XXX note 2. Extract: - Key claims and findings - GRADE quality assessment - Methodology and evidence type - Related source references 3. Rank by relevance to the question ### Phase 3: Answer Synthesis Synthesize a comprehensive answer from the matched sources: 1. **Lead with the answer** — state the synthesized finding clearly 2. **Cite inline** — reference specific REF-XXX identifiers with the finding they support 3. **Note evidence quality** — use GRADE-appropriate hedging: - HIGH: "Evidence strongly supports..." - MODERATE: "Evidence suggests..." - LOW: "Limited evidence indicates..." - VERY LOW: "Preliminary findings hint at..." 4. **Flag contradictions** — if sources disagree, state both positions with citations 5. **Identify gaps** — if the question touches areas with sparse coverage, note what's missing **Answer format:** ```markdown ## 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?" ``` ### Phase 4: Save (if --save) If `--save` is specified, write the answer as a synthesis artifact: ``` .aiwg/research/synthesis/query-<slug>-<date>.md ``` With frontmatter: ```yaml --- type: query-synthesis question: "<original question>" date: YYYY-MM-DD sources: [REF-012, REF-034, REF-067, REF-042] confidence: moderate --- ``` ## Distinction from Other Skills | 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 | ## Examples ```bash # 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 # 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 ``` ## References - @$AIWG_ROOT/agentic/code/frameworks/research-complete/skills/research-discover/SKILL.md — External search - @$AIWG_ROOT/agentic/code/frameworks/research-complete/skills/research-gap/SKILL.md — Gap analysis - @$AIWG_ROOT/agentic/code/frameworks/research-complete/skills/research-cite/SKILL.md — Citation formatting - @$AIWG_ROOT/agentic/code/frameworks/research-complete/skills/research-status/SKILL.md — Corpus health - @$AIWG_ROOT/agentic/code/frameworks/research-complete/elaboration/templates/REF-XXX-template.md — REF note format
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.