Repository navigation
Releases
Releases · nicobailon/pi-better
v0.2.0
pi-better is now on npm. Put /better in front of a prompt and a read-only helper reads your code, files and docs, then rewrites the prompt with the steps and checks you didn't think to ask for. The improved prompt lands in your input box, so you read and edit it before anything runs. It works in the background, even while your agent is busy, and your agent can use it too when it hands work to a subagent through pi-subagents.
Install it with pi install npm:pi-better. The method is Felix Rieseberg's "Depth" prompt from How to be more ambitious: A tutorial for humans with models.
Highlights
- The improved prompt goes into your input box, so you decide what gets sent.
/betterruns in the background: keep chatting while it digs, even while the agent is busy. Esc stops it.- With pi-subagents, your agent can start a subagent's task with
/better, and the brief is checked against your repo before the subagent starts. /better-boomerangdoes the rewrite live in your chat, then rewinds the chat so the research doesn't use up your context.
Need to know
- Subagent briefs work today for single subagents. Workflow children, including chain steps, need the next pi-subagents release after 0.88.0.
- If you cloned pi-better into
~/.pi/agent/extensions/pi-betterbefore, remove that folder when you switch topi install npm:pi-better, so Pi doesn't load it twice.
Changelog
Highlights
/betterputs the improved prompt in your input box, so you read and edit it before you press Enter./betterworks in the background. You keep chatting while the helper reads your code, even while the agent is busy, and Esc stops it.- Your agent can use
/bettertoo: with pi-subagents, a subagent's brief is checked against your repo before the subagent starts. - New
/better-boomerangdoes the rewrite live in your chat, then rewinds the chat so the research doesn't use up your context. - Install it from npm with
pi install npm:pi-better.
Added
- An agent can use
/betteron a subagent's brief the way you use it on a prompt. With pi-subagents, a task that starts with/betteris checked on a copy of the chat before the subagent starts. The subagent sees none of the chat, so the helper reads the brief as the subagent will, fixes paths and names that are wrong, spells out anything only the chat explains, and adds how the subagent will know it's done. It keeps the brief's scope and leaves it unchanged when nothing is missing. This works today for single subagents. For workflow children, including chain steps, it needs the next pi-subagents release after 0.88.0. /better-boomerang <prompt>: the agent in this chat rewrites the prompt with everything it already knows, then the chat jumps back to where it started and the improved prompt lands in your input box. The rewrite stays in/tree, and no other extension is needed.- While
/betterworks, two rows above your input box show a meter that fills as the helper reads your files, works through the four questions and writes your prompt, plus what it's doing now, like "Picking the methods and tools (3 of 4)", and its latest tools with ✓ or ✗. - Esc stops
/better, even while the agent is busy; press Esc again to stop the agent./better-canceldoes the same in RPC mode, which has no Esc key. - To run the helper on a different model or thinking level, set
"better": { "model": "…", "thinking": "…" }insettings.json. - Typing a space after either command shows what its argument is for.
Changed
/better <prompt>now puts the improved prompt in your input box instead of a box with fire, /boomerang, tweak, edit, why and cancel, so pi-boomerang is no longer needed. Anything you'd already typed stays in the box, below the improved prompt./betterstarts right away even while the agent is replying, running a tool or compacting, where a normal message would wait in the queue.- The helper is now a separate read-only
piprocess, so/betteritself no longer needs pi-subagents. It can only read files and run shell commands. - The helper runs on the chat's model and thinking level instead of always on Opus 5.5 with high thinking, and it reuses the chat's prompt cache, so reading your conversation costs far fewer input tokens.
- The helper is told to find and read the code, files, docs and logs your request touches before answering, without asking you anything, and to keep its searches small. Felix Rieseberg's four questions follow word for word.
- The README opens with Felix Rieseberg's "Depth" prompt from How to be more ambitious: A tutorial for humans with models and credits him. It also shows a real before-and-after, compares the three ways to run the prompt, and has a short video.
- Install with
pi install npm:pi-better.
Fixed
- An improved prompt that mentions the
<improved-prompt>tag itself now lands in your input box whole, instead of only the part after that mention. - When the helper's reply has no improved prompt in it,
/betterkeeps the reply in a file and tells you where. A helper that's killed or exits without an error message now says so plainly, instead of "exited with code null:". - Quitting Pi while
/betterworks no longer leaves a copy of your session in the temp folder.