Iterative Context Retrieval

•
113k
•

Optimizes AI context retrieval through a multi-stage feedback loop to solve the 'missing context' problem in complex multi-agent coding workflows.

Iterative Context Retrieval is a sophisticated pattern designed for Claude Code and agentic workflows to overcome the limitations of fixed-context retrieval. By implementing a 4-stage cycle—Dispatch, Evaluate, Refine, and Loop—this skill enables agents to progressively discover the most relevant files and code patterns within a large codebase. It prevents common failures like exceeding context limits or guessing incorrectly by scoring file relevance and refining search criteria based on discovered terminology. This ensures sub-agents have exactly the information they need to perform their tasks accurately while significantly optimizing token usage.

주요 기능

01Token usage optimization by excluding irrelevant paths and prioritizing top candidates
02Four-stage feedback loop (Dispatch, Evaluate, Refine, Loop) for precise context discovery
03Relevance scoring system (0.0 to 1.0) to filter high-impact files
04Dynamic search term refinement based on discovered codebase terminology
05Automatic gap identification to target missing architectural context
06112,917 GitHub stars

사용 사례

01Implementing new features that must align with existing internal patterns and middlewares
02Reducing token costs in RAG-based AI coding workflows by narrowing search focus
03Locating relevant files for bug fixes in unfamiliar or massive codebases