@pi-unipi/workflow
Plan mode and permission modes for the Pi coding agent
Package details
Install @pi-unipi/workflow from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@pi-unipi/workflow- Package
@pi-unipi/workflow- Version
3.0.0- Published
- Oct 25, 2026
- Downloads
- 6,870/mo · 299/wk
- Author
- neuron-mr-white
- License
- MIT
- Types
- extension
- Size
- 78.6 KB
- Dependencies
- 1 dependency · 4 peers
Pi manifest JSON
{
"skills": [],
"themes": [],
"prompts": [],
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Workflow
Workflow controls which tool calls the agent can run without your approval, and gives a read-only plan mode.
@pi-unipi/workflow · part of UniPi
What it does
- Checks each tool call against a permission mode:
ask,auto(default) orfull. - In
automode, sends an unknownbashcommand to jev for a risk verdict. Jev is the UniPi decision model: one small LLM call that returns a choice and a confidence. - Saves "Always allow" rules for each project. Saved deny rules apply in all modes.
- Gives plan mode. In plan mode, the agent can only read files and write one plan file.
- Shows the plan in a review screen. You approve it, ask for changes or discard it.
Quick start
- Install UniPi:
pi install npm:@pi-unipi/unipi. You can also install this package alone:pi install npm:@pi-unipi/workflow. - Push
Alt+Mto change the permission mode. - Push
Alt+Pto start plan mode. Ask the agent for a plan.
Commands
| Command or key | What it does |
|---|---|
/unipi:permission |
Shows the current mode, the project mode and the default mode. |
/unipi:permission ask|auto|full |
Sets the mode for this project. |
Alt+M |
Cycles the mode: ask, auto, full. |
/unipi:plan |
Starts or stops plan mode. |
/unipi:plan on|off |
Starts or stops plan mode. |
/unipi:plan view |
Shows the plan file. |
/unipi:plan approve |
Opens the plan review screen. |
Alt+P |
Starts or stops plan mode. |
Agent tools
| Tool | What it does |
|---|---|
plan_submit |
Plan mode only. Opens the plan review screen for the user. |
Permission modes
| Mode | What runs without a prompt |
|---|---|
ask |
Read-only tools only. All other calls show a prompt. |
auto |
Read-only tools, read-only bash, and writes in the project or the temp folder. Jev checks other bash commands. |
full |
All calls, also dangerous bash. Saved deny rules still block. |
The gate checks a tool call in this order:
- Saved rules. A deny rule blocks the call. An allow rule runs it.
- Read-only tools, such as
read,grep,ls,memory_searchandbg_status. writeandedit. A path outside the project and the temp folder shows a prompt inaskandautomodes.bash. Dangerous patterns, such asrm -rf,sudoorgit push --force, show a prompt inaskandautomodes. Inautomode, jev must saysafewith a confidence ofjevConfidenceor more. Otherwise, you get a prompt.- Other tools. They run in
autoandfullmodes.
The prompt gives four options: "Allow once", "Always allow", "Deny" and "Deny with note". The agent gets your note in the block reason.
When there is no UI, nothing shows a prompt. The gate blocks dangerous bash
and saved deny rules. It runs all other calls.
Plan mode
- The plan file is
docs/plans/<date>-<session-id>.mdin the project. - The agent can write only the plan file.
bashmust be read-only. Other tools that change state get a block message. - Each turn gets a short reminder message. The system prompt does not change.
- "Approve & implement" stops plan mode. It sends the plan as the next user message.
- "Keep planning" sends your feedback to the agent.
Settings
Namespace permission. Open it with /unipi:settings.
| Key | Default | What it does |
|---|---|---|
mode |
not set | Mode for this project. Project scope only. |
defaultMode |
auto |
Mode for projects that set no mode. Global scope only. |
jevJudge |
true |
Lets jev check unknown bash commands in auto mode. |
jevConfidence |
0.7 |
Minimum confidence for a safe verdict. |
rules |
[] |
Saved allow and deny rules. The hub has a "Clear saved rules" action. |
decisionModel.source |
inherit |
inherit uses the shared decision-model settings. custom sets a model for this namespace. |
Set UNIPI_DEBUG_PERMISSION=1 to write each decision to
~/.unipi/logs/permission.log.
See also
- Commands reference
- Shortcuts reference
- Harness messages
- Skill registry has the old workflow skills.