# retrieval-wasp-drone

retrieval-wasp-drone — a subagent for an app's retrieval layer: Postgres full-text search, pgvector recall, RRF fusion and recall scoring on a golden query set.

- subagent · `type=agent` · Claude Code, Codex, Cursor · ★ 96 repo stars
- Author: Legion Code Inc.
- License: AGPL-3.0-or-later · policy=link-only · description only; the file stays with the author
- Source: https://github.com/legioncodeinc/vibe-coding-tools/tree/HEAD/plugins/data-and-ai-tools/agents/retrieval-wasp-drone.md
- Updated: 2026-10-18
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/retrieval-wasp-drone

## What it does

The subagent owns how an app finds things. On the default stack that means Neon Postgres: `tsvector` and `websearch_to_tsquery` correctness, ranking with `ts_rank`, semantic recall through pgvector, Reciprocal Rank Fusion to join the two arms, and an optional cross-encoder pass on top. Chunking strategy and recall/precision scoring against a golden query set come with it.

First it works out which implementation the project already runs. A `tsvector` column and Drizzle schema point at the Postgres guides. A `grep-core.ts` file points at Deep Lake, where one `UNION ALL` query spans the `memory` and `sessions` tables, `<#>` handles cosine distance, and BM25/`ILIKE` quietly takes over once embeddings are off. The skillify branch (`src/skillify/*`, a KEEP/MERGE/SKIP gate on Haiku) counts as one capability, not the whole domain. Mode routing sits in `retrieval-stinger/SKILL.md`; audits land under `library/requirements/reports/retrieval/`.

Scope stops at the query itself. The embedding model and daemon belong to `embeddings-runtime-wasp-drone`, the vector column and index to `vector-store-wasp-drone`. Hand it a schema question and it will pass you on.

## Requirements
- Works with: PostgreSQL

## Install

### Claude Code (native platform)

1. **Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin marketplace add legioncodeinc/vibe-coding-tools
```
In the agent chat (not a shell):
```text
/plugin install data-and-ai-tools@wasp-nest
```

2. **Manually: put the files in place**
- File: `.claude/agents/retrieval-wasp-drone.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/retrieval-wasp-drone.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/retrieval-wasp-drone.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/legioncodeinc/vibe-coding-tools/tree/HEAD/plugins/data-and-ai-tools/agents/retrieval-wasp-drone.md

## When to use it
- diagnose a query that returned nothing useful
- fuse lexical and vector results with RRF
- choose a chunking strategy for retrieval
- score recall and precision on a golden query set
- check whether semantic recall fell back to `ILIKE`

## Example prompts
- Tune recall for the `sessions` table and tell me which arms actually ran.
- Why did this query miss? Audit the hybrid path in `grep-core.ts`.
- Add cross-encoder reranking on top of RRF and score it against the golden set.

## Similar
- [rag-retrieval](https://affpapa.org/en/nevibecode/skills/rag-retrieval.md) — skill · 1500 installs
- [postgres-semantic-search](https://affpapa.org/en/nevibecode/skills/postgres-semantic-search.md) — skill · 227 installs
- [stash-ai-memory](https://affpapa.org/en/nevibecode/skills/stash-ai-memory.md) — skill · 299 installs
- [Memory Vault](https://affpapa.org/en/nevibecode/mcp/memory-vault.md) — MCP server · ★ 67 repo stars
- [Lore](https://affpapa.org/en/nevibecode/mcp/agentkitai-lore.md) — MCP server · ★ 10 repo stars
- [Provena Agent Memory](https://affpapa.org/en/nevibecode/mcp/provena-agent-memory.md) — MCP server · ★ 8 repo stars

From the same set: [legioncodeinc/vibe-coding-tools](https://affpapa.org/en/nevibecode/by/legioncodeinc/vibe-coding-tools.md) — 172 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
