docs: document planning workflows with Conductor example (#21166)

This commit is contained in:
Jerop Kipruto
2026-03-04 17:07:05 -05:00
committed by GitHub
parent e63d273e4e
commit 55db3c776c

View File

@@ -12,8 +12,7 @@ implementation. With Plan Mode, you can:
> feedback is invaluable as we refine this feature. If you have ideas, > feedback is invaluable as we refine this feature. If you have ideas,
> suggestions, or encounter issues: > suggestions, or encounter issues:
> >
> - [Open an issue](https://github.com/google-gemini/gemini-cli/issues) on > - [Open an issue] on GitHub.
> GitHub.
> - Use the **/bug** command within Gemini CLI to file an issue. > - Use the **/bug** command within Gemini CLI to file an issue.
## How to enable Plan Mode ## How to enable Plan Mode
@@ -132,10 +131,10 @@ These are the only allowed tools:
### Custom planning with skills ### Custom planning with skills
You can use [Agent Skills](./skills.md) to customize how Gemini CLI approaches You can use [Agent Skills] to customize how Gemini CLI approaches planning for
planning for specific types of tasks. When a skill is activated during Plan specific types of tasks. When a skill is activated during Plan Mode, its
Mode, its specialized instructions and procedural workflows will guide the specialized instructions and procedural workflows will guide the research,
research, design, and planning phases. design, and planning phases.
For example: For example:
@@ -252,10 +251,59 @@ modes = ["plan"]
argsPattern = "\"file_path\":\"[^\"]+[\\\\/]+\\.gemini[\\\\/]+plans[\\\\/]+[\\w-]+\\.md\"" argsPattern = "\"file_path\":\"[^\"]+[\\\\/]+\\.gemini[\\\\/]+plans[\\\\/]+[\\w-]+\\.md\""
``` ```
## Planning workflows
Plan Mode provides building blocks for structured research and design. These are
implemented as [extensions] using core planning tools like [`enter_plan_mode`],
[`exit_plan_mode`], and [`ask_user`].
### Built-in planning workflow
The built-in planner uses an adaptive workflow to analyze your project, consult
you on trade-offs via [`ask_user`], and draft a plan for your approval.
### Custom planning workflows
You can install or create specialized planners to suit your workflow.
#### Conductor
[Conductor] is designed for spec-driven development. It organizes work into
"tracks" and stores persistent artifacts in your project's `conductor/`
directory:
- **Automate transitions:** Switches to read-only mode via [`enter_plan_mode`].
- **Streamline decisions:** Uses [`ask_user`] for architectural choices.
- **Maintain project context:** Stores artifacts in the project directory using
[custom plan directory and policies](#custom-plan-directory-and-policies).
- **Handoff execution:** Transitions to implementation via [`exit_plan_mode`].
#### Build your own
Since Plan Mode is built on modular building blocks, you can develop your own
custom planning workflow as an [extensions]. By leveraging core tools and
[custom policies](#custom-policies), you can define how Gemini CLI researches
and stores plans for your specific domain.
To build a custom planning workflow, you can use:
- **Tool usage:** Use core tools like [`enter_plan_mode`], [`ask_user`], and
[`exit_plan_mode`] to manage the research and design process.
- **Customization:** Set your own storage locations and policy rules using
[custom plan directories](#custom-plan-directory-and-policies) and
[custom policies](#custom-policies).
> **Note:** Use [Conductor] as a reference when building your own custom
> planning workflow.
By using Plan Mode as its execution environment, your custom methodology can
enforce read-only safety during the design phase while benefiting from
high-reasoning model routing.
## Automatic Model Routing ## Automatic Model Routing
When using an [**auto model**], Gemini CLI automatically optimizes [**model When using an [auto model], Gemini CLI automatically optimizes [model routing]
routing**] based on the current phase of your task: based on the current phase of your task:
1. **Planning Phase:** While in Plan Mode, the CLI routes requests to a 1. **Planning Phase:** While in Plan Mode, the CLI routes requests to a
high-reasoning **Pro** model to ensure robust architectural decisions and high-reasoning **Pro** model to ensure robust architectural decisions and
@@ -296,28 +344,32 @@ Manual deletion also removes all associated artifacts:
If you use a [custom plans directory](#custom-plan-directory-and-policies), If you use a [custom plans directory](#custom-plan-directory-and-policies),
those files are not automatically deleted and must be managed manually. those files are not automatically deleted and must be managed manually.
[`list_directory`]: /docs/tools/file-system.md#1-list_directory-readfolder [`list_directory`]: ../tools/file-system.md#1-list_directory-readfolder
[`read_file`]: /docs/tools/file-system.md#2-read_file-readfile [`read_file`]: ../tools/file-system.md#2-read_file-readfile
[`grep_search`]: /docs/tools/file-system.md#5-grep_search-searchtext [`grep_search`]: ../tools/file-system.md#5-grep_search-searchtext
[`write_file`]: /docs/tools/file-system.md#3-write_file-writefile [`write_file`]: ../tools/file-system.md#3-write_file-writefile
[`glob`]: /docs/tools/file-system.md#4-glob-findfiles [`glob`]: ../tools/file-system.md#4-glob-findfiles
[`google_web_search`]: /docs/tools/web-search.md [`google_web_search`]: ../tools/web-search.md
[`replace`]: /docs/tools/file-system.md#6-replace-edit [`replace`]: ../tools/file-system.md#6-replace-edit
[MCP tools]: /docs/tools/mcp-server.md [MCP tools]: ../tools/mcp-server.md
[`save_memory`]: /docs/tools/memory.md [`save_memory`]: ../tools/memory.md
[`activate_skill`]: /docs/cli/skills.md [`activate_skill`]: ./skills.md
[`codebase_investigator`]: /docs/core/subagents.md#codebase_investigator [`codebase_investigator`]: ../core/subagents.md#codebase_investigator
[`cli_help`]: /docs/core/subagents.md#cli_help [`cli_help`]: ../core/subagents.md#cli_help
[subagents]: /docs/core/subagents.md [subagents]: ../core/subagents.md
[custom subagents]: /docs/core/subagents.md#creating-custom-subagents [custom subagents]: ../core/subagents.md#creating-custom-subagents
[policy engine]: /docs/reference/policy-engine.md [policy engine]: ../reference/policy-engine.md
[`enter_plan_mode`]: /docs/tools/planning.md#1-enter_plan_mode-enterplanmode [`enter_plan_mode`]: ../tools/planning.md#1-enter_plan_mode-enterplanmode
[`exit_plan_mode`]: /docs/tools/planning.md#2-exit_plan_mode-exitplanmode [`exit_plan_mode`]: ../tools/planning.md#2-exit_plan_mode-exitplanmode
[`ask_user`]: /docs/tools/ask-user.md [`ask_user`]: ../tools/ask-user.md
[YOLO mode]: /docs/reference/configuration.md#command-line-arguments [YOLO mode]: ../reference/configuration.md#command-line-arguments
[`plan.toml`]: [`plan.toml`]:
https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/policy/policies/plan.toml https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/policy/policies/plan.toml
[auto model]: /docs/reference/configuration.md#model-settings [auto model]: ../reference/configuration.md#model-settings
[model routing]: /docs/cli/telemetry.md#model-routing [model routing]: ./telemetry.md#model-routing
[preferred external editor]: /docs/reference/configuration.md#general [preferred external editor]: ../reference/configuration.md#general
[session retention]: /docs/cli/session-management.md#session-retention [session retention]: ./session-management.md#session-retention
[extensions]: ../extensions/index.md
[Conductor]: https://github.com/gemini-cli-extensions/conductor
[open an issue]: https://github.com/google-gemini/gemini-cli/issues
[Agent Skills]: ./skills.md