mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-09-19 07:34:57 +08:00
ffc227a86e
codegraph_explore now sizes its response to the ANSWER rather than the file count. Builds on the off-spine polymorphic-sibling skeletonization (#564): - Uniqueness-aware spare: only a (near-)UNIQUE named callable spares a file from collapse — `as_sql` (110 defs across every Compiler/Expression subclass) no longer keeps every backend variant full and floods the budget; `getResponseWithInterceptorChain` (1 def) still spares RealCall. - Per-symbol focused view: a collapsed family file shows FULL bodies for on-spine / unique-named / canonical-base-supertype methods and signatures for the rest, so the mechanism (SQLCompiler.execute_sql/as_sql) survives without the file's ~80 other symbols + redundant subclasses. - Test-file exclusion on ALL tiers (was <500-file tiers only) — a test file no longer eats budget on a large repo's architecture question. - Named-method cluster survival in non-sibling god-files: inject agent-named defs the relevance-gather missed, rank them above connected/glue, and cap cluster selection at min(per-file, remaining-total) so high-importance named clusters survive instead of being source-order trimmed (Django's `_fetch_all` in a 3,040-line query.py, emitted last of four big files). Validated headless A/B (Opus 4.8, median of 4, full 7-repo sweep): avg 25%% cheaper / 57%% fewer tokens / 23%% faster / 62%% fewer tool calls (up from 22/47/20/50). The former cost laggards jumped — Django 9%%->23%% cheaper (median 0 reads), OkHttp 4%%->11%% cheaper (0 RealCall read-backs); every repo cheaper across small / medium / large. Inert repos (excalidraw/tokio/vscode/gin) carry no skeleton/focused sections. README benchmarks + averages + header refreshed. 8/8 adaptive tests; full suite green (5 npm-shim failures pre-existing/network). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>