iterative-retrieval

Refine codebase context retrieval through a 4-phase DISPATCH, EVALUATE, REFINE, LOOP cycle.

1|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/XiaoPuOuO/VFactory --skill iterative-retrieval-xiaopuouo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/XiaoPuOuO/VFactory/tree/main/paperclip-official/AgentSetting/skills/iterative-retrieval
Command: npx skills add https://github.com/XiaoPuOuO/VFactory --skill iterative-retrieval-xiaopuouo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Progressive retrieval patterns solve the context problem that arises when subagents start with limited or uncertain knowledge about the codebase. This skill defines a repeatable approach to incrementally gather, evaluate, and refine relevant context so subagents have the information they need to act effectively.

Core Features & Use Cases

  • 4-phase loop: DISPATCH, EVALUATE, REFINE, LOOP to iteratively build high-relevance context.
  • Relevance-driven selection: evaluate candidate files for relevance and identify gaps to guide subsequent searches.
  • Codebase exploration for multi-agent workflows: ideal for scenarios where subagents must operate with progressively discovered code and terminology.
  • Use Case: when spawning subagents that require evolving project context, this pattern helps ensure they receive appropriate materials without overloading context.

Quick Start

Describe an initial implementation of the iterative retrieval pattern to gather and refine codebase context for subagents.

Frequently Asked Questions about iterative-retrieval

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

FAQPage Schema
How do I handle missing context or context-too-large errors when spawning subagents in multi-agent workflows?

Progressive retrieval patterns solve the missing context problem by incrementally gathering, evaluating, and refining relevant codebase context for subagents. This ensures subagents start with limited knowledge but progressively discover the appropriate materials needed to act effectively.

What is the best way to refine codebase search context for subagents that need evolving project context?

The best way to refine codebase search context for subagents is using a 4-phase iterative retrieval loop: DISPATCH, EVALUATE, REFINE, and LOOP. This pattern iteratively evaluates candidate files for relevance, identifies context gaps, and refines search criteria over up to three cycles to build high-relevance context.

How does the iterative retrieval pattern work for discovering code and terminology in multi-agent workflows?

Iterative retrieval works by dispatching initial search criteria, evaluating returned candidate files for relevance, and refining criteria to fill identified gaps. It operates in a loop with up to three cycles, progressively discovering code and terminology to build high-relevance context for subagents.

When do I need progressive context retrieval for subagent workflows?

You need progressive context retrieval when spawning subagents that require evolving project context or when addressing context-too-large failures. It is ideal for multi-agent workflows where subagents must operate with progressively discovered code and terminology instead of static, potentially oversized context.

Are there limitations to the iterative retrieval loop when searching a large codebase for subagent context?

The iterative retrieval loop is limited to a maximum of three cycles when evaluating candidate files and refining search criteria. This bound prevents infinite searches but may limit exhaustive context discovery in exceptionally large codebases where deeper progressive refinement is required.