gograph_check
Run static policy checks on Go repository graphs to detect package layer violations, API drift, complex functions, and untested symbols. Returns structured results for PR review or pre-commit analysis.
Instructions
Run static policy checks against the repository graph. Checks include: boundaries (package layer violations), api_drift (breaking changes vs a baseline ref), max_arity (functions with too many args), max_complexity (cyclomatic complexity), test_coverage (symbols without tests), and no_orphans. Requires .gograph/graph.json. Read-only; no side effects. WHEN TO USE: During PR review to surface policy violations or as part of a pre-commit analysis workflow. NOT TO USE: For CI/CD enforcement with non-zero exit codes (use CLI gograph gate instead). RETURNS: Structured JSON with status (pass/warn/fail), findings array (level, check, message, location), and summary counts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | No | Optional path to a checks.json config file (defaults to .gograph/checks.json if present) | |
| since | No | Git ref for api_drift baseline (e.g. 'main', 'HEAD~5', 'v1.4.50') | |
| uncommitted | No | If true, include uncommitted changes in the analysis scope |