gograph_api
Detect public API surface drift in Go repositories by comparing exported symbols between current code and a baseline git reference. Returns added, removed, or changed symbol names to catch breaking changes before merging.
Instructions
Detect public API surface drift by comparing exported Go symbols (functions, types, interfaces) between the current working tree and a baseline git reference. Uses git archive to snapshot the baseline — requires git to be available and the since ref to be a valid branch, tag, or commit. Requires .gograph/graph.json — run gograph build . first. Read-only; archives only a temp directory that is removed after the call. WHEN TO USE: Before releasing or merging a PR to catch breaking-change regressions — exported symbols added, removed, or renamed since the baseline. NOT TO USE: For listing current exports without a diff baseline (use gograph_public or gograph_skeleton instead). RETURNS: JSON with added[], removed[], and changed[] arrays of exported symbol names since the baseline ref; empty arrays indicate no API drift.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| since | Yes | The baseline git reference (e.g., 'main' or 'HEAD~1') to compare against |