Iterative Context Retrieval

•
43k
•

Optimizes codebase context gathering through a progressive 4-stage refinement loop for AI subagents.

The Iterative Context Retrieval skill implements a systematic pattern to solve the context problem in multi-agent workflows where subagents lack initial clarity on necessary project files. By employing a 4-phase cycle—Dispatch, Evaluate, Refine, and Loop—this skill enables Claude to start with broad queries and progressively narrow down to the most relevant code sections, preventing context overflow while ensuring critical dependencies and terminology are captured. It is particularly effective for large codebases where traditional 'send everything' or 'guess and check' methods fail, providing a structured approach to relevance scoring and gap identification.

Key Features

014-Stage Progressive Retrieval Loop (Dispatch, Evaluate, Refine, Loop)
02Terminology discovery to bridge gaps in project-specific naming conventions
03Context overflow prevention by filtering low-relevance files
04Configurable cycle limits to balance depth and performance
0543,117 GitHub stars
06Automated Relevance Scoring system on a 0.0 to 1.0 scale

Use Cases

01Complex bug fixing where the root cause spans multiple unknown files
02Feature implementation in large codebases with specific internal patterns
03Context preparation for autonomous subagents in multi-step AI workflows