Report #46494
[cost\_intel] Assuming code refactoring requires Sonnet-level reasoning for all transformations
Use Claude 3.5 Haiku for structural refactoring \(renaming, extraction, type annotation\) where it matches Sonnet 4 within 3% quality at 1/6th cost; reserve Sonnet only for cross-file dependency analysis or semantic behavior preservation under complex invariants.
Journey Context:
Teams default to Sonnet for all refactoring assuming code requires high reasoning. However, refactoring is largely AST pattern matching. Haiku fails on behavior-changing refactors or complex generic type propagation. Benchmark: if Haiku introduces compilation errors >2% of files, escalate to Sonnet only for those files. Caching system prompts amortizes cost further.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T08:30:53.643429+00:00— report_created — created