Skip to content

docs: clarify global policy rules application in plan mode#21864

Merged
jerop merged 1 commit intomainfrom
docs/plan-mode-policy-clarification
Mar 10, 2026
Merged

docs: clarify global policy rules application in plan mode#21864
jerop merged 1 commit intomainfrom
docs/plan-mode-policy-clarification

Conversation

@jerop
Copy link
Contributor

@jerop jerop commented Mar 10, 2026

Clarify in docs/cli/plan-mode.md that policy rules without an explicit 'modes' setting apply to Plan Mode. Added a new section 'Global vs. mode-specific rules' with an example of how to exclude rules from Plan Mode by specifying other modes.

See: docs/reference/policy-engine.md#approval-modes

Closes #21709
Closes #21585

Clarify in docs/cli/plan-mode.md that policy rules without an explicit 'modes' setting apply to Plan Mode. Added a new section 'Global vs. mode-specific rules' with an example of how to exclude rules from Plan Mode by specifying other modes.

See: docs/reference/policy-engine.md#approval-modes
@jerop jerop requested review from a team as code owners March 10, 2026 12:22
@gemini-cli gemini-cli bot added area/core Issues related to User Interface, OS Support, Core Functionality 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item. labels Mar 10, 2026
@github-actions
Copy link

Size Change: -4 B (0%)

Total Size: 26.1 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 25.7 MB -4 B (0%)
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 221 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 227 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 11.5 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B 0 B
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B

compressed-size-action

@jerop jerop changed the title docs: clarify policy application in plan mode docs: clarify global policy rules application in plan mode Mar 10, 2026
@jerop jerop enabled auto-merge March 10, 2026 13:06
@jerop jerop added this pull request to the merge queue Mar 10, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the documentation for Plan Mode by clarifying how global policy rules are applied and providing an example of how to define mode-specific rules. This change helps users understand how to configure policies to behave differently in Plan Mode versus other modes.

Highlights

  • Policy Rule Application: Clarifies that policy rules without an explicit 'modes' setting apply to Plan Mode.
  • Mode-Specific Rules: Introduces a new section explaining how to exclude rules from Plan Mode by specifying other modes.
  • Example Configuration: Provides an example of how to configure a rule to apply to 'default' and 'autoEdit' modes but not 'plan' mode.
Changelog
  • docs/cli/plan-mode.md
    • Clarified the application of global policy rules in Plan Mode.
    • Added a new section explaining how to exclude rules from Plan Mode by specifying other modes.
    • Provided an example of configuring a rule to apply to specific modes.
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances the documentation for Plan Mode by adding a new section, 'Global vs. mode-specific rules'. This addition clarifies that policy rules lacking an explicit modes attribute are considered global and thus apply in Plan Mode. The change includes a practical example demonstrating how to configure a rule to apply to specific modes while excluding it from Plan Mode. The update is accurate and significantly improves the clarity of the policy engine's behavior for users. The changes have been reviewed and no issues were found.

Note: Security Review has been skipped due to the limited scope of the PR.

Merged via the queue into main with commit a6b9589 Mar 10, 2026
31 checks passed
@jerop jerop deleted the docs/plan-mode-policy-clarification branch March 10, 2026 13:25
PrasannaPal21 pushed a commit to PrasannaPal21/gemini-cli that referenced this pull request Mar 10, 2026
kunal-10-cloud pushed a commit to kunal-10-cloud/gemini-cli that referenced this pull request Mar 12, 2026
liamhelmer pushed a commit to badal-io/gemini-cli that referenced this pull request Mar 12, 2026
yashodipmore pushed a commit to yashodipmore/geemi-cli that referenced this pull request Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Issues related to User Interface, OS Support, Core Functionality 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gemini made changes in /plan mode. Gemini 3.1 Pro using Shell tool to edit files while in planning mode

2 participants