pi-plan-md
Branch-based planning workflow extension for pi
Package details
Install pi-plan-md from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-plan-md- Package
pi-plan-md- Version
0.1.12- Published
- Apr 24, 2026
- Downloads
- 762/mo · 220/wk
- Author
- siddr
- License
- MIT
- Types
- extension
- Size
- 91 KB
- Dependencies
- 1 dependency · 4 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Plan Mode extension
Branch-based planning workflow for pi.
Install
pi install npm:pi-plan-md
What it does
/plan-mdstarts planning when inactive and opens plan mode actions when already active.- Start location picker (shown when the session has branchable history):
Empty branch(jumps to a clean branch point)Current branch(stays where you are)
- If a session plan already exists with content, startup offers:
Continue planningEmpty branch/Current branchwhen branchable history is availableStart freshwhen no branchable history is available
/plan-mdaccepts an optional location argument:- file path → use that exact file as the plan file
- directory path → create
<timestamp>-<sessionId>.plan.mdin that directory
- Shows a persistent banner while active:
Plan mode active; /plan-md to exit. /plan-md <location> to move plan file.Plan file: <path>
- Running
/plan-mdwhile active (without args) shows:ExitExit & stay in current branch
- Running
/plan-md <location>while active moves the current plan file to the resolved location. - Starting or moving to an existing file asks for overwrite confirmation (and refuses overwrite in non-interactive mode).
Exitreturns to the point from before plan mode started. If that point was the root user message, it restores a fresh branch from that message instead of dropping to an empty root.Exit & stay in current branchends plan mode without navigating away from the planning branch tip.- Exiting plan mode prefills the editor only when the active plan file has content.
- After exit, a
Plan mode ended.message is shown. When a plan exists, the message includesPlan file: <path>and an expandable plan preview (Ctrl+O); otherwise it showsNo plan created..
Commands
/plan-md [location]
Built-in tools in plan mode
Plan mode adds these tools only while active:
request_user_input— ask clarifying questions with optional choices and optional freeform answersset_plan— overwrite the active plan file with the complete latest plan text
When plan mode ends, these tools are removed again.
Optional companion extension
If you also want delegated research tools, install pi-task-subagents separately:
pi install npm:pi-task-subagents
That adds subagents and steer_subagent everywhere, including during plan mode, but pi-plan-md does not require it.
Notes
- By default, plan mode uses one plan file per session in the same directory as the session file, replacing the session extension with
.plan.md. /plan-md [location]can override the plan file path.- Plan files are kept after exiting so planning can be resumed later.
- Entering plan mode posts a visible
Plan mode instructionsmessage once and injects the hidden plan-mode prompt for the next agent turn. - After session compaction, plan mode reposts the visible instructions and reinjects the hidden plan-mode prompt for the next agent turn.
- The default plan-mode prompt is stored in
plan-md/prompts/PLAN.prompt.md. - You can override that prompt globally by creating
~/.pi/agent/PLAN.prompt.md. - If the override file is missing or blank, the bundled prompt is used.