iterative-retrieval

Refine file retrieval across four phases for subagent codebase context.

8|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/D0NMEGA/donnyclaude --skill iterative-retrieval-d0nmega
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/D0NMEGA/donnyclaude/tree/main/packages/skills/iterative-retrieval
Command: npx skills add https://github.com/D0NMEGA/donnyclaude --skill iterative-retrieval-d0nmega

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Subagents often start with incomplete context and uncertain file relevance, leading to inefficient task execution. This skill defines an iterative retrieval pattern that narrows context through progressive discovery.

Core Features & Use Cases

  • Four-phase loop (DISPATCH → EVALUATE → REFINE → LOOP) to refine candidate files.
  • Relevance scoring and gap detection to identify missing context.
  • Configurable cycles (up to 3) and dynamic query refinement for codebase exploration.
  • Use cases include enabling subagents to operate in large repositories with limited initial context.

Quick Start

Start an iterative retrieval run to begin refining context for subagent tasks.

Frequently Asked Questions about iterative-retrieval

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

FAQPage Schema
How do I refine context for subagents working in a large codebase?

Subagent context refinement works through a four-phase loop: DISPATCH to retrieve initial files, EVALUATE to score relevance and detect gaps, REFINE to adjust queries, and LOOP for up to three cycles.

Why do subagents fail when exploring large repositories with limited initial context?

Subagents fail because incomplete initial context and uncertain file relevance lead to inefficient task execution, which progressive discovery and iterative narrowing of context must resolve.

Can I configure the number of retrieval cycles for multi-agent codebase exploration?

Yes, the iterative retrieval workflow supports up to three configurable cycles, allowing dynamic query refinement and relevance scoring to progressively narrow the retrieved context.

What's the best way to handle missing context when spawning subagents?

Use iterative retrieval to apply gap detection and relevance scoring across multiple cycles, progressively refining which files and patterns are retrieved for subagent tasks.

Does iterative retrieval work for workflows requiring deterministic codebase context narrowing?

Yes, it satisfies a deterministic four-phase workflow with relevance scoring and dynamic query refinement, making it suitable for workflows requiring strict context management in large codebases.