mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-10-04 15:08:32 +08:00
The first cut (off-spine + polymorphic-sibling) skeletonized two files the agent then Read back, defeating the cost win: OkHttp's RealCall (it implements the 9-impl Lockable mixin, so it tripped the sibling signal despite being the orchestrator) and Django's compiler.py. A real-agent A/B — not the deterministic probe — exposed it. Refined gate: a sibling file skeletonizes only if NOT spared, where spared = the agent NAMED a callable in it (getResponseWithInterceptorChain, SQLCompiler.execute_sql → keep full) UNLESS the file DEFINES a >=3-impl supertype. A base+subclasses "family" file (compiler.py) is huge and Read-anyway, so skeletonizing it frees explore budget for the sibling files the agent would otherwise Read. buildFlowFromNamedSymbols now also returns namedNodeIds; adds a definesPolymorphicSupertype helper. Validated (headless A/B, Opus 4.8): both former README cost outliers flipped — OkHttp 3% costlier -> cheaper (RealCall full, 0 read-backs), Django 10% costlier -> cheaper (half the runs read 0). Full 7-repo re-validation: avg 22% cheaper / 47%% fewer tokens / 20%% faster / 50%% fewer tool calls, every repo cost-positive. Inert repos (excalidraw/tokio/vscode/gin) stay 0 skeletons — the refined gate skeletonizes a strict subset of the original. Extends the regression test to 7 cases (named-callable spare + supertype-family override). Updates the design doc, CHANGELOG, and README benchmark numbers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>