diff --git a/docs/execpolicy.md b/docs/execpolicy.md index a5b77e402e..dc9447beb0 100644 --- a/docs/execpolicy.md +++ b/docs/execpolicy.md @@ -33,6 +33,29 @@ codex execpolicy check --policy ~/.codex/policy/default.codexpolicy git push ori Pass multiple `--policy` flags to test how several files combine, and use `--pretty` for formatted JSON output. See the [`codex-rs/execpolicy` README](../codex-rs/execpolicy/README.md) for a more detailed walkthrough of the available syntax. +Example output when a rule matches: + +```json +{ + "matchedRules": [ + { + "prefixRuleMatch": { + "matchedPrefix": ["git", "push"], + "decision": "prompt" + } + } + ], + "decision": "prompt" +} +``` + +When no rules match, `matchedRules` is an empty array and `decision` is omitted. + +```json +{ + "matchedRules": [], +} + ## Status `execpolicy` commands are still in preview. The API may have breaking changes in the future.