← ClaudeAtlas

iterative-retrievallisted

Pattern for progressively refining context retrieval when subagents don't know what context they need until they start. Use this skill whenever a subagent or fan-out task must discover relevant files / patterns / terminology on its own, when "send everything" overflows context and "send nothing" starves the agent, or when designing multi-agent retrieval that converges on the right context iteratively.
sardonyx0827/dotfiles · ★ 0 · Web & Frontend · score 72
Install: claude install-skill sardonyx0827/dotfiles
# Iterative Retrieval Pattern Solves the "context problem" in multi-agent workflows where subagents don't know what context they need until they start working. ## 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 Standard approaches fail: - **Send everything**: Exceeds context limits - **Send nothing**: Agent lacks critical information - **Guess what's needed**: Often wrong ## The Solution: Iterative Retrieval A 4-phase loop that progressively refines context: ``` ┌─────────────────────────────────────────────┐ │ │ │ ┌──────────┐ ┌──────────┐ │ │ │ DISPATCH │─────▶│ EVALUATE │ │ │ └──────────┘ └──────────┘ │ │ ▲ │ │ │ │ ▼ │ │ ┌──────────┐ ┌──────────┐ │ │ │ LOOP │◀─────│ REFINE │ │ │ └──────────┘ └──────────┘ │ │ │ │ Max 3 cycles, then proceed │ └─────────────────────────────────────────────┘ ``` ### Phase 1: DISPATCH Initial broad query to gather candidate files: ```javascript // Start with high-level intent const initialQuery = { patterns: ["src/**/*.ts", "lib/**/*.ts"], keywords: ["authentication", "user", "session"], excludes: ["*.test.ts",