outlineexplore API without reading entire files
The complete API of a file — hierarchy and full signatures — without reading a single body.
To use an API, you don't need the file. Not the comments, not the bodies, not the import list — you need the hierarchy and the full signature: name, parameters, return type, and the decorators, annotations, and modifiers that change how you call it. That is what outline returns, and nothing else. Reading a 5,000-token file to find one signature doesn't just cost tokens — it fills the agent's context with irrelevant code, and an agent reasons over everything in its context.
Every symbol comes with a stable handle. Handles survive body edits, comment changes, reformatting, and line shifts — so when your agent edits the file, it does not re-read the outline to find out where everything moved.
Every handle carries a price tag. full 124L | code 48L | docs 76L — the agent knows what a read costs before paying for it, and picks the view it needs: full, code only, docs only.
A 2,261-line file from this codebase:
saved: 85.4 KB -> 4.5 KB (95% fewer bytes)
# context-engine-core/src/infrastructure/lsp/process_manager.rs (2261L)
- #[derive(Debug)] pub struct LspProcessHandle { ... } ["1000t003" full 202L | code 17L | docs 185L]
- pub process_id: u32 ["1000t000" full 2L | code 1L | docs 1L]
- process_handle: Option<tokio::process::Child> ["1000t002" full 10L | code 1L | docs 9L]
- impl LspProcessHandle { ... } ["1000t00f" full 509L | code 509L]
- pub fn extract_streams( &mut self, ) -> Result<(ChildStdin, ChildStdout, ChildStderr), StreamExtractionError> { ... } ["1000t006" full 53L | code 13L | docs 40L]
- pub async fn terminate(&mut self) -> Result<()> { ... } ["1000t00b" full 124L | code 48L | docs 76L]
- #[async_trait::async_trait] pub trait ProcessManager: Send + Sync { ... } ["1000t00w" full 1437L | code 1118L | docs 319L]
- async fn spawn_lsp_process( &self, config: &LspExecutionConfig, cancellation_token: CancellationToken, ) -> ... ; ["1000t00n" full 39L | code 5L | docs 34L]
... (24 more symbols)The complete API of a 2,261-line file for 4.5 KB — and the price tags show terminate is 48 lines of code but 76 lines of docs, so the agent picks the view it actually needs before reading anything.
Documentation gets the same treatment
Agents re-read your README, your agent instructions, your specs — every session, usually wholesale. Outlining a Markdown file returns the heading hierarchy with the same handles and price tags. The README of the moka caching crate, straight from the dependency registry:
saved: 23.0 KB -> 1.7 KB (93% fewer bytes)
# ~/.cargo/registry/.../moka-0.12.16/README.md (655L)
- Moka ["1000E00v" full 656L]
- Features ["1000E001" full 57L]
- Usage ["1000E006" full 16L]
- Example: Synchronous Cache ["1000E007" full 80L]
- Example: Asynchronous Cache ["1000E008" full 101L]
- Expiration Policies ["1000E00b" full 23L]
- Troubleshooting ["1000E00g" full 45L]
- Compile Errors on Some 32-bit Platforms ["1000E00f" full 43L]
- Symptoms ["1000E00d" full 27L]
- How to Fix ["1000E00e" full 15L]
... (15 more sections)An agent learning this dependency needs the 101 lines of “Example: Asynchronous Cache” — not the other 554 lines of roadmap, credits, and license.