pi-xplan
Planning and step-by-step implementation workflow extension for pi with lightweight mutation guards.
Package details
Install pi-xplan from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-xplan- Package
pi-xplan- Version
0.1.2- Published
- May 26, 2026
- Downloads
- 111/mo · 111/wk
- Author
- devnazim
- License
- MIT
- Types
- extension
- Size
- 26.8 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-xplan
A small planning workflow extension for pi with lightweight mutation guards.
It adds one slash command, /xplan, for regular planning and bottom-up step-by-step implementation planning.
Install / run
Install the published package:
pi install pi-xplan
Run from a local checkout during development:
pi -e .
Or install a local checkout as a pi package:
pi install .
Commands
/xplan [task] Start regular plan mode
/xplan steps [task] Start bottom-up step-by-step planning mode
/xplan approve Approve current plan/current step for implementation
/xplan continue Continue after manual review/staging
/xplan preview Print current plan with completed step checkmarks
/xplan complete Mark xplan session complete
/xplan exit Exit xplan mode
/xplan status Show current state
/xplan help Show help
[task] is optional. Without it, xplan only switches mode; your next prompt will run with xplan steering.
Behavior
Regular plan mode
- Discuss and inspect first.
- Build a clear implementation plan.
- Do not edit until
/xplan approve. - After implementation, stop for manual review.
Step-by-step mode
/xplan steps tells the agent to:
- Build the full feature picture: behavior, data flow, dependencies, integration points, and required code blocks.
- Split implementation bottom-up so foundations are implemented before dependents.
- Keep each step review-friendly: not tiny, not huge.
- Keep the project buildable after each step when practical.
- Implement only one approved step at a time.
- Stop after each step so the user can review/stage files manually.
- Continue with the next pending planned step after
/xplan continue. - Preview the whole plan with
/xplan preview, using checkmarks for completed steps. - On the last implementation step, review the full feature, run/check reasonable validation if available, and fix issues before stopping.
Debugging
Run pi with --xplan-debug to print xplan state-machine logs to stderr.
Important notes
This extension is intentionally simple:
- No custom tools.
- No settings UI.
- No git automation.
- Built-in
edit/writetools and obvious mutatingbashcommands are blocked unless xplan is in the approvedimplementingphase.
The agent is also instructed to never stage, unstage, commit, push, pull, merge, rebase, stash, reset, restore, checkout files, cherry-pick, or otherwise mutate git history/state. The user manages git manually.