Install
Install with PiG
pig install npm:@po.dev/pi-branch-workspaceInstall with Pi
pi install npm:@po.dev/pi-branch-workspaceReview before installing
Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.4.5 (README.md). PiG does not review it.
branch-workspace
Pi extension that gives each git branch its own workspace and a read-only / edit mode guard.
Install
pi install npm:@po.dev/pi-branch-workspace
Or load locally:
pi -e ./branch-workspace/index.ts
Features
- Each git branch gets
.pi/<branch>/workspace.mdinjected as context every session - read-only mode — reads and traces the codebase before answering; blocks direct writes outside
.pi/**while allowing reads,chmod, and operations outside the project - edit mode — full access; commits only when you explicitly run
/ws commit - Switching to edit mode automatically kicks off whatever was agreed on in the conversation
AGENTS.md(or.pi/agents.md) injected as shared repo instructions
Commands
/mode show current mode
/mode read-only, /mode r switch to read-only
/mode edit, /mode e switch to edit and start implementing
/r shortcut for read-only mode
/e shortcut for edit mode
/ws pick a workspace section to update from conversation
/ws plan update the Plan section
/ws <section> update or create any section
/ws commit commit all uncommitted changes as "wip: <agent summary>"
Workspace layout
.pi/
agents.md shared repo instructions
<branch>/
workspace.md plan, discussion, progress notes
.mode current mode (read-only | edit)
Mode rules
- Every session start /
/reloadresets.modetoread-only—/mode editonly lasts the current session - Missing
.mode→ defaults toread-only - Invalid value → resets to
read-onlywith a warning - In read-only mode, direct
writeandeditcalls can change only.pi/**;.modeitself can still be changed only through/mode,/r, or/e