gograph_check
Run static policy checks and refresh source analysis to flag boundary, API drift, coverage, orphan, global, arity, and complexity issues during PR review or pre-commit.
Instructions
Refresh source analysis and run static policy checks: boundaries, API drift, changed-route/export tests, test coverage, orphans, globals, arity, and complexity. The default or a relative checks config is confined to a regular non-linked file beneath the project; an absolute config is an explicit operator-selected regular file. Baselines use the same validated builder as CLI: a value ending in .json loads a regular saved graph inside the project root with no linked component and the exact current source-policy marker, ignoring its serialized root; otherwise it is treated as a Git ref and extracted temporarily. WHEN TO USE: During PR review or pre-commit analysis. NOT TO USE: For CI process exit enforcement (use CLI gograph gate). RETURNS: Structured pass/warn/fail status, findings, and summary counts. Uncommitted modes compare declarations against HEAD, including selected untracked Go files. Traversal consumers refuse deleted declarations requiring historical caller evidence. Review instead includes changes --git HEAD declaration evidence and names unavailable historical callers, tests and risk. Incomplete comparisons and missing/ambiguous current identities remain errors. Rebuild before traversing newly added symbols.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Absolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean. | |
| since | No | Git ref or regular in-project saved graph path ending in .json, with no linked component and the exact current source-policy marker, for api_drift | |
| config | No | Optional checks.json path; relative/default paths are project-confined, while an absolute path explicitly selects a regular local file | |
| intention | No | Technical rationale, required for analytical calls selecting an active session. | |
| session_id | No | Caller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session. | |
| uncommitted | No | If true, include uncommitted changes in the analysis scope |