Check staged or working diff
diffgate_check_stagedCheck git staged or working-tree changes for findings and a verdict to guide approval decisions.
Instructions
Check all staged (or working-tree) changes in a git repo for DiffGate findings. Returns overall tier, counts, and per-file findings across the whole diff, plus a verdict block (the agent autonomy ladder: pass/review/blocked overall, with a rung — block/escalate/autofix/advisory — per finding) so you can decide whether to surface the diff without reimplementing the rules.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Repo root. Defaults to process.cwd(). | |
| mode | No | Check staged-only or all working-tree changes. Default: working. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tier | Yes | Overall risk tier across the diff. | |
| files | Yes | Per-file review results with findings. | |
| verdict | No | Agent autonomy ladder: pass/review/blocked, with a rung per finding. | |
| _diffgate | No | Capability hint: which layers (core/graph/llm) produced this result. |