pi-plan-modus

extensionmaintained

Read-only plan mode with RepoPrompt-aware write blocking; restricts tools, bash commands, and RepoPrompt operations (MCP + CLI) to read-only access

by · v0.2.6 · published 1mo ago

$ pi install npm:pi-plan-modus
downloads/mo
83
stars
122
last push
18h ago
open issues
0

Signals

license: MITtestspi manifest: missinginstall size: —deps: 0peer deps: 0

Download trend

501 downloads · last 12 weeks (weekly)

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 --plan to start in plan mode

What gets blocked

LayerBlocked operations
Native toolsedit, write
BashDestructive 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, rpce-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.