iterative-retrieval

Refine context iteratively to identify relevant files for subagent tasks.

Updated Jul 28, 2024
One-click install
npx skills add https://github.com/fredericvahrenhorst/share-app --skill iterative-retrieval-fredericvahrenhorst
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/fredericvahrenhorst/share-app/tree/main/.cursor/skills/iterative-retrieval
Command: npx skills add https://github.com/fredericvahrenhorst/share-app --skill iterative-retrieval-fredericvahrenhorst

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Subagents are spawned with limited context and often don't know what information they need until they begin work, leading to inefficient discovery and wasted cycles.

Core Features & Use Cases

  • Progressive, four-phase loop (DISPATCH, EVALUATE, REFINE, LOOP) to iteratively refine context and identify relevant files.
  • Reduces context explosion by focusing on high-relevance files while learning terminology and project structure.
  • Use Case: debugging multi-agent tasks where subagents must learn repository structure, naming conventions, and key patterns to complete assignments efficiently.

Quick Start

Initiate iterative retrieval for a specified task and allow up to three cycles of refinement to collect high-relevance context.

Frequently Asked Questions about iterative-retrieval

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

FAQPage Schema
How do I help subagents discover relevant files in a codebase when they start with limited context?

Subagent file discovery is handled by progressively refining context through a four-phase loop of dispatching, evaluating, refining, and looping. This iterative retrieval process identifies relevant files, learns codebase terminology, and scores file relevance within a maximum of three cycles.

Why do my multi-agent workflows waste cycles searching for code patterns and project structure?

Multi-agent workflows waste cycles when subagents lack initial repository context and must blindly search for code patterns. A progressive context refinement loop solves this by iteratively re-querying the codebase, learning naming conventions, and narrowing focus to high-relevance files before execution.

What is iterative retrieval for multi-agent codebase tasks?

Iterative retrieval is a context refinement technique for multi-agent systems. It uses a four-phase loop—dispatch, evaluate, refine, and loop—to progressively query the codebase, score file relevance, and collect high-relevance context within a maximum of three cycles.

How do I stop context explosion when multiple subagents query a large codebase simultaneously?

Context explosion is mitigated by iteratively refining subagent queries and focusing strictly on high-relevance files. By scoring relevance and limiting the discovery loop to three cycles, the system learns project structure and terminology without ingesting unnecessary repository data.

Can I apply iterative retrieval to debugging tasks where subagents must learn naming conventions?

Iterative retrieval is well-suited for debugging multi-agent tasks. It progressively refines context to help subagents learn repository structure, naming conventions, and key code patterns, allowing them to efficiently complete assignments within three refinement cycles.

What are the limitations of using a three-cycle context refinement loop for subagent discovery?

The primary limitation is the maximum three-cycle constraint on the refinement loop. If the codebase terminology or file structure is highly fragmented, subagents may not fully discover all relevant context before the loop terminates, potentially leaving gaps in their assignment context.