mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-01 19:03:42 +00:00
fix(core): clarify plan mode constraints and exit mechanism (#19438)
This commit is contained in:
@@ -467,6 +467,9 @@ ${options.planModeToolsList}
|
||||
)}.
|
||||
- **Directives:** If the request is a **Directive** (e.g., "Fix bug Y"), follow the workflow below to create and approve a plan.
|
||||
4. **Plan Storage:** Save plans as Markdown (.md) using descriptive filenames (e.g., \`feature-x.md\`).
|
||||
5. **Direct Modification:** If asked to modify code outside the plans directory, or if the user requests implementation of an existing plan, explain that you are in Plan Mode and use the ${formatToolName(
|
||||
EXIT_PLAN_MODE_TOOL_NAME,
|
||||
)} tool to request approval and exit Plan Mode to enable edits.
|
||||
|
||||
## Required Plan Structure
|
||||
When writing the plan file, you MUST include the following structure:
|
||||
|
||||
@@ -166,7 +166,7 @@ exports[`coreTools snapshots for specific models > Model: gemini-2.5-pro > snaps
|
||||
|
||||
exports[`coreTools snapshots for specific models > Model: gemini-2.5-pro > snapshot for tool: exit_plan_mode 1`] = `
|
||||
{
|
||||
"description": "Signals that the planning phase is complete and requests user approval to start implementation.",
|
||||
"description": "Finalizes the planning phase and transitions to implementation by presenting the plan for user approval. This tool MUST be used to exit Plan Mode before any source code edits can be performed. Call this whenever a plan is ready or the user requests implementation.",
|
||||
"name": "exit_plan_mode",
|
||||
"parametersJsonSchema": {
|
||||
"properties": {
|
||||
@@ -955,7 +955,7 @@ exports[`coreTools snapshots for specific models > Model: gemini-3-pro-preview >
|
||||
|
||||
exports[`coreTools snapshots for specific models > Model: gemini-3-pro-preview > snapshot for tool: exit_plan_mode 1`] = `
|
||||
{
|
||||
"description": "Signals that the planning phase is complete and requests user approval to start implementation.",
|
||||
"description": "Finalizes the planning phase and transitions to implementation by presenting the plan for user approval. This tool MUST be used to exit Plan Mode before any source code edits can be performed. Call this whenever a plan is ready or the user requests implementation.",
|
||||
"name": "exit_plan_mode",
|
||||
"parametersJsonSchema": {
|
||||
"properties": {
|
||||
|
||||
@@ -118,7 +118,7 @@ export function getExitPlanModeDeclaration(
|
||||
return {
|
||||
name: EXIT_PLAN_MODE_TOOL_NAME,
|
||||
description:
|
||||
'Signals that the planning phase is complete and requests user approval to start implementation.',
|
||||
'Finalizes the planning phase and transitions to implementation by presenting the plan for user approval. This tool MUST be used to exit Plan Mode before any source code edits can be performed. Call this whenever a plan is ready or the user requests implementation.',
|
||||
parametersJsonSchema: {
|
||||
type: 'object',
|
||||
required: ['plan_path'],
|
||||
|
||||
Reference in New Issue
Block a user