iterative-retrieval

Narrow codebase context retrieval through iterative DISPATCH, EVALUATE, REFINE, and LOOP phases.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pattern for progressively refining context retrieval to solve the subagent context problem in multi-agent workflows.

Core Features & Use Cases

  • 4-phase loop (DISPATCH, EVALUATE, REFINE, LOOP) to progressively narrow down relevant files and context.
  • Scenarios where subagents need codebase context they can't predict upfront; reduces context explosion and missing context.
  • Use cases include code exploration, debugging, and feature implementation with context-limited agents.

Quick Start

Start with broad file patterns and iteratively refine the search criteria until you identify enough high-relevance files to satisfy the task

Frequently Asked Questions about iterative-retrieval

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

FAQPage Schema
How do I retrieve relevant codebase context for subagents in a multi-agent workflow?

You retrieve codebase context through a structured four-phase loop: DISPATCH, EVALUATE, REFINE, and LOOP. This progressively narrows the search space and applies relevance scoring to determine when subagents have sufficient context for their task.

What is the best way to prevent context explosion when agents explore large codebases?

Iterative context refinement prevents context explosion by capping retrieval cycles and applying relevance scoring. The approach stops fetching once sufficient high-relevance files are identified, avoiding over-fetch in code exploration and debugging scenarios.

How do I start an iterative retrieval pipeline for code exploration?

Start with broad file patterns and iteratively refine your search criteria. The pipeline dispatches an initial search, evaluates the relevance of returned files, refines the search parameters, and loops until enough high-relevance files satisfy the task.

Can I use iterative retrieval for debugging and feature implementation with context-limited agents?

Yes, iterative retrieval supports debugging and feature implementation with context-limited agents. The multi-phase loop progressively reveals unknown codebase context, ensuring subagents receive only the relevant files needed without exceeding their context limits.

When should I not use an iterative retrieval approach for codebase context management?

Avoid iterative retrieval when the required codebase context is fully predictable upfront. The four-phase DISPATCH, EVALUATE, REFINE, and LOOP cycle adds overhead, making it unnecessary for tasks where context is already known and does not require progressive narrowing.