gograph_api
Detect API drift in Go projects by comparing exported symbols between the current code and a baseline git reference. Catch breaking changes before releasing.
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 |