iterative-retrieval

Refine retrieved code context through iterative relevance-scored retrieval cycles.

1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/samymity/bridge-ventures-backend --skill iterative-retrieval-samymity
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/samymity/bridge-ventures-backend/tree/main/.claude/skills/iterative-retrieval
Command: npx skills add https://github.com/samymity/bridge-ventures-backend --skill iterative-retrieval-samymity

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Iterative retrieval resolves the multi-agent context gap where subagents need relevant code or knowledge but cannot predict which files or concepts will matter until they start working.

Core Features & Use Cases

  • Four-phase refinement loop: DISPATCH candidates, EVALUATE relevance, REFINE the query using discovered terminology and gaps, then LOOP for up to three cycles.
  • Relevance scoring and gap identification: Selects high-relevance sources and explicitly targets missing context rather than blindly expanding results.
  • Token-efficient context selection: Stops early when the retrieved set is “good enough,” reducing “context too large” failures and avoiding “missing context” stalls.
  • Use Case: When an agent is assigned a specific feature task (e.g., fixing an authentication bug or adding rate limiting), it can discover the codebase’s naming conventions and relevant modules across cycles.

Quick Start

Ask the agent to retrieve code context for your task by running iterative retrieval: start broad, score candidates for relevance, refine using missing-context signals, and return only files with high relevance.

Frequently Asked Questions about iterative-retrieval

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I retrieve relevant code context for a task when I don't know which files to search?

Iterative retrieval progressively discovers relevant code context by dispatching broad candidates, scoring relevance, and refining queries. It loops up to three cycles to identify high-relevance files without needing target filenames upfront.

Why does my multi-agent dispatch fail due to overly large or missing context?

Multi-agent dispatch fails when context is missing or too large. Iterative retrieval applies gap detection and early stopping to select only high-relevance sources, preventing token-limit errors and missing-context stalls.

What is the best way to refine agent context for RAG pipelines in a codebase?

The best way to refine agent context in RAG pipelines is using a four-phase loop: dispatch candidates, evaluate relevance, refine query patterns, and loop. This targets missing context explicitly rather than blindly expanding results.

How does iterative retrieval improve multi-agent orchestration when exploring unknown code?

Iterative retrieval improves multi-agent orchestration by progressively refining retrieved code context. Agents discover naming conventions and relevant modules across bounded cycles, ensuring only high-relevance results are returned.

Can I use iterative retrieval for subagent dispatch in code exploration tasks?

Yes, iterative retrieval is designed for subagent dispatch in code exploration. It dispatches broad candidates, evaluates relevance with gap detection, and refines query patterns for up to three cycles to return high-relevance files.

When should I not use iterative retrieval for context management?

Avoid iterative retrieval if the exact target files are already known upfront, as the four-phase refinement loop is specifically built to discover unknown context rather than retrieve explicitly specified sources.