get_incremental_diff_context
Generate hyper-compact git diff context for PRs, showing changed symbols and dependents. Achieves 98%+ token savings for code review and debugging.
Instructions
Calculates hyper-compact PR git diff context (changed symbols + downstream blast radius dependents) for 98%+ token savings during code review and debugging.
Behavior:
Read-only: Inspects git diff and local AST; does not stage, commit, or revert any git changes.
Idempotent: Deterministic for the same git working tree status.
100% Offline: Local git CLI and AST processing.
Usage Guidelines:
When to use: Provide focused context during code review, PR description generation, or bug hunting for pending changes with 98%+ token reduction.
Sibling Routing: For full repository context, use 'get_project_context_tree'. For single-symbol impact analysis, use 'analyze_change_impact'.
Returns: Structured Markdown diff context with changed symbol signatures, diff hunks, and caller references.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base_ref | No | Git revision or branch to diff against (default: 'HEAD~1'). | HEAD~1 |
| project_root | No | Git repository root path (default: current directory). | . |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |