Progressive Disclosure Strategy
Relevant source files
The following files were used as context for generating this wiki page:
Progressive Disclosure within the Continuous Claude project is a multi-layered architectural pattern designed to minimize token consumption and reduce Model Context Protocol (MCP) overhead. The strategy primary focuses on exposing only the most relevant information or complex tool capabilities to the AI agent as needed, moving from low-token "index" or "discovery" phases to high-fidelity "execution" phases.
By utilizing filesystem-based discovery and CLI-based execution, the project achieves significant efficiency gains, including a reported 99.6% reduction in token overhead for code execution tasks compared to naive context loading. This strategy is central to the project's goal of maintaining high-fidelity session state across operations while working within the constraints of LLM context limits.
Sources: CLAUDE_ONBOARDING.md:12-18, CLAUDE.md:6-10, scripts/SCRIPTS.md:8-12
Architectural Layers of Disclosure
The Progressive Disclosure strategy is implemented through three distinct layers of operational intelligence. Each layer represents a different level of context depth and token cost, allowing the agent to select the most efficient path for a given task.
1. Discovery Layer (Minimal Tokens)
The Discovery Layer uses native filesystem commands and specialized MCP tool wrappers to provide the agent with an overview of available capabilities without loading full implementation details.
- Techniques: Using
ls scripts/to discover workflows orrepomix --token-count-treefor codebase overviews. - Token Impact: Approximately 50-110 tokens per interaction.
2. Analysis Layer (Focused Context)
Once a tool or code region is identified, the agent transitions to the Analysis Layer to understand specific requirements or schemas.
- Techniques: Using
cat scripts/{script}.pyto read docstrings and CLI arguments ormcp__plugin_claude-mem-search__search(format="index")to find memory references. - Token Impact: Reductions of up to 98% compared to loading full libraries.
3. Execution Layer (High Fidelity)
The final layer involves the execution of high-logic workflows using parameter-driven scripts. Instead of writing custom code or compacting context, the agent executes pre-existing templates with specific arguments.
- Techniques: Executing workflows via
uv run python -m runtime.harness scripts/{script}.py --args. - Token Impact: 99.6% reduction in token overhead for complex tool chaining.
Sources: CLAUDE.md:11-30, scripts/SCRIPTS.md:23-45, CLAUDE_ONBOARDING.md:52-78
Tool Discovery and Classification
To support progressive disclosure, tools are classified by their safety and utility to prevent context pollution from "dangerous" or irrelevant operations. The generate_test_params.py module implements logic to categorize tools automatically, allowing the discovery configuration to exclude high-risk tools from general discovery.
Safety Classification Logic
Tools are categorized into three states to guide agent behavior:
| Classification | Description | Logic Source |
|---|---|---|
| SAFE | Read-only or idempotent tools (e.g., get_, list_, search_). | Safe patterns & keywords |
| DANGEROUS | Mutation or execution tools (e.g., delete_, write_, run_). | Dangerous patterns & keywords |
| UNKNOWN | Tools with ambiguous names or descriptions. | Fallback default |
Sources: src/runtime/generate_test_params.py:48-95
Discovery Flow
The following diagram illustrates how the system progressively discloses tool capabilities to an agent:
The flow demonstrates the transition from low-fidelity discovery to high-fidelity execution, ensuring context is only consumed for the specific logic required.
Sources: CLAUDE.md:11-40, scripts/SCRIPTS.md:23-35
Comparison of Disclosure Modes
The project defines two primary paths for agent operations: the Script-Based (Preferred) mode which leverages progressive disclosure, and the Direct Script Writing (Alternative) mode.
| Feature | Scripts-Based (Progressive) | Direct Writing (Naive) |
|---|---|---|
| Token Cost | ~110 tokens (Read + Command) | ~2,000+ tokens (Schema + Code) |
| Time Cost | ~5 seconds | ~2 minutes |
| Token Reduction | 99.6% | 98.7% |
| Primary Use Case | Multi-step research, tool chaining | Novel, one-off fetch tasks |
| Reusability | High (Template-based) | Low (Custom each time) |
Sources: CLAUDE.md:43-65, scripts/SCRIPTS.md:37-45, scripts/README.md:14-25
Efficiency Comparison Diagram
This diagram highlights the massive reduction in context requirement when shifting from writing code from scratch to utilizing the script-based progressive disclosure model.
Sources: scripts/SCRIPTS.md:37-45, CLAUDE.md:105-115
Implementation via CLI Arguments
A key implementation detail of the Progressive Disclosure strategy is the use of argparse in scripts. This allows parameters to be changed via command-line arguments rather than editing files, which prevents the need for the agent to re-read and re-write implementation logic.
CLI Template Pattern
def parse_args():
parser = argparse.ArgumentParser(description="Skill description")
parser.add_argument("--param1", required=True)
# Filter sys.argv to remove script path
args_to_parse = [arg for arg in sys.argv[1:] if not arg.endswith(".py")]
return parser.parse_args(args_to_parse)
Sources: scripts/SCRIPTS.md:65-75, scripts/README.md:65-75
Conclusion
The Progressive Disclosure Strategy in Continuous Claude shifts the paradigm from "compacting" context to "clearing and selectively reloading" it. By using the filesystem as a discovery engine and parameter-driven scripts for execution, the system maintains high technical accuracy and operational speed while operating within strict token budgets. This approach ensures that the LLM is always working with the most relevant, high-fidelity context for the specific sub-task at hand.
Sources: CLAUDE_ONBOARDING.md:14-25, scripts/SCRIPTS.md:130-138