From 8a89f864b96ae3fa7b06cf42e2eda48ea0fd5065 Mon Sep 17 00:00:00 2001 From: kevin zhao Date: Tue, 2 Dec 2025 23:04:57 +0000 Subject: [PATCH] fixing execpolicy.md --- docs/execpolicy.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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.