iterative-retrieval

Refine subagent codebase context through a four-phase dispatch-evaluate-refine-loop protocol.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This pattern addresses the challenge of providing insufficient initial context to subagents by progressively narrowing the information they receive, ensuring relevant guidance while respecting token limits.

Core Features & Use Cases

  • 4-phase iterative loop: Dispatch, Evaluate, Refine, Loop to progressively refine search context.
  • Handles multi-agent workflows by exposing a concrete, repeatable method for context acquisition.
  • Real-world use: when subagents need codebase context they cannot predict upfront, or when context is too large to pass in a single pass.

Quick Start

Provide an initial broad query to gather candidate files, then iteratively evaluate and refine until sufficient context is obtained.

Frequently Asked Questions about iterative-retrieval

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

FAQPage Schema
How do I provide codebase context to subagents when the required files cannot be predicted upfront?

Iterative retrieval solves the subagent context problem by progressively narrowing retrieved materials through a four-phase loop: DISPATCH, EVALUATE, REFINE, and LOOP, ensuring relevant guidance while respecting token limits.

How do I manage multi-agent context size when a single retrieval pass returns too much data?

Manage multi-agent context size by applying staged retrieval to fetch bounded information iteratively. This approach scores and extracts patterns from retrieved materials, cycling until sufficient but bounded context is acquired without exceeding token limits.

What is the best way to structure a retrieval pipeline for multi-agent workflows?

Structure a multi-agent retrieval pipeline using a deterministic four-phase protocol that applies scoring, pattern extraction, and cycle limits. This ensures subagents receive progressively refined, sufficient, and bounded context.

Does iterative retrieval require specific dependencies to handle context management?

No dependencies are required. Iterative retrieval relies on a deterministic protocol to manage context, making it applicable to multi-agent workflows where staged retrieval is needed to handle context size challenges.

When should I avoid using an iterative retrieval pipeline for codebase context?

Avoid using an iterative retrieval pipeline when subagent codebase context can be predicted upfront and fits within token limits in a single pass. The pattern is designed for unpredictable, large-scale context acquisition.