iterative-retrieval

Refine codebase context for subagents through iterative retrieval cycles.

1|1|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/zardusai-cyber/zardus_setup --skill iterative-retrieval-zardusai-cyber
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/zardusai-cyber/zardus_setup/tree/main/ecc/skills/iterative-retrieval
Command: npx skills add https://github.com/zardusai-cyber/zardus_setup --skill iterative-retrieval-zardusai-cyber

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Subagents in multi-agent workflows often lack the necessary context and face the context-size challenge; this pattern provides a disciplined, iterative method to progressively refine and supply just-in-time codebase context to subagents.

Core Features & Use Cases

  • A four-phase loop (DISPATCH, EVALUATE, REFINE, LOOP) that narrows large codebases into high-relevance files.
  • Applies to tasks like bug fixes, feature implementation, and code exploration where context emerges during execution.
  • Use case: orchestrate subagents to operate on a codebase without overwhelming them with the entire repository.

Quick Start

Run an iterative retrieval loop that dispatches, evaluates, and refines context for up to three cycles to assemble high-relevance files.

Frequently Asked Questions about iterative-retrieval

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

FAQPage Schema
How do I supply codebase context to subagents when the relevant files are too large to predict upfront?

Progressive codebase context refinement supplies subagents with just-in-time files by running a four-phase loop: DISPATCH, EVALUATE, REFINE, and LOOP. This iteratively narrows large repositories into high-relevance file sets without overwhelming the agent's context window.

What is the best way to manage context size limits in a multi-agent codebase workflow?

Multi-agent context management is handled by pruning irrelevant files through guardrails during an iterative retrieval loop. The loop evaluates dispatched context and refines it across up to three cycles to ensure only high-relevance code is supplied to subagents.

How does the iterative retrieval loop handle tasks where code context emerges dynamically during execution?

The iterative retrieval loop handles dynamically emerging context by cycling through evaluate and refine phases. When a subagent discovers it needs different files during execution, the loop prunes irrelevant files and dispatches newly identified high-relevance codebase context.

Can I use iterative context refinement for multi-agent tasks like bug fixes and code exploration?

Iterative context refinement applies directly to multi-agent tasks like bug fixes, feature implementation, and code exploration. It orchestrates subagents by progressively assembling the specific codebase context each task requires as it emerges during execution.

What are the limitations of using a four-phase loop for codebase context management?

The four-phase loop for codebase context management is limited to a maximum of three refinement cycles. After three cycles, the loop stops refining and pruning irrelevant files, meaning highly complex tasks requiring deeper exploration may not fully resolve their context gaps.