@kkkiio/pi-advisor

A btw-style second opinion and watchdog for Pi, using a dedicated review model

Packages

Package details

extension

Install @kkkiio/pi-advisor from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@kkkiio/pi-advisor
Package
@kkkiio/pi-advisor
Version
0.3.0
Published
Jul 25, 2026
Downloads
467/mo · 207/wk
Author
kkkiio
License
Apache-2.0
Types
extension
Size
235.3 KB
Dependencies
0 dependencies · 5 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions/advisor.ts"
  ],
  "image": "https://raw.githubusercontent.com/kkkiio/pi-advisor/main/docs/assets/advisor-overview.png"
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

Advisor

Advisor combines a btw-style Second Opinion with an asynchronous watchdog for Pi. Press Option+/ on macOS to ask a dedicated reviewer whether the Primary Agent's latest answer is sound, or start a Watch Run and let Advisor follow the task in the background.

For the best pairing, use an expressive model that excels at documentation as the Primary Agent, then give Advisor a rigorous review model such as GPT. The two agents keep separate contexts, so Advisor can challenge the Primary Agent instead of echoing it.

Installation

pi install npm:@kkkiio/pi-advisor

Set the model that will act as Advisor:

/advisor:model openai-codex/gpt-5.6-sol

You can also install a local checkout with pi install ./path/to/pi-advisor.

Usage

Ask whether the Primary Agent is right

  1. Press Option+/ on macOS (Alt+/ in Pi's terminal notation).
  2. Ask Advisor a question such as: Was the Primary Agent's last answer correct?
  3. Press Option+/ again to return to the Primary Agent.

Advisor automatically receives the latest Primary context and can pull more of the transcript when it needs to inspect earlier messages, tool calls, or diffs.

You can also open Advisor and ask in one command:

/advisor Review the Primary Agent's approach and point out anything it missed.

Watch a task

/advisor:watch

A Watch Run follows the current Primary task asynchronously. Advisor can send timely guidance while work is in progress and queue concerns for the Primary Agent to handle after its current work. The Overlay can stay closed while the review continues.

Stop the Watch Run at any time:

/advisor:watch-off

Hand off a Second Opinion

After an Ask completes, send its latest Second Opinion to the Primary Agent:

/advisor:handoff

Commands

Command What it does
/advisor [message] Open Advisor or ask it immediately
/advisor:watch Start an asynchronous Watch Run
/advisor:watch-off Stop the Watch Run and preserve its transcript
/advisor:handoff [instructions] Send the latest Second Opinion to Primary
/advisor:new Start a fresh Advisor conversation
/advisor:model [model] Show or set the Advisor model
/advisor:thinking [level] Show or set the Advisor thinking level

The Advisor Overlay is a top-center work view with its own input and transcript. Option+/ opens or closes it, Esc returns to Primary, and Pi's app.tools.expand keybinding (Ctrl+O by default) expands Context and Pull blocks. Closing the Overlay preserves the conversation, input draft, and active Watch Run.

Ask Advisor and Watch Run share one session-persistent Advisor. It reviews and guides; it does not receive file-writing tools. During a Watch Run, accelerating information is delivered as a Hint, while risks that should not interrupt active work are delivered as a Concern.

Configuration

Advisor settings are stored in ~/.pi/agent/advisor.json:

{
  "model": "openai-codex/gpt-5.6-sol",
  "thinking": "high"
}

The Advisor Transcript currently lives in memory for the Pi session and is not persisted after the session closes.

Acknowledgments

Inspired by pi-btw, oh-my-pi, and pi-omplike-advisor.