iterative-retrieval

Refines context retrieval for subagents through iterative dispatch, evaluate, and refine cycles.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/erwinv2k-TKG/AgentesVSC --skill iterative-retrieval-erwinv2k-tkg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/erwinv2k-TKG/AgentesVSC/tree/main/packs/everything-claude-code/docs/zh-TW/skills/iterative-retrieval
Command: npx skills add https://github.com/erwinv2k-TKG/AgentesVSC --skill iterative-retrieval-erwinv2k-tkg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Subagents in multi-agent workflows start with limited context and do not know which files, patterns, or terminology a codebase uses. Sending everything exceeds context limits, sending nothing leaves agents uninformed, and guessing is often wrong. This Skill solves that context problem with progressive retrieval refinement. ## Core Features & Use Cases - Four-Phase Retrieval Loop: Dispatch broad queries, evaluate file relevance on a 0-1 scale, refine search criteria with discovered keywords and patterns, then loop up to 3 cycles. - Relevance Scoring and Gap Detection: Classify files as high, medium, low, or irrelevant, and explicitly identify missing context to drive the next refinement. - Terminology Learning: Discover codebase-specific naming conventions (e.g., "throttle" instead of "rate limit") during early cycles to improve later searches. - Use Case: When fixing an authentication token expiry bug, the loop starts with broad "token/auth" searches, discovers "refresh" and "jwt" terms, and converges on the four most relevant files within two cycles. ## Quick Start Ask the agent to retrieve context for your task using iterative retrieval: start with broad keyword searches, score each file's relevance, refine the query based on gaps, and repeat up to three cycles.

Frequently Asked Questions about iterative-retrieval

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

FAQPage Schema
How do I give subagents enough context without exceeding token limits?

Use iterative retrieval: dispatch a broad initial search, score each file's relevance from 0 to 1, refine the query with newly discovered keywords, and repeat up to three cycles. Return only files scoring 0.7 or higher instead of sending everything.

How does iterative context retrieval work in multi-agent workflows?

It runs a four-phase loop: DISPATCH sends a broad query, EVALUATE scores candidate files for relevance, REFINE updates search criteria with discovered patterns and exclusions, and LOOP repeats until enough high-relevance context is found or three cycles complete.

What relevance score threshold should I use when selecting context files?

Files scoring 0.7 or higher are considered high relevance and should be included. Scores of 0.5-0.7 indicate related patterns, while anything below 0.2 should be confidently excluded from future cycles since low-relevance files rarely become relevant.

Why does my initial code search return no relevant files?

The codebase likely uses different terminology than your query. The first retrieval cycle often reveals actual naming conventions, such as "throttle" instead of "rate limit". Add discovered terms to your keywords and run another cycle.

When should I stop the iterative retrieval loop?

Stop when you have at least three high-relevance files and no critical context gaps, or after three cycles maximum. Three highly relevant files provide better context than ten mediocre ones, so stop at "good enough" rather than searching exhaustively.