iterative-retrieval

Run a 4-phase iterative retrieval loop to refine context queries for subagents.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/luongldptit/move-ticket --skill iterative-retrieval-luongldptit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/luongldptit/move-ticket/tree/main/.agent/skills/iterative-retrieval
Command: npx skills add https://github.com/luongldptit/move-ticket --skill iterative-retrieval-luongldptit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the common "context problem" in multi-agent workflows where subagents lack the necessary codebase or project context to complete tasks effectively, avoiding failures from missing information or context limit overflows when sending large amounts of unrelated data.

Core Features & Use Cases

  • 4-Phase Iterative Retrieval Loop: Uses a structured Dispatch, Evaluate, Refine, and Loop cycle to progressively narrow down relevant context without overwhelming the subagent with unnecessary information.
  • Adaptive Context Refinement: Automatically adjusts search criteria based on initial results, learning project-specific terminology and excluding irrelevant files to improve result relevance over each cycle.
  • Use Case Example: Use this Skill when spawning a subagent to fix a bug in an unfamiliar codebase, so it can first find relevant authentication-related files, then refine its search to locate specific token and session management code without sending the entire codebase as context.

Quick Start

Use the iterative-retrieval skill to run a progressive 3-cycle context retrieval loop for your subagent task, returning only the most relevant files for your specific codebase query.

Frequently Asked Questions about iterative-retrieval

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

FAQPage Schema
How do I prevent subagent context overflow in multi-agent workflows?

To prevent subagent context overflow in multi-agent workflows, use iterative retrieval to progressively refine context queries. This structured dispatch-evaluate-refine-loop cycle narrows down relevant files without overwhelming the subagent with unnecessary data.

How do I find relevant code in an unfamiliar codebase for bug fixing?

To find relevant code in an unfamiliar codebase for bug fixing, apply iterative retrieval to progressively narrow search results. The adaptive refinement automatically adjusts criteria to locate specific files like session management code without sending the entire project as context.

What is the best way to optimize token usage for codebase exploration in agents?

The best way to optimize token usage for codebase exploration in agents is using a 4-phase iterative retrieval loop. It caps at 3 iterations to progressively refine context, returning only high-relevance files and excluding irrelevant data.

Does iterative retrieval work for RAG-like retrieval tasks with unknown context requirements?

Yes, iterative retrieval works for RAG-like retrieval tasks where initial context requirements are unknown upfront. It applies an adaptive context refinement process to learn project terminology and adjust search criteria over each cycle.

What are the limitations of using a 3-cycle iterative retrieval loop for context refinement?

A limitation of using a 3-cycle iterative retrieval loop for context refinement is the strict iteration cap. If the required codebase context cannot be found within three dispatch-evaluate-refine cycles, the loop terminates before retrieving the necessary files.