Documentationv1.4.0

policy

Inspect policy profile resolution and rules for specific repository paths.

policy check
bash
$gitresolve policy check internal/payments/charge.go

The policy check <file> command resolves the active policy profile for a given file. It reports whether the profile originated from an explicit flag, a path rule in .gitresolve/policy.json, a team rule, or the default profile.

output
Policy Check
file: internal/payments/charge.go
requested_profile: auto
resolved_profile: strict
source: path_rule
matched_path: internal/payments/
strict_blocks_both_for_file: true

Command Options

--policy-profile <profile>

Override policy evaluation with an explicit profile (auto, strict, balanced, aggressive).

--json

Emit policy check resolution details in structured JSON format.