iterative-retrieval

Installation
Summary

Progressive context refinement loop for multi-agent workflows solving the subagent context problem.

  • Four-phase cycle (dispatch, evaluate, refine, loop) that iteratively narrows retrieval to high-relevance files, capping at 3 iterations to balance token usage and context quality
  • Scores retrieved files on a 0–1 relevance scale and explicitly identifies missing context gaps to drive the next refinement cycle
  • Learns codebase terminology and patterns during the first cycle, improving subsequent searches without requiring upfront knowledge of project conventions
  • Designed for spawning subagents on code exploration, bug fixes, and feature implementation tasks where context needs are unpredictable upfront
SKILL.md

Iterative Retrieval Pattern

Solves the "context problem" in multi-agent workflows where subagents don't know what context they need until they start working.

When to Activate

  • Spawning subagents that need codebase context they cannot predict upfront
  • Building multi-agent workflows where context is progressively refined
  • Encountering "context too large" or "missing context" failures in agent tasks
  • Designing RAG-like retrieval pipelines for code exploration
  • Optimizing token usage in agent orchestration

The Problem

Subagents are spawned with limited context. They don't know:

  • Which files contain relevant code
  • What patterns exist in the codebase
  • What terminology the project uses
Related skills
Installs
3.9K
GitHub Stars
179.7K
First Seen
Jan 26, 2026