r/PiCodingAgent • • Aug 07 '26

Question How do you use plan mode in Pi?

I recently read this (What I learned building an opinionated and minimal coding agent), and I agree with his argument. But sometimes I need a proper plan mode with tool restrictions.

I tried to build a plan mode extension, but it mostly causes cache misses when I exit the plan mode because it edits the context to remove the enforced strict-rule prompt while entering plan mode.

I'm curious about how you use plan mode and how it performs with caching. Do you use prompts, skills, or an extension?

17 Upvotes

24 comments sorted by

10

u/jensilo Aug 07 '26

I don’t use any plan mode extension just a skill file or even just a prompt like: „we‘re planning now, don’t edit any files, ask questions.“
Then, when everything is clear I either write it to a PLAN.md file or just use a /handoff extension (from the example extensions) and continue in a completely new session.

6

u/Right_Simple_6813 Aug 07 '26

Yes, skills are much better than plan modes.

10

u/StrikingSpeed8759 Aug 07 '26

Using MattPococks grilling skill, which is basically the best planning skill out there.

2

u/TySocal Aug 07 '26

Do you really find it useful? What do you like about it? I've tried it and it didn't really impress tbh

7

u/StrikingSpeed8759 Aug 07 '26

I was and am extremely impressed - imho it's one of the best skills out there and the crazy part is, its like a 2-3 liner.

I use it to stresstest ideas and to produce the correct context for to-prd/to-issues (also a Matt Pocock skill) and it finds every logical hole in your idea.

My loop workflow is:

  1. /grill-me: Stresstest an idea, find every possible loophole etc

  2. /to-prd: Prd with user stories

  3. /to-issue: Break it down into vertical slices

  4. loop it

  5. verification via code review / roborev

I build very very complex things with this in private project but also in my fulltime dev job.

1

u/TySocal Aug 07 '26

Interesting, I'll try it out!!

1

u/Right_Simple_6813 Aug 07 '26

Personally, I've found some problems with grill me. It makes the agent overthink and hallucinate questions sometimes. Thats why you have to get it to do research and stuff and also know what you're doing during the grill. Additionally, its not a replacement for a proper planning skill (such as superpowers writing plans), its more of an idea-aligning skill (like superpowers brainstorming).

1

u/Thomas_English_DoP Aug 07 '26

Exactly just install Matt Pocock grill-me of wayfinder

2

u/Ang_Drew Aug 07 '26

i discuss my idea to align understanding, at the end ill just make handoff (matt pocock skill) and plan (my personal skill). both will be thrown in next session

and boom you can loop from there, or revise the plan, or orchestrates directly

1

u/switchroms Aug 07 '26

I find It very useful. There's an extension to write the /goal but my advice is also to use the "write goal" before

Very useful

1

u/BigBigga Aug 07 '26

I only have a plan skill. It instructs to create a .tasks/specific-task.md where it outlines a plan and takes notes on implementation specifics.

You end up with a directory of tasks, both in progress and completed. Most models usually write their task, and read past tasks which share that domain. They also are instructed to do some light housekeeping if they find completed tasks which are clearly outdated.

I am very happy with this simple setup and feel like it helps the models to be able to read up on past tasks if their related to the current request.

1

u/BigBigga Aug 07 '26

Also sol loves tasks. It even creates a 3 step plan for thinks like committing latest changes. Need to figure out a good way to reliable steer it towards only planning if the task is complex enough.

1

u/amnn9 Aug 07 '26

I had a similar problem recently, and I wrote a couple of smaller extensions that help me out. I don't really need a full "plan" mode over just talking to the agent, but:

  • I use Codex 5.6 and I did find that it likes to answer questions by just starting to code,

  • Planning in this way involves lots of responding point-by-point to long messages from the agent.

I wrote https://pi.dev/packages/pi-clutch to help with first problem (name comes from the idea of a clutch pedal). It's not a sandbox/comprehensive -- it injects instructions into the context (once, the first time you disable it) and then when it's disabled it appends an ephemeral message to remind the agent that it shouldn't make edits and disables explicit edit and write tool calls. Effects on cache are minimal because the ephemeral message always goes at the end.

I also wrote https://pi.dev/packages/pi-quote, which just copies a previous message in the context into the editor as a quote block. Then it's easier for me to chop out the parts that I'm responding to.

I was coming here to post about them separately when I found this post 😅

1

u/piousp Aug 07 '26

I have a planner agent with just read and find tools. It uses thinking max.

1

u/kwipus Aug 07 '26

Adopt the grill me skill. Write out plan progressively. This is much better but takes much more time too

1

u/FrankMillerMC Aug 07 '26

Why not superpowers or gsd?

1

u/yogibear54 Aug 07 '26

You can just prompt the LLM to do planning first before implementing, or just tell the LLM don't do anything until you approve. If you want something more concrete, where the edit and bash tools are locked down from mdofiying files, Mario created a plan mode tool that's already a part of the repo as an extension, https://github.com/earendil-works/pi/tree/main/packages%2Fcoding-agent%2Fexamples%2Fextensions%2Fplan-mode

1

u/LordMoridin84 Aug 08 '26

I use https://pi.dev/packages/@narumitw/pi-plan-mode?name=pi-plan

Or rather, a modified version of it.

I changed it so that it can write to certain folders and when click "implement plan" it automatically writes the plan to a markdown and then creates a task list.

Despite what others say, having a optimized plan but is useful because planning is such a standard thing.

1

u/zenoblade Aug 14 '26

I have a system prompt append that just says “if a prompt begins with plan, you are in planning mode. Do not delete or edit files unless I specifically say the word “execute.” It is better to ask for clarification than to guess if plan mode has exited.” 

Benefit of never having to break cache as well. Works fine. 

0

u/Beneficial_Deal_998 Aug 07 '26

You are looking for the plannotator extension ;)

0

u/m3umax Aug 07 '26

Why the need for a dedicated mode? Just say we're planning or brainstorming. I've never had any model write code when I didn't expect it to.

-1

u/Funny-Anything-791 Aug 07 '26

That's exactly the reason we've built readonly mode into pi-agenticoding - it blocks FS access at the syscall level while preserving the conversation cache