Progressive Disclosure

Start with a map, not the territory. Provide an index of what's available and let the model pull in details on demand.

The Problem This Solves

You don’t always know upfront what information will be needed. Pre-loading “everything that might be relevant” falls into the Select, Don’t Dump anti-pattern. But providing too little means working with incomplete information and filling gaps with guesses. The goal is comprehensive coverage without bloated context.

How It Works

Start with a lightweight map of what’s available, not the full content. Pull in details as needed.

The two-phase approach:

  1. Index phase. Provide a compact overview: file names, function signatures, table schemas, section headings, API endpoint summaries. Enough to know what exists and where to find it, but not the implementation details.
  2. Retrieval phase. Identify what’s needed and request the full content through tool calls, file reads, or search queries. Only the relevant details enter the context window.

You don’t read every file in a codebase before making a change. You look at the directory structure, read the relevant files, follow imports, and build understanding incrementally.

Example

Fixing a bug in a large codebase.

Pre-loading approach: dump all 50 source files into context (150k tokens). Most are irrelevant. Drowning in noise.

Progressive disclosure approach:

Turn 1: Provide a project map.

src/
  auth/       - Authentication (JWT, sessions, OAuth)
  api/        - REST endpoints (users, uploads, billing)
  workers/    - Background jobs (email, processing, cleanup)
  db/         - Database models and migrations
  lib/        - Shared utilities (logging, redis, validation)
tests/        - Mirror structure of src/

Turn 2: Request the specific area.

“Show me the contents of src/workers/ and the error logs related to the bug.”

Turn 3: Read deeper.

“Show me processing.py and the ProcessingJob model in db/.”

Each turn adds only what’s needed. The final context contains maybe 5 files (15k tokens) instead of 50, and every file is directly relevant.

Implementation

When to Use

When Not to Use