Open source AI coding agent. Designed for large projects and real world tasks.
Go aiai-agentsai-developer-toolsai-toolsclicommand-linedeveloper-toolsgitgolanggpt-4llmopenaipolyglot-programmingterminalterminal-basedterminal-ui
finishing up v2 docs updates
Dane Schneiderd22777d38277
diff --git a/docs/docs/core-concepts/autonomy.md b/docs/docs/core-concepts/autonomy.mdindex 5f37029f..bbc5cb29 100644--- a/docs/docs/core-concepts/autonomy.md+++ b/docs/docs/core-concepts/autonomy.md@@ -3,9 +3,9 @@ sidebar_position: 2sidebar_label: Autonomy----# Autonomy Levels+# Autonomy-Plandex v2 offers five different levels of autonomy. Each autonomy level controls:+Plandex v2 offers multiple levels of autonomy with pre-set config. Each autonomy level controls:- Automatic context loading and management- Automatic plan continuation@@ -14,7 +14,7 @@ Plandex v2 offers five different levels of autonomy. Each autonomy level control- Automatic command execution and debugging- Automatic git commits after changes are applied successfully-## The Five Autonomy Levels+## Autonomy Levels### None@@ -24,9 +24,11 @@ Complete manual control with no automation:- Manual plan continuation- Manual building of changes- Manual application of changes-- Manual command execution+- Command execution disabled++### Basic-### Basic (equivalent to Plandex v1 autonomy level)+_Equivalent to Plandex v1 autonomy level_Minimal automation:@@ -34,11 +36,11 @@ Minimal automation:- Auto-continue plans until completion- Manual building of changes- Manual application of changes-- Manual command execution+- Command execution disabled### Plus-Smart context management:+Smart context management and manual command execution:- Manual initial context loading- Auto-continue plans until completion@@ -49,7 +51,9 @@ Smart context management:- Manual command execution- Auto-commit changes to git when applied-### Semi (default level)+### Semi++_Default autonomy level for a fresh Plandex install_Automatic context loading:@@ -86,6 +90,7 @@ Complete automation:| `smart-context` | ❌ | ❌ | ✅ | ✅ | ✅ || `auto-update-context` | ❌ | ❌ | ✅ | ✅ | ✅ || `auto-apply` | ❌ | ❌ | ❌ | ❌ | ✅ |+| `can-exec` | ❌ | ❌ | ✅ | ✅ | ✅ || `auto-exec` | ❌ | ❌ | ❌ | ❌ | ✅ || `auto-debug` | ❌ | ❌ | ❌ | ❌ | ✅ || `auto-commit` | ❌ | ❌ | ✅ | ✅ | ✅ |diff --git a/docs/docs/core-concepts/configuration.md b/docs/docs/core-concepts/configuration.mdindex 94034e79..2b53aeb9 100644--- a/docs/docs/core-concepts/configuration.md+++ b/docs/docs/core-concepts/configuration.md@@ -5,16 +5,17 @@ sidebar_label: Configuration# Configuration-Plandex v2 provides a flexible configuration system that lets you customize its behavior to match your workflow preferences.+Plandex v2 provides a flexible configuration system that lets you customize its behavior based on the task+you're working on and your preferences.-## Viewing Configuration+## Viewing Config```bashplandex config # View current plan's configurationplandex config default # View default configuration for new plans```-## Modifying Configuration+## Modifying Config```bashplandex set-config # Select from a list of options@@ -22,78 +23,69 @@ plandex set-config auto-apply true # Set a specific optionplandex set-config default auto-mode basic # Set default for new plans```-## Key Configuration Settings+## Key Settings-### Autonomy Settings+### Autonomy Level++Autonomy settings control the overall level of automation Plandex will use. See the [Autonomy](./autonomy.md) page for more details and shortcuts for setting autonomy levels.++| Setting | Description | Default |+| --------------------- | ---------------------------------------------------------------- | ------- |+| `auto-mode` | Overall autonomy level (`none`, `basic`, `plus`, `semi`, `full`) | `semi` |++### Plan Control| Setting | Description | Default || --------------------- | ---------------------------------------------------------------- | ------- |-| `auto-mode` | Overall autonomy level (`none`, `basic`, `plus`, `semi`, `full`) | `basic` || `auto-continue` | Continue plans until completion | `true` || `auto-build` | Build changes into pending updates | `true` |-| `auto-load-context` | Load context using project map | `false` |-| `smart-context` | Load only necessary files for each step | `false` |-| `auto-update-context` | Update context when files change | `false` || `auto-apply` | Apply changes to project files | `false` |-| `auto-exec` | Execute commands after applying changes | `false` |-| `auto-debug` | Debug failing commands | `false` |-| `auto-commit` | Commit changes to git when applied | `false` |-### Execution Settings+### Context Management| Setting | Description | Default || ----------------------- | ---------------------------------------- | ------- |-| `can-exec` | Allow command execution (safety setting) | `true` |-| `auto-debug-tries` | Number of tries for automatic debugging | `5` |-| `auto-revert-on-rewind` | Revert project files when rewinding | `true` |--## Setting Autonomy Levels+| `auto-update-context` | Update context when files change | `true` |+| `auto-load-context` | Load context using project map | `true` |+| `smart-context` | Load only necessary files for each step | `true` |-Instead of configuring individual settings, you can use predefined autonomy levels:--```bash-plandex set-auto none # No automation, step-by-step-plandex set-auto basic # Auto-continue plans only-plandex set-auto plus # Smart context management-plandex set-auto semi # Auto-load context-plandex set-auto full # Full automation-```+### Execution-For default settings on new plans:+| Setting | Description | Default |+| ----------------------- | ---------------------------------------- | ------- |+| `can-exec` | Allow command execution (safety setting) | `true` |+| `auto-exec` | Automatically execute commands | `true` |+| `auto-debug` | Automatically debug commands | `false` |+| `auto-debug-tries` | Number of tries for automatic debugging | `5` |-```bash-plandex set-auto default semi # Set default to semi-auto-```+### Version Control-## Autonomy Level Comparison+| Setting | Description | Default |+| ----------------------- | ---------------------------------------- | ------- |+| `auto-commit` | Commit changes to git when applied | `true` |+| `auto-revert-on-rewind` | Revert project files when rewinding | `true` |-| Setting | None | Basic | Plus | Semi | Full |-| --------------------- | ---- | ----- | ---- | ---- | ---- |-| `auto-continue` | ❌ | ✅ | ✅ | ✅ | ✅ |-| `auto-build` | ❌ | ❌ | ✅ | ✅ | ✅ |-| `auto-load-context` | ❌ | ❌ | ❌ | ✅ | ✅ |-| `smart-context` | ❌ | ❌ | ✅ | ✅ | ✅ |-| `auto-update-context` | ❌ | ❌ | ✅ | ✅ | ✅ |-| `auto-apply` | ❌ | ❌ | ❌ | ❌ | ✅ |-| `auto-exec` | ❌ | ❌ | ❌ | ❌ | ✅ |-| `auto-debug` | ❌ | ❌ | ❌ | ❌ | ✅ |-| `auto-commit` | ❌ | ❌ | ✅ | ✅ | ✅ |## Command Line Overrides-Many settings can be overridden with command line flags:+Settings can be overridden with command line flags:```bash+# this will apply changes, automatically execute commands, and automatically debug regardless of your autonomy level and config settingsplandex tell "add a feature" --apply --auto-exec --debug```These overrides apply only to the current command execution and don't change the saved configuration.+See the [CLI Reference](../cli-reference.md) for a full list of command line flags for each command.+## REPL Commands```\config # View current plan config\config default # View default config\set-config # Modify current plan config+\set-config default # Modify default config for new plans\set-auto # Set autonomy level+\set-auto default # Set default autonomy level for new plans```diff --git a/docs/docs/core-concepts/context-management.md b/docs/docs/core-concepts/context-management.mdindex 31c86fae..45781971 100644--- a/docs/docs/core-concepts/context-management.md+++ b/docs/docs/core-concepts/context-management.md@@ -11,7 +11,7 @@ Changes to context are [version controlled](./version-control.md) and can be [br## Automatic vs. Manual-As of 2.0.0, Plandex loads context automatically by default. When a new plan is created, a [project map](#loading-project-maps) is generated and loaded into context. The LLM then uses this map to select relevant context before planning a task or responding to a message.+As of v2, Plandex loads context automatically by default. When a new plan is created, a [project map](#loading-project-maps) is generated and loaded into context. The LLM then uses this map to select relevant context before planning a task or responding to a message.### Tradeoffs@@ -21,13 +21,6 @@ Automatic context loading makes Plandex more powerful and easier to work with, bYou can use manual context loading by:-- Setting the `auto-load-context` config option to `false`:--```bash-plandex set-config auto-load-context false-plandex set-config default auto-load-context false # set the default value for all new plans-```-- Using `set-auto` to choose a lower [autonomy level](./autonomy.md) that has auto-load-context disabled (like `plus` or `basic`).```bash@@ -43,9 +36,16 @@ plandex --plusplandex new --basic```+- Setting the `auto-load-context` [config option](./configuration.md) to `false`:++```bash+plandex set-config auto-load-context false+plandex set-config default auto-load-context false # set the default value for all new plans+```+### Smart Context Window Management-Another new context management feature in 2.0.0 is smart context window management. When making a plan with multiple steps, Plandex will determine which files are relevant to each step. Only those files will be loaded into context during implementation.+Another new context management feature in v2 is smart context window management. When making a plan with multiple steps, Plandex will determine which files are relevant to each step. Only those files will be loaded into context during implementation.When combined with automatic context loading, this effectively creates a sliding context window that grows and shrinks as needed throughout the plan.@@ -71,13 +71,13 @@ plandex set-config auto-update-context falseplandex set-config default auto-update-context false # set the default value for all new plans```-### Context-Autonomy Matrix+### Autonomy MatrixHere are the different autonomy levels as they relate to context management config options:| | `none` | `basic` | `plus` | `semi` | `full` || --------------------- | ------ | ------- | ------ | ------ | ------ |-| `auto-load-context` | ❌ | ❌ | ✅ | ✅ | ✅ |+| `auto-load-context` | ❌ | ❌ | ❌ | ✅ | ✅ || `smart-context` | ❌ | ❌ | ✅ | ✅ | ✅ || `auto-update-context` | ❌ | ❌ | ✅ | ✅ | ✅ |diff --git a/docs/docs/core-concepts/execution-and-debugging.md b/docs/docs/core-concepts/execution-and-debugging.mdindex 047f97ac..5d4b2766 100644--- a/docs/docs/core-concepts/execution-and-debugging.md+++ b/docs/docs/core-concepts/execution-and-debugging.md@@ -5,10 +5,18 @@ sidebar_label: Execution and Debugging# Execution and Debugging-Plandex v2 includes powerful execution control and automated debugging capabilities.+Plandex v2 includes command execution and automated debugging capabilities that aim to balance power, control, and safety.## Command Execution+During a plan, apart from making changes to files, Plandex can write to a special path, `_apply.sh`, with any commands required to complete the plan. This commonly includes installing dependencies, running tests, building and running code, starting servers, and so on.++Commands accumulate in the sandbox just like [pending changes to files](./reviewing-changes.md#pending-changes). If execution fails, you can roll back changes and optionally send the output to the model for automated debugging and retries.++While Plandex will attempt to automatically infer relevant commands to run, it also tries not to overdo it. It generally won't, for example, run a test suite unless you've specifically asked it to, since it may not be desirable after every change. It tries to only run what's strictly necessary, to make local project-level changes instead of global system-wide changes, to check existing dependencies before installing, to write idempotent commands, to avoid hiding output or asking for user input, and to recover gracefully from failures.++If you want specific commands to run and Plandex isn't including automatically them because of it's somewhat conservative approach, you can either mention them in the prompt, or you can use the `plandex debug` command to automatically debug based on the output of any command you choose.+### Execution ConfigControl whether Plandex can execute commands:@@ -18,25 +26,16 @@ plandex set-config can-exec true # Allow command execution (default)plandex set-config can-exec false # Disable command execution```-### Automatic Execution+If you toggle `can-exec` to `false`, Plandex will completely skip writing any commands to `_apply.sh`.-Control whether commands are executed automatically after applying changes:+Control whether commands are executed automatically after applying changes (be careful with this):```bashplandex set-config auto-exec true # Auto-execute commandsplandex set-config auto-exec false # Prompt before executing (default)--# Override for specific commands-plandex apply --auto-exec # Auto-execute after applying-plandex apply --no-exec # Don't execute after applying--# With tell/continue/build-plandex tell "add a route" --apply --auto-exec```-## Debugging Commands--### Using `plandex debug`+## Automated DebuggingThe `plandex debug` command repeatedly runs a terminal command, making fixes until it succeeds:@@ -53,30 +52,12 @@ This will:4. If command is succesful after fixes, commit changes (if auto-commit is enabled). Otherwise, roll back changes and return to step 2.5. Repeat until success or max tries reached-### Number of Tries--Configure the default number of tries:+You can configure the default number of tries:```bashplandex set-config auto-debug-tries 10 # Set default to 10 tries```-### Automatic Debugging--Control whether failing commands are automatically debugged:--```bash-plandex set-config auto-debug true # Auto-debug failing commands-plandex set-config auto-debug false # Don't auto-debug (default)--# Override for specific commands-plandex apply --debug # Auto-debug failing commands-plandex apply --debug 10 # Auto-debug with 10 tries--# With tell/continue/build-plandex tell "add a route" --apply --debug-```-## Common Debugging Workflows### Fixing Failing Tests@@ -109,42 +90,34 @@ plandex debug 'npm run typecheck'plandex debug 'tsc --noEmit'```-## Alternative Approaches--### Piping Into `plandex tell`+## A Manual Alternative-For a less automated approach:+For a less automated approach, you can pipe the output of a command into `plandex chat` or `plandex tell`.```bashnpm test | plandex tell 'npm test output'+go build | plandex chat 'what could be causing these type errors?'```-This works similarly to `plandex debug` but without automatic retries. You can review changes before applying them.+This works similarly to `plandex debug` but without automatically applying changes and retrying.-## Interaction with Autonomy Levels+Note that piping output into a prompt requires using the CLI directly in the terminal. You can't do it from inside the [REPL](../repl.md).++## Autonomy MatrixExecution and debugging behavior is affected by your [autonomy level](./autonomy.md):| Setting | None | Basic | Plus | Semi | Full || ------------ | ---- | ----- | ---- | ---- | ---- |+| `can-exec` | ❌ | ❌ | ✅ | ✅ | ✅ || `auto-exec` | ❌ | ❌ | ❌ | ❌ | ✅ || `auto-debug` | ❌ | ❌ | ❌ | ❌ | ✅ |-With `full` autonomy, commands are automatically executed and debugged after changes are applied. For other levels, you'll be prompted to approve execution and debugging.--## Configuration Settings--Key settings that control execution and debugging:-```bash-plandex set-config can-exec true # Allow command execution-plandex set-config auto-exec true # Auto-execute commands-plandex set-config auto-debug true # Auto-debug failing commands-plandex set-config auto-debug-tries 10 # Set debug tries-```+With `full` autonomy, commands are automatically executed and debugged after changes are applied. For other levels, you'll be prompted to approve execution and debugging steps.## Safety-Needless to say, you should be extremely careful when using `auto-exec`, `auto-debug`, and the `debug` command. They can make many changes quickly without any prompting or review, and can run commands that could potentially be destructive to your system. While the best LLMs are quite trustworthy when it comes to running commands and are unlikely to cause harm, it still pays to be cautious.+Needless to say, you should be extremely careful when using full auto mode, `auto-exec`, `auto-debug`, and the `debug` command. They can make many changes quickly without any prompting or review, and can run commands that could potentially be destructive to your system. While the best LLMs are quite trustworthy when it comes to running commands and are unlikely to cause harm, it still pays to be cautious.-It's a good idea to make sure your git state is clean, and to check out an isolated branch before running these commands.+It's a good idea to make sure your git state is clean, and to check out an isolated branch before using these features.diff --git a/docs/docs/core-concepts/reviewing-changes.md b/docs/docs/core-concepts/reviewing-changes.mdindex dede1b2a..09d614a5 100644--- a/docs/docs/core-concepts/reviewing-changes.md+++ b/docs/docs/core-concepts/reviewing-changes.md@@ -61,102 +61,21 @@ Once you're happy with the plan's changes, you can apply them to your project fiplandex apply```-### Apply Flags+### Apply Flags & Config-Plandex v2 introduces several new flags for the `apply` command that give you more control over what happens after changes are applied:+Plandex v2 introduces several [new config settings and flags](./configuration.md) for the `apply` command that give you control over what happens after changes are applied.-- `--auto-update-context`: Automatically update context if files have changed (defaults to config value `auto-update-context`)-- `--no-exec`: Don't execute commands after successful apply (defaults to opposite of config value `can-exec`)-- `--auto-exec`: Automatically execute commands after successful apply without confirmation (defaults to config value `auto-exec`)-- `--debug`: Automatically execute and debug failing commands (optionally specify number of tries—default is 5, based on config values `auto-debug` and `auto-debug-tries`)-- `--commit/-c`: Commit changes to git after applying (defaults to config value `auto-commit`)-- `--skip-commit`: Don't commit changes to git (defaults to opposite of config value `auto-commit`)+### Command Execution & Debugging-### Git Integration+After applying changes, Plandex can automatically execute pending commands. This is useful for running tests, starting servers, or performing other actions that verify the changes work as expected.-If you're in a git repository, Plandex will give you the option of grouping the changes into a git commit with an automatically generated commit message. Any uncommitted changes that were present in your working directory beforehand will be unaffected.--You can control git integration with these flags:--```bash-plandex apply --commit # Commit changes to git after applying-plandex apply --skip-commit # Don't commit changes to git-```--Or you can set the `auto-commit` config value to `true` or `false` to control this behavior globally:--```bash-plandex set-config auto-commit true-plandex set-config default skip-commit true # Set the default value for new plans-```--### Command Execution--After applying changes, Plandex can automatically execute commands that were part of the plan. This is useful for running tests, starting servers, or performing other actions that verify the changes work as expected.--```bash-plandex apply --auto-exec # Automatically execute commands after successful apply-plandex apply --no-exec # Don't execute commands after successful apply-```--### Automatic Debugging--If a command fails after applying changes, Plandex can automatically attempt to debug and fix the issue:--```bash-plandex apply --debug # Automatically debug failing commands (default 5 tries)-plandex apply --debug 10 # Automatically debug failing commands with 10 tries-```+If commands fail, the changes are rolled back. Depending on the autonomy level and config, Plandex will then either attempt to debug automatically or prompt you with debugging options.## Auto-Applying Changes-If you want to skip the review step and automatically apply the changes from a plan immediately after it's complete, you can pass the `--apply/-a` flag to `plandex tell`, `plandex continue`, or `plandex build`:+When `auto-apply` is enabled, Plandex will automatically apply changes after a plan is complete without prompting or review. This is enabled at the `full` autonomy level, and also during auto-debugging.-```bash-plandex tell "add a new route" --apply-plandex continue --apply-plandex build --apply-```--You can combine this with other flags:--```bash-plandex tell "add a new route" --apply --commit # Apply and commit changes-plandex tell "add a new route" --apply --auto-exec # Apply and execute commands-plandex tell "add a new route" --apply --debug # Apply and debug failing commands-```--## Configuration Settings--Plandex v2 introduces several configuration settings that control how changes are applied. You can view these settings with `plandex config`:--```bash-plandex config-```--The following settings affect how changes are applied:--- `auto-apply`: Whether changes are automatically applied after a plan is complete-- `auto-exec`: Whether commands are automatically executed after changes are applied-- `auto-debug`: Whether failing commands are automatically debugged-- `auto-debug-tries`: Number of tries for automatic debugging (default: 5)-- `auto-commit`: Whether changes are automatically committed to git after applying-- `can-exec`: Whether commands can be executed at all (safety setting)--You can modify these settings with `plandex set-config`:--```bash-plandex set-config auto-apply true-plandex set-config auto-exec true-plandex set-config auto-debug true-plandex set-config auto-debug-tries 10-plandex set-config auto-commit true-plandex set-config can-exec true-```--## Interaction with Autonomy Levels--The behavior of the `apply` command is also affected by the [autonomy level](./autonomy.md) you've set for your plan:+## Autonomy Matrix| Setting | None | Basic | Plus | Semi | Full || ------------- | ---- | ----- | ---- | ---- | ---- |@@ -164,33 +83,3 @@ The behavior of the `apply` command is also affected by the [autonomy level](./a| `auto-exec` | ❌ | ❌ | ❌ | ❌ | ✅ || `auto-debug` | ❌ | ❌ | ❌ | ❌ | ✅ || `auto-commit` | ❌ | ❌ | ✅ | ✅ | ✅ |--If you're using the `full` autonomy level, changes will be automatically applied to your project files, commands will be automatically executed, and failing commands will be automatically debugged.--For other autonomy levels, you'll need to manually apply changes, but you can still use the flags described above to override the default behavior for a specific command.--## Recommended Workflow--For most users, we recommend the following workflow:--1. Use `plandex tell` to give Plandex a task-2. Review the proposed changes with `plandex diff` or `plandex diff --ui`-3. Apply the changes with `plandex apply`-4. If commands need to be executed, decide whether to execute them automatically or manually--For users who want more automation, we recommend:--1. Set the autonomy level to `full` with `plandex set-auto full`-2. Use `plandex tell` to give Plandex a task-3. Let Plandex automatically apply changes, execute commands, and debug failing commands--For users who want more control, we recommend:--1. Set the autonomy level to `plus` or `semi` with `plandex set-auto plus` or `plandex set-auto semi`-2. Use `plandex tell` to give Plandex a task-3. Review the proposed changes with `plandex diff` or `plandex diff --ui`-4. Apply the changes with `plandex apply`-5. Manually execute any commands that need to be run- If you want to skip the review step and automatically apply the changes from a plan immediately after it's complete, you can pass the `--apply/-a` flag to `plandex tell`, `plandex continue`, or `plandex build`.--If you do this, you can also pass the `--commit/-c` flag to commit the automatically applied changes to git.