Tier Code Context by Dependency Distance: Full Body, Then Stubs, Then Signatures

~45-65% fewer code-context tokens per edit (self-reported) Advanced 3 min read

When a coding agent edits one file, dumping that file plus every import in full wastes tokens on implementations the model never reads. Tier the context by distance in the dependency graph: full body for the target, typed stubs for direct deps, bare signatures for transitive deps.

๐Ÿ”’ Pro tip ยท Advanced

Unlock this tip โ€” and 140 more

This is one of 141 advanced, fact-checked tactics reserved for Pro. Get the full 163-tip library, a searchable archive, and a new tip every morning. Free for 7 days, then $9/mo.

Prefer to browse? The 22 Beginner tips are free forever.