code_diff_context
code_diff_context combines a git diff with caller impact analysis. It shows what changed and — critically — which other functions are affected by those changes. A single call replaces git diff followed by manual code_callers lookups for every changed function.
code_diff_context()code_diff_context(base="HEAD~3")code_diff_context(base="main", include_callers=false)Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
base | string | HEAD~1 | Base ref to diff against |
include_callers | boolean | true | Include callers of changed functions |
Output
Section titled “Output”Changed functions (2):
PaymentService.charge src/services/payment.ts + Added retry logic for transient failures Callers (3): OrderService.checkout — CRITICAL SubscriptionService.renew — HIGH payment.test.ts — MEDIUM
AuthService.validate src/middleware/auth.ts ~ Modified token expiry check Callers (5): every authenticated route — CRITICALWhen to use
Section titled “When to use”- Before committing — understand the full blast radius of your changes
- Code review — instantly see what a PR touches beyond the diff itself
- After a merge — verify no unexpected functions were affected