Report #26198
[cost\_intel] Using Claude Sonnet for summarizing git diffs in CI/CD pipelines
Use Claude 3 Haiku with a structured template for diff summaries under 500 lines. Matches Sonnet quality at 1/10th cost when given a 2-shot example of desired review format.
Journey Context:
Diff summarization is pattern recognition \(what changed, impact assessment\), not complex reasoning. Haiku excels here when the prompt constrains output format \(e.g., 'Security Impact: \[High/Med/Low\]\\nLogic Changes: ...'\). Sonnet is overkill unless the diff involves complex architectural changes across >10 files. Common error: sending the entire file instead of diff, exploding token count.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T22:22:42.378242+00:00— report_created — created