pi-plan-modus
Read-only plan mode with RepoPrompt-aware write blocking; restricts tools, bash commands, and RepoPrompt operations (MCP + CLI) to read-only access
Package details
Install pi-plan-modus from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-plan-modus- Package
pi-plan-modus- Version
0.2.3- Published
- Apr 5, 2026
- Downloads
- 211/mo · 12/wk
- Author
- w-winter
- License
- MIT
- Types
- extension
- Size
- 27.8 KB
- Dependencies
- 1 dependency · 2 peers
Pi manifest JSON
{
"extensions": [
"extensions/plan-mode.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Plan Modus for Pi (pi-plan-modus)
Read-only exploration sandbox for Pi with RepoPrompt-aware write blocking. When enabled, plan mode removes Pi-native write tools from the active Pi tool list and blocks write-capable bash and RepoPrompt operations while leaving other available tools alone.
Designed to be compatible with the pi-repoprompt-mcp and pi-repoprompt-cli extensions. When any of these are active, plan mode blocks their write-capable operations (apply_edits, file_actions, file create/delete/move) while keeping read operations available.
Based on the plan-mode example from pi-mono, with additions for RepoPrompt integration and bash AST analysis.
Install
From npm:
pi install npm:pi-plan-modus
From the dot314 git bundle (filtered install):
{
"packages": [
{
"source": "git:github.com/w-winter/dot314",
"extensions": ["extensions/plan-mode.ts"],
"skills": [],
"themes": [],
"prompts": []
}
]
}
Usage
- Command:
/plan - Shortcut:
Ctrl+Alt+P(macOS:Ctrl+Option+P) - CLI flag:
pi --planto start in plan mode
What gets blocked
| Layer | Blocked operations |
|---|---|
| Native tools | edit, write |
| Bash | Destructive commands (rm, mv, cp, mkdir, git commit, ...), write redirects (>, >>), editors (vim, nano, code) |
RepoPrompt MCP (rp) |
apply_edits, file_actions |
RepoPrompt CLI (rp_exec, rp-cli) |
edit, file create/delete/move, interactive REPL (-i) |
Read-only operations remain available across all layers: read_file, get_file_tree, file_search, get_code_structure, git status/log/diff/show, etc.
Bash command analysis
Uses just-bash AST parsing (v2+) for accurate command inspection, including nested command substitutions, pipelines, conditionals, and wrapper commands (sudo, env, command). Falls back to regex matching if the parser is unavailable.
State persistence
Plan mode state is persisted per-branch via session entries and restored on session start, switch, tree navigation, and fork.