← Catalog

@pi-unipi/workflow

Plan mode and permission modes for the Pi coding agent

Extension

Install

Install with PiG

pig install npm:@pi-unipi/workflow

Install with Pi

pi install npm:@pi-unipi/workflow
Review 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.

{
  "skills": [],
  "themes": [],
  "prompts": [],
  "extensions": [
    "./index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 3.0.3 (README.md). PiG does not review it.

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) or full.
  • In auto mode, sends an unknown bash command 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

  1. Install UniPi: pi install npm:@pi-unipi/unipi. You can also install this package alone: pi install npm:@pi-unipi/workflow.
  2. Push Alt+M to change the permission mode.
  3. Push Alt+P to start plan mode. Ask the agent for a plan.

Commands

Command or keyWhat it does
/unipi:permissionShows the current mode, the project mode and the default mode.
/unipi:permission ask|auto|fullSets the mode for this project.
Alt+MCycles the mode: ask, auto, full.
/unipi:planStarts or stops plan mode.
/unipi:plan on|offStarts or stops plan mode.
/unipi:plan viewShows the plan file.
/unipi:plan approveOpens the plan review screen.
Alt+PStarts or stops plan mode.

Agent tools

ToolWhat it does
plan_submitPlan mode only. Opens the plan review screen for the user.

Permission modes

ModeWhat runs without a prompt
askRead-only tools only. All other calls show a prompt.
autoRead-only tools, read-only bash, and writes in the project or the temp folder. Jev checks other bash commands.
fullAll calls, also dangerous bash. Saved deny rules still block.

The gate checks a tool call in this order:

  1. Saved rules. A deny rule blocks the call. An allow rule runs it.
  2. Read-only tools, such as read, grep, ls, memory_search and bg_status.
  3. write and edit. A path outside the project and the temp folder shows a prompt in ask and auto modes.
  4. bash. Dangerous patterns, such as rm -rf, sudo or git push --force, show a prompt in ask and auto modes. In auto mode, jev must say safe with a confidence of jevConfidence or more. Otherwise, you get a prompt.
  5. Other tools. They run in auto and full modes.

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>.md in the project.
  • The agent can write only the plan file. bash must 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.

KeyDefaultWhat it does
modenot setMode for this project. Project scope only.
defaultModeautoMode for projects that set no mode. Global scope only.
jevJudgetrueLets jev check unknown bash commands in auto mode.
jevConfidence0.7Minimum confidence for a safe verdict.
rules[]Saved allow and deny rules. The hub has a "Clear saved rules" action.
decisionModel.sourceinheritinherit 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