Elffuss BraidHub

kikocis/continue public

Merge pull request #6657 from continuedev/bdougie/plan-mode-docs

docs: plan mode doumentation
Changesetdf03007bc9c25ac7b49d38de0e444bc92a60e9c073b0ce3560cdf76a66a11660
AuthorDallin Romney <dallinromney@gmail.com> · 2025-07-21 15:53 +02:00
CommitterGitHub <noreply@github.com> · 2025-07-21 15:53 +02:00
Parents9df0fa5d79c7, cb8d4c6c0659

Browse the files at this changeset

10 files changed

modified docs/docs.json +1 −0
@@ -65,6 +65,7 @@
6565 "pages": [
6666 "features/agent/quick-start",
6767 "features/agent/how-it-works",
68+ "features/agent/plan-mode",
6869 "features/agent/model-setup",
6970 "features/agent/how-to-customize",
7071 "features/agent/context-selection"
modified docs/features/agent/how-it-works.mdx +30 −15
@@ -17,22 +17,37 @@
1717 6. The model responds, potentially with another tool call and step 2 begins again
1818
1919 <Info>
20- In [Chat mode](/features/chat/quick-start), tools are **not** included in the
21- request to the model.
20+ Tool availability varies by mode:
21+ - **Chat mode**: No tools included
22+ - **Plan mode**: Only read-only tools included
23+ - **Agent mode**: All tools included
2224 </Info>
2325
2426 ## Built-in tools
2527
26-Continue includes several built-in tools which provide the model access to IDE functionality:
27-
28-- **Read file** (`read_file`): read the contents of a file within the project
29-- **Read currently open file** (`read_currently_open_file`): read the contents of the currently open file
30-- **Create new file** (`create_new_file`): Create a new file within the project, with path and contents specified by the model
31-- **Exact search** (`exact_search`): perform a `ripgrep` search within the project
32-- **Glob search** (`file_glob_search`): perform a glob search on files in the project. Currently limits to 100 output and warns the Agent if limit reached.
33-- **Run terminal command** (`run_terminal_command`): run a terminal command from the workspace root
34-- **Search web** (`search_web`): Perform a web search to get top results
35-- **View diff** (`view_diff`): View the current working git diff
36-- **View repo map** (`view_repo_map`): request a copy of the repository map—same as the [Repo Map Context Provider](/customize/custom-providers#repository-map)
37-- **View subdirectory** (`view_subdirectory`): request a copy of a repo map for a specific directory within the project
38-- **Create Rule Block** (`create_rule_block`): creates a new rule block in `.continue/rules` based on the contents of the conversation
28+Continue includes several built-in tools which provide the model access to IDE functionality.
29+
30+### Plan mode tools (read-only)
31+
32+In Plan mode, only these read-only tools are available:
33+- **Read file** (`read_file`)
34+- **Read currently open file** (`read_currently_open_file`)
35+- **List directory** (`ls`)
36+- **Glob search** (`glob_search`)
37+- **Grep search** (`grep_search`)
38+- **Fetch URL content** (`fetch_url_content`)
39+- **Search web** (`search_web`)
40+- **View diff** (`view_diff`)
41+- **View repo map** (`view_repo_map`)
42+- **View subdirectory** (`view_subdirectory`)
43+- **Codebase tool** (`codebase_tool`)
44+
45+### Agent mode tools (all tools)
46+
47+In Agent mode, all tools are available including the read-only tools above plus:
48+
49+- **Create new file** (`create_new_file`): Create a new file within the project
50+- **Edit file** (`edit_file`): Make changes to existing files
51+- **Run terminal command** (`run_terminal_command`): Run commands from the workspace root
52+- **Create Rule Block** (`create_rule_block`): Create a new rule block in `.continue/rules`
53+- All other write/execute tools for modifying the codebase
added docs/features/agent/plan-mode.mdx +49 −0
@@ -0,0 +1,49 @@
1+---
2+title: "Plan Mode"
3+description: "Explore and understand code safely with read-only tools"
4+---
5+
6+## What is Plan mode?
7+
8+Plan mode is a restricted environment that provides read-only access to your codebase. It's designed for safe exploration, understanding code, and planning changes without making any modifications.
9+
10+![Plan mode in action](/images/plan-mode.gif)
11+
12+### Key features
13+
14+- **Read-only tools**: Access files, search, and analyze without risk
15+- **Safe exploration**: Perfect for understanding unfamiliar codebases
16+- **Planning focus**: Develop implementation strategies before execution
17+- **MCP support**: Works with all MCP tools alongside built-in read-only tools
18+
19+### How it works
20+
21+Plan mode filters the available tools to only include read-only operations. This means you can:
22+- Read any file in your project
23+- Search through code with grep and glob patterns
24+- View repository structure and diffs
25+- Fetch web content for additional context
26+- Use all MCP tools
27+
28+But you cannot:
29+- Create, edit, or delete files
30+- Run terminal commands
31+- Make any system changes
32+
33+### Getting started
34+
35+Select "Plan" from the mode selector below the chat input, or use `Cmd/Ctrl + .` to cycle through modes.
36+
37+![Plan mode selector](/images/plan-mode-selector.png)
38+
39+For detailed information about tools and usage, see the [Agent documentation](/features/agent/how-it-works), which covers both Agent and Plan modes.
40+
41+### Common workflow
42+
43+1. **Start in Plan mode** to explore and understand
44+2. **Develop your approach** with the model's help
45+3. **Switch to Agent mode** when ready to implement
46+
47+<Tip>
48+ Plan mode shares the same interface and context features as Chat and Agent modes. You can use `@` context providers and highlight code just like in other modes.
49+</Tip>
No newline at the end of the file
modified docs/features/agent/quick-start.mdx +23 −2
@@ -6,18 +6,39 @@
66
77 Agent equips the Chat model with the tools needed to handle a wide range of coding tasks, allowing the model to make decisions and save you the work of manually finding context and performing actions.
88
9+### When to use each mode
10+
11+- **Plan mode**: Use when you want to explore code, understand systems, or plan changes without making modifications. Perfect for:
12+ - Understanding unfamiliar codebases
13+ - Planning complex refactors
14+ - Debugging and investigation
15+ - Creating implementation strategies
16+
17+- **Agent mode**: Use when you're ready to make changes. Ideal for:
18+ - Implementing features
19+ - Fixing bugs
20+ - Running tests and commands
21+ - Executing plans developed in Plan mode
22+
923 ### Use Agent
1024
11-You can switch to `Agent` in the mode selector below the chat input box.
25+You can switch to `Agent` in the mode selector below the chat input box. The mode selector offers three options:
26+- **Chat**: No tools available, pure conversation
27+- **Plan**: Read-only tools for safe exploration and planning
28+- **Agent**: All tools available for making changes
1229
1330 ![How to select agent mode](/images/mode-select-agent.png)
1431
1532 <Info>
16- If Agent is disabled with a `Not Supported` message, the selected model or
33+ If Agent or Plan is disabled with a `Not Supported` message, the selected model or
1734 provider doesn't support tools, or Continue doesn't yet support tools with it.
1835 See [Model Blocks](/customization/models) for more information.
1936 </Info>
2037
38+<Tip>
39+ Use the keyboard shortcut `Cmd/Ctrl + .` to quickly cycle between modes.
40+</Tip>
41+
2142 ### Chat with Agent
2243
2344 Agent lives within the same interface as [Chat](/features/chat/how-it-works), so the same [input](/features/chat/quick-start#1-start-a-conversation) is used to send messages and you can still use the same manual methods of providing context, such as [`@` context providers](/features/chat/quick-start#3-use--for-additional-context) or adding [highlighted code from the editor](/features/chat/quick-start#2-include-code-context).
added docs/features/plan/how-it-works.mdx +112 −0
@@ -0,0 +1,112 @@
1+---
2+title: "How Plan Works"
3+description: "Plan mode provides a restricted environment with read-only tools, enabling safe exploration and planning without making changes to your codebase."
4+---
5+
6+## Understanding Plan mode
7+
8+Plan mode is designed to help you understand code and construct plans before making changes. It sits between Chat mode (no tools) and Agent mode (all tools), providing a middle ground where you can explore and analyze without risk.
9+
10+### The key difference: Read-only tools
11+
12+While Agent mode has access to all tools including those that modify files, Plan mode restricts access to only read-only tools. This ensures that:
13+
14+- No files are created, modified, or deleted
15+- No commands are executed that could change system state
16+- All exploration is safe and non-destructive
17+- You can confidently investigate without unintended consequences
18+
19+## How Plan mode works
20+
21+When you select Plan mode:
22+
23+1. Continue sends a special system message instructing the model to focus on understanding and planning
24+2. The tool list is filtered to include only read-only tools
25+3. The model can use these tools to explore and analyze your codebase
26+4. When you're ready to implement changes, you switch to Agent mode
27+
28+### Available tools in Plan mode
29+
30+Plan mode includes these read-only built-in tools:
31+
32+- **Read file** (`read_file`): Read the contents of any file in the project
33+- **Read currently open file** (`read_currently_open_file`): Read the contents of the currently open file
34+- **List directory** (`ls`): List files and directories
35+- **Glob search** (`glob_search`): Search for files matching a pattern
36+- **Grep search** (`grep_search`): Search file contents using regex patterns
37+- **Fetch URL content** (`fetch_url_content`): Retrieve content from web URLs
38+- **Search web** (`search_web`): Perform web searches for additional context
39+- **View diff** (`view_diff`): View the current git diff
40+- **View repo map** (`view_repo_map`): Get an overview of the repository structure
41+- **View subdirectory** (`view_subdirectory`): Get a detailed view of a specific directory
42+- **Codebase tool** (`codebase_tool`): Advanced codebase analysis capabilities
43+
44+### MCP tools support
45+
46+In addition to built-in read-only tools, Plan mode also supports all MCP (Model Context Protocol) tools. This allows integration with external services that provide additional context or analysis capabilities without modifying your local environment.
47+
48+<Info>
49+ While Plan mode restricts built-in tools to read-only operations, MCP tools are not filtered by Continue. Some MCP tools may have write capabilities that could modify your system or external services. Always verify what actions your MCP tools can perform before using them in Plan mode.
50+</Info>
51+
52+## The planning workflow
53+
54+A typical Plan mode workflow follows these steps:
55+
56+1. **Exploration**: Use read-only tools to understand the current state
57+2. **Analysis**: Identify what needs to change and potential impacts
58+3. **Planning**: Develop a detailed plan for implementation
59+4. **Verification**: Review the plan and ensure it addresses all requirements
60+5. **Execution**: Switch to Agent mode to implement the plan
61+
62+### Example: Planning a refactor
63+
64+```
65+User: Help me plan a refactor to extract the authentication logic into a separate module
66+
67+Plan mode:
68+1. Reads relevant files to understand current structure
69+2. Analyzes dependencies and usage patterns
70+3. Identifies all places that need updates
71+4. Creates a step-by-step refactoring plan
72+5. Suggests: "Switch to Agent mode to implement this plan"
73+```
74+
75+## System message and behavior
76+
77+Plan mode uses a dedicated system message that:
78+
79+- Instructs the model to focus on understanding and planning
80+- Emphasizes using only read-only tools
81+- Reminds the model to suggest switching to Agent mode for implementation
82+- Encourages thorough analysis before suggesting changes
83+
84+<Info>
85+ The system message can be customized per model. See [How to
86+ Customize](/features/plan/how-to-customize) for details or see it [directly in
87+ the
88+ code](https://github.com/continuedev/continue/blob/main/core/llm/defaultSystemMessages.ts).
89+</Info>
90+
91+## When to use Plan mode vs other modes
92+
93+### Use Plan mode when:
94+
95+- Exploring unfamiliar codebases
96+- Planning complex refactors or features
97+- Debugging and understanding issues
98+- Reviewing code architecture
99+- Creating implementation strategies
100+
101+### Use Chat mode when:
102+
103+- Having discussions without needing file access
104+- Asking general programming questions
105+- Getting explanations without exploring code
106+
107+### Use Agent mode when:
108+
109+- Ready to implement changes
110+- Need to create or modify files
111+- Want to run commands or tests
112+- Implementing a plan developed in Plan mode
added docs/features/plan/quick-start.mdx +60 −0
@@ -0,0 +1,60 @@
1+---
2+title: "Quick Start"
3+---
4+
5+## How to use it
6+
7+Plan mode provides a safe environment for understanding and constructing plans without making changes. It equips the Chat model with read-only tools, allowing you to explore, analyze, and plan modifications before executing them.
8+
9+### Use Plan
10+
11+You can switch to `Plan` in the mode selector below the chat input box.
12+
13+![How to select plan mode](/images/mode-select-plan.png)
14+
15+<Info>
16+ If Plan is disabled with a `Not Supported` message, the selected model or
17+ provider doesn't support tools. See [Model Setup](/features/plan/model-setup)
18+ for more information.
19+</Info>
20+
21+### Chat with Plan
22+
23+Plan mode lives within the same interface as [Chat](/features/chat/how-it-works) and [Agent](/features/agent/how-it-works), so the same [input](/features/chat/quick-start#1-start-a-conversation) is used to send messages and you can still use the same manual methods of providing context, such as [`@` context providers](/features/chat/quick-start#3-use--for-additional-context) or adding [highlighted code from the editor](/features/chat/quick-start#2-include-code-context).
24+
25+#### What makes Plan different
26+
27+Unlike Agent mode, Plan mode:
28+- Only uses read-only tools (file reading, searching, analysis)
29+- Cannot modify, create, or delete files
30+- Focuses on understanding and planning rather than execution
31+- Provides a safe environment for exploration
32+
33+### Common use cases
34+
35+Plan mode is ideal for:
36+- **Code exploration**: Understanding how a codebase works
37+- **Planning refactors**: Analyzing impact before making changes
38+- **Debugging**: Investigating issues without modifying code
39+- **Architecture review**: Understanding system design and dependencies
40+- **Pre-implementation planning**: Thinking through changes before executing
41+
42+### Example workflow
43+
44+1. **Start in Plan mode** to explore and understand the task
45+2. **Develop a plan** with the model's help
46+3. **Switch to Agent mode** when ready to implement changes
47+
48+For example, you might say:
49+
50+> Help me understand how the authentication system works and plan improvements to add OAuth support
51+
52+Plan mode will analyze the existing code, understand the current implementation, and help you create a detailed plan—all without making any changes.
53+
54+## Switching to execution
55+
56+When you're ready to implement your plan, simply switch to Agent mode using the mode selector or keyboard shortcut (`Cmd/Ctrl + .`). The conversation context carries over, so Agent mode can immediately start implementing the plan you developed.
57+
58+<Tip>
59+ Use the keyboard shortcut `Cmd/Ctrl + .` to quickly cycle between Chat, Plan, and Agent modes.
60+</Tip>
No newline at the end of the file
modified docs/getting-started/overview.mdx +10 −0
@@ -43,4 +43,14 @@
4343 Learn more about [Agent](/features/agent/quick-start)
4444 </Info>
4545 </Tab>
46+
47+<Tab title="Plan">
48+[Plan](/features/agent/plan-mode) provides a safe environment with read-only tools for exploring code and planning changes
49+
50+![plan](/images/plan-mode.gif)
51+
52+<Info>
53+ Learn more about [Plan](/features/agent/plan-mode)
54+</Info>
55+</Tab>
4656 </Tabs>
added docs/images/plan-mode-compressed.gif +0 −0

Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.

added docs/images/plan-mode-selector.png +0 −0

Binary content is not shown. View the file.

added docs/images/plan-mode.gif +0 −0

Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.