Get ticket diff
get_ticket_diffCapture code changes for a ticket by locating commits that reference the ticket id in their message, returning a summary and size-capped unified diff for each commit.
Instructions
Capture the code changes made for a ticket: find commits in the project's code repo (codeLocation / gitTargets.codeRepo) whose message mentions the ticket id and return, per commit, a summary (hash/author/date/subject) plus a size-capped unified diff (git show). Read-only — never writes or fetches. context sets the unified context-line count; maxBytes caps the total diff bytes returned (over-cap diffs are truncated with a notice, later commits omitted). Returns a warning (not an error) when the project has no codeLocation, the path is not a git repo, or no commits mention the ticket. Pass semantic:true to also get a deterministic semantic view (no LLM): formatting-only hunks stripped, files ordered core → tests → docs/config, mechanical renames flagged, plus a ready-to-use review-summary prompt — assistive, verify against the raw diff.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticket | Yes | ||
| context | No | Unified diff context lines (default 3). | |
| project | Yes | ||
| maxBytes | No | Total diff byte cap across commits (default 60000). | |
| semantic | No | Add a deterministic semantic view: formatting-only hunks stripped, files ordered core → tests → docs/config, mechanical renames flagged, plus a review-summary prompt (assistive — verify against the raw diff). | |
| maxCommits | No | Max commits to inspect (default 20). |