iterative-retrieval

Refine codebase retrieval through a 4-phase dispatch-evaluate-refine loop.

2|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/Zenobia000/ai-brainstorming --skill iterative-retrieval-zenobia000
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/Zenobia000/ai-brainstorming/tree/main/.claude/custom-rule%26skill/skills/iterative-retrieval
Command: npx skills add https://github.com/Zenobia000/ai-brainstorming --skill iterative-retrieval-zenobia000

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Subagents in multi-agent workflows cannot predict the exact codebase context they need upfront, leading to failures from missing information, context overflow from sending irrelevant data, or wasted tokens on guessed content.

Core Features & Use Cases

  • 4-Phase Iterative Loop: Dispatch, Evaluate, Refine, and Loop cycles to progressively narrow down relevant context.
  • Relevance Scoring: Rates retrieved files on a 0-1 scale to prioritize high-value content and exclude irrelevant paths.
  • Terminology Discovery: Automatically learns project-specific naming conventions to fix initial search mismatches.
  • Use Case: When building a multi-agent code review system, use this pattern to pull only the relevant source files for a bug fix instead of loading the entire codebase into each subagent's context.

Quick Start

Use the iterative-retrieval skill to gather all relevant context for implementing rate limiting on the API endpoints in the routes/ directory.

Frequently Asked Questions about iterative-retrieval

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

FAQPage Schema
How do I reduce token waste when sending codebase context to subagents in multi-agent workflows?

Reduce token waste in multi-agent subagent workflows by applying a 4-phase iterative retrieval cycle that progressively narrows down relevant codebase context instead of sending full or guessed data upfront.

What is the best way to retrieve relevant source files for a bug fix in a multi-agent code review system?

The best way to retrieve relevant source files for a bug fix is implementing an iterative dispatch-evaluate-refine-loop cycle that uses relevance scoring to pull only critical context and exclude irrelevant paths.

Why does my subagent fail to find the right codebase context for feature implementation tasks?

Subagents fail to find the right codebase context because they cannot predict exact requirements upfront, causing missing information or context overflow; terminology discovery fixes this by learning project naming conventions.

Can I use iterative retrieval to optimize a RAG pipeline for codebases of any size?

Yes, you can use iterative retrieval to optimize a RAG pipeline for codebases of any size by scoring retrieved files on a 0-1 scale to prioritize high-value content and minimize token usage.

When do I need progressive context refinement for agent orchestration tasks?

You need progressive context refinement for agent orchestration tasks when subagents experience context limitations from missing information, token waste from guessed content, or context overflow from irrelevant data.

Does iterative retrieval work for code exploration without loading the entire codebase into each subagent's context?

Yes, iterative retrieval works for code exploration by progressively refining codebase retrieval through a loop cycle that ensures only critical context is loaded, preventing the need to send the entire codebase into subagent context.