-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Review: Gemini CLI Policy Engine Documentation #18750
Copy link
Copy link
Labels
area/documentationGemini CLI documentation tasks and issuesGemini CLI documentation tasks and issuesarea/enterpriseIssues related to Telemetry, Policy, Quota / LicensingIssues related to Telemetry, Policy, Quota / Licensinghelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!We will accept PRs from all issues marked as "help wanted". Thanks for your support!priority/p3Backlog - a good idea but not currently a priority.Backlog - a good idea but not currently a priority.
Metadata
Metadata
Assignees
Labels
area/documentationGemini CLI documentation tasks and issuesGemini CLI documentation tasks and issuesarea/enterpriseIssues related to Telemetry, Policy, Quota / LicensingIssues related to Telemetry, Policy, Quota / Licensinghelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!We will accept PRs from all issues marked as "help wanted". Thanks for your support!priority/p3Backlog - a good idea but not currently a priority.Backlog - a good idea but not currently a priority.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Review: Gemini CLI Policy Engine Documentation
Page: https://geminicli.com/docs/core/policy-engine/#toml-rule-schema
Issues Found
1. No reference list of available tool names
The TOML rule schema requires a
toolNamevalue, but the policy engine page never lists what tool names are valid. The only tools mentioned incidentally arewrite_file,replace,read_file,run_shell_commandandglob— and only as brief inline examples, not as a proper reference.To write a rule for
write_file, a user has to know the exact tool name upfront. There is no link to a tools index or any indication of where to find the full list.2.
commandPrefixis documented on the policy engine page but absent from the shell tool pageThe policy engine page documents
commandPrefixas a top-level rule field and even uses it in the Quick Start example. However, on the [Shell tool page](https://geminicli.com/docs/tools/shell/),commandPrefixdoes not appear at all — the shell tool's own arguments arecommand,description, anddirectory.This is not necessarily wrong (the two pages cover different things — policy rules vs. tool invocation arguments), but the relationship is never explained. A reader of the shell tool page would have no idea that
commandPrefixexists as a policy shorthand, and vice versa.3.
argsPatternrequires knowing the JSON structure of tool argumentsThe
argsPatternfield matches against the JSON representation of a tool's arguments. To use it correctly for tools other thanrun_shell_command, a user needs to know what keys each tool's JSON arguments contain. This information is not available on the policy engine page or linked from it.Suggestion
Add a reference section listing available built-in tools with their argument names and types — or at minimum, link to such a reference from the policy engine page. This would make
toolNameandargsPatternusable without guesswork.Thank you for submitting this issue. I believe we still need PRs for all items on the list.