Add an explicit /plan-execute approval command for the Pi extension so task_plan.md can be drafted and reviewed without activating plan injection, pre-tool recitations, post-write reminders, or auto-continue. Scope approval to the current session and plan path, reset it on session lifecycle events, and document the passive review flow with focused runtime and docs coverage.
3.4 KiB
3.4 KiB
Pi Agent Setup
How to use planning-with-files with Pi Coding Agent.
Installation
Recommended: Install from npm
pi install npm:pi-planning-with-files
This package now installs both:
- Skill:
planning-with-files(3-file planning workflow) - Extension:
planning-with-fileshook parity runtime
Manual Install (repo copy)
# Clone repo
git clone https://github.com/OthmanAdi/planning-with-files.git
cd planning-with-files
# Copy skill package into your Pi skills directory
mkdir -p ~/.pi/agent/skills/planning-with-files
cp -r .pi/skills/planning-with-files/* ~/.pi/agent/skills/planning-with-files/
What Pi Now Supports
Pi integration provides Claude-style lifecycle behavior via extension events:
- Session catchup on
session_start - Passive plan status before approval
- Plan context reminder/injection on
before_agent_startafter/plan-execute - Pre-tool plan recitation equivalent on
tool_callafter/plan-execute - Post-write reminders on
tool_resultafter/plan-execute - Auto-continue guard on
agent_endafter/plan-execute(limit: 3) - Pre-compaction reminder on
session_before_compact - Plan attestation guard (
[PLAN TAMPERED — injection blocked])
Mode System (DeepSeek-aware)
The extension supports four modes:
auto(default):- DeepSeek model ->
cache-safe - Other models ->
parity
- DeepSeek model ->
parity: maximum Claude-equivalent behavior (dynamic plan injection)cache-safe: stable fixed reminder for better DeepSeek KV-cache hit ratenotify: UI notifications only, no conversation injection
Configure via environment variable
PWF_MODE=auto pi
PWF_MODE=parity pi
PWF_MODE=cache-safe pi
PWF_MODE=notify pi
Configure via settings
Project-level (.pi/settings.json) overrides global (~/.pi/agent/settings.json):
{
"planningWithFiles": {
"mode": "auto"
}
}
Commands
After installation, these extension commands are available:
/plan-status— show current plan counts and paths/plan-attest [--show|--clear]— manage plan SHA-256 attestation/plan-execute— approve the active plan and enable hook activation/plan-execute reset— return the active plan to passive review mode/plan-goal <text|default|clear>— set/clear continuation goal text/plan-loop [10m] [prompt...]— periodic planning tick; usestopto cancel
Usage
Start with:
/skill:planning-with-files
Then ask Pi to create/update:
task_plan.mdfindings.mdprogress.md
Review and edit the plan until it matches your intent. During this review stage, the extension stays passive: it may show plan status, but it does not inject plan context, recite the plan before tools, or auto-continue.
When you are ready to execute, run:
/plan-execute
For long tasks, keep task_plan.md as the source of truth and let the activated
hooks/extension events enforce the loop.
Troubleshooting
- Confirm package installed:
pi list - Reload runtime:
/reload - Check skill and extension paths:
- skill:
.pi/skills/planning-with-files/ - extension:
extensions/planning-with-files/index.ts
- skill:
- If plan injection is blocked, run:
Then re-attest intentionally changed plans:
/plan-attest --show/plan-attest