3.6 KiB
PI COMMON REVIEWER
Purpose
This document covers the shared reviewer-runtime helpers used by the Pi workflow skills.
It is intentionally separate from PI-SUPERPOWERS.md. Superpowers are skill dependencies; reviewer-runtime is helper-script setup.
Pi As A Reviewer CLI
Pi workflow skills may use pi itself as the reviewer CLI, even when the main workflow is already running in pi. In that case, the reviewer model is configured independently from the running agent model. This lets the operator run a workflow with one model while asking another pi-configured model, including provider-qualified model IDs, to review the plan or implementation.
The canonical isolated, read-only reviewer command is:
pi --no-session --no-skills --no-prompt-templates --no-extensions --no-context-files --model "$REVIEWER_MODEL" --tools read,grep,find,ls -p "Read the review payload and return the requested verdict."
Pi reviewer calls must stay isolated from the main workflow:
- Use
--no-sessionso the reviewer does not continue or persist the workflow session. - Use
--no-skills --no-prompt-templates --no-extensions --no-context-filesso the reviewer does not load workflow skills, project context files, or package extensions that could re-entercreate-plan,implement-plan, ordo-task. - Use exactly
--tools read,grep,find,lsfor review. The pi reviewer command MUST NOT includewrite,edit, orbash; the reviewer reads payloads and diffs but never modifies files or runs commands.
If the reviewer subprocess exits non-zero because the provider, credentials, or model ID are unavailable, surface the captured stderr/status from run-review.sh, then ask the user for a configured reviewer model. Use pi --list-models [search] to inspect available configured models when needed.
Official references:
https://github.com/badlogic/pi-mono/tree/main/packages/coding-agentdocuments pi providers, model selection, skills, extensions, and print mode.- Local
pi --helpfor pi0.70.0confirms--model <pattern>supportsprovider/id,--print, -pruns non-interactively,--tools, -t <tools>allowlists tools, and the read-only example ispi --tools read,grep,find,ls -p "Review the code in src/".
Required Files
The workflow-heavy Pi skills expect these helper files from skills/reviewer-runtime/pi/:
run-review.shnotify-telegram.sh
Supported install locations:
.pi/skills/reviewer-runtime/pi/~/.pi/agent/skills/reviewer-runtime/pi/
Verify An Existing Install
Project-local:
test -x .pi/skills/reviewer-runtime/pi/run-review.sh
test -x .pi/skills/reviewer-runtime/pi/notify-telegram.sh
Global:
test -x ~/.pi/agent/skills/reviewer-runtime/pi/run-review.sh
test -x ~/.pi/agent/skills/reviewer-runtime/pi/notify-telegram.sh
Install The Common Reviewer Helpers
Global install:
mkdir -p ~/.pi/agent/skills/reviewer-runtime/pi
cp -R skills/reviewer-runtime/pi/* ~/.pi/agent/skills/reviewer-runtime/pi/
chmod +x ~/.pi/agent/skills/reviewer-runtime/pi/*.sh
Project-local install:
mkdir -p .pi/skills/reviewer-runtime/pi
cp -R skills/reviewer-runtime/pi/* .pi/skills/reviewer-runtime/pi/
chmod +x .pi/skills/reviewer-runtime/pi/*.sh
Telegram
If you want the workflow skills to send completion messages, configure:
TELEGRAM_BOT_TOKENTELEGRAM_CHAT_ID
The Pi helper uses the same notification behavior documented in TELEGRAM-NOTIFICATIONS.md.
What This Doc Does Not Cover
- installing Obra Superpowers
- Pi package layout decisions
Those belong in PI-SUPERPOWERS.md and PI.md.